diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-05-12 01:12:58 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-24 21:06:18 +0200 |
commit | c0acefc3616e93c0dad36c9e5bdbe4bf77d97ea3 (patch) | |
tree | 48b264fd000824aa6c74ea3662d11b99bb2d5211 | |
parent | f50a03985fe30cc327ab86cc34da9b6e616a449e (diff) | |
download | red-flag-over-paris-c0acefc3616e93c0dad36c9e5bdbe4bf77d97ea3.tar.gz |
Pius IX.
-rw-r--r-- | events.txt | 14 | ||||
-rw-r--r-- | rules.js | 39 |
2 files changed, 39 insertions, 14 deletions
@@ -47,8 +47,7 @@ CARD 5 - Le Figaro endswitch CARD 6 - Général Louis Valentin - # remove_different_up_to 2 (where_present(PARIS)) - asm game.count = 2 + asm game.vm.count = 2 asm game.vm.spaces = where_present(PARIS) if (can_vm_remove()) goto "general_louis_valentin" @@ -105,7 +104,6 @@ CARD 14 - Colonel de Lochner CARD 15 - Jules Favre increase_prussian_collaboration - # TODO BUG HERE? - skipped this place_up_to 1 REPUBLICANS CARD 16 - Hostage Decree @@ -200,8 +198,7 @@ CARD 34 - Charles Delescluze # Neutral Cards CARD 35 - Conciliation - # TODO - improve UX here - prompt is confusing - prompt "Move up to 2 from Public Opinion or Paris to the other." + prompt "Move up to 2 from Public Opinion or Paris." switch ["public_opinion","paris"] case "public_opinion" prompt "Move up to 2 from Public Opinion to Paris." @@ -331,7 +328,12 @@ CARD 49 - Pius IX prompt "Replace in 2 different Political or remove 1 from any space." switch ["replace","remove"] case "replace" - replace_different 2 POLITICAL + asm game.vm.count = 2 + asm game.vm.spaces = POLITICAL.slice() + if (can_vm_replace()) + goto "pius_ix" + endif + endif case "remove" remove 1 ANY endswitch @@ -1835,12 +1835,12 @@ states.objective_card_scoring = { function goto_objective_card_events() { if (!is_commune_control(commune_objective_space())) { log_br() - log("Removed C" + commune_objective_card()) + log("Commune removed C" + commune_objective_card()) game.red_objective = 0 } if (!is_versailles_control(versailles_objective_space())) { log_br() - log("Removed C" + versailles_objective_card()) + log("Versailles removed C" + versailles_objective_card()) game.blue_objective = 0 } resume_objective_card_events() @@ -1877,7 +1877,7 @@ states.objective_card_events = { game.red_fulfilled += 1 game.active = COMMUNE log_br() - log("Commune Played C" + c + ".") + log("Commune played C" + c + ".") goto_play_event(c) } if (c === versailles_objective_card()) { @@ -1885,7 +1885,7 @@ states.objective_card_events = { game.blue_fulfilled += 1 game.active = VERSAILLES log_br() - log("Versailles Played C" + c + ".") + log("Versailles played C" + c + ".") goto_play_event(c) } }, @@ -2725,7 +2725,7 @@ states.general_louis_valentin = { array_remove_item(game.vm.spaces, s) log("Removed from S" + s + ".") remove_piece(p) - if (--game.count === 0 || !can_vm_remove()) + if (--game.vm.count === 0 || !can_vm_remove()) vm_next() }, skip() { @@ -2733,6 +2733,24 @@ states.general_louis_valentin = { }, } +states.pius_ix = { + prompt() { + event_prompt("Replace 1 in 2 different Political spaces.") + for (let s of game.vm.spaces) + if (can_replace_cube(s)) + for_each_enemy_cube(s, gen_action_piece) + }, + piece(p) { + push_undo() + let s = game.pieces[p] + array_remove_item(game.vm.spaces, s) + replace_cube(p) + log("Replaced in S" + s + ".") + if (--game.vm.count === 0 || !can_vm_replace()) + vm_next() + }, +} + function init_karl_marx() { clear_undo() // Draw cards into hand in case a reshuffle is triggered. @@ -3274,7 +3292,7 @@ CODE[5] = [ // Le Figaro ] CODE[6] = [ // Général Louis Valentin - [ vm_asm, ()=>game.count = 2 ], + [ vm_asm, ()=>game.vm.count = 2 ], [ vm_asm, ()=>game.vm.spaces = where_present(PARIS) ], [ vm_if, ()=>(can_vm_remove()) ], [ vm_goto, "general_louis_valentin" ], @@ -3473,7 +3491,7 @@ CODE[34] = [ // Charles Delescluze ] CODE[35] = [ // Conciliation - [ vm_prompt, "Move up to 2 from Public Opinion or Paris to the other." ], + [ vm_prompt, "Move up to 2 from Public Opinion or Paris." ], [ vm_switch, ["public_opinion","paris"] ], [ vm_case, "public_opinion" ], [ vm_prompt, "Move up to 2 from Public Opinion to Paris." ], @@ -3624,7 +3642,12 @@ CODE[49] = [ // Pius IX [ vm_prompt, "Replace in 2 different Political or remove 1 from any space." ], [ vm_switch, ["replace","remove"] ], [ vm_case, "replace" ], - [ vm_replace_different, 2, POLITICAL ], + [ vm_asm, ()=>game.vm.count = 2 ], + [ vm_asm, ()=>game.vm.spaces = POLITICAL.slice() ], + [ vm_if, ()=>(can_vm_replace()) ], + [ vm_goto, "pius_ix" ], + [ vm_endif ], + [ vm_endif ], [ vm_case, "remove" ], [ vm_remove, 1, ANY ], [ vm_endswitch ], |