diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-07-24 23:34:12 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-24 23:34:12 +0200 |
commit | f71897d6fa4e2c9d714167bdcc2c5a6b20a2d55d (patch) | |
tree | f3afb798b025bf21885bbbe9aac82bacedd56fa1 | |
parent | f0357af2ef6c3d4cc35e905bb85865f8f49dc750 (diff) | |
download | time-of-crisis-f71897d6fa4e2c9d714167bdcc2c5a6b20a2d55d.tar.gz |
Cap military emperor legacy loss from pretenders at bonus legacy gained.
Per Errata, cannot lose more than the bonus gained from being emperor.
-rw-r--r-- | rules.js | 25 |
1 files changed, 12 insertions, 13 deletions
@@ -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 |