Looks like un_recall_unit_cost() is used to retrieve the unit cost of the recalled unit but it also decrements the recall count, duplicating the decrement in un_recall_unit().
A [terrain_mask] is simply a map. It can be smaller than the map, and can be offset. As a map, it can give special locations which can be used to position units, and queried by WML. With this change the names are properly applied to the underlying map, offset relative to the [terrain_mask]. A name given in the [terrain_mask] replaces that name in the underlying map, regardless of the original location. A map file can define only one name per location. A name can have only one location; but a location can have any number of names. To define additional names for a location, stack [terrain_mask] maps giving each. Once placed on the map, a name cannot be removed.
The support parameter in the attack evaluation quantifies how much
power the AI can bring to an attack hex. This is supposed to include
the attacking unit itself. However, in some circumstances (such as when
the unit cannot move for one reason or another) this unit is not
accounted for. If no other units can get to this hex either, support is
(erroneously) set to zero, resulting in an attack score of zero, which
in turn results in no attack. Skipping the multiplication of the score
by support in this case does not affect comparison with other attacks
here, as this is by definition the only attack possible on the given
hex.
Note that the '!is_surrounded' conditional is also covered by 'support
!= 0' and can therefore be deleted.
This fixes bug #23720.
This CA performs attacks on enemy units so close to leveling that the
default AI's combat CA would not attack them (with some exceptions).
This is meant to keep players from being able to exploit this known
weakness of the default AI.
With debug features enabled (the --debug command line switch), select the
unit and type ";unit invulnerable=yes".
This method operates by reducing the opponent's hit chance to zero. As a
result, it doesn't slow down damage calculation unlike the "increase HP
to ridiculous levels" method.
When specified, replace rather than merge the [unit] sub-tags. Does not effect [object], [trait], [effect] or [advancement].
For example:
[modify_unit]
[filter]
id=Deoran
[/filter]
mode=replace
[filter_recall]
[not]
id="Sir Gerrick"
[/not]
[/filter_recall]
[/modify_unit]
will replace the current contents of [filter_recall] with the given contents. Without mode=replace, the contents would be appended to the previous contents.
The GUI1 textbox widget had a mechanism to reject input until it has
received an SDL_KEYDOWN event, but it didn't do any good. I suspect this
regressed in commit 61ccf2fc, which changed the type of the event handler
container from std::vector to std::list. Apparently, starting from that
commit, an event (say, an SDL_KEYDOWN event) will also be delivered to
any event listeners which are registered by existing event handlers.
In other words:
1. the player presses ;
2. SDL generates an SDL_KEYDOWN event
3. a handler for that event creates the command console
4. the command console registers a handler for SDL events
5. the original keypress event is delivered to the command console
6. the console starts listening for input as a result of that event
7. SDL generates an SDL_TEXTINPUT event, still for the same keypress
8. the console inserts the ; character
I made the textbox loop through all the keys in construction, and store a
set of all pressed keys. The box will ignore all input until all the keys
which were down at the time it was created have been released. The fix
stops the stray ; character from appearing.
Also disable victory music on scenarios which have the carryover report
disabled, mainly cutscene scenarios and final scenarios of each campaign.
This avoids an unfortunate "abruptly play the winning music, then
immediately switch to the next music" situation that would break
fade-out otherwise.
Finally, I also removed an unreachable code line that triggers a warning
in Visual Studio.