diff options
-rw-r--r-- | rules.js | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -3124,19 +3124,15 @@ states.foederati_general = { barbarian(id) { let tribe = get_barbarian_tribe(id) let from = get_barbarian_location(id) - if (count_legions_in_army(game.count) > count_barbarians_in_army(game.count)) { - if (is_barbarian_inactive(id)) - log("Foederati inactive " + BARBARIAN_NAME[tribe] + " from %" + from + " to %" + game.where + ".") - else - log("Foederati " + BARBARIAN_NAME[tribe] + " from %" + from + " to %" + game.where + ".") + let name = is_barbarian_inactive(id) ? "inactive " + BARBARIAN_NAME[tribe] : BARBARIAN_NAME[tribe] + if (from === game.where) + log("Foederati " + name + " in %" + from + ".") + else + log("Foederati " + name + " in %" + from + " to %" + game.where + ".") + if (count_legions_in_army(game.count) > count_barbarians_in_army(game.count)) set_barbarian_location(id, ARMY + game.count) - } else { - if (is_barbarian_inactive(id)) - log("Foederati inactive " + BARBARIAN_NAME[tribe] + " in %" + from + ".") - else - log("Foederati " + BARBARIAN_NAME[tribe] + " in %" + from + ".") + else eliminate_barbarian(id) - } resume_take_actions() }, } |