final fixes

This commit is contained in:
Scott Klempner 2006-06-10 16:31:43 +00:00
parent dbbc5f2765
commit 6d6e50afdb
3 changed files with 233 additions and 72 deletions

View file

@ -178,75 +178,6 @@
[/message]
[/event]
#define VOID_ARMOR X_LOC Y_LOC
{PLACE_IMAGE items/armor.png ({X_LOC}) ({Y_LOC})}
[event]
name=moveto
first_time_only=no
[filter]
side=1
x,y={X_LOC},{Y_LOC}
[/filter]
[if]
[variable]
name=armor_taken
numerical_equals=0
[/variable]
[then]
[message]
speaker=narrator
image="items/armor.png"
message= _ "Do you want this unit to pick up the armor?"
[option]
message= _ "Yes"
[command]
[object]
id=void_armor
name= _ "Void Armor"
image="icon_armor.png"
description= _ "A beautiful chest plate crafted from shimmering black steel, the Void Armor is virtually impenetrable to physical weapons!"
cannot_use_message= _ "Only a powerful warrior may don this armor!"
duration=forever
[filter]
side=1
x,y={X_LOC},{Y_LOC}
type=Fighter,Commander,Lord,Princess,Battle Princess,Elvish Lord,Elvish High Lord,Elvish Fighter,Elvish Captain,Elvish Hero,Elvish Marshal,Elvish Champion,Elvish Ranger,Elvish Avenger,Horseman,Knight,Lancer,Paladin,Grand Knight,Dwarvish Fighter,Dwarvish Steelclad,Dwarvish Lord,Dwarvish Guardsman,Dwarvish Stalwart,Dwarvish Sentinel
[/filter]
[then]
[removeitem]
x,y={X_LOC},{Y_LOC}
[/removeitem]
[message]
speaker=narrator
image="wesnoth-icon.png"
message= _ "You struggle to lift and don the heavy plate. Once worn, however, it is amazingly comfortable. You have increased resistance to all physical damage!"
[/message]
{VARIABLE armor_taken 1}
[/then]
[effect]
apply_to=resistance
replace=true
[resistance]
blade=50
pierce=60
impact=60
holy=10
fire=10
[/resistance]
[/effect]
[/object]
[/command]
[/option]
[option]
message= _ "No"
[/option]
[/message]
[/then]
[/if]
[/event]
#enddef
#define ENDOWED_KNIGHT NAME
[event]
name=die
@ -266,10 +197,9 @@ name=die
description=Delfador
message= _ "Its owner was surely a famous warrior in life. I wonder who it was. That plate must have a powerful enchantment to have resisted centuries of decay. Choose wisely who will bear it."
[/message]
{VARIABLE armor_taken 0}
{VARIABLE temp_armor_x $x1}
{VARIABLE temp_armor_y $y1}
{VOID_ARMOR $temp_armor_x $temp_armor_y}
{OBJ_VOID_ARMOR $temp_armor_x $temp_armor_y void_armor}
[/event]
#enddef
@ -399,6 +329,7 @@ name=die
result=victory
{CLEAR_VARIABLE temp_armor_x}
{CLEAR_VARIABLE temp_armor_y}
{CLEAR_VARIABLE armor_taken}
[/endlevel]
[/event]

View file

@ -5,9 +5,201 @@
################################
#
# Nothing yet
# HTTT-specific artifacts
#
#define OBJ_SWORD_FIRE X Y ID
{PLACE_IMAGE items/flame-sword.png ({X}) ({Y})}
{VARIABLE sword_taken 0}
[event]
name=moveto
first_time_only=no
[filter]
side=1
x={X}
y={Y}
[/filter]
[if]
[variable]
name=sword_taken
numerical_equals=0
[/variable]
[then]
[message]
speaker=narrator
image="wesnoth-icon.png"
message= _ "Do you want this unit to pick up the sword?"
[option]
message= _ "Yes"
[command]
[object]
id={ID}
name= _ "Flaming Sword"
image=attacks/sword-flaming.png
duration=forever
description= _ "This massive blade was created centuries ago by long-forgotten elvish forgemasters, who managed to imbue the bluish steel with an inner magical fire. Tongues of flame dance on the surface, giving the bluish steel a flawless mirrored finish."
cannot_use_message= _ "Only the leader of an army can wield this sword!"
[filter]
description=Fighter,Commander,Lord,Princess,Battle Princess,Elvish Captain,Elvish Hero,Elvish Marshal,Elvish Champion,Paladin
x,y={X},{Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[message]
speaker=narrator
image="wesnoth-icon.png"
message= _ "As you place your hand around the glittering leather hilt, the sword roars to life! Strangely, you feel no heat once you pick it up, yet the grass at your feet bursts into flame as you test the heft of this mighty weapon."
[/message]
{VARIABLE sword_taken 1}
[/then]
[effect]
apply_to=new_attack
name= _ "flaming sword"
icon=attacks/sword-flaming.png
type=fire
range=melee
special=magical
damage=15
number=4
[sound]
time=-200
sound=fire.wav
[/sound]
[/effect]
[/object]
[/command]
[/option]
[option]
message= _ "No"
[/option]
[/message]
[/then]
[/if]
[/event]
#enddef
#define OBJ_VOID_ARMOR X Y ID
{PLACE_IMAGE items/armor.png ({X}) ({Y})}
{VARIABLE armor_taken 0}
[event]
name=moveto
first_time_only=no
[filter]
side=1
x,y={X},{Y}
[/filter]
[if]
[variable]
name=armor_taken
numerical_equals=0
[/variable]
[then]
[message]
speaker=narrator
image="wesnoth-icon.png"
message= _ "Do you want this unit to pick up the armor?"
[option]
message= _ "Yes"
[command]
[object]
id={ID}
name= _ "Void Armor"
image="icon_armor.png"
description= _ "A beautiful chest plate crafted from shimmering black steel, the Void Armor is virtually impenetrable to physical weapons!"
cannot_use_message= _ "Only a powerful warrior may don this armor!"
duration=forever
[filter]
side=1
x,y={X},{Y}
type=Fighter,Commander,Lord,Princess,Battle Princess,Elvish Lord,Elvish High Lord,Elvish Fighter,Elvish Captain,Elvish Hero,Elvish Marshal,Elvish Champion,Elvish Ranger,Elvish Avenger,Horseman,Knight,Lancer,Paladin,Grand Knight,Dwarvish Fighter,Dwarvish Steelclad,Dwarvish Lord,Dwarvish Guardsman,Dwarvish Stalwart,Dwarvish Sentinel
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[message]
speaker=narrator
image="wesnoth-icon.png"
message= _ "You struggle to lift and don the heavy plate. Once worn, however, it is amazingly comfortable. You have increased resistance to all physical damage!"
[/message]
{VARIABLE armor_taken 1}
[/then]
#
# Set physical resistance to 50/40/40
#
[effect]
apply_to=resistance
replace=true
[resistance]
blade=50
pierce=60
impact=60
[/resistance]
[/effect]
#
# Increase fire resistance by 10%
#
[effect]
apply_to=resistance
[resistance]
fire=-10
[/resistance]
[/effect]
[/object]
[/command]
[/option]
[option]
message= _ "No"
[/option]
[/message]
[/then]
[/if]
[/event]
#enddef
#
# This macro isn't actually used in the scenario "The Scepter of Fire"
# because of the random location issue. We're keeping it here for
# posterity for the time being.
#
#define OBJ_SCEPTER_FIRE X Y ID
{PLACE_IMAGE items/sceptre-of-fire.png ({X}) ({Y})}
[event]
name=moveto
first_time_only=no
[filter]
side=1
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Scepter of Fire"
image=items/sceptre-of-fire.png
duration=forever
description= _ "This ancient Scepter was forged by the Dwarves. A symbol of the kingship of Wesnoth, the Scepter has the power to shoot fireballs at enemies of the bearer!"
cannot_use_message= _ "This is the Scepter of Fire. Only a true successor to the throne can possibly dare to take this!"
[filter]
type=Princess,Battle Princess,Commander,Lord
x,y={X},{Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=variation
name=scepter
[/effect]
[/object]
[/event]
#enddef
################################
#
# SCEPTER OF FIRE MACROS FOLLOW

View file

@ -178,6 +178,25 @@
speaker=Prince Haldric
message= _ "Get her before she can cause too much trouble!"
[/message]
[objectives]
side=1
[objective]
description= _ "Defeat the Vampire Queen"
condition=win
[/objective]
[objective]
description= _ "Death of Prince Haldric"
condition=lose
[/objective]
[objective]
description= _ "Death of Lady Jessica"
condition=lose
[/objective]
[objective]
description= _ "Turns run out"
condition=lose
[/objective]
[/objectives]
[set_variable]
name=queen_awake
value=1
@ -438,6 +457,25 @@
speaker=Lady Jessica
message= _ "We still have to defeat that Vampire Queen!"
[/message]
[objectives]
side=1
[objective]
description= _ "Defeat the Vampire Queen"
condition=win
[/objective]
[objective]
description= _ "Death of Prince Haldric"
condition=lose
[/objective]
[objective]
description= _ "Death of Lady Jessica"
condition=lose
[/objective]
[objective]
description= _ "Turns run out"
condition=lose
[/objective]
[/objectives]
[/then]
[else]
[endlevel]