diff options
-rw-r--r-- | rules.js | 77 |
1 files changed, 32 insertions, 45 deletions
@@ -1,40 +1,33 @@ "use strict" -// RULE QUESTIONS: subsidy contract - if major fortress enemy controlled? - ignore contract or waste card? - -/* TODO - -check inactive prompts -check push_undo/clear_undo for political phase and political changes +// TODO: subsidy contracts +// TODO: remove hussars when retreating across them +// TODO: austria + pragmatic action stage intermixing on flanders +// TODO: austria + pragmatic stack if both agree -add undo steps and pauses for saxony neutral return pieces +/* -show who controls which power in player list +OPTIMIZE: fewer/smarter/smaller lists, smarter power control checks +OPTIMIZE: range checks instead of set checks -austria/pragmatic move order on flanders (start with pragmatic) -only stack if agree (undo/move to previous space) +POLISH: check inactive prompts +POLISH: check push_undo/clear_undo for political phase and political changes +POLISH: add undo steps and pauses for saxony neutral return pieces -winter scoring +UI: show who controls which power in player list +UI: show TC modifiers +UI: show subsidy contracts when are subsidies given? +when are subsidies created? example france subsidy to prussia at france's stage? at prussia's stage? -tc subsidies - minor when major fortress enemy occupied -subsidy contracts -imperial election + what happens to subsidy when minor's fortress is enemy occupied */ -// TODO: austria/pragmatic action stage - show both sides cards and interleave movement on flanders map -// PLAN: move all austria on bohemia first, then alternate pragmatic and austria activations on flanders map -// TODO: confirm mixed stack creation on flanders map (force "undo" to previous location if denied?) - -// TODO: TC subsidies -// TODO: subsidy markers? - const R_LOUIS_XV = "Louis XV" const R_FREDERICK = "Frederick" const R_MARIA_THERESA = "Maria Theresa" @@ -1181,6 +1174,9 @@ function end_action_stage() { if (check_instant_victory()) return + if (game.power === P_PRUSSIA) + game.flags &= ~F_PRUSSIA_NEUTRAL + if (game.power === P_PRUSSIA && has_prussia_conquered_silesia()) { game.state = "offer_peace" return @@ -1627,8 +1623,6 @@ function resume_supply() { goto_supply_suffer() else end_supply() - // TODO: pause - // game.state = "supply_done" } function goto_supply_hussars() { @@ -2252,7 +2246,7 @@ function search_force_march(p, came_from, start) { return seen } -// TODO: choose not-shortest path to capture hussars during force march? +// WONTFIX: choose not-shortest path to capture hussars during force march? states.force_march = { inactive: "move", prompt() { @@ -2898,8 +2892,6 @@ function next_combat() { if (game.combat.length > 0) game.state = "combat" else - // TODO: a bit abrupt, but saves time if - // game.state = "combat_done" goto_retroactive_conquest() } @@ -2918,18 +2910,6 @@ states.combat = { }, } -// TODO: unused for now -states.combat_done = { - inactive: "attack", - prompt() { - prompt("Combat done.") - view.actions.end_combat = 1 - }, - end_combat() { - goto_retroactive_conquest() - }, -} - states.combat_target = { inactive: "attack", prompt() { @@ -4052,11 +4032,13 @@ function goto_mannheim_to_french_control() { next_execute_political_card() } -function goto_pragmatic_general_to_england() { - throw "TODO" +function goto_france_minus_tc_this_turn() { + log("France -1 TC this turn.") + game.flags |= F_WAR_OF_JENKINS_EAR + next_execute_political_card() } -function goto_france_minus_tc_this_turn() { +function goto_pragmatic_general_to_england() { throw "TODO" } @@ -4504,20 +4486,25 @@ function goto_annex_silesia() { game.flags |= F_PRUSSIA_NEUTRAL // remove all austrian markers in prussia - // set aside half prussian markers in prussia - let n = 0 for (let s of all_prussian_and_silesian_fortresses) { let pow = map_get(game.victory, s, -1) if (pow === P_AUSTRIA) { map_delete(game.victory, s) } + } + log("Removed all Austrian victory markers in Prussia.") + + // set aside half prussian markers in prussia + let n = 0 + for (let s of all_core_austria_fortresses) { + let pow = map_get(game.victory, s, -1) if (pow === P_PRUSSIA) { map_delete(game.victory, s) ++n } } + log("Removed " + n + " Prussian victory markers in Austria.") n = (n + 1) >> 1 - log("Removed all Austrian victory markers.") log("Set aside " + n + " Prussian victory markers.") game.vp[SET_ASIDE_PRUSSIA] = n |