diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-09-02 01:15:00 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 12:31:29 +0100 |
commit | f78698d6f442ed08337e7d0722fbb83cab769f10 (patch) | |
tree | 6771266926008d5c70e8de65a2386817dba50672 | |
parent | 6dec86f98c6b858971fdc8ec1c57d7ac7666f00e (diff) | |
download | pax-pamir-f78698d6f442ed08337e7d0722fbb83cab769f10.tar.gz |
Log which court spy actions happen in.
-rw-r--r-- | rules.js | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1335,7 +1335,11 @@ states.place_spy = { }, card(c) { push_undo() - logi(`Spy to #${c}.`) + let p = find_card_in_court(c) + if (p !== game.active) + logi(`Spy to #${c} in ${player_names[p]} court.`) + else + logi(`Spy to #${c}.`) game.pieces[game.selected] = c game.used_pieces.push(game.selected) game.selected = -1 @@ -1828,7 +1832,12 @@ states.move = { card(c) { push_undo() let old = game.pieces[game.selected] - logi(`Spy from #${old} to #${c}.`) + let pold = find_card_in_court(old) + let p = find_card_in_court(c) + if (pold !== p) + logi(`Spy from #${old} in ${player_names[pold]} court to #${c} in ${player_names[p]} court.`) + else + logi(`Spy from #${old} to #${c} in ${player_names[p]} court.`) game.pieces[game.selected] = c game.selected = -1 if (--game.count === 0) @@ -2130,7 +2139,8 @@ states.battle = { } else { let p = Math.floor((x - 36) / 10) if (where <= 100) { - logi(`Removed ${piece_owner(x)} spy from #${where}.`) + let pp = find_card_in_court(where) + logi(`Removed ${piece_owner(x)} spy from #${where} in ${player_names[pp]} court.`) if (player_has_safe_house(p)) game.pieces[x] = Safe_House } else { |