Implicitly constructing a log_domain from a string has the effect of resetting its severity to 1 (or whatever severity was passed to the constructor). This is probably fine when it's declared as a file static, but no good if passing the log_domain to a log_scope2() or dont_log() call.
Previously it calculated max movement, and then added the adjacent hexes. This
version should correctly handle:
* units with vp different to max mp
* units with vision costs different to movement costs
* jamming by enemy units
Draft changelog entry for this:
* `[store_reachable_locations]range=vision` now calculates vision, instead of using movement costs and max movement points (issue #4179)
Make "show attack range" not overwrite the array for cleaning up
the "show movement range" command's display.
Add a label and tooltip about the enemy unit with jamming.
The new option shows the result of [store_reachable_locations]range=vision.
There are known issues with that for:
* units with vp different to mp
* units with vision costs different to movement costs
* jamming by enemy units
Previously, the runner relied on the name being part of the output log from the Wesnoth process.
This works in most cases because Wesnoth prints a line with the test's name before exiting.
However, if the test timed out, that line would typically be missing, so this makes the runner insert it into the failure message as well to make sure it's present.
Canvas kept separate lists of what had already been drawn and what needed to be
drawn, but whenever changes happened all of the drawn_shapes_ were put back
into shapes_. No point in having two separate lists.
The list of shape needs pointers to support polymorphism, but doesn't need
shared_ptrs.
The renderer only needs to exist during draw(). The old implementation kept the
old renderer until the next call to draw(), but would then usually destroy the
old one and create a new one.
The current implementation technically allows for there to be multiple comparison attributes present and it will return false if any of them are false or return true if all of them are true. This changes the implementation to only check the first comparison attribute found and return true or false based on that check, which is how the [variable] tag is documented as working on the wiki.
Let's internally handle this mess in terms of tokens instead of
delimiter positions.
This alters the code so we don't add and substract ones (1) all over the
place. It also simplifies the final std::string_view::substr() call so
we don't need to count the remainder's length at all.
And more importantly, this makes the case where no delimiters had been
previously found trivial instead of causing it to break and result in no
text being output at all. We also don't start with a size_t value of -1
(actually a very large unsigned value).
Closes#5625.
Poison is added to the attack damage when comparing attacks by the same unit with different weapons, but it should only be counted as a bonus if the enemy survives, otherwise it serves no purpose.
This applies to the Walking Corpse in particular, which has 4 MP and 4
movement cost to enter shallow water. In practice this means that it can
move into shallow water only if it's not slowed and hasn't spent any
movement points this turn, and then it cannot move any further until the
next turn.
Closes#5689.