summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-10-26 09:47:03 +0100
committeriainp5 <iain.pearce.ip@gmail.com>2024-10-26 09:47:03 +0100
commit1bfe93eea7faffbe59af0b5c2c0f6aa6889527e4 (patch)
tree398f95e119baae26d2f6fd4acc10af96daa6625d /rules.js
parenta651d28999accf0c18476b322a47ea5ebf031aef (diff)
parent99a6ff8112bbc47d6c2825c36328aa40c5c99384 (diff)
download1989-dawn-of-freedom-1bfe93eea7faffbe59af0b5c2c0f6aa6889527e4.tar.gz
Merge branch 'work-in-progress' of https://github.com/iainp5/1989-Dawn-of-Freedom into work-in-progress
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js74
1 files changed, 36 insertions, 38 deletions
diff --git a/rules.js b/rules.js
index a508d04..a82a641 100644
--- a/rules.js
+++ b/rules.js
@@ -192,7 +192,8 @@ exports.view = function(state, player) {
}
if (game.is_pwr_struggle) {
- view.strategy_discard = game.power_struggle_discard
+ view.power_struggle_discard = game.power_struggle_discard
+ view.played_power_card = game.played_power_card
} else {
view.strategy_discard = game.strategy_discard
}
@@ -268,18 +269,13 @@ exports.view = function(state, player) {
// === ACTIONS ===========
function gen_action(action, argument) {
-//console.log('gen_action called with ', action, ' and ', argument)
if (argument === undefined) {
- //console.log('argument undefined')
view.actions[action] = 1
} else {
- if (!(action in view.actions)) {
- //console.log('push argument')
+ if (!(action in view.actions))
view.actions[action] = []
- }
view.actions[action].push(argument)
}
- //console.log('view.actions: ', view.actions, 'view.actions[action]: ', view.actions[action])
}
function gen_action_space(space){
@@ -9015,6 +9011,7 @@ states.vm_support_falters = {
/* =================== EVENTS ================================ */
// #region GENERATED EVENT CODE
+
const CODE = []
CODE[1] = [ // Legacy of Martial Law*
@@ -9877,43 +9874,44 @@ CODE[110] = [ // Malta Summit*
[ vm_remove_opp_infl, 5 ],
[ vm_return ],
]
-// #endregion
-
-// ============= TIANANMEN SQUARE TRACK AWARDS ====================
-CODE[203] = [//Tiananmen Square space 3 award
- [vm_tst_3],
- [vm_return]
-]
-CODE[204] = [//Tiananmen Square space 4 award
- [vm_valid_spaces_opponent],
- [vm_tst_4],
- [vm_return]
+CODE[203] = [ // Tiananmen Square space 3 award
+ [ vm_tst_3 ],
+ [ vm_return ],
]
-CODE[206] = [//Tiananmen Square space 6
- [vm_valid_spaces_sc],
- [vm_tst_6],
- [vm_return]
+
+CODE[204] = [ // Tiananmen Square space 4 award
+ [ vm_valid_spaces_opponent ],
+ [ vm_tst_4 ],
+ [ vm_return ],
]
-CODE[208] = [//Tiananmen Square space 8 event
- [vm_tst_8],
- [vm_return]
+
+CODE[206] = [ // Tiananmen Square space 6
+ [ vm_valid_spaces_sc ],
+ [ vm_tst_6 ],
+ [ vm_return ],
]
-// ============= POWER STRUGGLE WILDCARDS =========================
+CODE[208] = [ // Tiananmen Square space 8 event
+ [ vm_tst_8 ],
+ [ vm_return ],
+]
-CODE[349] = [//Scare Tactics
- [vm_scare_tactics],
- [vm_valid_spaces_country_opp],
- [vm_prompt, ()=>` from ${country_name(game.vm_active_country)}`],
- [vm_remove_opp_infl, 1],
- [vm_return]
+CODE[349] = [ // Scare Tactics
+ [ vm_scare_tactics ],
+ [ vm_valid_spaces_country_opp ],
+ [ vm_prompt, ()=>` from ${country_name(game.vm_active_country)}` ],
+ [ vm_remove_opp_infl, 1 ],
+ [ vm_return ],
]
-CODE[350] = [//Support Surges
- [vm_support_surges],
- [vm_return]
+
+CODE[350] = [ // Support Surges
+ [ vm_support_surges ],
+ [ vm_return ],
]
-CODE[351] = [//Support Falters
- [vm_support_falters],
- [vm_return]
+
+CODE[351] = [ // Support Falters
+ [ vm_support_falters ],
+ [ vm_return ],
]
+// #endregion