diff options
-rw-r--r-- | play.js | 49 |
1 files changed, 23 insertions, 26 deletions
@@ -260,33 +260,30 @@ function on_click_space(evt) { }
function on_click_card(evt) {
- //console.log('on_click_card')
- if (evt.button === 0) {
- const card = evt.target.my_card;
- console.log('on_click_card_called with card:', card);
- if (is_action('card', card)) {
- console.log('in action card')
- if (send_action('card', card)) {
- evt.stopPropagation();
- }
- }
- //First check for TST special power
- else if (is_card_action('card_tst_8', card)) {
- show_popup_menu(evt, "popup_tst_8", card, cards[card].name)
- }
-
- //Check for Common European Home
- else if (is_card_action('card_ceh', card)) {
- show_popup_menu(evt, "popup_ceh_check", card, cards[card].name)
- } else if (is_card_action('card_opp_event', card)) {
- console.log('in action card_opp_event')
- show_popup_menu(evt, "popup_opp_event", card, cards[card].name)
+ const card = evt.target.my_card;
+ console.log('on_click_card_called with card:', card);
+ if (is_action('card', card)) {
+ console.log('in action card')
+ if (send_action('card', card)) {
+ evt.stopPropagation();
}
- else {
- console.log('in action card_my_event')
- show_popup_menu(evt, "popup", card, cards[card].name)
- }
- }
+ }
+ //First check for TST special power
+ else if (is_card_action('card_tst_8', card)) {
+ show_popup_menu(evt, "popup_tst_8", card, cards[card].name)
+ }
+
+ //Check for Common European Home
+ else if (is_card_action('card_ceh', card)) {
+ show_popup_menu(evt, "popup_ceh_check", card, cards[card].name)
+ } else if (is_card_action('card_opp_event', card)) {
+ console.log('in action card_opp_event')
+ show_popup_menu(evt, "popup_opp_event", card, cards[card].name)
+ }
+ else {
+ console.log('in action card_my_event')
+ show_popup_menu(evt, "popup", card, cards[card].name)
+ }
}
function is_action(action) {
|