summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.css2
-rw-r--r--play.html27
-rw-r--r--play.js11
-rw-r--r--rules.js12
4 files changed, 48 insertions, 4 deletions
diff --git a/play.css b/play.css
index 373904d..c6693d2 100644
--- a/play.css
+++ b/play.css
@@ -18,6 +18,8 @@ header.your_turn { background-color: orange; }
}
#deck_stat {padding-left: 5px; padding-bottom: 5px;}
+#tank {margin-right: 0;}
+
#log { background-color: whitesmoke; }
#log .h1 { font-weight: bold; padding-top:2px; padding-bottom:2px; text-align: center; }
#log .h2 { padding-top:2px; padding-bottom:2px; text-align: center; }
diff --git a/play.html b/play.html
index aa69a76..718ee38 100644
--- a/play.html
+++ b/play.html
@@ -27,7 +27,7 @@
<li data-action="card_event"><span>&#x1f3b4;</span> Event
<li data-action="card_influence"><span>&#x2B50;</span> Place SPs
<li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span>&#x1F6E4;</span> Tiananmen Square Track
+ <li data-action="card_tst"><span><img id = "tank" src="images/tank2.png" style="width:20px; height: 30px; vertical-align: middle;"></span> Tiananmen Square Track
</menu>
<menu id="popup_opp_event" class="popup">
@@ -36,7 +36,7 @@
<li data-action="card_opp_event"><span>&#x1f3b4;</span> Resolve Opponent Event
<li data-action="card_influence"><span>&#x2B50;</span> Place SPs
<li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span>&#x1F6E4;</span> Tiananmen Square Track
+ <li data-action="card_tst"><span><img src="images/tank1.png" style="width:16px; height: 16px; vertical-align: middle;"></span> Tiananmen Square Track
</menu>
<menu id="popup_ceh_check" class="popup">
@@ -49,6 +49,16 @@
<li data-action="card_tst"><span>&#x1F6E4;</span> Tiananmen Square Track
</menu>
+<menu id="popup_tst_7" class="popup">
+ <li class="title">TITLE
+ <li class="separator">
+ <li data-action="card_tst_7"><span>&#x1f3b4;</span> Cancel Opponent Event
+ <li data-action="card_opp_event"><span>&#x1f3b4;</span> Resolve Opponent Event
+ <li data-action="card_influence"><span>&#x2B50;</span> Place SPs
+ <li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
+ <li data-action="card_tst"><span><img src="images/tank1.png" style="width:16px; height: 16px; vertical-align: middle;"></span> Tiananmen Square Track
+</menu>
+
<menu id="popup_tst_8" class="popup">
<li class="title">TITLE
<li class="separator">
@@ -56,7 +66,18 @@
<li data-action="card_event"><span>&#x1f3b4;</span> Event
<li data-action="card_influence"><span>&#x2B50;</span> Place SPs
<li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span>&#x1F6E4;</span> Tiananmen Square Track
+ <li data-action="card_tst"><span><img src="images/tank1.png" style="width:16px; height: 16px; vertical-align: middle;"></span> Tiananmen Square Track
+</menu>
+
+<menu id="popup_tst_7_8" class="popup">
+ <li class="title">TITLE
+ <li class="separator">
+ <li data-action="card_tst_7"><span>&#x1f3b4;</span> Cancel Opponent Event
+ <li data-action="card_opp_event"><span>&#x1f3b4;</span> Resolve Opponent Event
+ <li data-action="card_tst_8"><span>&#x1f3b4;</span> Event and Operations
+ <li data-action="card_influence"><span>&#x2B50;</span> Place SPs
+ <li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
+ <li data-action="card_tst"><span><img src="images/tank1.png" style="width:16px; height: 16px; vertical-align: middle;"></span> Tiananmen Square Track
</menu>
<header>
diff --git a/play.js b/play.js
index 44a7d84..2c4d482 100644
--- a/play.js
+++ b/play.js
@@ -225,7 +225,9 @@ function hide_popup_menu() {
document.getElementById("popup").style.display = "none"
document.getElementById("popup_ceh_check").style.display = "none"
document.getElementById("popup_opp_event").style.display = "none"
+ document.getElementById("popup_tst_7").style.display = "none"
document.getElementById("popup_tst_8").style.display = "none"
+ document.getElementById("popup_tst_7_8").style.display = "none"
}
@@ -268,7 +270,14 @@ function on_click_card(evt) {
evt.stopPropagation();
}
}
- //First check for TST special power
+ //First check for TST special powers
+ else if (is_card_action('card_tst_7', card)) {
+ if (is_card_action('card_tst_8', card)) {
+ show_popup_menu(evt, "popup_tst_7_8", card, cards[card].name)
+ } else {
+ show_popup_menu(evt, "popup_tst_7", card, cards[card].name)
+ }
+ }
else if (is_card_action('card_tst_8', card)) {
show_popup_menu(evt, "popup_tst_8", card, cards[card].name)
}
diff --git a/rules.js b/rules.js
index e03476b..1b07a3d 100644
--- a/rules.js
+++ b/rules.js
@@ -440,6 +440,11 @@ states.choose_card = {
//Check for Tiananmen Square Track awards special abilities
+
+ if ((game.active === DEM && cards[card].side !== 'C' && game.dem_tst_position >= 7 && game.com_tst_position < 7 && !game.tst_7) || (game.active === COM && cards[card].side !== 'D' && game.com_tst_position >= 7 && game.dem_tst_position < 7 && !game.tst_7)){
+ gen_action('card_tst_7', card)
+ }
+
console.log('game.tst_8', game.tst_8)
if ((game.active === DEM && cards[card].side !== 'C' && game.dem_tst_position >= 8 && game.com_tst_position < 8 && !game.tst_8) || (game.active === COM && cards[card].side !== 'D' && game.com_tst_position >= 8 && game.dem_tst_position < 8 && !game.tst_8)){
gen_action('card_tst_8', card)
@@ -595,6 +600,12 @@ states.choose_card = {
game.state='support_check_prep'
valid_spaces_sc()
},
+ card_tst_7() {
+ select_card(card)
+ game.vm_infl_to_do = true
+ game.tst_7 = true
+ game.state = 'resolve_opponent_event'
+ },
card_tst_8(card) { /*Play card for ops and event */
select_card(card)
game.vm_event_to_do = true
@@ -855,6 +866,7 @@ states.resolve_opponent_event = {
}
}
+
states.finish_add_infl = {
inactive: 'add SPs.',
prompt () {