- {{ general.leadership }}
+ {{ calcInjury('leadership', general) }}
+{{ general.lbonus }}
@@ -33,7 +33,7 @@
- {{ general.strength }}
+ {{ calcInjury('strength', general) }}
@@ -41,7 +41,7 @@
- {{ general.intel }}
+ {{ calcInjury('intel', general) }}
@@ -91,6 +91,8 @@ import { unwrap } from "@/util/unwrap";
import type { GameConstStore } from "@/GameConstStore";
import { formatGeneralTypeCall } from "@/utilGame/formatGeneralTypeCall";
import { formatConnectScore } from "@/utilGame/formatConnectScore";
+import { calcInjury } from "@/utilGame/calcInjury";
+
const gameConstStore = unwrap(inject
[>("gameConstStore"));
const props = defineProps<{
general: GeneralListItemP0;
diff --git a/hwe/ts/utilGame/calcInjury.ts b/hwe/ts/utilGame/calcInjury.ts
new file mode 100644
index 00000000..e3f5c29c
--- /dev/null
+++ b/hwe/ts/utilGame/calcInjury.ts
@@ -0,0 +1,6 @@
+import type { GeneralListItemP0 } from "@/defs/API/Nation";
+
+export function calcInjury(statKey: 'leadership'|'strength'|'intel', general: GeneralListItemP0){
+ const baseStat = general[statKey];
+ return Math.round(baseStat * (100 -general.injury) / 100);
+}
\ No newline at end of file
]