diff options
-rw-r--r-- | events.txt | 16 | ||||
-rw-r--r-- | rules.js | 31 |
2 files changed, 43 insertions, 4 deletions
@@ -79,10 +79,22 @@ SHADED 7 log "NOT IMPLEMENTED" EVENT 8 - log "NOT IMPLEMENTED" + current REBEL_FACTIONS + prompt `In each Province, replace a Delhi Sultanate Unit with a ${PIECE_FACTION_TYPE_NAME[game.current][ELITE]}.` + space_opt all (is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && has_ds_unit(s) && can_place_piece(s, game.current, ELITE) + piece 1 is_ds_unit(p) && is_piece_in_event_space(p) + remove + auto_place (game.current) ELITE + endpiece + endspace SHADED 8 - log "NOT IMPLEMENTED" + current DS + prompt `In each Province, free Govern and then add a Troop.` + space_opt all (is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && can_govern_in_space(s) + free_govern + place_opt 1 DS TROOPS + endspace EVENT 9 current VE @@ -2506,6 +2506,10 @@ function has_qasbah(s) { return has_piece(s, DS, DISC) } +function has_ds_unit(s) { + return has_piece(s, DS, ELITE) || has_piece(s, DS, TROOPS) +} + function is_adjacent(a, b) { return set_has(SPACES[a].adjacent, b) } @@ -2530,6 +2534,10 @@ function is_qasbah(p) { return piece_name(p) === "Qasbah" } +function is_piece_in_event_space(p) { + return piece_space(p) === game.vm.s +} + /* EVENT SPECIFIC */ function has_majority_goa() { @@ -3852,6 +3860,13 @@ function vm_free_compel() { goto_compel_space() } +// VM: GOVERN + +function vm_free_govern() { + init_free_command("Govern", game.vm.s) + goto_govern_space() +} + // VM: RALLY function vm_free_rally() { @@ -4025,13 +4040,25 @@ CODE[7 * 2 + 1] = [ // EVENT 8 CODE[8 * 2 + 0] = [ - [ vm_log, "NOT IMPLEMENTED" ], + [ vm_current, REBEL_FACTIONS ], + [ vm_prompt, ()=>`In each Province, replace a Delhi Sultanate Unit with a ${PIECE_FACTION_TYPE_NAME[game.current][ELITE]}.` ], + [ vm_space, true, 0, 999, (s)=>(is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && has_ds_unit(s) && can_place_piece(s, game.current, ELITE) ], + [ vm_piece, false, 1, 1, (p,s)=>is_ds_unit(p) && is_piece_in_event_space(p) ], + [ vm_remove ], + [ vm_auto_place, false, 0, false, ()=>(game.current), ELITE ], + [ vm_endpiece ], + [ vm_endspace ], [ vm_return ], ] // SHADED 8 CODE[8 * 2 + 1] = [ - [ vm_log, "NOT IMPLEMENTED" ], + [ vm_current, DS ], + [ vm_prompt, ()=>`In each Province, free Govern and then add a Troop.` ], + [ vm_space, true, 0, 999, (s)=>(is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && can_govern_in_space(s) ], + [ vm_free_govern ], + [ vm_place, false, 1, 1, DS, TROOPS ], + [ vm_endspace ], [ vm_return ], ] |