Fulfil the rest of bug #12180. Reindent appropriately.
This commit is contained in:
parent
08f09eda6f
commit
b31c324728
19 changed files with 365 additions and 358 deletions
|
@ -140,39 +140,39 @@
|
|||
{VARIABLE_OP number_of_guards random 0..2}
|
||||
|
||||
{REPEAT $number_of_guards (
|
||||
[store_locations]
|
||||
[filter_adjacent_location]
|
||||
x,y={X},{Y}
|
||||
[/filter_adjacent_location]
|
||||
[store_locations]
|
||||
[filter_adjacent_location]
|
||||
x,y={X},{Y}
|
||||
[/filter_adjacent_location]
|
||||
|
||||
[not]
|
||||
[filter]
|
||||
[/filter]
|
||||
[/not]
|
||||
[not]
|
||||
[filter]
|
||||
[/filter]
|
||||
[/not]
|
||||
|
||||
variable=possible_guard_locations
|
||||
[/store_locations]
|
||||
variable=possible_guard_locations
|
||||
[/store_locations]
|
||||
|
||||
{IF_VAR possible_guard_locations.length greater_than 0 (
|
||||
[then]
|
||||
{VARIABLE_OP random_location_index random 0..$possible_guard_locations.length}
|
||||
{IF_VAR possible_guard_locations.length greater_than 0 (
|
||||
[then]
|
||||
{VARIABLE_OP random_location_index random 0..$possible_guard_locations.length}
|
||||
|
||||
[move_unit_fake]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
x={X},$possible_guard_locations[$random_location_index].x
|
||||
y={Y},$possible_guard_locations[$random_location_index].y
|
||||
[/move_unit_fake]
|
||||
[move_unit_fake]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
x={X},$possible_guard_locations[$random_location_index].x
|
||||
y={Y},$possible_guard_locations[$random_location_index].y
|
||||
[/move_unit_fake]
|
||||
|
||||
[unit]
|
||||
name={NAME_STRING} # wmllint: ignore
|
||||
type={TYPE}
|
||||
side={SIDE}
|
||||
x,y=$possible_guard_locations[$random_location_index].x,$possible_guard_locations[$random_location_index].y
|
||||
random_traits=yes
|
||||
[/unit]
|
||||
[/then]
|
||||
)}
|
||||
[unit]
|
||||
name={NAME_STRING} # wmllint: ignore
|
||||
type={TYPE}
|
||||
side={SIDE}
|
||||
x,y=$possible_guard_locations[$random_location_index].x,$possible_guard_locations[$random_location_index].y
|
||||
random_traits=yes
|
||||
[/unit]
|
||||
[/then]
|
||||
)}
|
||||
)}
|
||||
|
||||
{CLEAR_VARIABLE number_of_guards}
|
||||
|
@ -202,15 +202,15 @@
|
|||
[/filter]
|
||||
|
||||
{IF_VAR village_$x1|_$y1|_cleared not_equals yes (
|
||||
[then]
|
||||
{RANDOM_GUARDS (Goblin Spearman) (_ "Villager") 2 $x1 $y1}
|
||||
[then]
|
||||
{RANDOM_GUARDS (Goblin Spearman) (_ "Villager") 2 $x1 $y1}
|
||||
|
||||
{VARIABLE village_$x1|_$y1|_cleared yes}
|
||||
[/then]
|
||||
{VARIABLE village_$x1|_$y1|_cleared yes}
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
[allow_undo][/allow_undo]
|
||||
[/else]
|
||||
[else]
|
||||
[allow_undo][/allow_undo]
|
||||
[/else]
|
||||
)}
|
||||
[/event]
|
||||
|
||||
|
|
|
@ -353,15 +353,15 @@
|
|||
name=victory
|
||||
|
||||
{MODIFY_UNIT (
|
||||
side=1
|
||||
{NOT_ON_RECALL_LIST}
|
||||
[not]
|
||||
id=Malin Keshar
|
||||
side=1
|
||||
{NOT_ON_RECALL_LIST}
|
||||
[not]
|
||||
id=Malin Keshar
|
||||
|
||||
[or]
|
||||
id=Darken Volk
|
||||
[/or]
|
||||
[/not]
|
||||
[or]
|
||||
id=Darken Volk
|
||||
[/or]
|
||||
[/not]
|
||||
) variables.got_inside_manor yes}
|
||||
|
||||
{CLEAR_VARIABLE undeadWarning}
|
||||
|
|
|
@ -110,26 +110,26 @@
|
|||
|
||||
# Place manor guards
|
||||
{SCATTER_UNITS 6 Pikeman,Duelist,Pikeman,Spearman,Pikeman,Swordsman 3 (
|
||||
terrain=Rr
|
||||
[not]
|
||||
x,y=25,18
|
||||
radius=4
|
||||
[/not]
|
||||
[not]
|
||||
x,y=31,15
|
||||
radius=2
|
||||
[/not]
|
||||
[not]
|
||||
x,y=11,7
|
||||
[/not]
|
||||
[not]
|
||||
[filter]
|
||||
[/filter]
|
||||
[/not]
|
||||
terrain=Rr
|
||||
[not]
|
||||
x,y=25,18
|
||||
radius=4
|
||||
[/not]
|
||||
[not]
|
||||
x,y=31,15
|
||||
radius=2
|
||||
[/not]
|
||||
[not]
|
||||
x,y=11,7
|
||||
[/not]
|
||||
[not]
|
||||
[filter]
|
||||
[/filter]
|
||||
[/not]
|
||||
) (
|
||||
side=2
|
||||
name= _ "Guard"
|
||||
random_traits=yes
|
||||
side=2
|
||||
name= _ "Guard"
|
||||
random_traits=yes
|
||||
)}
|
||||
|
||||
# Place mages in rooms
|
||||
|
|
|
@ -342,12 +342,12 @@
|
|||
[/filter]
|
||||
|
||||
{MODIFY_UNIT (
|
||||
side=2
|
||||
role=ambusher
|
||||
side=2
|
||||
role=ambusher
|
||||
|
||||
[filter_adjacent]
|
||||
x,y=$x1,$y1
|
||||
[/filter_adjacent]
|
||||
[filter_adjacent]
|
||||
x,y=$x1,$y1
|
||||
[/filter_adjacent]
|
||||
) role not_ambusher}
|
||||
|
||||
[redraw][/redraw]
|
||||
|
|
|
@ -429,12 +429,12 @@
|
|||
[/filter]
|
||||
|
||||
{MODIFY_UNIT (
|
||||
side=2,3
|
||||
role=ambusher
|
||||
side=2,3
|
||||
role=ambusher
|
||||
|
||||
[filter_adjacent]
|
||||
x,y=$x1,$y1
|
||||
[/filter_adjacent]
|
||||
[filter_adjacent]
|
||||
x,y=$x1,$y1
|
||||
[/filter_adjacent]
|
||||
) role not_ambusher}
|
||||
|
||||
[redraw][/redraw]
|
||||
|
|
|
@ -201,14 +201,14 @@
|
|||
[/attack]
|
||||
{DEFENSE_ANIM_RANGE "units/konrad-lord-scepter-sword-defend.png" "units/konrad-lord-scepter-attack-w1.png" {SOUND_LIST:HUMAN_HIT} melee}
|
||||
{DEFENSE_ANIM_FILTERED "units/konrad-commander-scepter-defend.png" "units/konrad-commander-scepter.png" {SOUND_LIST:HUMAN_HIT} (
|
||||
[filter_second_attack]
|
||||
name=scepter of fire
|
||||
[/filter_second_attack]
|
||||
[filter_second_attack]
|
||||
name=scepter of fire
|
||||
[/filter_second_attack]
|
||||
)}
|
||||
{DEFENSE_ANIM_FILTERED "units/konrad-commander-bow-defend.png" "units/konrad-commander-bow.png" {SOUND_LIST:HUMAN_HIT} (
|
||||
[filter_second_attack]
|
||||
name=bow
|
||||
[/filter_second_attack]
|
||||
[filter_second_attack]
|
||||
name=bow
|
||||
[/filter_second_attack]
|
||||
)}
|
||||
[attack_anim]
|
||||
[filter_attack]
|
||||
|
|
|
@ -200,14 +200,14 @@
|
|||
die_sound={SOUND_LIST:HUMAN_DIE}
|
||||
{DEFENSE_ANIM_RANGE "units/konrad-lord-scepter-sword-defend.png" "units/konrad-lord-scepter-attack-w1.png" {SOUND_LIST:HUMAN_HIT} melee}
|
||||
{DEFENSE_ANIM_FILTERED "units/konrad-lord-scepter-defend.png" "units/konrad-lord-scepter.png" {SOUND_LIST:HUMAN_HIT} (
|
||||
[filter_second_attack]
|
||||
name=scepter of fire
|
||||
[/filter_second_attack]
|
||||
[filter_second_attack]
|
||||
name=scepter of fire
|
||||
[/filter_second_attack]
|
||||
)}
|
||||
{DEFENSE_ANIM_FILTERED "units/konrad-lord-bow-defend.png" "units/konrad-lord-bow.png" {SOUND_LIST:HUMAN_HIT} (
|
||||
[filter_second_attack]
|
||||
name=bow
|
||||
[/filter_second_attack]
|
||||
[filter_second_attack]
|
||||
name=bow
|
||||
[/filter_second_attack]
|
||||
)}
|
||||
[attack]
|
||||
name=sword
|
||||
|
|
|
@ -329,27 +329,27 @@
|
|||
#endif
|
||||
|
||||
{IF_VAR $unit.side equals 1 (
|
||||
[then]
|
||||
[message]
|
||||
speaker=Wolmas
|
||||
message= _ "What's happening here? Why are you running like mad, $unit.name|?"
|
||||
[/message]
|
||||
[message]
|
||||
speaker=unit
|
||||
message= _ "Goblin riders on the hunt. We must not let any of them to the village!"
|
||||
[/message]
|
||||
[/then]
|
||||
[then]
|
||||
[message]
|
||||
speaker=Wolmas
|
||||
message= _ "What's happening here? Why are you running like mad, $unit.name|?"
|
||||
[/message]
|
||||
[message]
|
||||
speaker=unit
|
||||
message= _ "Goblin riders on the hunt. We must not let any of them to the village!"
|
||||
[/message]
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
[message]
|
||||
speaker=Wolmas
|
||||
message= _ "Look! Goblin riders are on the hunt - and heading right for Dallben!"
|
||||
[/message]
|
||||
[message]
|
||||
speaker=Remald
|
||||
message= _ "Halt!"
|
||||
[/message]
|
||||
[/else]
|
||||
[else]
|
||||
[message]
|
||||
speaker=Wolmas
|
||||
message= _ "Look! Goblin riders are on the hunt - and heading right for Dallben!"
|
||||
[/message]
|
||||
[message]
|
||||
speaker=Remald
|
||||
message= _ "Halt!"
|
||||
[/message]
|
||||
[/else]
|
||||
)}
|
||||
[/event]
|
||||
|
||||
|
|
|
@ -304,58 +304,77 @@
|
|||
[/store_locations]
|
||||
|
||||
{IF_VAR new_guard_locations.length greater_than 0 (
|
||||
[then]
|
||||
{VARIABLE_OP random_i random "1..$new_guard_locations.length"}
|
||||
{VARIABLE_OP random_i add -1}
|
||||
|
||||
{VARIABLE stored_guard.x $new_guard_locations[$random_i].x}
|
||||
{VARIABLE stored_guard.y $new_guard_locations[$random_i].y}
|
||||
|
||||
[unstore_unit]
|
||||
variable=stored_guard
|
||||
[/unstore_unit]
|
||||
|
||||
[store_locations]
|
||||
[and]
|
||||
x,y=$stored_guard.x,$stored_guard.y
|
||||
radius=2
|
||||
[/and]
|
||||
|
||||
[not]
|
||||
find_in=total_vision_area
|
||||
radius=7
|
||||
|
||||
[filter_radius]
|
||||
terrain=Gg,R*,Re^Gvs,*^V*,C*
|
||||
[/filter_radius]
|
||||
[/not]
|
||||
|
||||
[not]
|
||||
terrain=Gs^Fp,Hh,Ww,Wo,Ss,Ds
|
||||
[/not]
|
||||
|
||||
variable=new_assistant_guard_locations
|
||||
[/store_locations]
|
||||
|
||||
{IF_VAR new_assistant_guard_locations.length greater_than 0 (
|
||||
[then]
|
||||
{VARIABLE_OP random_i random "1..$new_assistant_guard_locations.length"}
|
||||
{VARIABLE_OP random_i random "1..$new_guard_locations.length"}
|
||||
{VARIABLE_OP random_i add -1}
|
||||
|
||||
{VARIABLE_OP assistant_guard_type random "Shock Trooper,Shock Trooper,Iron Mauler,Javelineer,Swordsman,Pikeman"}
|
||||
{VARIABLE stored_guard.x $new_guard_locations[$random_i].x}
|
||||
{VARIABLE stored_guard.y $new_guard_locations[$random_i].y}
|
||||
|
||||
[unit]
|
||||
type=$assistant_guard_type
|
||||
side=2
|
||||
x,y=$new_assistant_guard_locations[$random_i].x,$new_assistant_guard_locations[$random_i].y
|
||||
generate_name=yes
|
||||
random_traits=yes
|
||||
[/unit]
|
||||
[unstore_unit]
|
||||
variable=stored_guard
|
||||
[/unstore_unit]
|
||||
|
||||
[store_locations]
|
||||
[and]
|
||||
x,y=$new_assistant_guard_locations[$random_i].x,$new_assistant_guard_locations[$random_i].y
|
||||
radius=6
|
||||
x,y=$stored_guard.x,$stored_guard.y
|
||||
radius=2
|
||||
[/and]
|
||||
|
||||
[not]
|
||||
find_in=total_vision_area
|
||||
radius=7
|
||||
|
||||
[filter_radius]
|
||||
terrain=Gg,R*,Re^Gvs,*^V*,C*
|
||||
[/filter_radius]
|
||||
[/not]
|
||||
|
||||
[not]
|
||||
terrain=Gs^Fp,Hh,Ww,Wo,Ss,Ds
|
||||
[/not]
|
||||
|
||||
variable=new_assistant_guard_locations
|
||||
[/store_locations]
|
||||
|
||||
{IF_VAR new_assistant_guard_locations.length greater_than 0 (
|
||||
[then]
|
||||
{VARIABLE_OP random_i random "1..$new_assistant_guard_locations.length"}
|
||||
{VARIABLE_OP random_i add -1}
|
||||
|
||||
{VARIABLE_OP assistant_guard_type random "Shock Trooper,Shock Trooper,Iron Mauler,Javelineer,Swordsman,Pikeman"}
|
||||
|
||||
[unit]
|
||||
type=$assistant_guard_type
|
||||
side=2
|
||||
x,y=$new_assistant_guard_locations[$random_i].x,$new_assistant_guard_locations[$random_i].y
|
||||
generate_name=yes
|
||||
random_traits=yes
|
||||
[/unit]
|
||||
|
||||
[store_locations]
|
||||
[and]
|
||||
x,y=$new_assistant_guard_locations[$random_i].x,$new_assistant_guard_locations[$random_i].y
|
||||
radius=6
|
||||
|
||||
[filter_radius]
|
||||
terrain=Gg,R*,Re^Gvs,*^V*,C*
|
||||
[/filter_radius]
|
||||
[/and]
|
||||
|
||||
[or]
|
||||
find_in=total_vision_area
|
||||
[/or]
|
||||
|
||||
variable=total_vision_area
|
||||
[/store_locations]
|
||||
[/then]
|
||||
)}
|
||||
|
||||
[store_locations]
|
||||
[and]
|
||||
x,y=$stored_guard.x,$stored_guard.y
|
||||
radius=$guard_vision_range
|
||||
|
||||
[filter_radius]
|
||||
terrain=Gg,R*,Re^Gvs,*^V*,C*
|
||||
|
@ -368,28 +387,9 @@
|
|||
|
||||
variable=total_vision_area
|
||||
[/store_locations]
|
||||
|
||||
{VARIABLE_OP guards add 1}
|
||||
[/then]
|
||||
)}
|
||||
|
||||
[store_locations]
|
||||
[and]
|
||||
x,y=$stored_guard.x,$stored_guard.y
|
||||
radius=$guard_vision_range
|
||||
|
||||
[filter_radius]
|
||||
terrain=Gg,R*,Re^Gvs,*^V*,C*
|
||||
[/filter_radius]
|
||||
[/and]
|
||||
|
||||
[or]
|
||||
find_in=total_vision_area
|
||||
[/or]
|
||||
|
||||
variable=total_vision_area
|
||||
[/store_locations]
|
||||
|
||||
{VARIABLE_OP guards add 1}
|
||||
[/then]
|
||||
)}
|
||||
|
||||
{VARIABLE_OP loops add 1}
|
||||
|
@ -678,12 +678,12 @@
|
|||
[/filter_second]
|
||||
|
||||
{IF_VAR $second_unit.hitpoints greater_than 0 (
|
||||
[then]
|
||||
[message]
|
||||
speaker=Baldras
|
||||
message= _ "Fall back, quickly! Maybe we can yet lose them!"
|
||||
[/message]
|
||||
[/then]
|
||||
[then]
|
||||
[message]
|
||||
speaker=Baldras
|
||||
message= _ "Fall back, quickly! Maybe we can yet lose them!"
|
||||
[/message]
|
||||
[/then]
|
||||
)}
|
||||
[/event]
|
||||
|
||||
|
|
|
@ -279,55 +279,55 @@
|
|||
[/scroll_to]
|
||||
|
||||
{REPEAT 3 (
|
||||
[removeitem]
|
||||
x,y=12,12
|
||||
[/removeitem]
|
||||
[removeitem]
|
||||
x,y=13,13
|
||||
[/removeitem]
|
||||
[removeitem]
|
||||
x,y=14,13
|
||||
[/removeitem]
|
||||
[removeitem]
|
||||
x,y=12,12
|
||||
[/removeitem]
|
||||
[removeitem]
|
||||
x,y=13,13
|
||||
[/removeitem]
|
||||
[removeitem]
|
||||
x,y=14,13
|
||||
[/removeitem]
|
||||
|
||||
[terrain]
|
||||
x=12,13,14
|
||||
y=12,13,13
|
||||
terrain=Xu
|
||||
[/terrain]
|
||||
[terrain]
|
||||
x=12,13,14
|
||||
y=12,13,13
|
||||
terrain=Xu
|
||||
[/terrain]
|
||||
|
||||
[redraw][/redraw]
|
||||
[delay]
|
||||
time=200
|
||||
[/delay]
|
||||
[redraw][/redraw]
|
||||
[delay]
|
||||
time=200
|
||||
[/delay]
|
||||
|
||||
[terrain]
|
||||
x=12,14
|
||||
y=12,13
|
||||
terrain=Uu
|
||||
[/terrain]
|
||||
[terrain]
|
||||
x=13
|
||||
y=13
|
||||
terrain=Rp
|
||||
[/terrain]
|
||||
[terrain]
|
||||
x=12,14
|
||||
y=12,13
|
||||
terrain=Uu
|
||||
[/terrain]
|
||||
[terrain]
|
||||
x=13
|
||||
y=13
|
||||
terrain=Rp
|
||||
[/terrain]
|
||||
|
||||
[item]
|
||||
x,y=12,12
|
||||
image=scenery/rubble.png
|
||||
[/item]
|
||||
[item]
|
||||
x,y=13,13
|
||||
image=scenery/rubble.png
|
||||
[/item]
|
||||
[item]
|
||||
x,y=14,13
|
||||
image=scenery/rubble.png
|
||||
[/item]
|
||||
[item]
|
||||
x,y=12,12
|
||||
image=scenery/rubble.png
|
||||
[/item]
|
||||
[item]
|
||||
x,y=13,13
|
||||
image=scenery/rubble.png
|
||||
[/item]
|
||||
[item]
|
||||
x,y=14,13
|
||||
image=scenery/rubble.png
|
||||
[/item]
|
||||
|
||||
[redraw][/redraw]
|
||||
[delay]
|
||||
time=200
|
||||
[/delay]
|
||||
[redraw][/redraw]
|
||||
[delay]
|
||||
time=200
|
||||
[/delay]
|
||||
)}
|
||||
[/event]
|
||||
|
||||
|
|
|
@ -713,10 +713,10 @@
|
|||
[/unstore_unit]
|
||||
|
||||
{MODIFY_UNIT (
|
||||
side=4
|
||||
[not]
|
||||
id=Grüü
|
||||
[/not]
|
||||
side=4
|
||||
[not]
|
||||
id=Grüü
|
||||
[/not]
|
||||
) side 1}
|
||||
|
||||
[store_unit]
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
image="units/masked_fighter.png"
|
||||
advanceto=Dwarvish Masked Steelclad
|
||||
{DEFENSE_ANIM_FILTERED "units/masked_fighter-axedefend.png" "units/masked_fighter.png" {SOUND_LIST:DWARF_HIT} (
|
||||
[filter_second_attack]
|
||||
name=axe
|
||||
[/filter_second_attack]
|
||||
[filter_second_attack]
|
||||
name=axe
|
||||
[/filter_second_attack]
|
||||
)}
|
||||
{DEFENSE_ANIM_FILTERED "units/masked_fighter-hammerdefend.png" "units/masked_fighter.png" {SOUND_LIST:DWARF_HIT} (
|
||||
[filter_second_attack]
|
||||
name=hammer
|
||||
[/filter_second_attack]
|
||||
[filter_second_attack]
|
||||
name=hammer
|
||||
[/filter_second_attack]
|
||||
)}
|
||||
{DEFENSE_ANIM_RANGE "units/masked_fighter-hammer.png" "units/masked_fighter.png" {SOUND_LIST:DWARF_HIT} ranged}
|
||||
[attack]
|
||||
|
|
|
@ -445,7 +445,7 @@
|
|||
#endif
|
||||
|
||||
{TIME_ACTIONS (
|
||||
{ELVISH_AMBUSH_AREA 2 1-29 23-50 $ambushing_elves}
|
||||
{ELVISH_AMBUSH_AREA 2 1-29 23-50 $ambushing_elves}
|
||||
)}
|
||||
|
||||
{CLEAR_VARIABLE possible_ambush_locations}
|
||||
|
@ -621,14 +621,14 @@
|
|||
[/filter]
|
||||
[/unstone]
|
||||
{MODIFY_UNIT (
|
||||
side=2
|
||||
[filter_location]
|
||||
terrain=Gs^Fp
|
||||
[and]
|
||||
x,y=$x1,$y1
|
||||
radius=4
|
||||
[/and]
|
||||
[/filter_location]
|
||||
side=2
|
||||
[filter_location]
|
||||
terrain=Gs^Fp
|
||||
[and]
|
||||
x,y=$x1,$y1
|
||||
radius=4
|
||||
[/and]
|
||||
[/filter_location]
|
||||
) side 3}
|
||||
|
||||
[redraw][/redraw]
|
||||
|
@ -863,15 +863,15 @@
|
|||
{VARIABLE_OP undead_spawns add -$undead.length}
|
||||
|
||||
{REPEAT $undead_spawns (
|
||||
{VARIABLE_OP undead_spawn_y random "19..34"}
|
||||
{VARIABLE_OP undead_spawn_y random "19..34"}
|
||||
|
||||
{VARIABLE_OP undead_spawn_type random $undead_spawn_types}
|
||||
{VARIABLE_OP undead_spawn_type random $undead_spawn_types}
|
||||
|
||||
[unit]
|
||||
side=2
|
||||
type=$undead_spawn_type
|
||||
x,y=19,$undead_spawn_y
|
||||
[/unit]
|
||||
[unit]
|
||||
side=2
|
||||
type=$undead_spawn_type
|
||||
x,y=19,$undead_spawn_y
|
||||
[/unit]
|
||||
)}
|
||||
[/event]
|
||||
[/event]
|
||||
|
|
|
@ -299,7 +299,7 @@
|
|||
#! {SET_LABEL_PERSISTANT 4 7 _ "There really will be dragons here!!"}
|
||||
{SET_LABEL {X} {Y} ({STRING}) }
|
||||
{ON_SIDETURN (
|
||||
{SET_LABEL {X} {Y} ({STRING}) }
|
||||
{SET_LABEL {X} {Y} ({STRING}) }
|
||||
)}
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -514,55 +514,55 @@
|
|||
|
||||
#define OBJ_TRIDENT_STORM X Y ID
|
||||
{PICKUPPABLE_ITEM {ID} {X} {Y} race=merman items/storm-trident.png _"Should $unit.name pick up the trident?" _"Only the mermen can use this item!" (
|
||||
[object]
|
||||
name= _ "Storm Trident"
|
||||
image=items/storm-trident.png
|
||||
duration=forever
|
||||
description= _ "This trident allows a merman to shoot electric bolts at his enemies!"
|
||||
[effect]
|
||||
apply_to=new_attack
|
||||
name="storm trident"
|
||||
description= _ "storm trident"
|
||||
icon=attacks/lightning.png
|
||||
type=fire
|
||||
range=ranged
|
||||
[specials]
|
||||
{WEAPON_SPECIAL_MAGICAL}
|
||||
[/specials]
|
||||
damage=14
|
||||
number=2
|
||||
[/effect]
|
||||
[effect]
|
||||
apply_to=new_animation
|
||||
name="storm trident"
|
||||
[attack_anim]
|
||||
[filter_attack]
|
||||
name="storm trident"
|
||||
[/filter_attack]
|
||||
[missile_frame]
|
||||
begin=-150
|
||||
end=0
|
||||
image=projectiles/lightning-n.png
|
||||
image_diagonal=projectiles/lightning-ne.png
|
||||
[/missile_frame]
|
||||
[if]
|
||||
hits=no
|
||||
[frame]
|
||||
begin=-200
|
||||
[object]
|
||||
name= _ "Storm Trident"
|
||||
image=items/storm-trident.png
|
||||
duration=forever
|
||||
description= _ "This trident allows a merman to shoot electric bolts at his enemies!"
|
||||
[effect]
|
||||
apply_to=new_attack
|
||||
name="storm trident"
|
||||
description= _ "storm trident"
|
||||
icon=attacks/lightning.png
|
||||
type=fire
|
||||
range=ranged
|
||||
[specials]
|
||||
{WEAPON_SPECIAL_MAGICAL}
|
||||
[/specials]
|
||||
damage=14
|
||||
number=2
|
||||
[/effect]
|
||||
[effect]
|
||||
apply_to=new_animation
|
||||
name="storm trident"
|
||||
[attack_anim]
|
||||
[filter_attack]
|
||||
name="storm trident"
|
||||
[/filter_attack]
|
||||
[missile_frame]
|
||||
begin=-150
|
||||
end=0
|
||||
sound=lightning-miss.ogg
|
||||
[/frame]
|
||||
[/if]
|
||||
[else]
|
||||
hits=yes
|
||||
[frame]
|
||||
begin=-200
|
||||
end=0
|
||||
sound=lightning.ogg
|
||||
[/frame]
|
||||
[/else]
|
||||
[/attack_anim]
|
||||
[/effect]
|
||||
[/object]
|
||||
image=projectiles/lightning-n.png
|
||||
image_diagonal=projectiles/lightning-ne.png
|
||||
[/missile_frame]
|
||||
[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]
|
||||
[/object]
|
||||
)}
|
||||
#enddef
|
||||
|
|
|
@ -274,8 +274,8 @@
|
|||
[/store_unit]
|
||||
|
||||
{MODIFY_UNIT (
|
||||
side={SIDE}
|
||||
canrecruit=yes
|
||||
side={SIDE}
|
||||
canrecruit=yes
|
||||
) canrecruit no}
|
||||
[/then]
|
||||
[/if]
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
description= _ "Dwarvish Fighters wield mighty battle axes and hammers, which make them feared opponents in close range combat. They are excellent in mountainous terrain or underground. Though not swift, their power and endurance more than compensate."
|
||||
die_sound={SOUND_LIST:DWARF_DIE}
|
||||
{DEFENSE_ANIM_FILTERED "units/dwarves/fighter-defend-2.png" "units/dwarves/fighter-defend-1.png" {SOUND_LIST:DWARF_HIT} (
|
||||
[filter_second_attack]
|
||||
name=axe
|
||||
[/filter_second_attack]
|
||||
[filter_second_attack]
|
||||
name=axe
|
||||
[/filter_second_attack]
|
||||
)}
|
||||
{DEFENSE_ANIM_FILTERED "units/dwarves/fighter-hammer-defend.png" "units/dwarves/fighter-hammer.png" {SOUND_LIST:DWARF_HIT} (
|
||||
[filter_second_attack]
|
||||
name=hammer
|
||||
[/filter_second_attack]
|
||||
[filter_second_attack]
|
||||
name=hammer
|
||||
[/filter_second_attack]
|
||||
)}
|
||||
{DEFENSE_ANIM_RANGE "units/dwarves/fighter-defend.png" "units/dwarves/fighter.png" {SOUND_LIST:DWARF_HIT} ranged}
|
||||
[attack]
|
||||
|
|
|
@ -208,12 +208,12 @@ usage=mask
|
|||
|
||||
#define TS_OPEN_WALLS
|
||||
{EARTHQUAKE (
|
||||
{IF_ALLIED 7 2 ({MODIFY_TERRAIN_MASK 7 13 ("{TS_WALL_MASK_NORTH_WEST}") ()} )}
|
||||
{IF_ALLIED 2 3 ({MODIFY_TERRAIN_MASK 23 6 ("{TS_WALL_MASK_NORTH}") ()} )}
|
||||
{IF_ALLIED 3 4 ({MODIFY_TERRAIN_MASK 29 13 ("{TS_WALL_MASK_NORTH_EAST}") ()} )}
|
||||
{IF_ALLIED 4 5 ({MODIFY_TERRAIN_MASK 29 23 ("{TS_WALL_MASK_SOUTH_EAST}") ()} )}
|
||||
{IF_ALLIED 5 6 ({MODIFY_TERRAIN_MASK 23 26 ("{TS_WALL_MASK_SOUTH}") ()} )}
|
||||
{IF_ALLIED 6 7 ({MODIFY_TERRAIN_MASK 7 23 ("{TS_WALL_MASK_SOUTH_WEST}") ()} )}
|
||||
{IF_ALLIED 7 2 ({MODIFY_TERRAIN_MASK 7 13 ("{TS_WALL_MASK_NORTH_WEST}") ()} )}
|
||||
{IF_ALLIED 2 3 ({MODIFY_TERRAIN_MASK 23 6 ("{TS_WALL_MASK_NORTH}") ()} )}
|
||||
{IF_ALLIED 3 4 ({MODIFY_TERRAIN_MASK 29 13 ("{TS_WALL_MASK_NORTH_EAST}") ()} )}
|
||||
{IF_ALLIED 4 5 ({MODIFY_TERRAIN_MASK 29 23 ("{TS_WALL_MASK_SOUTH_EAST}") ()} )}
|
||||
{IF_ALLIED 5 6 ({MODIFY_TERRAIN_MASK 23 26 ("{TS_WALL_MASK_SOUTH}") ()} )}
|
||||
{IF_ALLIED 6 7 ({MODIFY_TERRAIN_MASK 7 23 ("{TS_WALL_MASK_SOUTH_WEST}") ()} )}
|
||||
)}
|
||||
#enddef
|
||||
|
||||
|
@ -223,12 +223,12 @@ usage=mask
|
|||
|
||||
#define TS_OPEN_CASTLE
|
||||
{EARTHQUAKE (
|
||||
{IF_ALIVE 2 ({MODIFY_TERRAIN_MASK 19 16 ("{TS_OPEN_MASK_NORTH_WEST}") ()} )}
|
||||
{IF_ALIVE 3 ({MODIFY_TERRAIN_MASK 25 17 ("{TS_OPEN_MASK_NORTH_EAST}") ()} )}
|
||||
{IF_ALIVE 4 ({MODIFY_TERRAIN_MASK 29 20 ("{TS_OPEN_MASK_EAST}") ()} )}
|
||||
{IF_ALIVE 5 ({MODIFY_TERRAIN_MASK 25 23 ("{TS_OPEN_MASK_SOUTH_EAST}") ()} )}
|
||||
{IF_ALIVE 6 ({MODIFY_TERRAIN_MASK 19 23 ("{TS_OPEN_MASK_SOUTH_WEST}") ()} )}
|
||||
{IF_ALIVE 7 ({MODIFY_TERRAIN_MASK 19 20 ("{TS_OPEN_MASK_WEST}") ()} )}
|
||||
{IF_ALIVE 2 ({MODIFY_TERRAIN_MASK 19 16 ("{TS_OPEN_MASK_NORTH_WEST}") ()} )}
|
||||
{IF_ALIVE 3 ({MODIFY_TERRAIN_MASK 25 17 ("{TS_OPEN_MASK_NORTH_EAST}") ()} )}
|
||||
{IF_ALIVE 4 ({MODIFY_TERRAIN_MASK 29 20 ("{TS_OPEN_MASK_EAST}") ()} )}
|
||||
{IF_ALIVE 5 ({MODIFY_TERRAIN_MASK 25 23 ("{TS_OPEN_MASK_SOUTH_EAST}") ()} )}
|
||||
{IF_ALIVE 6 ({MODIFY_TERRAIN_MASK 19 23 ("{TS_OPEN_MASK_SOUTH_WEST}") ()} )}
|
||||
{IF_ALIVE 7 ({MODIFY_TERRAIN_MASK 19 20 ("{TS_OPEN_MASK_WEST}") ()} )}
|
||||
)}
|
||||
#enddef
|
||||
|
||||
|
@ -279,46 +279,46 @@ usage=mask
|
|||
|
||||
#define TS_SPAWNS
|
||||
{ON_TURN 2 (
|
||||
{TS_SPAWN1 "Footpad"}{TS_SPAWN1 "Peasant"}
|
||||
{TS_SPAWN2 "Bowman"}{TS_SPAWN2 "Cavalryman"}
|
||||
{TS_SPAWN1 "Footpad"}{TS_SPAWN1 "Peasant"}
|
||||
{TS_SPAWN2 "Bowman"}{TS_SPAWN2 "Cavalryman"}
|
||||
)}
|
||||
{ON_TURN 5 (
|
||||
{TS_SPAWN1 "Thief"}{TS_SPAWN1 "Poacher"}
|
||||
{TS_SPAWN2 "Dwarvish Guardsman"}{TS_SPAWN2 "Dwarvish Fighter"}
|
||||
{TS_SPAWN1 "Thief"}{TS_SPAWN1 "Poacher"}
|
||||
{TS_SPAWN2 "Dwarvish Guardsman"}{TS_SPAWN2 "Dwarvish Fighter"}
|
||||
)}
|
||||
{ON_TURN 8 (
|
||||
{TS_SPAWN1 "Elvish Archer"}{TS_SPAWN1 "Elvish Shaman"}
|
||||
{TS_LAKE_SPAWN "Merman Hunter"}
|
||||
{TS_SPAWN2 "Elvish Archer"}
|
||||
{TS_SPAWN1 "Elvish Archer"}{TS_SPAWN1 "Elvish Shaman"}
|
||||
{TS_LAKE_SPAWN "Merman Hunter"}
|
||||
{TS_SPAWN2 "Elvish Archer"}
|
||||
)}
|
||||
{ON_TURN 11 (
|
||||
{TS_SPAWN1 "Orcish Slayer"}
|
||||
{TS_LAKE_SPAWN "Naga Fighter"}
|
||||
{TS_SPAWN2 "Troll Hero"}{TS_SPAWN2 "Troll Whelp"}
|
||||
{TS_SPAWN1 "Orcish Slayer"}
|
||||
{TS_LAKE_SPAWN "Naga Fighter"}
|
||||
{TS_SPAWN2 "Troll Hero"}{TS_SPAWN2 "Troll Whelp"}
|
||||
)}
|
||||
{ON_TURN 14 (
|
||||
{TS_SPAWN1 "Drake Warrior"}{TS_SPAWN1 "Drake Glider"}
|
||||
{TS_SPAWN2 "Fire Drake"}{TS_SPAWN2 "Drake Fighter"}
|
||||
{TS_SPAWN1 "Drake Warrior"}{TS_SPAWN1 "Drake Glider"}
|
||||
{TS_SPAWN2 "Fire Drake"}{TS_SPAWN2 "Drake Fighter"}
|
||||
)}
|
||||
{ON_TURN 17 (
|
||||
{TS_SPAWN1 "Death Knight"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Vampire Bat"}
|
||||
{TS_SWAMP_SPAWN "Tentacle of the Deep"}
|
||||
{TS_SPAWN2 "Lich"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Vampire Bat"}
|
||||
{TS_SPAWN1 "Death Knight"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Vampire Bat"}
|
||||
{TS_SWAMP_SPAWN "Tentacle of the Deep"}
|
||||
{TS_SPAWN2 "Lich"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Vampire Bat"}
|
||||
)}
|
||||
{ON_TURN 20 (
|
||||
{TS_SPAWN1 "Drake Enforcer"}
|
||||
{TS_LAKE_SPAWN "Mermaid Diviner"}{TS_LAKE_SPAWN "Merman Entangler"}
|
||||
{TS_SPAWN2 "Drake Enforcer"}
|
||||
{TS_SPAWN1 "Drake Enforcer"}
|
||||
{TS_LAKE_SPAWN "Mermaid Diviner"}{TS_LAKE_SPAWN "Merman Entangler"}
|
||||
{TS_SPAWN2 "Drake Enforcer"}
|
||||
)}
|
||||
{ON_TURN 23 (
|
||||
{TS_SPAWN1 "Dark Sorcerer"}
|
||||
{TS_LAKE_SPAWN "Shadow"}{TS_LAKE_SPAWN "Shadow"}{TS_LAKE_SPAWN "Shadow"}
|
||||
{TS_SPAWN2 "Dark Sorcerer"}
|
||||
{TS_SPAWN1 "Dark Sorcerer"}
|
||||
{TS_LAKE_SPAWN "Shadow"}{TS_LAKE_SPAWN "Shadow"}{TS_LAKE_SPAWN "Shadow"}
|
||||
{TS_SPAWN2 "Dark Sorcerer"}
|
||||
)}
|
||||
{ON_TURN 26 (
|
||||
{TS_SPAWN1 "Goblin Rouser"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}
|
||||
{TS_SWAMP_SPAWN "Cuttle Fish"}
|
||||
{TS_SPAWN2 "Goblin Rouser"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}
|
||||
{TS_SPAWN1 "Goblin Rouser"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}
|
||||
{TS_SWAMP_SPAWN "Cuttle Fish"}
|
||||
{TS_SPAWN2 "Goblin Rouser"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}
|
||||
)}
|
||||
#enddef
|
||||
|
||||
|
@ -344,14 +344,14 @@ usage=mask
|
|||
victory_when_enemies_defeated=yes
|
||||
|
||||
{ON_PRESTART (
|
||||
{SET_OBJECTIVES 0 (_ "Survive for 32 turns.") (_ "Hint: Learning the enemy spawnpoints and types helps alot.") (
|
||||
{VICTORY_CONDITION (_ "Survive all enemy attacks.")}
|
||||
{DEFEAT_CONDITION (_ "Death of your team leaders.")}
|
||||
)}
|
||||
{SET_OBJECTIVES 0 (_ "Survive for 32 turns.") (_ "Hint: Learning the enemy spawnpoints and types helps alot.") (
|
||||
{VICTORY_CONDITION (_ "Survive all enemy attacks.")}
|
||||
{DEFEAT_CONDITION (_ "Death of your team leaders.")}
|
||||
)}
|
||||
)}
|
||||
{ON_START (
|
||||
{TS_SET_LABELS}
|
||||
{TS_OPEN_WALLS}
|
||||
{TS_SET_LABELS}
|
||||
{TS_OPEN_WALLS}
|
||||
)}
|
||||
|
||||
{TS_SPAWNS}
|
||||
|
@ -359,27 +359,27 @@ usage=mask
|
|||
{ON_TURN 25 {TS_BUILD_CASTLE}}
|
||||
{ON_TURN 26 {TS_OPEN_CASTLE}}
|
||||
{ON_TURN 32 (
|
||||
{IF_ALIVE 2 ({ENDGAME victory})}
|
||||
{IF_ALIVE 3 ({ENDGAME victory})}
|
||||
{IF_ALIVE 4 ({ENDGAME victory})}
|
||||
{IF_ALIVE 5 ({ENDGAME victory})}
|
||||
{IF_ALIVE 6 ({ENDGAME victory})}
|
||||
{IF_ALIVE 7 ({ENDGAME victory})}
|
||||
{IF_ALIVE 2 ({ENDGAME victory})}
|
||||
{IF_ALIVE 3 ({ENDGAME victory})}
|
||||
{IF_ALIVE 4 ({ENDGAME victory})}
|
||||
{IF_ALIVE 5 ({ENDGAME victory})}
|
||||
{IF_ALIVE 6 ({ENDGAME victory})}
|
||||
{IF_ALIVE 7 ({ENDGAME victory})}
|
||||
)}
|
||||
|
||||
{ON_VICTORY (
|
||||
{MESSAGE narrator (units/elves-wood/shyde.png) (_ "Faery") (_ "Congratulations for surviving the map that so many people claim is impossible. Frankly, I haven't got a clue as to how you did it, so send me the replay by mail to: roze@roze.mine.nu. Thank You!")}
|
||||
{MESSAGE narrator (units/elves-wood/shyde.png) (_ "Faery") (_ "Congratulations for surviving the map that so many people claim is impossible. Frankly, I haven't got a clue as to how you did it, so send me the replay by mail to: roze@roze.mine.nu. Thank You!")}
|
||||
)}
|
||||
{ON_DEFEAT (
|
||||
{MESSAGE narrator (units/undead/wraith.png) (_ "Death") (_ "You have lost this game, but fear not. You can always try again. And again. And again. *Muahahaha*")}
|
||||
{MESSAGE narrator (units/undead/wraith.png) (_ "Death") (_ "You have lost this game, but fear not. You can always try again. And again. And again. *Muahahaha*")}
|
||||
)}
|
||||
|
||||
{DEFAULT_MUSIC_PLAYLIST}
|
||||
{DEFAULT_SCHEDULE}
|
||||
|
||||
{SIDE_COMPUTER 1 Attacker (_ "Attacker") 1000 47 () (
|
||||
leader_value=7.0
|
||||
aggression=0.95
|
||||
leader_value=7.0
|
||||
aggression=0.95
|
||||
)}
|
||||
{SIDE_PLAYER 2 Defenders (_ "Defender") 125 -2 ()}
|
||||
{SIDE_PLAYER 3 Defenders (_ "Defender") 125 -2 ()}
|
||||
|
|
|
@ -75,7 +75,9 @@ def is_directive(str):
|
|||
|
||||
def closer(str):
|
||||
"Are we looking at a closing tag?"
|
||||
if str.startswith("[/"):
|
||||
if str.startswith("#"):
|
||||
return False
|
||||
elif str.startswith("[/") or str.startswith(")"):
|
||||
return True
|
||||
else:
|
||||
for prefix in closer_prefixes:
|
||||
|
@ -85,10 +87,15 @@ def closer(str):
|
|||
|
||||
def opener(str):
|
||||
"Are we looking at an opening tag?"
|
||||
if str.startswith("#"):
|
||||
return False
|
||||
# This logic is a bit obscure. The 'not "[/" in str' catches the
|
||||
# obvious case of a closing tag, but it also catches the idiom
|
||||
# [allow_undo][/allow_undo] which we want to treat as a no-op.
|
||||
if (str.startswith("[") and not closer(str) and not "[/" in str):
|
||||
elif (str.startswith("[") and not closer(str) and not "[/" in str):
|
||||
return True
|
||||
# Trailing ( opens a scope to be closed by ).
|
||||
elif str.endswith("(\n"):
|
||||
return True
|
||||
else:
|
||||
for prefix in opener_prefixes:
|
||||
|
|
Loading…
Add table
Reference in a new issue