-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
dragon.cfg
151 lines (125 loc) · 4.11 KB
/
dragon.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#textdomain wesnoth-ai
[test]
id=dragon
name=_"Dragon"
next_scenario=micro_ai_test
map_data="{multiplayer/maps/2p_Fallenstar_Lake.map}"
{DEFAULT_SCHEDULE}
turns=unlimited
victory_when_enemies_defeated=no
[side]
side=1
controller=ai
no_leader=yes
team_name=Rowck
# wmllint: local spellings Rowck
user_team_name= _ "team_name^Rowck"
persistent=no
gold=200
[/side]
[side]
side=2
type=Dread Bat
controller=human
suppress_end_turn_confirmation=yes
id=Dreadful Bat
name= _ "Dreadful Bat"
canrecruit=yes
recruit=Vampire Bat,Giant Rat,Giant Scorpion
persistent=no
gold=1000
[/side]
# Put all the units and markers out there
[event]
name=prestart
{VARIABLE scenario_name dragon}
{PLACE_IMAGE "scenery/signpost.png" 40 5}
{SET_LABEL 40 5 _"End Scenario"}
{PLACE_IMAGE "scenery/signpost.png" 3 15}
{SET_LABEL 3 15 _"Rowck's Home"}
[unit]
id=Rowck
name= _ "Rowck"
unrenamable=yes
type=Fire Dragon
side=1
x,y=3,15
[/unit]
# Set up the dragon micro AI
[micro_ai]
side=1
ai_type=hunter
action=add
[filter]
id=Rowck
[/filter]
[filter_location]
x,y=5-30,1-15
[/filter_location]
home_x,home_y=3,15
rest_turns=2
[/micro_ai]
[/event]
[event]
name=start
{STORE_UNIT_VAR (id=Dreadful Bat) profile profile}
{MESSAGE (Dreadful Bat) "" "" _"Be careful to stay out of the way of that dragon. He's a mean one."}
{CLEAR_VARIABLE profile}
# wmllint: unbalanced-on
{MESSAGE Rowck "" "" _"Hi there. I am Rowck and here is what I do:
When hungry, I move around part of the map in a random wander until I get into range of an enemy. If enemies are within range, I attack and devour the weakest of them. After that, I retreat to my rest location, where I stay for a certain number of turns or until fully healed.
A few details (features, not bugs, but can be changed if desired):
- If my way home is blocked on the return, the normal RCA AI takes over my behavior.
- I will, however, attack any enemy occupying my rest hex, if I can get there.
- A kill only makes me go home when I am the attacker, not as defender.
- Occasionally I will not move at all while wandering (a dragon has to rest sometimes!)
Note: The Hunter AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
# wmllint: unbalanced-off
[objectives]
summary= _ "Move the bats around to explore how Rowck reacts"
[objective]
description= _ "Defeat Rowck"
condition=win
[/objective]
[objective]
description= _ "Move the lead bat to the signpost"
condition=win
[/objective]
[objective]
description= _ "Death of the bat leader"
condition=lose
[/objective]
[/objectives]
[/event]
# The events finishing the scenario
[event]
name=die
[filter]
id=Rowck
[/filter]
[fire_event]
name=end_scenario
[/fire_event]
[/event]
[event]
name=moveto
[filter]
id=Dreadful Bat
x,y=40,5
[/filter]
[fire_event]
name=end_scenario
[/fire_event]
[/event]
[event]
name=end_scenario
{MESSAGE (Dreadful Bat) "" "" _"I'm out of here."}
[endlevel]
result=victory
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
[/endlevel]
[/event]
[/test]