diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-29 20:29:46 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-29 20:29:46 +0100 |
commit | d0aba7c1b882b43e9c4687b00ddefbc4e86e7634 (patch) | |
tree | fb376d7f8de61865f32abebceb01aca0ead9ba5a /rules.js | |
parent | c55bedbaef91557377d1dad3c642a3f9406a5876 (diff) | |
download | 1989-dawn-of-freedom-d0aba7c1b882b43e9c4687b00ddefbc4e86e7634.tar.gz |
Fix the Crowd Turns infl
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -1070,11 +1070,11 @@ states.the_crowd_turns_against_ceausescu_prep = { game.temp = game.ceausescu_cards.filter(card => card && card >=25 && card <= 30).length
log(`Drew ${pluralize(game.temp, 'Rally in the Square')}.`)
game.vm_available_ops = game.temp * 3
- game.state = 'the_crowd_turns_against_ceausescu'
+ game.state = 'vm_the_crowd_turns_against_ceausescu'
}
}
-states.the_crowd_turns_against_ceausescu = {
+states.vm_the_crowd_turns_against_ceausescu = {
get inactive() {
return `resolve ${cards[54].name}.`
},
@@ -1087,6 +1087,7 @@ states.the_crowd_turns_against_ceausescu = { push_undo()
game.ceausescu_cards = []
valid_spaces_infl()
+ game.valid_spaces.filter(space => spaces[space].country === 'Romania')
game.state = 'the_crowd_turns_against_ceausescu_infl' /* Send this to add_infl. Add check at end of add_infl similar to valid_spaces*/
},
support_check() {
@@ -2558,7 +2559,9 @@ function valid_spaces_infl() { for (let adj_space_id of adjacent_spaces) {
//console.log('adj_space_id', adj_space_id)
if (adj_space_id) {
- //console.log('checking adjacent space', spaces[adj_space_id].name_unique)
+ if (space.country === 'Romania') {
+ console.log('checking adjacent space', spaces[adj_space_id].name_unique)
+ }
const adj_piece = spaces[adj_space_id];
//console.log('adjacent piece name', adj_piece.name_unique)
@@ -2575,7 +2578,9 @@ function valid_spaces_infl() { // Otherwise, only add the adjacent space if the available_ops >= 2 or the space is not controlled by the opponent
if (ops >= 2 || !opponent_control) {
- // console.log('space added normally')
+ if (space.country === 'Romania') {
+ console.log('space added normally')
+ }
valid_spaces_set.add(adj_piece.space_id)
}
}
@@ -2692,7 +2697,10 @@ function check_opp_control(space_id) { console.log('in check opp control, space', spaces[space_id].name_unique)
}
if (game.active === DEM && ((game.comInfl[space_id] - game.demInfl[space_id]) >= spaces[space_id].stability)) {
- return true;
+ if (spaces[space_id].country === 'Romania') {
+ console.log('control true')
+ }
+ return true;
} else if (game.active === COM && ((game.demInfl[space_id] - game.comInfl[space_id]) >= spaces[space_id].stability)) {
//console.log('true')
return true;
|