Respect server options given as script arguments.
Fix killing background process in trap.
Use printf instead of echo.
Keep upper case variable names reserved for env variables.
Logfilter scripts converted to sed -E and removed GNUisms.
Original code from mesilliac in #6826. Made a separate PR for this since the relevant code moved to an entirely separate file and trying to "properly" fix the merge conflicts resulting from that isn't worth the time.
max_value is used to limit the increase in resistance with the "resistance" capability, but there was no equivalent for its reduction.
To be able to add min_value without redoing the "resistance" checking for the umpteenth time, I prefer to modify effect:: so that the checking of these two attributes is done at the same time as the other numerical attributes and keep the door open to a possible generalization of the proceed
The movetype data includes vulnerability to damage types, for example
`resistance_against("arcane")`. There was also a convenience wrapper
that took an attack_type, and returned the vulnerability to that
attack_type's damage type.
The logic of the wrapper is very basic, and does not use unit.cpp's
logic to check whether abilities that change the type are active.
Although it gained knowledge of alternative damage types in 3910817cf7,
it won't always return the same value as the unit.cpp function does.
The wrapper is now only used in FormulaAI, so let's move the code there,
which in effect marks it deprecated.
If a mouse click causes a delay and then a message to appear, for example
when moving a unit triggers an `[event]name=moveto`, then the message
would sometimes flash on screen and then disappear with barely enough time
to see which character's portrait was used, let alone to read it.
Although there's already logic to not be triggered by the same mouseclick that
caused the unit to move, it had a race condition if the MOUSE_UP happened
around the time the the dialog's pre_show() function was running.
(cherry picked from commit 26ead85914c9e7af9e378d583657fef7f68f6821)
- `start_faded` was always true (the default value value was never used)
- 'skip_replay' was only set in playmp_controller which had already other
code to set it (also it is not used in the ctor)
From the ui point of view, there should be no difference between
network turns and ai turns, and the other play_.._turn functions
also work without such calls. (Furthermore this codes is really
old, so whatever the reason for its existance was probably doesn't
apply anymore)
Now its a bit easier to understand which functions are in play_controller adn which in playsingle_controller as all turn related functiosn are now in playsingle_controller