-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
9_Caverns_of_Flame.cfg
855 lines (805 loc) · 23.7 KB
/
9_Caverns_of_Flame.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
#textdomain wesnoth-sof
[scenario]
name= _ "Caverns of Flame"
id=9_Caverns_of_Flame
map_data="{campaigns/Sceptre_of_Fire/maps/9_Caverns_of_Flame.map}"
next_scenario=Epilogue
turns=-1
victory_when_enemies_defeated=no
{SCENARIO_MUSIC "the_dangerous_symphony.ogg"}
{EXTRA_SCENARIO_MUSIC "heroes_rite.ogg"}
{UNDERGROUND}
[side]
type=Dwarvish Fighter
id=Rugnur
side=1
canrecruit=yes
recruit=
controller=human
shroud=yes
gold=0
income=-2
village_gold=0
team_name=dwarves
user_team_name= _ "Dwarves"
{FLAG_VARIANT knalgan}
[/side]
[side]
no_leader=yes
side=2
team_name=elves
user_team_name= _ "Elves"
[ai]
[goal]
name=target
[criteria]
side=1
[/criteria]
value=5
[/goal]
[goal]
name=target
[criteria]
side=3,4,5,6
[/criteria]
value=0.5
[/goal]
grouping=none
aggression=1.0
[/ai]
{FLAG_VARIANT wood-elvish}
[/side]
[side]
type=Orcish Warlord
side=3
canrecruit=yes
recruit=Orcish Warrior,Troll Warrior
{GOLD 200 220 240}
{INCOME 20 25 30}
[ai]
recruitment_pattern=fighter
[goal]
name=target
[criteria]
side=1
[/criteria]
value=10
[/goal]
[/ai]
team_name=orcs
user_team_name= _ "Orcs"
{FLAG_VARIANT6 ragged}
[/side]
[side]
type=Orcish Warlord
side=4
canrecruit=yes
recruit=Orcish Warrior,Troll Warrior
{GOLD 200 220 240}
{INCOME 20 25 30}
[ai]
recruitment_pattern=fighter
[goal]
name=target
[criteria]
side=1
[/criteria]
value=10
[/goal]
[/ai]
team_name=orcs
user_team_name= _ "Orcs"
{FLAG_VARIANT6 ragged}
[/side]
[side]
type=Troll Warrior
side=5
canrecruit=yes
recruit=Orcish Warrior,Troll
{GOLD 150 200 250}
{INCOME 5 6 7}
[ai]
recruitment_pattern=fighter
[goal]
name=target
[criteria]
side=1
[/criteria]
value=10
[/goal]
[goal]
name=target
[criteria]
side=2
[/criteria]
value=1
[/goal]
[/ai]
team_name=orcs
user_team_name= _ "Orcs"
[/side]
[side]
type=Troll Warrior
side=6
canrecruit=yes
controller=ai
recruit=Orcish Warrior,Troll
{GOLD 150 200 250}
{INCOME 5 6 7}
[ai]
recruitment_pattern=fighter
[goal]
name=target
[criteria]
side=1
[/criteria]
value=10
[/goal]
[goal]
name=target
[criteria]
side=2
[/criteria]
value=1
[/goal]
[/ai]
team_name=orcs
user_team_name= _ "Orcs"
[/side]
[story]
[part]
# po: The text in 1.14.4 mentioned Knalga. Geographically, these caves are in Knalga, but the text was confusing if the reader thought of the Knalgan Alliance.
story= _ "There was no exit for the dwarves. They had reached the realms of the orcs, with the elves hot on their trail. There was truly no exit from these caves."
[/part]
[part]
story= _ "So the dwarves had no way out. They could not leave the caverns that they had entered."
[/part]
[/story]
{SOF_TRACK {JOURNEY_09_NEW} }
{SOF_DEATHS}
[event]
name=prestart
#the glyph
[item]
x,y=18,23
image=scenery/rune1.png
[/item]
[objectives]
side=1
[objective]
description= _ "Explore as much of the cave as possible"
condition=win
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[/objective]
[objective]
description= _ "Death of Krawg"
condition=lose
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[/objective]
{IS_LAST_SCENARIO}
[/objectives]
[/event]
[event]
name=start
[recall]
id=Thursagan
[/recall]
[recall]
id=Baglur
[/recall]
[recall]
id=Krawg
[/recall]
[store_unit]
[filter]
side=1
x,y=recall,recall
[/filter]
kill=no
variable=to_be_recalled
[/store_unit]
[foreach]
array=to_be_recalled
[do]
[recall]
id=$this_item.id
[/recall]
[/do]
[/foreach]
{CLEAR_VARIABLE to_be_recalled}
#orcs/trolls start out
[unit]
x,y=17,21
side=5
type=Troll
ai_special=guardian
role=Guardian
name= _ "Guardian"
[/unit]
[unit]
x,y=15,24
side=5
type=Orcish Warrior
ai_special=guardian
role=Guardian
name= _ "Guardian"
[/unit]
[unit]
x,y=16,25
side=5
type=Orcish Warrior
ai_special=guardian
role=Guardian
name= _ "Guardian"
[/unit]
[unit]
x,y=19,21
side=6
type=Troll
ai_special=guardian
role=Guardian
name= _ "Guardian"
[/unit]
[unit]
x,y=21,24
side=6
type=Orcish Warrior
ai_special=guardian
role=Guardian
name= _ "Guardian"
[/unit]
[unit]
x,y=20,25
side=6
type=Orcish Warrior
ai_special=guardian
role=Guardian
name= _ "Guardian"
[/unit]
#messages
[message]
speaker=Rugnur
message= _ "Well, I think we’ve gotten a good distance ahead of the elves. What do we do now?"
[/message]
[message]
speaker=Thursagan
# wmllint: local spelling Khrakrahs
message= _ "We should keep going. Remember what Khrakrahs said, about this being a volcano? I think we should try to cause it to erupt. It will kill all the elves, and we might be able to find a safe place so the lava doesn’t kill us."
[/message]
[message]
speaker=Rugnur
message= _ "This sounds... plausible."
[/message]
[message]
speaker=Baglur
message= _ "Yes, an interesting plan. How do you propose we do this?"
[/message]
[message]
speaker=Thursagan
message= _ "I have a suspicion that there is an opening somewhere near here than leads to the surface. Somewhere near there, there is probably a magic object of some kind that will cause the lava to flow."
[/message]
[message]
speaker=Rugnur
message= _ "Very well. We will continue to explore until we find it."
[/message]
[message]
speaker=Krawg
#po: "Krawg smells orcs in this cave!"
message= _ "Krawg sme’ o’cz in iz ’ave!" # wmllint: no spellcheck
[/message]
[message]
speaker=Thursagan
message= _ "Indeed, there may be orcs lurking here. We should beware of them."
[/message]
[set_variable]
name=overlayturn
value=not_yet
[/set_variable]
[/event]
#define RANDOM_MERCENARY_2 TYPE
{GENERIC_UNIT 2 {TYPE} 15 4}
#enddef
#elves come
[event]
name=turn 4
[move_unit_fake]
type=Elvish Marshal
side=2
x=15
y=1,4
[/move_unit_fake]
[unit]
type=Elvish Marshal
side=2
id=Aendan
name= _ "Aendan"
canrecruit=yes
x,y=15,4
[/unit]
[message]
speaker=Aendan
message= _ "We have caught up to the dwarves. Now, prepare to destroy them!"
[/message]
{RANDOM_MERCENARY_2 "Dwarvish Lord"}
{RANDOM_MERCENARY_2 "Dwarvish Lord"}
{RANDOM_MERCENARY_2 "Dwarvish Lord"}
{RANDOM_MERCENARY_2 "Dwarvish Lord"}
#ifdef HARD
{RANDOM_MERCENARY_2 "Dwarvish Lord"}
#endif
{RANDOM_MERCENARY_2 "Dwarvish Dragonguard"}
{RANDOM_MERCENARY_2 "Dwarvish Dragonguard"}
{RANDOM_MERCENARY_2 "Dwarvish Dragonguard"}
{RANDOM_MERCENARY_2 "Dwarvish Dragonguard"}
#ifdef HARD
{RANDOM_MERCENARY_2 "Dwarvish Dragonguard"}
#endif
{RANDOM_MERCENARY_2 "Elvish Champion"}
{RANDOM_MERCENARY_2 "Elvish Champion"}
{RANDOM_MERCENARY_2 "Elvish Champion"}
{RANDOM_MERCENARY_2 "Elvish Champion"}
#ifdef HARD
{RANDOM_MERCENARY_2 "Elvish Champion"}
#endif
{RANDOM_MERCENARY_2 "Elvish Avenger"}
{RANDOM_MERCENARY_2 "Elvish Avenger"}
{RANDOM_MERCENARY_2 "Elvish Avenger"}
{RANDOM_MERCENARY_2 "Elvish Avenger"}
#ifdef HARD
{RANDOM_MERCENARY_2 "Elvish Avenger"}
#endif
{RANDOM_MERCENARY_2 "Elvish Outrider"}
{RANDOM_MERCENARY_2 "Elvish Outrider"}
{RANDOM_MERCENARY_2 "Elvish Outrider"}
{RANDOM_MERCENARY_2 "Elvish Outrider"}
#ifdef HARD
{RANDOM_MERCENARY_2 "Elvish Outrider"}
#endif
[message]
speaker=Rugnur
message= _ "Thursagan! The elves are right on our tail; what should we do?"
[/message]
[message]
speaker=Thursagan
message= _ "We could try to set off the volcano as soon as possible. Meanwhile, we should draw the elves further into the caves, so they can’t escape when it does erupt."
[/message]
[/event]
#when the elves lose troops, the orcs gain them
[event]
name=die
first_time_only=no
[filter]
side=2
[/filter]
[gold]
side=3
amount=50
[/gold]
[gold]
side=4
amount=50
[/gold]
[/event]
#TODO: Uncomment when we'll have translations for this
#seeing the trapped orcs
#[event]
# name=sighted
# [filter]
# side=3,4
# [/filter]
# [filter_second]
# side=1
# [/filter_second]
# [filter_condition]
# [variable]
# name=overlayturn
# equals=not_yet
# [/variable]
# [/filter_condition]
# [message]
# id=Rugnur
# message= _ "Look, those orcs can’t get to us! There’s cave wall in the way!"
# [/message]
# [message]
# id=Thursagan
# message= _ "True; but, perhaps later they will find a way out."
# [/message]
#[/event]
#seeing the guards of the glyph
[event]
name=sighted
[filter]
role=Guardian
side=5,6
[filter_vision]
side=1
[/filter_vision]
[/filter]
[message]
speaker=Rugnur
message= _ "These orcs appear to be guarding something."
[/message]
[message]
speaker=Thursagan
message= _ "It is probably the magical object. Attack them!"
[/message]
[objectives]
side=1
[objective]
description= _ "Move onto the glyph in the center of the volcano"
condition=win
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[/objective]
[objective]
description= _ "Death of Krawg"
condition=lose
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[/objective]
{IS_LAST_SCENARIO}
[/objectives]
[/event]
#define CHANGE_MAP TURN
[if]
[variable]
name=overlayturn
numerical_equals={TURN}
[/variable]
[then]
[terrain_mask]
x,y=1,1
border=yes
mask="{campaigns/Sceptre_of_Fire/maps/9_overlay/9_o{TURN}.mask}"
[rule]
old=Ql,Uu,Cud,Vu,Rr,Uf,Uh
new=Ql
terrain=Qlf
[/rule]
[rule]
use_old=yes
[/rule]
[/terrain_mask]
[redraw][/redraw]
[/then]
[/if]
#enddef
#triggering the volcano
[event]
name=moveto
[filter]
x,y=18,23
side=1
[/filter]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
[message]
speaker=Thursagan
message= _ "That’s it! The volcano will erupt soon now that you’ve triggered it."
[/message]
[terrain]
x=11
y=4-5
terrain=Uu
[/terrain]
[terrain]
x=20
y=3-4
terrain=Uu
[/terrain]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
[message]
speaker=Rugnur
message= _ "Look, it has knocked down some of the walls! Those orcs have a way out now!"
[/message]
[scroll_to]
x,y=14,1
[/scroll_to]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
[message]
speaker=Baglur
message= _ "Well, we’ve succeeded in stopping the elves from getting the Sceptre, I would say. But what do we do now?!"
[/message]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
[message]
speaker=Thursagan
message= _ "Now, we must fight the orcs until we die, it’s our only option."
[/message]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
#ifdef __UNUSED__
[message]
speaker=Rugnur
message= _ "We cannot let any of the elves or their mercenaries escape; they would tell where the Sceptre of Fire is. Make sure they all die!"
[/message]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
[message]
speaker=Thursagan
message= _ "We have to kill them quickly, before they realize what is happening. And remember, the lava spreads quickly, suddenly, and dangerously. The only place safe from it is the area near the glyph."
[/message]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
#endif
#a turn counter that starts when you set off the volcano
[set_variable]
name=overlayturn
value=0
[/set_variable]
#the objectives, they are a-changin'
[objectives]
side=1
[objective]
#TODO: Provide a different objective, since the player doesn't have
# to kill the elves anymore
description= _ "Kill all of the elves before one of them escapes from the caves"
condition=win
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[/objective]
[objective]
description= _ "Death of Krawg"
condition=lose
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[/objective]
{IS_LAST_SCENARIO}
[/objectives]
[/event]
[event]
name=new turn
first_time_only=no
[filter_condition]
[variable]
name=overlayturn
not_equals=not_yet
[/variable]
[/filter_condition]
[set_variable]
name=overlayturn
add=1
[/set_variable]
#the elves try to escape 5 turns after you set off the volcano
[if]
[variable]
name=overlayturn
numerical_equals=5
[/variable]
[then]
[role]
role=smartelf
side=2
type=Elvish Marshal,Elvish Avenger,Elvish Champion,Elvish Outrider,Dwarvish Lord,Dwarvish Dragonguard
[/role]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
[message]
role=smartelf
#NOTE: Since the elves won't try to escape anymore, what about
#making them act cowardly (maybe with some micro ai) and change
#this message consequently?
message= _ "Wait, what’s going on? The volcano is going to erupt! Everyone, try to get out of these caves!"
[/message]
# once they try to escape, if they move to the top 2 rows you lose
# deactivated out since there's no way for the player to
# stop them from moving to those locations
#ifdef __UNUSED__
[event]
name=moveto
[filter]
x=14-16
y=1-2
side=2
[/filter]
[message]
speaker=unit
message= _ "I must go report to my superiors!"
[/message]
[message]
speaker=Thursagan
message= _ "We have allowed an enemy to escape; we have failed."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
#endif
[/then]
[/if]
#the lava is spreading and killing things every turn
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
{CHANGE_MAP 1}
{CHANGE_MAP 2}
{CHANGE_MAP 3}
{CHANGE_MAP 4}
{CHANGE_MAP 5}
{CHANGE_MAP 6}
[store_locations]
[filter]
[not]
type=Gryphon,Gryphon Rider,Gryphon Master
[/not]
side=1,2,3,4,5,6
[/filter]
x=1-32
y=1-32
terrain=Ql,Qlf
variable=lavadead
[/store_locations]
[foreach]
array=lavadead
[do]
[kill]
x=$this_item.x
y=$this_item.y
animate=yes
fire_event=yes
[/kill]
[/do]
[/foreach]
[clear_variable]
name=lavadead
[/clear_variable]
#after 7 turns you win
[if]
[variable]
name=overlayturn
numerical_equals=7
[/variable]
[then]
{QUAKE "rumble.ogg"}
{QUAKE "rumble.ogg"}
[role]
role=dumbelf
side=2
type=Elvish Marshal,Elvish Avenger,Elvish Champion,Elvish Outrider,Dwarvish Lord,Dwarvish Dragonguard
[/role]
[message]
role=dumbelf
message= _ "Aghh!! The volcano is erupting, and now our exit has been blocked off!!"
[/message]
[fire_event]
name=lava kills all
[/fire_event]
[/then]
[/if]
[/event]
#when all the elves die, you win
[event]
name=die
first_time_only=no
[filter]
side=2
[/filter]
[filter_condition]
[not]
[have_unit]
side=2
[/have_unit]
[/not]
[/filter_condition]
[message]
speaker=Rugnur
message= _ "We have hidden the Sceptre well, but now the volcano is going to erupt and kill us all."
[/message]
[fire_event]
name=lava kills all
[/fire_event]
[/event]
#when you win, Krawg flies out of the mountain
[event]
name=lava kills all
#kill everyone in a sequence that makes it look like the cave is being flooded by lava
[while]
[have_location]
terrain=!,Xu,Qlf,Qlf^*
include_borders=no
[filter_adjacent_location]
terrain=Ql,Qlf
[/filter_adjacent_location]
[/have_location]
[do]
[store_locations]
terrain=!,Xu,Qlf,Qlf^*
include_borders=no
[filter_adjacent_location]
terrain=Ql,Qlf
[/filter_adjacent_location]
variable=new_lava
[/store_locations]
[terrain]
find_in=new_lava
include_borders=no
[and]
terrain=*^Ii
[/and]
terrain=Qlf^Ii
[/terrain]
[terrain]
find_in=new_lava
include_borders=no
[not]
terrain=Qlf^Ii
[/not]
terrain=Qlf
[/terrain]
[redraw][/redraw]
[kill]
[filter_location]
find_in=new_lava
[/filter_location]
[not]
type=Gryphon,Gryphon Rider,Gryphon Master
[/not]
animate=yes
fire_event=no
[/kill]
[/do]
[/while]
{CLEAR_VARIABLE new_lava}
[terrain]
[and]
terrain=!,Xu,Qlf,Qlf^*
[/and]
terrain=Qlf
[/terrain]
#krawg leaves
[kill]
[not]
id=Krawg
[/not]
animate=yes
[/kill]
[message]
speaker=Krawg
#po: "Hmmm, me leave now!"
message= _ "Hm... Me le’ no’w!" # wmllint: no spellcheck
[/message]
[store_unit]
[filter]
id=Krawg
[/filter]
variable=krawg
kill=yes
[/store_unit]
{VARIABLE move_x ($krawg.x|,18)}
{VARIABLE move_y ($krawg.y|,23)}
[move_unit_fake]
type=$krawg.type
side=$krawg.side
x=$move_x
y=$move_y
[/move_unit_fake]
[unstore_unit]
variable=alanin
[/unstore_unit]
{CLEAR_VARIABLE move_x,move_y}
{CLEAR_VARIABLE alanin}
[endlevel]
result=victory
carryover_report=no
save=no
linger_mode=no
[/endlevel]
[/event]
[/scenario]
#undef RANDOM_MERCENARY_2
#undef CHANGE_MAP