Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[show_if] is not correctly evaluated when objectives are shown on start #3544
I'm playing Wesnoth 1.14.4 on Windows 10
You'll see "No little friend here" even though the dragon is on the map. If you re-open the objectives dialog (
The Wiki states "Scenario objectives are displayed on the player's first turn after the tag is used, or as part of the event if it triggers during that player's turn."
The prestart event and the start event are both prior to this.
The bug is that the objects [show_if] was evaluated at the time the [objectives] block appeared (in prestart), prior to conditions changing during the start event. So, when the display finally occurs (following the start event), the incorrect objectives appear.
Note that the [show_if] conditions are properly evaluated when [show_objectives] processes.
The fix would seem to be to do the full [show_objectives] processing at the time the objectives should first appear, just prior to the 'turn 1 begin' event,