diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-04-02 14:12:57 -0400 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-04-02 14:12:57 -0400 |
commit | 1c8a3c93b867a60a6760b7988fd537a0285b3048 (patch) | |
tree | 4c6fc56c8d56202c5728070dbcd46d92e11bca36 | |
parent | d01adec15a2b90c33b5aecf62af858732910ff51 (diff) | |
download | vijayanagara-1c8a3c93b867a60a6760b7988fd537a0285b3048.tar.gz |
Fuzzing summaries
-rw-r--r-- | events.txt | 3 | ||||
-rw-r--r-- | rules.js | 11 |
2 files changed, 13 insertions, 1 deletions
@@ -685,6 +685,9 @@ EVENT 31 piece 1 (is_piece_in_event_space(p) && is_enemy_unit(p)) remove endpiece + endspace + prompt "Free Attack in selected Province." + space_opt 1 (s === game.vm.m[0] && can_attack_in_space(s)) free_attack endspace @@ -960,6 +960,8 @@ function can_select_cmd_space(cost) { function end_command() { if (game.summary && game.summary.length > 0) { pop_summary() + } else if (game.summary) { + game.summary = null } log_br() game.cmd = null @@ -3799,8 +3801,10 @@ function log_space(s, action) { } function push_summary() { - if (game.summary) + if (game.summary) { + console.log("SUMMARY ", game.summary) throw "TOO MANY SUMMARIES" + } game.summary = [] } @@ -5706,6 +5710,8 @@ states.shaded_29 = { if (game.cmd.count < 3) { log(`${faction_name[game.current]} spent ${3-game.cmd.count} Resources.`) upop_summary() + } else { + game.summary = null } vm_next() } @@ -6627,6 +6633,9 @@ CODE[31 * 2 + 0] = [ [ vm_piece, false, 1, 1, (p,s)=>(is_piece_in_event_space(p) && is_enemy_unit(p)) ], [ vm_remove ], [ vm_endpiece ], + [ vm_endspace ], + [ vm_prompt, "Free Attack in selected Province." ], + [ vm_space, true, 0, 1, (s)=>(s === game.vm.m[0] && can_attack_in_space(s)) ], [ vm_free_attack ], [ vm_endspace ], [ vm_return ], |