This is a balance-changing bugfix. All recruited creeps were given the loyal
trait, but it was added in a way that didn't set their upkeep to zero (at least
in Wesnoth 1.14). So there's a huge cash-drain on the AI sides that was only
noticed when testing this commit Fixing this will change the map balance, but
it will probably improve the game and also make it easier, with more creeps to
earn gold from.
Use the mainline macros for the fearless and loyal traits.
These two changes go together, because the [store_unit] for adding the loyal
trait was also the [store_unit] for checking whether the recruit had both melee
and ranged attacks.
If a creep doesn't have a melee or ranged weapon, then one is added. The old
code generated a random number to choose the weapon type, even if it wouldn't
be used. This probably doesn't matter, looking at a replay there seems to be
just one random seed for each recruit event, so the extra random calls don't
add network traffic.
This is a balance-changing bugfix. All recruited creeps were given the loyal trait, but it was added in a way that didn't set their upkeep to zero (at least in Wesnoth 1.14). So there's a huge cash-drain on the AI sides that was only noticed when testing this commit Fixing this will change the map balance, but it will probably improve the game and also make it easier, with more creeps to earn gold from.
Use the mainline macros for the fearless and loyal traits.
These two changes go together, because the [store_unit] for adding the loyal trait was also the [store_unit] for checking whether the recruit had both melee and ranged attacks.
If a creep doesn't have a melee or ranged weapon, then one is added. The old code generated a random number to choose the weapon type, even if it wouldn't be used. This probably doesn't matter, looking at a replay there seems to be just one random seed for each recruit event, so the extra random calls don't add network traffic.