wip: 바보 젬3플. type 재정의 준비

This commit is contained in:
Hide_D committed 2026-01-05 18:43:09 +00:00
1 parent 27f7b8e894
commit 6bddbc3aa0
7 files changed
+254 -167

No files matched your search

+6 -18
View File
@@ -34,31 +34,19 @@ export const createStatItemModule = (options: StatItemOptions): ItemModule => {
const name = `${options.rawName}(+${options.statValue})`;
const baseInfo = `${statLabel} +${options.statValue}`;
const info = options.extraInfo ? `${baseInfo}<br>${options.extraInfo}` : baseInfo;
function onCalcStat(
_context: GeneralActionContext,
statName: GeneralStatName,
value: number,
_aux?: unknown
): number;
function onCalcStat(
_context: WarActionContext,
statName: WarStatName,
value: number | [number, number],
_aux?: unknown
): number | [number, number];
function onCalcStat(
const onCalcStat = (
_context: GeneralActionContext | WarActionContext,
statName: GeneralStatName | WarStatName,
value: number | [number, number]
): number | [number, number] {
): number | [number, number] => {
if (statName !== options.statName) {
return value;
}
if (Array.isArray(value)) {
return value;
if (typeof value === 'number') {
return value + options.statValue;
}
return value + options.statValue;
}
return value;
};
return {
key: options.key,