Refine NPC interactions and runtime item generation

This commit is contained in:
2026-04-05 17:13:07 +08:00
parent c49c64896a
commit 89cecda7da
58 changed files with 4199 additions and 1562 deletions

View File

@@ -27,7 +27,7 @@ function getNpcEncounterKey(encounter: Encounter) {
}
function getResolvedNpcState(state: GameState, encounter: Encounter) {
return state.npcStates[getNpcEncounterKey(encounter)] ?? buildInitialNpcState(encounter, state.worldType);
return state.npcStates[getNpcEncounterKey(encounter)] ?? buildInitialNpcState(encounter, state.worldType, state);
}
function shouldAutoStartBattleForEncounter(state: GameState, encounter: Encounter) {