Add choice-based events with a resolution modal
Standard/kaos events can now present 2 options instead of a fixed effect, pausing new event triggers until the player answers. Adds 4 choice events as a first batch; resources keep accruing while a choice is pending. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import './style.css';
|
||||
import { createState, tick, buyUpgrade, visitLocation, saveState, loadState, clearSave } from './engine.ts';
|
||||
import { createState, tick, buyUpgrade, visitLocation, resolveEventChoice, saveState, loadState, clearSave } from './engine.ts';
|
||||
import { initUI, renderState } from './ui.ts';
|
||||
import { initMap, updateMap } from './map.ts';
|
||||
|
||||
@@ -22,7 +22,8 @@ function start(): void {
|
||||
visitCooldowns = new Map();
|
||||
document.getElementById('overlay')!.classList.remove('visible');
|
||||
renderState(state);
|
||||
}
|
||||
},
|
||||
(index) => { state = resolveEventChoice(state, index); renderState(state); saveState(state); }
|
||||
);
|
||||
|
||||
initMap('map', (locationId) => {
|
||||
|
||||
Reference in New Issue
Block a user