summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-27 13:27:15 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commitb145e50811b3869ce3acd3a61e27407efc579926 (patch)
tree2701b14d6de4e7acbbabbab8e67d93a04104ebfa /rules.js
parentf4631652b2bd9b89bb7bc4389f16d51464766471 (diff)
downloadandean-abyss-b145e50811b3869ce3acd3a61e27407efc579926.tar.gz
Don't log Shipment transfer between own faction.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index 62dc30f..0a54d51 100644
--- a/rules.js
+++ b/rules.js
@@ -1839,19 +1839,19 @@ states.remove_pieces = {
// === NEGOTIATION ===
function is_player_govt() {
- return game.active === NAME_GOVT || game.active === NAME_GOVT_AUC
+ return game.current === GOVT || game.active === NAME_GOVT_AUC
}
function is_player_farc() {
- return game.active === NAME_FARC || game.active === NAME_FARC_CARTELS
+ return game.current === FARC || game.active === NAME_FARC_CARTELS
}
function is_player_auc() {
- return game.active === NAME_AUC || game.active === NAME_GOVT_AUC || game.active === NAME_AUC_CARTELS
+ return game.current === AUC || game.active === NAME_GOVT_AUC || game.active === NAME_AUC_CARTELS
}
function is_player_cartels() {
- return game.active === NAME_CARTELS || game.active === NAME_FARC_CARTELS || game.active === NAME_AUC_CARTELS
+ return game.current === CARTELS || game.active === NAME_FARC_CARTELS || game.active === NAME_AUC_CARTELS
}
function action_ask_resources() {
@@ -2120,7 +2120,8 @@ states.transfer_shipment = {
game.transfer.shipment = sh
},
piece(p) {
- log_transfer(`${faction_name[game.current]} gave Shipment to ${piece_faction_name(p)} in S${piece_space(p)}.`)
+ if (game.current !== piece_faction(p))
+ log_transfer(`${faction_name[game.current]} gave Shipment to ${piece_faction_name(p)} in S${piece_space(p)}.`)
place_shipment(game.transfer.shipment, p)
game.transfer.shipment = -1
end_negotiation()