summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-27 17:07:58 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-30 21:59:25 +0200
commit74d994c18d34befbde226a78db4386a5cf9357c9 (patch)
tree9d8ffce3c8d43d65175b0816c74e3b77ad70a11f /rules.js
parenta22eb4ab7c82d41b44da9d646776a08b87ca636c (diff)
downloadfriedrich-74d994c18d34befbde226a78db4386a5cf9357c9.tar.gz
some combat logging
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/rules.js b/rules.js
index 942a1df..3d9804a 100644
--- a/rules.js
+++ b/rules.js
@@ -2103,7 +2103,7 @@ function end_resolve_combat() {
game.ia_attack = get_space_suit(game.attacker)
if (game.count === 0) {
- log("Tie.")
+ log(">Tie")
next_combat()
} else if (game.count > 0) {
if (get_supreme_commander(game.defender) == GEN_HILDBURGHAUSEN)
@@ -2259,7 +2259,7 @@ function fate_card_bonus(c) {
function play_card(c, sign) {
if (fate_card_zero()) {
- log(POWER_NAME[game.power] + " C" + c + " - " + to_value(c) + " = " + game.count)
+ log(">" + POWER_NAME[game.power] + " C" + c + " - " + to_value(c) + " to " + (sign * game.count))
clear_fate_effect()
return
}
@@ -2269,16 +2269,16 @@ function play_card(c, sign) {
else
game.count += to_value(c) + bonus
if (bonus > 0)
- log(POWER_NAME[game.power] + " C" + c + " + " + bonus + " = " + (game.count))
+ log(">" + POWER_NAME[game.power] + " C" + c + " + " + bonus + " to " + (sign * game.count))
else
- log(POWER_NAME[game.power] + " C" + c + " = " + (game.count))
+ log(">" + POWER_NAME[game.power] + " C" + c + " to " + (sign * game.count))
if (bonus > 0)
clear_fate_effect()
}
function play_reserve(v, sign) {
if (fate_card_zero()) {
- log(POWER_NAME[game.power] + " 0R = " + game.count)
+ log(">" + POWER_NAME[game.power] + " 0R to " + (sign * game.count))
clear_fate_effect()
return
}
@@ -2288,9 +2288,9 @@ function play_reserve(v, sign) {
else
game.count += v
if (bonus > 0)
- log(POWER_NAME[game.power] + " " + (v-bonus) + "R +" + bonus + " = " + (game.count))
+ log(">" + POWER_NAME[game.power] + " " + (v-bonus) + "R +" + bonus + " to " + (sign * game.count))
else
- log(POWER_NAME[game.power] + " " + (v) + "R = " + (game.count))
+ log(">" + POWER_NAME[game.power] + " " + (v) + "R to " + (sign * game.count))
if (bonus > 0)
clear_fate_effect()
}
@@ -2441,7 +2441,7 @@ function goto_retreat() {
}
}
- log("P" + get_supreme_commander(loser) + " lost " + (lost-hits) + " troops")
+ log(">P" + get_supreme_commander(loser) + " lost " + (lost-hits) + " troops")
resume_retreat()
}