-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
filter_this_unit.cfg
90 lines (84 loc) · 1.46 KB
/
filter_this_unit.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Note: As an Orcish Grunt without traits, Bob starts with 38 hitpoints.
# Thus, the first test sets his hitpoints to 19, and the second test
# sets his level to 2.
{GENERIC_UNIT_TEST filter_this_unit_wml (
[event]
name=prestart
[modify_unit]
[filter]
id=bob
[/filter]
hitpoints="$($this_unit.max_hitpoints / 2)"
[/modify_unit]
{RETURN (
[have_unit]
id=bob
[filter_wml]
hitpoints="$($this_unit.max_hitpoints / 2)"
[/filter_wml]
[/have_unit]
)}
[/event]
)}
{GENERIC_UNIT_TEST filter_this_unit_tl (
[event]
name=prestart
[modify_unit]
[filter]
id=bob
[/filter]
level="$($this_unit.max_hitpoints / 19)"
[/modify_unit]
{RETURN (
[have_unit]
id=bob
level="$($this_unit.max_hitpoints / 19)"
[/have_unit]
)}
[/event]
)}
{GENERIC_UNIT_TEST filter_this_unit_fai (
[event]
name=prestart
[modify_unit]
[filter]
id=bob
[/filter]
moves=3
[/modify_unit]
{RETURN (
[have_unit]
id=bob
formula="$this_unit.moves < $this_unit.max_moves"
[/have_unit]
)}
[/event]
)}
{GENERIC_UNIT_TEST filter_fai_unit (
[event]
name=prestart
[modify_unit]
[filter]
id=bob
[/filter]
moves=3
[/modify_unit]
{RETURN (
[have_unit]
id=bob
formula="moves < max_moves"
[/have_unit]
)}
[/event]
)}
{GENERIC_UNIT_TEST filter_fai_unit_error (
[event]
name=prestart
{RETURN (
[have_unit]
id=bob
formula="+ max_moves"
[/have_unit]
)}
[/event]
)}