wesnoth/data/test/units.cfg
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

78 lines
1.7 KiB
INI

#textdomain wesnoth-test
[units]
{test/units/}
[race]
id=test
name= _ "test"
female_name= _ "test"
plural_name= _ "tests"
description= _ "test race"
num_traits=2
{ORCISH_NAMES}
[/race]
[movetype]
name=fly
flying=yes
[movement_costs]
{FLY_MOVE}
cave=3
fungus=3
[/movement_costs]
[defense]
{FLY_DEFENSE 50}
cave=80
fungus=-70
[/defense]
{FLY_RESISTANCE}
[special_note]
note={INTERNAL:SPECIAL_NOTES_DEFENSE_CAP}
[/special_note]
[/movetype]
# The main feature of this movetype is that it has 0% defense on all terrains,
# so there's no need to use CHANCE_TO_HIT macros.
[movetype]
name=test_movetype_no_defense
[movement_costs]
shallow_water=2
reef=2
swamp_water=2
flat=2
sand=2
forest=2
hills=2
village=2
castle=2
cave=2
frozen=2
fungus=2
[/movement_costs]
[defense]
shallow_water=100
reef=100
swamp_water=100
flat=100
sand=100
forest=100
hills=100
village=100
castle=100
cave=100
frozen=100
fungus=100
[/defense]
[resistance]
blade=100
pierce=100
impact=100
fire=100
cold=100
arcane=100
[/resistance]
[/movetype]
[/units]