summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js46
1 files changed, 21 insertions, 25 deletions
diff --git a/rules.js b/rules.js
index 3437e77..4c3d701 100644
--- a/rules.js
+++ b/rules.js
@@ -659,7 +659,25 @@ states.play_card = {
}
// Continue with normal logic
- get_events(game.played_card)
+ if (cards[game.played_card].side === 'D') {
+ if (game.active === DEM) view.actions.event = 1
+ if (game.active === COM) view.actions.opp_event = 1
+ } else if (cards[game.played_card].side === 'C') {
+ if (game.active === COM) view.actions.event = 1
+ if (game.active === DEM) view.actions.opp_event = 1
+ } else {
+ view.actions.event = 1
+ }
+ } else {
+ if (cards[game.played_card].side === 'D') {
+ if (game.active === DEM) view.actions.event = 0
+ if (game.active === COM) view.actions.opp_event = 0
+ } else if (cards[game.played_card].side === 'C') {
+ if (game.active === COM) view.actions.event = 0
+ if (game.active === DEM) view.actions.opp_event = 0
+ } else {
+ view.actions.event = 0
+ }
}
gen_action('influence')
@@ -3359,28 +3377,6 @@ function is_auto_resolve(card) {
}
}
-function get_events(card) {
- if (event_is_playable(card)) {
- if (cards[card].side === 'D') {
- if (game.active === DEM) {
- gen_action('event')
- }
- if (game.active === COM) {
- gen_action('opp_event')
- }
- } else if (cards[card].side === 'C') {
- if (game.active === COM) {
- gen_action('event')
- }
- if (game.active === DEM) {
- gen_action('opp_event')
- }
- } else {
- gen_action('event')
- }
- }
-}
-
function event_is_playable(card) {
// Reformer never playable here
if (card === C_REFORMER_REHABILITATED) {
@@ -3540,8 +3536,8 @@ function finish_play_card() {
return
}
}
- // Check if card is opponent card with event that needs to be resolved
+ // Check if card is opponent card with event that needs to be resolved
if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) {
if (
(game.active === DEM && cards[game.played_card].side === 'C') ||
@@ -7377,7 +7373,7 @@ states.vm_nomenklatura_remove = {
states.vm_nomenklatura_add = {
prompt() {
- view.prompt = `Nomenklatura: Place ${pluralize(game.vm_available_ops, 'SP') in any Elite space(s).`
+ view.prompt = `Nomenklatura: Place ${pluralize(game.vm_available_ops, 'SP')} in any Elite space(s).`
for (let space_id of game.valid_spaces) {
gen_action_space(space_id)
}