summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js50
1 files changed, 47 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index 4e0f149..237bebf 100644
--- a/rules.js
+++ b/rules.js
@@ -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 ],
]