diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-29 20:18:41 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-29 20:18:41 +0100 |
commit | 8c603116af540895e77632e834a877a38c7f4d99 (patch) | |
tree | 16e3145cdb16af1d0a1560dd4f610b9b0c205393 | |
parent | a06a62c75015746c1fd866f927ac78487bce2050 (diff) | |
download | 1989-dawn-of-freedom-8c603116af540895e77632e834a877a38c7f4d99.tar.gz |
Debugging Crowd Turns infl
-rw-r--r-- | rules.js | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1086,7 +1086,7 @@ states.the_crowd_turns_against_ceausescu = { influence() {
push_undo()
game.ceausescu_cards = []
- valid_spaces_infl()
+ valid_spaces_infl_ceausescu()
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() {
@@ -2539,12 +2539,17 @@ function valid_spaces_infl() { for (let i = 1; i < game.demInfl.length; i++) {
//piece = game.pieces[i]
space = spaces[i]
- // console.log('checking piece:', space.name_unique)
+
let player_influence = game.active === COM ? game.comInfl[i] : game.demInfl[i];
-
+ if (space.country === 'Romania') {
+ console.log('checking piece:', space.name_unique, 'game.active', game.active, 'player infl', player_influence)
+ }
+
// If the piece has the player's influence, add it and its adjacent spaces to the set
if (player_influence > 0) {
- // console.log(space.name_unique, 'added to set')
+ if (space.country === 'Romania') {
+ console.log(space.name_unique, 'added to set')
+ }
valid_spaces_set.add(space.space_id);
// Check adjacency information
@@ -4363,7 +4368,7 @@ function vm_do_add_infl(space) { // Check Genscher
if (game.persistent_events['genscher'] && game.active === DEM && spaces[clicked_space].country === 'East_Germany') {
game.vm_available_ops--
- } else if (check_control(clicked_space)) {
+ } else if (check_opp_control(clicked_space)) {
game.vm_available_ops -= 2
//Check if Austria Hungary Border Reopened was used to place last SP in a controlled space in East Germany. If so, game.vm_available_op will be negative
if (game.vm_available_ops < 0) {
|