summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js25
1 files changed, 12 insertions, 13 deletions
diff --git a/rules.js b/rules.js
index 7db581b..d7d6968 100644
--- a/rules.js
+++ b/rules.js
@@ -4508,11 +4508,6 @@ function award_legacy_summary(p, reason, n) {
}
}
-function award_combat_legacy(p, reason, n) {
- award_legacy(p, reason, n)
- game.combat_legacy += n
-}
-
function goto_combat_no_victory() {
log("Both sides eliminated.")
game.combat.killed = 0
@@ -4542,10 +4537,12 @@ function goto_combat_victory_attacker() {
if (game.combat.type === "barbarians") {
let inflicted = game.combat.dtaken + game.combat.staken
- if (game.emperor === ARMY + game.combat.attacker)
- award_combat_legacy(game.current, "Military Emperor Victory", 4 + inflicted * 2)
- else
- award_combat_legacy(game.current, "Victory", 2 + inflicted)
+ if (game.emperor === ARMY + game.combat.attacker) {
+ award_legacy(game.current, "Military Emperor Victory", 4 + inflicted * 2)
+ game.combat_legacy += 2 + inflicted
+ } else {
+ award_legacy(game.current, "Victory", 2 + inflicted)
+ }
// Surviving Barbarians go home (to active)
let tribe = game.combat.target
@@ -4555,10 +4552,12 @@ function goto_combat_victory_attacker() {
set_barbarian_location(id, BARBARIAN_HOMELAND[tribe])
}
} else {
- if (game.emperor === ARMY + game.combat.attacker)
- award_combat_legacy(game.current, "Military Emperor Victory", 4)
- else
- award_combat_legacy(game.current, "Victory", 2)
+ if (game.emperor === ARMY + game.combat.attacker) {
+ award_legacy(game.current, "Military Emperor Victory", 4)
+ game.combat_legacy += 2
+ } else {
+ award_legacy(game.current, "Victory", 2)
+ }
}
// Defending Romans must retreat into province