Commit graph

3 commits

Author SHA1 Message Date
Steve Cotton
aaf2735c1c Add [test_do_attack_by_id], a wrapper for [do_command][attack]
The new tag takes ids instead of needing coordinates. So instead of storing
units or hardcoding values, an attack can be done like this:

```
[test_do_attack_by_id]
	attacker=alice
	defender=bob
	weapon=0
[/test_do_attack_by_id]
```

Add a simpler unit for unit tests than the Elvish Archer / Orcish Grunt
combo, cherry-picked from gfgtdf's PR #7589. This is a unit with a 10x1
melee attack, and 0% defense on all terrains.

Remove the test race's undead_variation=
For testing custom plague abilities, this triggered a warning when
converting to any unit type that doesn't have variation_id=wolf,
restricting tests to using only Walking Corpse and Soulless.
2023-07-02 18:54:17 +02:00
Steve Cotton
5f1d46513a Reindent unit tests and unit test macros
This doesn't cover all of the unit tests, it's the result of running wmlindent
on all of them and then reviewing whether the changes were bugs in the test, or
whether they're bugs in wmlindent.

Note: there are two cve_2018_1999023 tests. The other one needs to be treated
as a binary file, but the one changed here is plain text that loads its attack
from a separate file.

The change in start_position_generic.cfg doesn't seem good, but it's not
particularly bad and it's what wmlindent currently does.
2023-01-20 02:28:54 +01:00
Kingofd
492c20baa6
Add exclusive unit traits handling similar to require_amla (#7109) 2023-01-19 13:49:39 -05:00