LoW: Made the side of Olurf persistent.

This commit causes the engine to drop out with an assertion error when
LoW reaches Scenario 7.
This commit is contained in:
Fabian Müller 2008-12-07 18:59:47 +00:00
parent 1551704bc3
commit 98b4cb6fcc
4 changed files with 53 additions and 70 deletions

View File

@ -35,16 +35,17 @@
# wmllint: recognize Kalenz
recruit={ELVES}
[/side]
[side]
side=2
{OLURF}
# wmllint: recognize Olurf
controller=ai
canrecruit=yes
{GOLD 150 120 120}
recruit={DWARVES}
team_name=dwarves
[ai]
caution=0.5
[avoid]
x=1-30,1-19,1-18,1-16,1-15,1-13,1-11,1-10,1-9,1-5,1-7,1-9,1-12,1-14,1-17,1-18,1-19,1-21,1-22 ,1-23,1-22,1-21
y=1-9,10,11,12,13-15,16-17,18-19,20,21,22,23,24,25,26,27,28-29,30,31-32,33-36,37,38-39,40
@ -52,6 +53,8 @@
[/ai]
[/side]
#wmllint: validate-on
{MAKE_AI_SIDE_PERSISTENT 2}
{LIMIT_RECRUITS 2 (Dwarvish Berserker) 2}
[side]
#ifdef EASY
@ -224,7 +227,7 @@
[modify_side]
side=2
[ai]
dummy=true
caution=0.5
[/ai]
[/modify_side]
#endif
@ -266,14 +269,12 @@
[/modify_side]
[/else]
[/if]
{CLEAR_VARIABLE olurf_side}
[modify_side]
side=2
team_name=trolls
[ai]
dummy=true
caution=0.5
[/ai]
[/modify_side]
[/event]
@ -299,16 +300,17 @@
[/endlevel]
[/event]
[event]
name=victory
#TODO remove after Olurf was made persisitant
# [event]
# name=victory
[store_unit]
variable=olurf_store
[filter]
id=Olurf
[/filter]
[/store_unit]
[/event]
# [store_unit]
# variable=olurf_store
# [filter]
# id=Olurf
# [/filter]
# [/store_unit]
# [/event]
{@campaigns/Legend_of_Wesmere/utils/deaths.cfg}
[/scenario]

View File

@ -31,9 +31,12 @@
#Olurf's side
[side]
{OLURF}
side=2
canrecruit=yes
no_leader=yes
persistent=yes
#Olurf's controller is human to trigger the persistence.
controller=human
{GOLD 120 160 200}
{INCOME 4 8 12}
team_name=kalenz
@ -44,6 +47,16 @@
[/ai]
[/side]
#wmllint: validate-on
{RECALL_AI_SIDE 2}
[event]
name=victory
[store_unit]
variable=olurf_party
[filter]
side=2
[/filter]
[/store_unit]
[/event]
[side]
type=Orcish Warlord
@ -163,19 +176,6 @@
{CHECK_LANDAR}
{CHECK_CLEODIL}
{CHECK_OLURF_STORE (side=2
canrecruit=yes
x=20
y=25) }
{VARIABLE olurf_store.x 20}
{VARIABLE olurf_store.y 25}
[unstore_unit]
variable=olurf_store # wmllint: recognize Olurf
[/unstore_unit]
{CLEAR_VARIABLE olurf_store}
[/event]
[event]
@ -246,17 +246,10 @@
side=1
amount=-400
[/gold]
[sound]
name=gold.ogg
[/sound]
[store_unit]
variable=olurf_store
[filter]
id=Olurf
[/filter]
[/store_unit]
[/event]
{@campaigns/Legend_of_Wesmere/utils/deaths.cfg}

View File

@ -22,7 +22,8 @@
{TO_ELVES_LAST_STAND}
[/part]
[/story]
#friends
#Kalenz
#wmllint: validate-off
[side]
side=1
@ -32,6 +33,7 @@
save_id=Kalenz
recruit={ELVES}
[/side]
[side]
side=2
no_leader=yes
@ -51,8 +53,8 @@
#time_of_day=dusk,dawn,morning,afternoon,first_watch,second_watch
passive_leader=yes
villages_per_scout=20
aggression=-80.0
caution=80.0
aggression=0.0
caution=0.5
grouping=defensive
[/ai]
[/side]
@ -77,8 +79,8 @@
#time_of_day=dusk,dawn,morning,afternoon,first_watch,second_watch
#passive_leader=yes
villages_per_scout=20
aggression=-80.0
caution=80.0
aggression=0.0
caution=0.5
grouping=defensive
[/ai]
{GOLD 280 300 400}
@ -291,7 +293,7 @@
{AI_LOCATION kgrubr "Keep of Grubr" 1 20 42}
{AI_LOCATION nshallows "Northern Shallows" 2 31 11}
{AI_LOCATION falyas "Ford of Alyas" 3 22 19}
{AI_LOCATION fifranur "Ford of Tifranur" 2 7 31}
{AI_LOCATION fifranur "Ford of Tifranur" 2 7 31}
{AI_LOCATION tnorth "North Tower" 1 14 24}
{AI_LOCATION snorth "South Tower" 1 12 26}
{AI_LOCATION sgate "South Bastion" 1 14 31}
@ -437,19 +439,25 @@
[event]
name=olurf
{VARIABLE olurf_store.x 3}
{VARIABLE olurf_store.y 2}
{VARIABLE olurf_store.side 1}
{VARIABLE olurf_store.canrecruit no}
{FOREACH olurf_party dwarf}
{VARIABLE olurf_party[dwarf].side 1}
{VARIABLE olurf_party[dwarf].x 3}
{VARIABLE olurf_party[dwarf].y 2}
[message]
message=a dwarvish dwarf
[/message]
[unstore_unit]
variable=olurf_store # wmllint: recognize Olurf
[/unstore_unit]
{CLEAR_VARIABLE olurf_store}
[unstore_unit]
variable=olurf_party[dwarf]
find_vacant=yes
text=unstored
[/unstore_unit]
{NEXT dwarf}
{MODIFY_UNIT (id=Olurf) canrecruit no}
{MAKE_HERO Olurf}
{OLURF_PARTY}
#{OLURF_PARTY}
{OLURF_SPEAK}
[/event]

View File

@ -203,26 +203,6 @@ Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Ulfserker, Dwarvish Berserker, Dwar
#define ORCS1
Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Goblin Spearman#enddef
#define GIVE_ALL_VILLAGES SIDE
[event]
name=prestart
[store_locations]
terrain=*^V*
variable=temp_starting_villages
[/store_locations]
{FOREACH temp_starting_villages i}
[capture_village]
side={SIDE}
x,y=$temp_starting_villages[$i].x,$temp_starting_villages[$i].y
[/capture_village]
{NEXT i}
{CLEAR_VARIABLE i}
{CLEAR_VARIABLE temp_starting_villages}
[/event]
#enddef
#define VILLAGE_SIDE SIDE X Y
[event]
name=prestart