diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-02-19 12:15:20 -0500 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-02-19 12:15:20 -0500 |
commit | 7f0d7c4203b263c28a91fed4fca8ca8d79e73101 (patch) | |
tree | 3cdf42ecf50541808e4f1caf31a3bda01fe573a3 /rules.js | |
parent | cfe74b0842ddc33e281570e9c186868431529a36 (diff) | |
download | vijayanagara-7f0d7c4203b263c28a91fed4fca8ca8d79e73101.tar.gz |
Event 25.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 50 |
1 files changed, 47 insertions, 3 deletions
@@ -258,7 +258,7 @@ exports.setup = function (seed, scenario, _options) { } function setup_deck() { - game.deck = [ 22, 21, 20, 35, 29, 15, 17, 16, 18, 5, 3, 36, 10, 37, 11, 2, 10, 1, 12, 13, 14 ] + game.deck = [ 22, 21, 20, 25, 29, 15, 17, 16, 18, 5, 3, 36, 10, 37, 11, 2, 10, 1, 12, 13, 14 ] } function setup_standard() { @@ -4117,6 +4117,40 @@ function vm_free_rally() { goto_rally_space() } +// VM: EVENT_25 + +function vm_event_25() { + game.state = "event_25" +} + +states.event_25 = { + prompt() { + + if (game.current === BK) { + event_prompt("Trade or gain 3 Resources.") + view.actions.trade = 1 + } else if (game.current === VE) { + event_prompt("Tax or gain 3 Resources.") + view.actions.tax = 1 + } + + gen_action_resources(game.current) + }, + resources(f) { + add_resources(game.current, 3) + log_resources(game.current, 3) + vm_next() + }, + tax() { + goto_tax() + }, + trade() { + goto_trade() + } +} + + + // === CONST === // Factions @@ -4722,13 +4756,23 @@ CODE[24 * 2 + 1] = [ // EVENT 25 CODE[25 * 2 + 0] = [ - [ vm_log, "NOT IMPLEMENTED" ], + [ vm_current, REBEL_FACTIONS ], + [ vm_event_25 ], [ vm_return ], ] // SHADED 25 CODE[25 * 2 + 1] = [ - [ vm_log, "NOT IMPLEMENTED" ], + [ vm_current, DS ], + [ vm_prompt, "Place up to 2 Troops in 3 Provinces adjance to Goa or Warangal." ], + [ vm_space, true, 0, 3, (s)=>(is_adjacent_to_city(C_GOA, s) || is_adjacent_to_city(C_WARANGAL, s)) ], + [ vm_mark_space ], + [ vm_place, false, 1, 2, DS, TROOPS ], + [ vm_endspace ], + [ vm_prompt, "Govern in one of the selected Province." ], + [ vm_space, true, 1, 1, (s)=>(can_govern_in_space(s) && set_has(game.vm.m, s)) ], + [ vm_free_govern ], + [ vm_endspace ], [ vm_return ], ] |