summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorJoël Simoneau <simoneaujoel@gmail.com>2025-02-20 15:00:13 -0500
committerJoël Simoneau <simoneaujoel@gmail.com>2025-02-20 15:00:13 -0500
commited67583bee1b1a3fa91b0e8dfe73bad83bcbd025 (patch)
tree9fa83e7075bd4f0fc2fe1ef860e94d7b0b3ea5ca /rules.js
parent55fff141cd83aa37b35519946034016af78f0d82 (diff)
downloadvijayanagara-ed67583bee1b1a3fa91b0e8dfe73bad83bcbd025.tar.gz
Event 4 - shaded
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js30
1 files changed, 25 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index d11441a..6900186 100644
--- a/rules.js
+++ b/rules.js
@@ -266,7 +266,7 @@ exports.setup = function (seed, scenario, _options) {
}
function setup_deck() {
- game.deck = [ 22, 21, 2, 1, 29, 15, 17, 16, 18, 5, 3, 36, 10, 37, 11, 2, 10, 1, 12, 13, 14 ]
+ game.deck = [ 22, 21, 4, 1, 29, 15, 17, 16, 18, 5, 3, 36, 10, 37, 11, 2, 10, 1, 12, 13, 14 ]
}
function setup_standard() {
@@ -1430,8 +1430,9 @@ function can_govern() {
}
function can_govern_in_space(s) {
+ let is_event_4 = (game.vm && game.vm.fp === 9)
let is_space = (is_tributary(s) || s === S_DELHI || s === S_MOUNTAIN_PASSES || s === S_PUNJAB || is_faction_control(s, DS))
- if (!is_space)
+ if (!is_event_4 && !is_space)
return false
if (has_piece(AVAILABLE, DS, ELITE))
@@ -1464,7 +1465,10 @@ function goto_govern_space() {
states.govern = {
prompt() {
- view.prompt = "Govern: Select a Tributary, Controlled, Mongol Invader region or Delhi."
+ if (game.vm && game.vm.fp === 9)
+ view.prompt = "Govern: Ignore Locations requirements."
+ else
+ view.prompt = "Govern: Select a Tributary, Controlled, Mongol Invader region or Delhi."
if (can_select_cmd_space(1) && can_govern())
for (let s = first_space; s <= last_space; ++s)
@@ -4129,6 +4133,19 @@ function vm_free_govern() {
goto_govern_space()
}
+function vm_govern() {
+ game.cmd = {
+ limited: 0,
+ free: 0,
+ spaces: [],
+ pieces: [],
+ where: -1,
+ pass: 1
+ }
+ console.log(game.vm)
+ game.state = "govern"
+}
+
// VM: MARCH
function vm_free_march() {
@@ -4296,13 +4313,16 @@ CODE[3 * 2 + 1] = [
// EVENT 4
CODE[4 * 2 + 0] = [
- [ vm_log, "NOT IMPLEMENTED" ],
+ [ vm_current, REBEL_FACTIONS ],
+ [ vm_prompt, "" ],
[ vm_return ],
]
// SHADED 4
CODE[4 * 2 + 1] = [
- [ vm_log, "NOT IMPLEMENTED" ],
+ [ vm_current, DS ],
+ [ vm_prompt, "Govern, without location requirements." ],
+ [ vm_govern ],
[ vm_return ],
]