Don't animate unit advancements during a prestart event.
It woudl be better it u:advance() would automaticialyl not waste time animating advancements that can't be seen (during prestart events) but for this scenario this is already an improvement
(cherry picked from commit e549b03412)
The event has to use side 3 because side 2 is idle. Also remove the dollar sign because IF_VAR doesn't work with it.
(cherry picked from commit ae5b2f0da6)
The random map generator can generate starting locations so close that
ERASE_CASTLE removed not just the intended castle, but also the keep
of the nearby leader. To avoid that, create the castles after deciding
which leaders to remove.
The ERASE_CASTLE macro is obsolete; even for logic that erases
castles, using location_id makes the code simple enough that a macro
isn't useful. However, as this change is being applied to 1.18, I'm
only adding a comment about it.
In EI S11, the player encounters an orcish warlord named Dra-Nak. If not killed in S11, he continues pursuing the player in S12, but the current S12 gives him different traits and a different portrait. This PR fixes the issue.
EI's S17b has a gold refund mechanic, allowing enemies to build up large gold reserves in certain situations.
When gold gets high, enemies are supposed to start recruiting higher-level units so they can spend it faster. The former implementation had some inconsistent issues; this should restore the intended behavior.
In EI's S99, you gain gold from defeating and capturing hostile drakes. The drakes are physically moved to prison cells in the middle of the map.
Previously, the player could continue capturing drakes even if the prison cells were captured by enemies. This made it a strong strategy to abandon the center and turtle up in a corner of the map. Additionally, the prison cells stayed locked with prisoners inside.
This PR fixes this issue. This also adds 2 new strings; I'm planning to backport to 1.18.2, as this is arguably a bugfix.
EI's S11 and S99 have prison cells, one of which has an unintended backdoor entrance via an unwalkable deep water river. Flying units are involved in these scenarios, and can possibly fly into the cells through this unintended backdoor.
This PR changes the map hexes from unwalkable to impassable.
The lava is supposed to stay away from the Sceptre itself.
However, 60d114b changed from using sceptre_x,sceptre_y to using
a location_id, and missed updating these macros.
Owaec has a crown but little other indicator that he's a leader, and this scenario requires him to be used to recruit. Make it more obvious to the player.
Formerly, EI S13 uses various Deathblades' max-moves status instead of [filter_second] for some reason. This breaks when deathblades get rebuild, which in the bug report was caused by the sentinel shield. Use [filter_second] instead.
Resolves#8969
In EI S10, Dacyn picks up a cursed amulet and his HP drops to 1. In EI S11, Dacyn remains on very low HP, and is surrounded by orcs. There's a convenient ford hex he can hide on and be protected, but several players did not notice this hex and complained about difficulty.
In S10, this commit also drops his XP to 0. 1) showing that the amulet interferes with his MoL-ing, and 2) preventing the player from deliberately AMLA-ing Dacyn in the next scenario (partially a difficulty issue, but mostly it's bad to punish blind playthroughs / reward foreknowledge).
In S11, this commit adds a gold pile on Easy/Normal hinting towards the hex, while on Easy Dacyn's HP is fully restored. Hard is unaffected.
In S12, this commit restores Dacyn's HP on Easy (since it would be odd if he had full HP S11 but low HP S12).
https://www.reddit.com/r/wesnoth/comments/1d6a3e7/eastern_invasion_is_much_better_but_still_bad/
EI's S10 is overly hard on Normal, and especially on Easy (which is intended to be a very accessible difficulty). This PR increases the available gold and adds several villages, which aid in both defense and upkeep. This PR also drastically reduces the number of orcs on lower difficulties.
We also move Owaec to his keep to help imply his ability to recruit, and remove the related just-added [note] string to avoid violating 1.18.1 string freeze.
EI S06b objective strings were changed to be less misleading and more transparent. Revert this change, and re-implement after 1.18.1 releases and the string freeze is no longer in effect
S04b's alternative objective involves collecting herbs that semi-randomly spawn around the map, hidden under fog. Herbs spawn in all directions, but the map layout and scenario design can lead players to expect herbs to all be in the east. This objective note clarifies herb placement.
https://forums.wesnoth.org/viewtopic.php?t=57915
To complete EI's S06b, the player must fight through a necromancer and his bodyguards. Prior to this commit, the necromancer's bodyguards did not vary by difficulty, making Easy disproportionately difficult.
Other leaders do not need to be fought directly to win. In addition, this is an optional mission labeled as more difficult. Therefore, I haven't adjusted other leaders' guards' difficulty scaling.
https://forums.wesnoth.org/viewtopic.php?t=57915
Many turns into EI S17b, a pre-existing lich changes sides and transforms into Mal-Ravanal.
Before this commit, this process would un-capture any villages previously captured by that side, causing Mal-Ravanal to waste turns retaking them.
Lua was getting this variable without being told it is a number rather than a string. On some systems it is interpreted as a string which breaks this monster spawner code and throws Lua error messages onto the player's screen.
Units with traits may sometimes have quick and may sometimes not have quick. This causes civilians to randomly block certain castle hexes that the player can use to recruit.
Remove traits to prevent this random blocking. Increase MP 4->5 to prevent 2 castle hexes from always being blocked.
EI's S09 has a small pile of gold some distance off the main path, visible through the shroud.
Without a label, players may over-commit units/upkeep to getting the gold without realizing it's only a small amount, and possibly worth skipping.
In "Ill Humors", 2 spawn regions for aswaldan herbs overlap, which can result in both spawning on the same hex without any special visual indicator.
Credit to PointMeAtTheDawn.
The Barrow Wight has the Shroud ability: "When defending, this unit has 50%
Fire and Arcane resistance." However, if the attack's original damage type
isn't Fire or Arcane, the Shroud ability fails to trigger. The Barrow Wight
takes massive Arcane damage (50% weakness) when defending against such attacks.
Because this is the stable branch, the API can't fix the root cause, which is
that ability filters don't consider the weapon's alternative damage type. This
adds tests to verify that the API still works as before, but changes the items
in EI that give units alternative damage types.