summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-11-03 08:48:19 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-03 08:48:19 +0000
commitefe638d90fbfc954dddadb2ff34598f0f3e08c73 (patch)
treeedf8efc6f41349c2545073994289d37d2d7ac056
parent3b1f1fcecea5f891131ae891299a5884fc12db0c (diff)
download1989-dawn-of-freedom-efe638d90fbfc954dddadb2ff34598f0f3e08c73.tar.gz
Verbose logs
-rw-r--r--rules.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/rules.js b/rules.js
index 82a98a3..af568aa 100644
--- a/rules.js
+++ b/rules.js
@@ -811,17 +811,14 @@ states.add_influence = {
},
space(space) {
add_infl(space, 'available_ops')
- add_infl(space, 'available_ops')
},
end_round() {
push_undo()
do_log_summary()
- do_log_summary()
end_round()
},
done() {
do_log_summary()
- do_log_summary()
reset_austria_hungary_border_reopened()
game.state = 'resolve_opponent_event'
}
@@ -918,7 +915,6 @@ states.tst_goddess_draw = {
draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length, game.communist_hand.length +1)
}
end_goddess()
- end_goddess()
}
}
@@ -1825,13 +1821,13 @@ states.honecker ={
log(`Communist chooses to take an extra Action Round due to C${C_HONECKER}`)
log_h2(`Action Round ${game.round}`)
game.round_player = COM
- game.persistent_events = game.persistent_events.filter(n => n !== C_HONECKER)
+ permanently_remove(C_HONECKER)
game.state = 'choose_card'
},
pass() {
+ push_undo()
log(`C${C_HONECKER}: passed`)
- game.persistent_events = game.persistent_events.filter(n => n !== C_HONECKER)
- //end_round()
+ permanently_remove(C_HONECKER)
game.state = 'end_round'
}
}
@@ -2868,6 +2864,7 @@ function add_to_persistent_events(card) {
}
function permanently_remove(card) {
+ game.persistent_events = game.persistent_events.filter( c => c !== card)
remove_from_discard(card)
if (!game.strategy_removed.includes(card)) {
game.strategy_removed.push(card)
@@ -3055,7 +3052,7 @@ function event_is_playable(card) {
function get_card_ops(card) {
let ops = cards[card].ops
if (game.persistent_events.includes(C_PERESTROIKA) && game.active === COM) {
- if(game.state === 'choose_card' || game.state === 'stasi_play_card') {
+ if(game.state === 'choose_card' || game.state === 'stasi_play_card' || game.state === 'general_strike') {
log(`+1 op from C${C_PERESTROIKA}`)
}
ops ++
@@ -3092,7 +3089,7 @@ function get_card_ops(card) {
}
if (game.active === COM && game.prudence && game.prudence.COM < 0) {
- if(game.state === 'choose_card') {
+ if(game.state === 'choose_card' || game.state === 'general_strike') {
if (ops > 2) {
log(`${pluralize(game.prudence.COM,'op')} from C${C_PRUDENCE}`)
} else if (ops > 1) {
@@ -3234,6 +3231,7 @@ function end_round() {
//console.log('cards in game', card_check)
if (game.turn <= 3) {
if (card_check.length !== 40) {
+ console.log('cards in game', card_check)
throw new Error(`Wrong number of cards: ${card_check.length}`)
}
} else if (game.turn <=7) {
@@ -4877,11 +4875,13 @@ function vm_legacy_of_1968() {
function vm_li_peng() {
add_to_persistent_events(C_LI_PENG)
+ logi(`+1 modifier to all Communist Tiananmen Square Track attempts for the rest of the game`)
vm_next()
}
function vm_ligachev() {
add_to_persistent_events(C_LIGACHEV)
+ logi(`-3VPs if the Democrat does not play C${C_GORBACHEV_CHARMS_THE_WEST} next Action Round`)
vm_next()
}
@@ -4933,11 +4933,13 @@ function vm_normalisation() {
function vm_peasant_parties_revolt() {
add_to_persistent_events(C_PEASANT_PARTIES_REVOLT)
+ logi(`In the next Power Stuggle, if the Democrat controls a Farmer space draw 1 Power Struggle card at random from the Communist hand`)
vm_next()
}
function vm_perestroika() {
add_to_persistent_events(C_PERESTROIKA)
+ logi(`+1 Ops value for cards played by the Communist for the rest of this turn`)
vm_next()
}
@@ -4982,10 +4984,10 @@ function vm_prudence() {
}
if (game.active === DEM) {
game.prudence.COM --
- log(`${game.prudence.COM} to Communist ops this turn`)
+ log(`${game.prudence.COM} to Communist Ops this turn`)
} else {
game.prudence.DEM --
- log(`${game.prudence.DEM} to Democrat ops this turn`)}
+ log(`${game.prudence.DEM} to Democrat Ops this turn`)}
vm_next()
}