Fix yet another cycholka bug:

WML didn't do the right thing if Abhai picked up the Rod of Justice.
This commit is contained in:
Eric S. Raymond 2009-03-25 19:16:57 +00:00
parent 55f8b1431a
commit d10c24c8d0

View file

@ -1583,101 +1583,13 @@
x=3
y=7
[/filter]
# Check who picked the rod
[if]
[variable]
name=unit.id
equals=Abhai
[/variable]
# If it's Abhai hand the rod to Tallin
[then]
{INCIDENTAL_MUSIC "sad.ogg"}
{VARIABLE explorer Tallin}
[/then]
[/if]
# Remove the icon
[removeitem]
x=3
y=7
[/removeitem]
# Apply the effects
[object]
id=justice_rod
name= _ "Rod of Justice"
image=attacks/staff-magic.png
duration=forever
description= _ "This is a magical staff of tremendous power and unknown origin. Although the full extent of its power has not been fathomed, there are a few features about it that will be obvious to any master of lore. The wielder of this staff gains a dramatic increase in strength, speed and intelligence, and is granted the ability to fire devastating lightning bolts at at his opponents. Only a person who is good at heart and who is willing to sacrifice his life on the path of justice can wield this staff."
[filter]
id=$unit.id
[/filter]
# New 16-4 fire attack with cool lightning animation
[effect]
apply_to=new_attack
name=rod of justice
description= _ "rod of justice"
type=fire
range=ranged
damage=16
number=4
icon=attacks/lightning.png
[/effect]
# The cool animation mentioned above, a copypasted fragment from Delfador's attack
[effect]
apply_to=new_animation
[attack_anim]
[filter_attack]
name=rod of justice
[/filter_attack]
{LIGHTNING_BOLT 1}
[if]
hits=no
[frame]
begin=-200
end=0
sound=lightning-miss.ogg
[/frame]
[/if]
[else]
hits=yes
[frame]
begin=-200
end=0
sound=lightning.ogg
[/frame]
[/else]
[/attack_anim]
[/effect]
# Increase the movement by 2
[effect]
apply_to=movement
increase=2
[/effect]
# If the unit has melee attacks increase the damage of all of them by two
[effect]
apply_to=attack
range=melee
increase_damage=2
[/effect]
# Give the unit additional 10 HP and heal it
[effect]
apply_to=hitpoints
increase_total=10
heal_full=yes
[/effect]
# Reduce the amount of experience required for next level by 20%
[effect]
apply_to=max_experience
increase=-20%
[/effect]
[/object]
# And do all the talk
[if]
[variable]
name=unit.id
equals=Abhai
[/variable]
[then]
[message]
speaker=Abhai
message= _ "The Rod of Justice! What in the world is it doing all the way down here?"
@ -1751,6 +1663,84 @@
[/message]
[/then]
[/if]
# Remove the icon
[removeitem]
x=3
y=7
[/removeitem]
# Apply the effects
[object]
id=justice_rod
name= _ "Rod of Justice"
image=attacks/staff-magic.png
duration=forever
description= _ "This is a magical staff of tremendous power and unknown origin. Although the full extent of its power has not been fathomed, there are a few features about it that will be obvious to any master of lore. The wielder of this staff gains a dramatic increase in strength, speed and intelligence, and is granted the ability to fire devastating lightning bolts at at his opponents. Only a person who is good at heart and who is willing to sacrifice his life on the path of justice can wield this staff."
[filter]
id=$unit.id
[/filter]
# New 16-4 fire attack with cool lightning animation
[effect]
apply_to=new_attack
name=rod of justice
description= _ "rod of justice"
type=fire
range=ranged
damage=16
number=4
icon=attacks/lightning.png
[/effect]
# The cool animation mentioned above, a copypasted
# fragment from Delfador's attack
[effect]
apply_to=new_animation
[attack_anim]
[filter_attack]
name=rod of justice
[/filter_attack]
{LIGHTNING_BOLT 1}
[if]
hits=no
[frame]
begin=-200
end=0
sound=lightning-miss.ogg
[/frame]
[/if]
[else]
hits=yes
[frame]
begin=-200
end=0
sound=lightning.ogg
[/frame]
[/else]
[/attack_anim]
[/effect]
# Increase the movement by 2
[effect]
apply_to=movement
increase=2
[/effect]
# If the unit has melee attacks, increase the damage of
# all of them by two
[effect]
apply_to=attack
range=melee
increase_damage=2
[/effect]
# Give the unit additional 10 HP and heal it
[effect]
apply_to=hitpoints
increase_total=10
heal_full=yes
[/effect]
# Reduce the amount of experience required for next level
# by 20%
[effect]
apply_to=max_experience
increase=-20%
[/effect]
[/object]
[/else]
[/if]
[/event]