fix: 전투 이펙트와 차등 하네스 호환성을 복원한다
Ref 기준의 판정 순서, 난수 소비, 아이템·특기 이펙트와 로그 형식을 맞춘다. 전체 전투 결과와 이벤트·상태·난수 trace를 엄격 비교하고 fixture 및 출병 예약 회귀를 보강한다.
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import { GeneralTriggerCaller } from '@sammo-ts/logic/triggers/general.js';
|
||||
import { CheUisulCityHealTrigger } from '@sammo-ts/logic/triggers/generalTriggers/che_도시치료.js';
|
||||
import { triggerModule as medicalWarTriggerModule } from '@sammo-ts/logic/war/triggers/che_의술.js';
|
||||
import { BaseWarUnitTrigger, WarTriggerCaller } from '@sammo-ts/logic/war/triggers.js';
|
||||
import { che_의술발동, che_의술시도 } from '@sammo-ts/logic/war/triggers/che_의술.js';
|
||||
import type { ItemModule } from './types.js';
|
||||
|
||||
const INFO =
|
||||
'[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 30% 감소, 부상 회복)';
|
||||
|
||||
const ATTEMPT_DEDUP_TYPE: Record<string, number> = {
|
||||
che_의술_상한잡병론: 301,
|
||||
che_의술_정력견혈산: 302,
|
||||
che_의술_청낭서: 302,
|
||||
che_의술_태평청령: 303,
|
||||
};
|
||||
|
||||
export const createMedicalItem = (key: string, rawName: string): ItemModule => ({
|
||||
key,
|
||||
rawName,
|
||||
@@ -18,6 +26,15 @@ export const createMedicalItem = (key: string, rawName: string): ItemModule => (
|
||||
reqSecu: 0,
|
||||
unique: true,
|
||||
getPreTurnExecuteTriggerList: (context) => new GeneralTriggerCaller(new CheUisulCityHealTrigger(context.general)),
|
||||
getBattlePhaseTriggerList: (context) =>
|
||||
context.unit ? medicalWarTriggerModule.createTriggerList(context.unit) : null,
|
||||
getBattlePhaseTriggerList: (context) => {
|
||||
if (!context.unit) {
|
||||
return null;
|
||||
}
|
||||
const attemptRaiseType =
|
||||
BaseWarUnitTrigger.TYPE_ITEM + BaseWarUnitTrigger.TYPE_DEDUP_TYPE_BASE * (ATTEMPT_DEDUP_TYPE[key] ?? 0);
|
||||
return new WarTriggerCaller(
|
||||
new che_의술시도(context.unit, attemptRaiseType),
|
||||
new che_의술발동(context.unit, BaseWarUnitTrigger.TYPE_ITEM)
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user