summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js34
1 files changed, 5 insertions, 29 deletions
diff --git a/rules.js b/rules.js
index a9fa127..7f51d2a 100644
--- a/rules.js
+++ b/rules.js
@@ -4610,37 +4610,14 @@ function vm_valid_spaces_country_opp () {
}
function vm_valid_spaces_country_sc () {
- let valid_spaces = []
- let country = ''
+ let active_country
if (vm_operand(1)) {
- country = vm_operand(1) }
+ active_country = vm_operand(1) }
else {
- country = game.vm_active_country
- }
- for (let space of spaces) {
- if (!space) continue
- if (game.active === DEM) {
- if (space.country === country && game.comInfl[space.space_id] >0) {
- valid_spaces.push(space.space_id);
- }
- } else {
- if (space.country === country && game.demInfl[space.space_id] >0) {
- //Check Solidarity Legalised
- if (game.persistent_events.includes(2) && space.space_id === S_GDANSK) {continue}
-
- //Check Civic Forum
- if (game.persistent_events.includes(90) && space.space_id === S_CHARLES_UNIVERSITY) {continue}
-
- //Check We are the People
- if (game.persistent_events.includes(48) && space.space_id === S_LEIPZIG) {continue}
- valid_spaces.push(space.space_id);
-
- //Check Foreign Currency Debt Burden
- if (game.persistent_events.includes(49) && space.country === game.foreign_currency_debt_burden) {continue}
- }
- }
+ active_country = game.vm_active_country
}
- game.valid_spaces = valid_spaces
+ valid_spaces_sc()
+ game.valid_spaces = game.valid_spaces.filter( s => spaces[s].country === active_country)
vm_next()
}
@@ -5870,7 +5847,6 @@ function vm_yakovlev_counsels_gorbachev() {
function vm_permanently_remove () {
// Check if the event is being played as the result of another card, e.g. Dash for the West, is a card which should be removed, and which hasn't already been removed!
- console.log('game.vm_event', game.vm_event)
if (game.vm_event !== 0 && cards[game.vm_event].remove === 1 && !game.strategy_removed.includes(game.vm_event)) {
permanently_remove(game.vm_event)
}