mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 20:21:17 +00:00
DiD S11: Fix & improve wose implementation
Bug was that a troll on 4,21 could move through the avoid area to attack player at 11,22 which is a likely occurrence. Expanding the avoid area further seems inappropriate as troll avoidance is more likely to be noticed. New implementation ensures only player will trigger the wose, maintains proper look to the player, no longer interferes with trolls attacking, and simplifies code.
This commit is contained in:
parent
8db9ec2777
commit
b0fc2708ae
@ -110,10 +110,10 @@
|
||||
value=10
|
||||
[/goal]
|
||||
|
||||
# Avoid the spiders, the wose, and the beginning area
|
||||
# Avoid the spiders and the beginning area
|
||||
[avoid]
|
||||
x=2-9,2-27,5-9
|
||||
y=11-15,30-35,19-23
|
||||
x=2-9,2-27
|
||||
y=11-15,30-35
|
||||
[/avoid]
|
||||
[/ai]
|
||||
[/side]
|
||||
@ -143,10 +143,10 @@
|
||||
#endif
|
||||
|
||||
[ai]
|
||||
# Avoid the spiders, the wose, and the beginning area
|
||||
# Avoid the spiders and the beginning area
|
||||
[avoid]
|
||||
x=2-9,2-27,5-9
|
||||
y=11-15,30-35,19-23
|
||||
x=2-9,2-27
|
||||
y=11-15,30-35
|
||||
[/avoid]
|
||||
[/ai]
|
||||
[/side]
|
||||
@ -175,10 +175,10 @@
|
||||
#endif
|
||||
|
||||
[ai]
|
||||
# Avoid the spiders, the wose, and the beginning area
|
||||
# Avoid the spiders and the beginning area
|
||||
[avoid]
|
||||
x=2-9,2-27,5-9
|
||||
y=11-15,30-35,19-23
|
||||
x=2-9,2-27
|
||||
y=11-15,30-35
|
||||
[/avoid]
|
||||
[/ai]
|
||||
[/side]
|
||||
@ -186,6 +186,7 @@
|
||||
# Monsters
|
||||
[side]
|
||||
side=5
|
||||
team_name=monsters
|
||||
gold=0
|
||||
controller=ai
|
||||
no_leader=yes
|
||||
@ -195,15 +196,6 @@
|
||||
fog=yes
|
||||
shroud=yes
|
||||
|
||||
# The wose
|
||||
[unit]
|
||||
type=Ancient Wose
|
||||
x,y=7,21
|
||||
id=Dumdumbadoom
|
||||
name= _ "Dumdumbadoom"
|
||||
ai_special=guardian
|
||||
[/unit]
|
||||
|
||||
# Generic Monsters
|
||||
{GENERIC_UNIT () (Giant Rat) 14 29} {GUARDIAN}
|
||||
{GENERIC_UNIT () (Giant Rat) 21 28} {GUARDIAN}
|
||||
@ -219,9 +211,30 @@
|
||||
{GENERIC_UNIT () (Giant Spider) 7 12} {GUARDIAN}
|
||||
{GENERIC_UNIT () (Giant Spider) 8 13} {GUARDIAN}
|
||||
{GENERIC_UNIT () (Giant Spider) 6 15} {GUARDIAN}
|
||||
[/side]
|
||||
|
||||
# The Wose
|
||||
[side]
|
||||
side=6
|
||||
color=black
|
||||
team_name=monsters,trolls #so the trolls don't trigger the wose
|
||||
gold=0
|
||||
controller=null #so the wose doesn't move until discovered
|
||||
no_leader=yes
|
||||
hidden=yes
|
||||
income=-2
|
||||
|
||||
fog=yes
|
||||
shroud=yes
|
||||
|
||||
[unit]
|
||||
type=Ancient Wose
|
||||
x,y=7,21
|
||||
id=Dumdumbadoom
|
||||
name= _ "Dumdumbadoom"
|
||||
[/unit]
|
||||
|
||||
[ai]
|
||||
# This is mostly for the Wose -- the others are guardians
|
||||
[goal]
|
||||
name=target
|
||||
[criteria]
|
||||
@ -705,26 +718,9 @@
|
||||
[/modify_side]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn refresh
|
||||
first_time_only=no
|
||||
[filter_condition]
|
||||
[variable]
|
||||
name=side_number
|
||||
equals=5
|
||||
[/variable]
|
||||
[variable]
|
||||
name=wose_awakened
|
||||
not_equals=yes
|
||||
[/variable]
|
||||
[/filter_condition]
|
||||
|
||||
{MODIFY_UNIT id=Dumdumbadoom moves 0}
|
||||
[/event]
|
||||
|
||||
# Fun with the wose
|
||||
[event]
|
||||
name=moveto
|
||||
name=enter_hex # handles transition from great tree to wose better than moveto
|
||||
[filter]
|
||||
side=1
|
||||
[filter_adjacent]
|
||||
@ -742,7 +738,11 @@
|
||||
message= _ "Who has awoken me from my slumber? Undead? I shall not suffer the existence of such foul creatures!"
|
||||
[/message]
|
||||
|
||||
{VARIABLE wose_awakened yes}
|
||||
[modify_side]
|
||||
side=6
|
||||
controller=ai
|
||||
team_name=monsters
|
||||
[/modify_side]
|
||||
[/event]
|
||||
|
||||
#ifdef __UNUSED__
|
||||
|
Loading…
x
Reference in New Issue
Block a user