L Fix bugs and tidy up a bit

Bugs:
S02: Use role= for roles, not speaker=
S05: Misplaced ai_algorithm
S08: No constant FOREVER, use 99999

Cleanup:
S01, S07: [if] requires [then]
S01, S05, S07, S08: remove macro artifacts
S07, S08: remove variable artifacts
S04, S08: remove dead  code
utils: Remove unused macros
This commit is contained in:
Gregory A Lundberg 2016-07-16 10:59:31 -05:00
parent 2825a9d84d
commit 5bb6aa5536
7 changed files with 35 additions and 105 deletions

View file

@ -272,10 +272,12 @@
side=2
[/filter]
[if]
[have_unit]
side=2
[/have_unit]
[else]
[not]
[have_unit]
side=2
[/have_unit]
[/not]
[then]
{CLEAR_VARIABLE town_guards_awakened}
[if]
[variable]
@ -284,6 +286,7 @@
[/variable]
[then]
{CLEAR_VARIABLE any_villagers_died}
[message]
speaker=Harper
message= _ "We are barely able to survive these orc raids. We lost two men last week, more today... yet Weldyn does nothing!"
@ -310,7 +313,7 @@
bonus=yes
{NEW_GOLD_CARRYOVER 100}
[/endlevel]
[/else]
[/then]
[/if]
[/event]
@ -417,3 +420,6 @@
{LIBERTY_DEATHS}
[/scenario]
#undef GOBLIN_RAIDER
#undef DALLBEN_PEASANT

View file

@ -189,7 +189,7 @@
message= _ "Well, it wont be long until they report back to the local garrison with the details of your encounter."
[/message]
[message]
speaker=Advisor
role=Advisor
message= _ "Then theyll be back in force."
[/message]
[message]

View file

@ -639,6 +639,7 @@
[/message]
{CLEAR_VARIABLE undead_transformation}
{CLEAR_VARIABLE temp}
[endlevel]
result=victory

View file

@ -46,10 +46,10 @@
side=2
canrecruit=yes
controller=ai
ai_algorithm=idle_ai
user_team_name=_"Asheviere"
team_name=bad_guys
[ai]
ai_algorithm=idle_ai
passive_leader=yes
[/ai]
shroud=no
@ -627,3 +627,5 @@
{VILLAGE_BURNED}
[/scenario]
#undef SEEKER

View file

@ -324,10 +324,12 @@
side=2,3
[/filter]
[if]
[have_unit]
side=2,3
[/have_unit]
[else]
[not]
[have_unit]
side=2,3
[/have_unit]
[/not]
[then]
[message]
speaker=Baldras
message= _ "What a bloody mess. We must attack Halstead next. If we wait, they will become invincible. If we can burn it to the ground before that happens, our people may have a chance. Rest well tonight, because tomorrows battle will decide the fate of our homes, our families, and our freedom."
@ -346,12 +348,14 @@
[/then]
[/if]
{CLEAR_VARIABLE stored_Archarel}
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/else]
[/then]
[/if]
[/event]
@ -373,3 +377,5 @@
{VILLAGE_BURNED}
[/scenario]
#undef TROOPER

View file

@ -169,7 +169,7 @@
[/avoid]
[/ai]
[ai]
turns=7-FOREVER
turns=7-99999
caution=0.1
aggression=0.9
scout_village_targeting=1
@ -271,7 +271,7 @@
[/ai]
[ai]
turns=7-FOREVER
turns=7-99999
aggression=0.6
caution=0.6
leader_value=0.5
@ -327,8 +327,6 @@
#Initialize the counter and switches
{VARIABLE supports_destroyed 0}
{VARIABLE harper_dead 0}
{VARIABLE dommel_dead 0}
#Set up the inside of the fortress just like we want it
{PLACE_IMAGE scenery/trapdoor-closed.png 16 13}
@ -894,6 +892,9 @@ Uu, Uu, Chr, Uh, Re, Uu, Uu, Uh, Uu, Chr, Chr
time=2000
[/delay]
{CLEAR_VARIABLE Helicrom_status}
{CLEAR_VARIABLE supports_destroyed}
[endlevel]
result=victory
carryover_report=no
@ -995,7 +996,6 @@ Uu, Uu, Chr, Uh, Re, Uu, Uu, Uh, Uu, Chr, Chr
speaker=Baldras
message= _ "But we are so close to the end. We must finish this. I am sorry you will not be able to enjoy our freedom. Goodbye, Harper."
[/message]
{VARIABLE harper_dead 1}
[/event]
#
# Deaths - Helicrom
@ -1077,15 +1077,16 @@ Uu, Uu, Chr, Uh, Re, Uu, Uu, Uh, Uu, Chr, Chr
# wmllint: local spelling Uungh
message= _ "You... underestimate the... cruelty and ambition of your Queen... Uungh..."
[/message]
{VARIABLE dommel_dead 2}
[/then]
[else]
[message]
speaker=Baldras
message= _ "Small victory? Bah! Now we will raze this fortress and bury it in the earth from whence it came."
[/message]
{VARIABLE dommel_dead 1}
[/else]
[/if]
[/event]
[/scenario]
#undef MOVETO_TRAPDOOR
#undef BAD_CAVALRY

View file

@ -8,92 +8,6 @@
[/capture_village]
#enddef
#
# This one changes a unit from one type to another
#
#define CHG_TYPE FILTER VALUE ALIGN
[store_unit]
[filter]
{FILTER}
[/filter]
variable=chgtype_store
kill=yes
[/store_unit]
{FOREACH chgtype_store i}
[set_variable]
name=chgtype_store[$i].type
value={VALUE}
[/set_variable]
[set_variable]
name=chgtype_store[$i].alignment
value={ALIGN}
[/set_variable]
[unstore_unit]
variable=chgtype_store[$i]
[/unstore_unit]
{NEXT i}
{CLEAR_VARIABLE chgtype_store}
#enddef
#define OBJ_HOLY_ANKH X Y ID
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
side=1
[/filter]
[object]
id={ID}
name= _ "Holy Ankh"
image=items/ankh-necklace.png
duration=scenario
description= _ "You find a hefty pendant on a strange and ominous looking altar. It glows brightly when you pick it up!"
cannot_use_message= _ "There is a strange altar here and a pendant on it. I dont want to touch it."
[filter]
side=1
x,y={X},{Y}
[/filter]
[then]
[remove_item]
x,y={X},{Y}
[/remove_item]
[/then]
[effect]
apply_to=new_attack
name=ankh
description= _ "holy ankh"
icon=attacks/lightbeam.png
type=arcane
range=ranged
[specials]
{WEAPON_SPECIAL_MAGICAL}
[/specials]
damage=24
number=1
[/effect]
[effect]
apply_to=new_animation
[attack_anim]
[filter_attack]
name=ankh
[/filter_attack]
{MISSILE_FRAME_LIGHT_BEAM}
{SOUND:HIT_AND_MISS {SOUND_LIST:HOLY} {SOUND_LIST:HOLY_MISS} -75}
[/attack_anim]
[/effect]
[/object]
[/event]
#enddef
#define LIBERTY_DEATHS
[event]
name=last breath