mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 12:53:21 +00:00
EI S13: Rewrite dragon's AI
Most part of the old AI had no evident effect: the dragon just moved here and there without attacking you, and since he flied over shallow water, it was impossible to chase him. The micro ai makes Khrakhras wander around and attack you when you approach his castle. (cherry-picked from commit 64917b70b5eb484ed132df2b43ca26b3af47a690)
This commit is contained in:
parent
3c1dd4d555
commit
fdfdb0a200
@ -45,87 +45,6 @@
|
||||
user_team_name=_"Evil"
|
||||
gold=0
|
||||
no_leader=yes
|
||||
[ai]
|
||||
#don't target any of the default things
|
||||
village_value=0
|
||||
leader_value=0
|
||||
[goal]
|
||||
name=protect_unit
|
||||
[criteria]
|
||||
side=3
|
||||
canrecruit=yes
|
||||
[/criteria]
|
||||
value=0
|
||||
[/goal]
|
||||
#stay in the middle of the map
|
||||
[avoid]
|
||||
[not]
|
||||
x=14-32
|
||||
y=10-45
|
||||
[/not]
|
||||
[/avoid]
|
||||
#and target anyone in it (otherwise it will have nothing to do when
|
||||
#it can't attack in the current turn)
|
||||
[goal]
|
||||
name=target
|
||||
[criteria]
|
||||
#who knows what would happen if it targetted itself
|
||||
[not]
|
||||
type="Skeletal Dragon"
|
||||
[/not]
|
||||
x=14-32
|
||||
y=10-45
|
||||
[/criteria]
|
||||
value=100
|
||||
[/goal]
|
||||
#I don't know if this is needed, but it sure would be stupid to use
|
||||
#any grouping behavior when there's only one unit on this side!
|
||||
grouping=no
|
||||
#not sure if this really does anything; it was copied from IP's code
|
||||
aggression=1.0
|
||||
leader_aggression=0.4
|
||||
caution=0.0
|
||||
[/ai]
|
||||
|
||||
#give the skeletal dragon something to do when there are no
|
||||
#enemies available let it look like it's wandering around
|
||||
#semi-randomly
|
||||
[ai]
|
||||
[leader_goal]
|
||||
x,y=14,10
|
||||
[/leader_goal]
|
||||
time_of_day=dawn
|
||||
[/ai]
|
||||
[ai]
|
||||
[leader_goal]
|
||||
x,y=23,26
|
||||
[/leader_goal]
|
||||
time_of_day=morning
|
||||
[/ai]
|
||||
[ai]
|
||||
[leader_goal]
|
||||
x,y=23,26
|
||||
[/leader_goal]
|
||||
time_of_day=afternoon
|
||||
[/ai]
|
||||
[ai]
|
||||
[leader_goal]
|
||||
x,y=32,32
|
||||
[/leader_goal]
|
||||
time_of_day=dusk
|
||||
[/ai]
|
||||
[ai]
|
||||
[leader_goal]
|
||||
x,y=32,10
|
||||
[/leader_goal]
|
||||
time_of_day=first_watch
|
||||
[/ai]
|
||||
[ai]
|
||||
[leader_goal]
|
||||
x,y=14,32
|
||||
[/leader_goal]
|
||||
time_of_day=second_watch
|
||||
[/ai]
|
||||
[/side]
|
||||
|
||||
[event]
|
||||
@ -167,6 +86,20 @@
|
||||
canrecruit=yes
|
||||
[/unit]
|
||||
|
||||
[micro_ai]
|
||||
side=3
|
||||
ai_type=big_animals
|
||||
action=add
|
||||
|
||||
[filter]
|
||||
id="Khrakrahs"
|
||||
[/filter]
|
||||
[filter_location]
|
||||
x=23-32
|
||||
y=21-26
|
||||
[/filter_location]
|
||||
[/micro_ai]
|
||||
|
||||
#buff the dragon with some magic resistances
|
||||
[object]
|
||||
name= _ "Null Stone"
|
||||
|
Loading…
x
Reference in New Issue
Block a user