ANL: remove direct use of overlay, switch to objects
This commit is contained in:
parent
479278a0d9
commit
5ee5920cbd
1 changed files with 22 additions and 19 deletions
|
@ -191,39 +191,33 @@
|
|||
[/filter]
|
||||
|
||||
[message]
|
||||
side_for=$side_number
|
||||
side_for=$unit.side
|
||||
speaker=unit
|
||||
message= _ "Let’s cut you free!"
|
||||
[/message]
|
||||
[message]
|
||||
side_for=$side_number
|
||||
side_for=$unit.side
|
||||
speaker=narrator
|
||||
message= _ "You release the creature from the web and it agrees to help you."
|
||||
image=wesnoth-icon.png
|
||||
[/message]
|
||||
|
||||
[store_unit]
|
||||
# Change captured unit
|
||||
[modify_unit]
|
||||
[filter]
|
||||
x={UNIT_X}
|
||||
y={UNIT_Y}
|
||||
[/filter]
|
||||
variable=critter
|
||||
kill=no
|
||||
[/store_unit]
|
||||
side=$unit.side
|
||||
[/modify_unit]
|
||||
|
||||
[set_variable]
|
||||
name=critter.side
|
||||
value=$side_number
|
||||
[/set_variable]
|
||||
[clear_variable]
|
||||
name=critter.overlays
|
||||
[/clear_variable]
|
||||
[remove_object]
|
||||
x={UNIT_X}
|
||||
y={UNIT_Y}
|
||||
object_id=trapped-web
|
||||
[/remove_object]
|
||||
|
||||
[unstore_unit]
|
||||
variable=critter
|
||||
[/unstore_unit]
|
||||
|
||||
# Lose all moves.
|
||||
# Lose all moves of capturing unit (also if it is a skirmisher)
|
||||
[set_variable]
|
||||
name=unit.moves
|
||||
value=0
|
||||
|
@ -273,7 +267,16 @@
|
|||
#define ANL_PLACE_TRAPPED_UNIT SIDE TYPE X Y
|
||||
{NOTRAIT_UNIT {SIDE} {TYPE} {X} {Y} }
|
||||
[+unit]
|
||||
overlays=projectiles/web.png
|
||||
[+modifications]
|
||||
[object]
|
||||
id=trapped-web
|
||||
duration=scenario
|
||||
[effect]
|
||||
apply_to=overlay
|
||||
add=projectiles/web.png
|
||||
[/effect]
|
||||
[/object]
|
||||
[/modifications]
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue