DM: Rewrote the generator for scenario 7.

This commit is contained in:
Fabian Müller 2009-04-11 12:34:10 +00:00
parent 97f999a3f3
commit 6fc2fb1504
4 changed files with 96 additions and 207 deletions

View file

@ -57,14 +57,16 @@
#ifdef NORMAL
{MEMOIRS_GENERATOR_SKELETON 7 5 12}
{MEMOIRS_GENERATOR_SKELETON_ARCHER 11 19 12}
{MEMOIRS_GENERATOR_SKELETON 11 19 12}
#endif
#ifdef HARD
{MEMOIRS_GENERATOR_SKELETON 18 3 12}
{MEMOIRS_GENERATOR_SKELETON_ARCHER 11 19 12}
{MEMOIRS_GENERATOR_SKELETON 11 19 12}
#endif HARD
{MEMOIRS_GENERATOR}
# if the player manages to destroy all generators...
# an unlikely outcome unless we are on EASY
[event]

View file

@ -11,3 +11,8 @@
{TERRAIN_BASE Qea ethereal-abyss1 }
{WALL_TRANSITION_LF Qea (!,Qea) -90 ground chasm}
# Monolith overlay
{OVERLAY *^Im1 ../scenery/monolith1}
{OVERLAY *^Im2 ../scenery/monolith2}

View file

@ -14,3 +14,25 @@
aliasof=Qt
editor_group=dm
[/terrain]
#
# Milestones
#
[terrain]
symbol_image=../scenery/monolith1
id=milestone1
name= _ "Milestone1"
string=^Im1
aliasof=_bas
editor_group=dm
[/terrain]
[terrain]
symbol_image=../scenery/monolith2
id=milestone2
name= _ "Milestone2"
string=^Im2
aliasof=_bas
editor_group=dm
[/terrain]

View file

@ -1,20 +1,64 @@
#textdomain wesnoth-dm
#define MEMOIRS_GENERATOR_SKELETON X Y END_TURN_NUMBER
# decorate the hex
[item]
image=scenery/monolith2.png
x={X}
y={Y}
[/item]
#define MEMOIRS_GENERATOR_SKELETON X Y Z
# set the generator's terrain
[event]
name=prestart
[terrain]
x={X}
y={Y}
terrain=Gs^Im2
[/terrain]
[/event]
[event]
name=turn {Z}
[terrain]
x={X}
y={Y}
terrain=Gs^Im1
[/terrain]
[/event]
#enddef
#define MEMOIRS_GENERATOR
# generate a unit each turn
[event]
name=new turn
first_time_only=no
[store_locations]
terrain=*^Im2
variable=monoliths
[/store_locations]
{FOREACH monoliths one}
[scroll_to]
x=$monoliths[$one].x
y=$monoliths[$one].y
[/scroll_to]
[sound]
name=heal.wav
[/sound]
{RANDOM (Skeleton,Skeleton Archer)}
[unit]
type=$random
side=2
x=$monoliths[$one].x
y=$monoliths[$one].y
animate=yes
[/unit]
{NEXT one}
[/event]
# if someone capable of destroying the generator moves there
[event]
name=moveto
[filter]
side=1
x={X}
y={Y}
type=Mage of Light,White Mage,Great Mage,Arch Mage,Red Mage,Mage,Elder Mage,Paladin,Silver Mage,Journeyman Mage,Mage Leader,Mage Commander
[filter_location]
terrain=Gs^Im2
[/filter_location]
[/filter]
[message]
speaker=unit
@ -36,14 +80,11 @@
green=0
blue=0
[/colour_adjust]
[set_variable]
name=generator_killed_{X}_{Y}
value=true
[/set_variable]
[removeitem]
x={X}
y={Y}
[/removeitem]
[terrain]
x=$unit.x
y=$unit.y
terrain=Gg^Im1
[/terrain]
[/event]
# if someone who can't destroy the generator moves there
@ -51,198 +92,17 @@
name=moveto
[filter]
side=1
x={X}
y={Y}
[not]
type=Mage of Light,White Mage,Great Mage,Arch Mage,Red Mage,Mage,Elder Mage,Paladin,Silver Mage,Journeyman Mage,Mage Leader,Mage Commander
[/not]
[filter_location]
terrain=Gs^Im2
[/filter_location]
[/filter]
[if]
[variable]
name=generator_killed_{X}_{Y}
boolean_equals=false
[/variable]
[then]
[message]
speaker=unit
message=_"Evil emanates from this stone, but I have not the power to destroy it."
[/message]
[/then]
[/if]
[/event]
# clean up variables
[event]
name=victory
[clear_variable]
name=generator_killed_{X}_{Y}
[/clear_variable]
[/event]
# switch off the generator on the last turn
[event]
name=turn {END_TURN_NUMBER}
[set_variable]
name=generator_killed_{X}_{Y}
[/set_variable]
[/event]
# generate a baddie each turn
[event]
name=new turn
first_time_only=no
[if]
[variable]
name=generator_killed_{X}_{Y}
boolean_equals=false
[/variable]
[then]
[unit]
type=Skeleton
side=2
x={X}
y={Y}
[/unit]
[hide_unit]
x={X}
y={Y}
[/hide_unit]
[scroll_to_unit]
x={X}
y={Y}
[/scroll_to_unit]
[sound]
name=heal.wav
[/sound]
[unhide_unit]
[/unhide_unit]
[redraw]
[/redraw]
[delay]
time=500
[/delay]
[/then]
[/if]
[/event]
#enddef
#define MEMOIRS_GENERATOR_SKELETON_ARCHER X Y END_TURN_NUMBER
# decorate the hex
[item]
image=scenery/monolith3.png
x={X}
y={Y}
[/item]
# if someone capable of destroying the generator moves there
[event]
name=moveto
[filter]
side=1
x={X}
y={Y}
type=Mage of Light,White Mage,Great Mage,Arch Mage,Red Mage,Mage,Elder Mage,Paladin,Silver Mage,Journeyman Mage,Mage Leader,Mage Commander
[/filter]
[message]
speaker=unit
message=_"Evil spirits, begone from this place!"
message=_"Evil emanates from this stone, but I have not the power to destroy it."
[/message]
[sound]
name=lightning.ogg
[/sound]
[colour_adjust]
red=100
green=100
blue=100
[/colour_adjust]
[delay]
time=10
[/delay]
[colour_adjust]
red=0
green=0
blue=0
[/colour_adjust]
[set_variable]
name=generator_killed_{X}_{Y}
value=true
[/set_variable]
[removeitem]
x={X}
y={Y}
[/removeitem]
[/event]
# if someone who can't destroy the generator moves there
[event]
name=moveto
[filter]
side=1
x={X}
y={Y}
[/filter]
[if]
[variable]
name=generator_killed_{X}_{Y}
boolean_equals=false
[/variable]
[then]
[message]
speaker=unit
message=_"It would take powerful magic to drive the evil from this place."
[/message]
[/then]
[/if]
[/event]
# clean up variables
[event]
name=victory
[clear_variable]
name=generator_killed_{X}_{Y}
[/clear_variable]
[/event]
# switch off the generator on the last turn
[event]
name=turn {END_TURN_NUMBER}
[set_variable]
name=generator_killed_{X}_{Y}
[/set_variable]
[/event]
# generate a baddie each turn
[event]
name=new turn
first_time_only=no
[if]
[variable]
name=generator_killed_{X}_{Y}
equals=1
[/variable]
[else]
[unit]
type=Skeleton Archer
side=2
x={X}
y={Y}
[/unit]
[hide_unit]
x={X}
y={Y}
[/hide_unit]
[scroll_to_unit]
x={X}
y={Y}
[/scroll_to_unit]
[sound]
name=heal.wav
[/sound]
[unhide_unit]
[/unhide_unit]
[redraw]
[/redraw]
[delay]
time=500
[/delay]
[/else]
[/if]
[/event]
#enddef