-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
05_Tirigaz.cfg
916 lines (818 loc) · 23.5 KB
/
05_Tirigaz.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
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
#textdomain wesnoth-dw
# This level is not too hard. Don't go too negative on gold, but
# recruit three or four high-level units. You need mostly leveled
# initiates for their magic ranged attacks. Keshan is a big help, and
# so is the unit with the storm trident. If you decide to go after the
# orc leader, wait until the undead are dispatched. Heal everyone,
# then assemble just to the north of his keep. Don't touch the ships
# or piers though! Wait until day time, then send in all the units
# with magical attacks. Use other units to keep the slurbows
# busy. Hopefully the leader won't kill anyone before your next
# turn. One more round of magical attacks should kill him before his
# recruits start beating you up. Killing the orc leader isn't really
# necessary, but he helps someone level up, and he has a fair bit of
# gold. The next level is much easier with lots of gold.
# A lot of the code here is to activate the orc side if the mermen do
# anything wrong, and keep it passive until then. There is also some
# animation of the orcs coming out to tear down the keep after the
# first turn.
[scenario]
name= _ "Tirigaz"
map_data="{campaigns/Dead_Water/maps/Tirigaz.map}"
id=05_Tirigaz
next_scenario=06_Uncharted_Islands
[story]
[part]
{DW_BIGMAP}
story= _ "Farther up the coast was the port city of Tirigaz where Kai Laudiss had so soundly beaten the orcs. Bilheld was due west from there. The merfolk felt uneasy, so they took shelter in an abandoned orcish encampment as night fell."
[/part]
[/story]
{DW_TRACK {JOURNEY_05_NEW} }
{DEFAULT_SCHEDULE_DUSK}
{TURNS4 18 17 16 16}
victory_when_enemies_defeated=no
[side]
{SIDE_1}
{INCOME4 8 7 6 6}
{GOLD4 120 120 100 100}
[/side]
[event]
name=prestart
[music]
name=northerners.ogg
[/music]
[music]
name=legends_of_the_north.ogg
append=yes
[/music]
# wmllint: who RECALL_LOYAL_UNITS is Teeloa, Keshan
{RECALL_LOYAL_UNITS}
[objectives]
side=1
{HOW_TO_LOSE}
[objective]
description= _ "Destroy all the undead"
condition=win
[/objective]
[objective]
[show_if]
[have_unit]
side=2
canrecruit=yes
[/have_unit]
[/show_if]
{BONUS_OBJECTIVE_CAPTION}
description= _ "Also kill Marg-Tonz"+{EARLY_FINISH_BONUS_FOOTNOTE}+{OBJECTIVE_FOOTNOTE _"(you can destroy the undead first)"}
condition=win
[/objective]
[gold_carryover]
carryover_percentage=40
[/gold_carryover]
[/objectives]
[set_variable]
name=orcs_passive
value=yes
[/set_variable]
[item]
x=27
y=10
image="units/transport/transport-galleon.png~RC(magenta>orange)"
[/item]
[item]
x=29
y=9
image="units/transport/galleon.png~RC(magenta>purple)"
[/item]
[item]
x=22
y=5
image="units/transport/transport-galleon.png~RC(magenta>teal)"
[/item]
[/event]
[side]
side=2
controller=ai
user_team_name= _ "Orcs"
team_name=neutral
id=Marg-Tonz
name= _ "Marg-Tonz"
canrecruit=yes
moves=0
type=Orcish Sovereign
recruit=Wolf Rider, Goblin Knight, Goblin Pillager, Orcish Archer, Orcish Grunt, Orcish Crossbowman, Orcish Assassin, Orcish Warrior, Orcish Slurbow, Orcish Warlord, Orcish Slayer
[ai]
[goal]
name=target
[criteria]
side=1
[/criteria]
value=1000
[/goal]
leader_value=1000
[/ai]
gold=0
income=-10
{FLAG_VARIANT6 ragged}
[/side]
{STARTING_VILLAGES 2 99}
[side]
side=3
controller=ai
no_leader=yes
team_name=bad guys
user_team_name= _ "Undead"
[ai]
aggression=0.8
[goal]
name=target
[criteria]
side=1
[/criteria]
value=1000
[/goal]
[goal]
name=target
[criteria]
side=2
[/criteria]
value=1
[/goal]
village_value=0
# Even though they are less attractive targets, the ghosts
# will attack the orcs if they are in range and the mermen
# aren't. We will keep the ghosts from attacking the orcs
# by telling them to avoid the hexes around the guardians.
[avoid]
x=14,15,16, 15,16,17, 22,23,24, 24,25,26, 29,30,31, 32,33,34, 31,32,33, 35,36,37
y=2-3,2-4,2-3, 9-10,8-10,9-10, 2-3,2-4,2-3, 12-13,12-14,12-13, 12-13,11-13,12-13, 7-8,7-9,7-8, 10-11,9-11,10-11, 15-16,14-16,15-16
[/avoid]
[/ai]
gold=0
{FLAG_VARIANT undead}
[/side]
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Orcish Warlord) 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Orcish Slurbow) 2}
#define CITY_GUARD X Y
[unit]
type=Orcish Crossbowman
generate_name=yes
side=2
x={X}
y={Y}
[modifications]
{TRAIT_LOYAL}
{TRAIT_FEARLESS}
[/modifications]
moves=0
[/unit]
#enddef
[event]
name=prestart
{CITY_GUARD 15 3}
{CITY_GUARD 16 9}
{CITY_GUARD 23 3}
{CITY_GUARD 33 8}
{CITY_GUARD 30 12}
{CITY_GUARD 25 13}
{CITY_GUARD 36 15}
[/event]
#define GHOST X Y
[unit]
type=Ghost
x={X}
y={Y}
side=3
[/unit]
#enddef
#define WRAITH X Y
[unit]
type=Wraith
x={X}
y={Y}
side=3
[/unit]
#enddef
[event]
name=start
[move_unit_fake]
type=Ghost
x=14,20
y=20,18
[/move_unit_fake]
[unit]
type=Ghost
id=ghost scout
x=20
y=18
side=3
[/unit]
[message]
speaker=ghost scout
message= _ "Found. Them."
[/message]
{GHOST 19 20}
{GHOST 20 19}
{GHOST 21 20}
{GHOST 22 20}
{WRAITH 19 19}
{WRAITH 17 19}
{WRAITH 18 19}
{WRAITH 17 18}
{WRAITH 20 20}
#ifdef NORMAL
[unit]
type=Spectre
x=17
y=18
side=3
[/unit]
[unit]
type=Spectre
x=20
y=20
side=3
[/unit]
#endif
#ifdef HARD
[unit]
type=Spectre
x=17
y=18
side=3
[/unit]
[unit]
type=Spectre
x=20
y=20
side=3
[/unit]
[unit]
type=Shadow
x=20
y=19
side=3
[/unit]
[unit]
type=Shadow
x=20
y=19
side=3
[/unit]
#endif
#ifdef NIGHTMARE
[unit]
type=Spectre
x=17
y=18
side=3
[/unit]
[unit]
type=Spectre
x=20
y=20
side=3
[/unit]
[unit]
type=Shadow
x=20
y=19
side=3
[/unit]
[unit]
type=Shadow
x=20
y=19
side=3
[/unit]
[unit]
type=Nightgaunt
x=20
y=19
side=3
[/unit]
[unit]
type=Nightgaunt
x=20
y=19
side=3
[/unit]
#endif
# Count the undead because it's more robust than hardcoding
# their number.
[store_unit]
[filter]
side=3
[/filter]
variable=undead
[/store_unit]
[foreach]
array=undead
[do]
[set_variable]
name=number_of_undead
add=1
[/set_variable]
[/do]
[/foreach]
[clear_variable]
name=undead
[/clear_variable]
[message]
speaker=Kai Krellis
message= _ "I feared this might happen. We tarried too long fighting the saurians, and the undead have caught up with us. The spirits may have trapped us here for the night, but in the morning we will..."
[/message]
[message]
speaker=Marg-Tonz
message= _ "What’s going on? What are you fish-men doing here? Are we constantly to be pestered by you creatures?"
[/message]
[message]
speaker=Cylanna
message= _ "He’s one to complain about <i>that</i>..."
[/message]
[message]
speaker=Kai Krellis
message= _ "We were just passing through."
[/message]
[message]
speaker=Marg-Tonz
message= _ "Well, finish passing."
[/message]
[message]
speaker=Kai Krellis
message= _ "Actually, we have some ghosts after us now, and we would like to shelter here for a while."
[/message]
[message]
speaker=Marg-Tonz
message= _ "Forget about it! We don’t want no trouble, but get off our land! Ghosts who don’t like fish are your problem."
[/message]
[message]
speaker=Kai Krellis
message= _ "If you give us a few hours to regroup and prepare our soldiers, we will go without causing you trouble."
[/message]
[message]
speaker=Marg-Tonz
message= _ "You have one hour. After that, we are tearing down that old encampment. You stay in the water if you know what’s good for you. If you set foot...or whatever...on land again, we’ll cut your throats. And stay off our piers. And don’t touch the ships neither!"
[/message]
[message]
speaker=Cylanna
message= _ "I wonder how he gets customers with manners like that."
[/message]
[message]
speaker=Kai Krellis
message= _ "One hour will work for us. It will not take all of us to defeat the undead. " + {WHISPER _"We can decide what to do about the orc after that."}
[/message]
[message]
speaker=narrator
message= _ "You will only be able to use your keep for one turn."
image=wesnoth-icon.png
[/message]
[/event]
#define WAKE_ORCS
# This variable removes their movement points every turn when it's yes:
[set_variable]
name=orcs_passive
value=no
[/set_variable]
[gold]
side=2
#ifdef EASY
amount=200
#endif
#ifdef NORMAL
amount=250
#endif
#ifdef HARD
amount=300
#endif
#ifdef NIGHTMARE
amount=350
#endif
[/gold]
[modify_side]
side=2
income=0
[/modify_side]
#enddef
[event]
name=turn 2
# If, at the end of turn 2, (actually, beginning of turn 3)
# the mermen are still ashore, the orcs attack. The event
# doesn't need to check for the turn being 3, because that's
# the only way the mermen could be ashore with the orcs still
# passive.
[event]
name=side turn
first_time_only=no
[if]
[and]
[variable]
name=side_number
equals=2
[/variable]
[variable]
name=orcs_passive
equals=yes
[/variable]
[have_unit]
side=1
[not]
[filter_location]
terrain=Ww, Wo, Wwf
[/filter_location]
[/not]
[/have_unit]
[/and]
[then]
[message]
speaker=Marg-Tonz
message= _ "You’re still squatting on our land! I warned you."
[/message]
{WAKE_ORCS}
[/then]
[/if]
[/event]
[/event]
# After turn 3, if the mermen touch land, the orcs attack.
[event]
name=turn 3
[event]
name=moveto
first_time_only=yes
[filter]
side=1
[not]
[filter_location]
terrain=Ww, Wo, Wwf
[/filter_location]
[/not]
[/filter]
[if]
[variable]
name=orcs_passive
equals=yes
[/variable]
[then]
[message]
speaker=Marg-Tonz
message= _ "I told you to stay off our land! Now you’re in for it."
[/message]
{WAKE_ORCS}
[/then]
[else]
[allow_undo]
[/allow_undo]
[/else]
[/if]
[/event]
[/event]
# If a merman lands on a ship, the orcs attack.
[event]
name=moveto
first_time_only=yes
[filter]
side=1
#ship locations
x=27, 29, 22
y=10, 9, 5
[/filter]
[if]
[variable]
name=orcs_passive
equals=yes
[/variable]
[then]
[message]
speaker=Marg-Tonz
message= _ "I told not to bother the ships! Now you’re in for it."
[/message]
{WAKE_ORCS}
[/then]
[else]
[allow_undo]
[/allow_undo]
[/else]
[/if]
[/event]
# If a mermen attacks an orc, the orcs can attack back:
[event]
name=attack_end
first_time_only=yes
[filter]
side=1
[/filter]
[filter_second]
side=2
[/filter_second]
[if]
[variable]
name=orcs_passive
equals=yes
[/variable]
[then]
[message]
speaker=Marg-Tonz
message= _ "You crazy fish men are attacking us? After we tried to be nice? That’s it. We’re going to end you once and for all."
[/message]
{WAKE_ORCS}
[/then]
[else]
[allow_undo]
[/allow_undo]
[/else]
[/if]
[/event]
# Remove the orcs movement points each turn if the mermen have
# stayed in the water.
[event]
name=turn refresh
first_time_only=no
[if]
[variable]
name=orcs_passive
equals=yes
[/variable]
[then]
[store_unit]
[filter]
side=2
[/filter]
kill=yes
variable=orcs
[/store_unit]
[foreach]
array=orcs
[do]
[set_variable]
name=this_item.moves
value=0
[/set_variable]
[unstore_unit]
variable=this_item
[/unstore_unit]
[/do]
[/foreach]
[clear_variable]
name=orcs
[/clear_variable]
[/then]
[/if]
[/event]
# When a ghost is killed, check to see if it was the last one. If
# it was, and the orc is gone, the player wins. Otherwise, he gets
# the option to kill the orc.
[event]
name=die
first_time_only=no
[filter]
side=3
[/filter]
[set_variable]
name=number_of_undead
sub=1
[/set_variable]
[if]
[variable]
name=number_of_undead
equals=0
[/variable]
[then]
[if]
[not]
[have_unit]
id=Marg-Tonz
[/have_unit]
[/not]
[then]
[message]
speaker=Kai Krellis
message= _ "Now maybe we can head west undisturbed."
[/message]
[endlevel]
result=victory
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[else]
[message]
speaker=Kai Krellis
message= _ "We have destroyed the undead."
[option]
label= _ "Now maybe we can head west undisturbed."
[command]
[endlevel]
result=victory
bonus=no
[/endlevel]
[/command]
[/option]
[option]
label= _ "This orc leader has not learned that threatening merfolk is a bad idea. We shall defeat him before we go."
[/option]
[/message]
[/else]
[/if]
[/then]
[/if]
[/event]
# If the ghost are gone, then killing Marg-Tonz ends the level. If
# they are not, it doesn't.
[event]
name=die
[filter]
id=Marg-Tonz
[/filter]
[if]
[have_unit]
x,y=$x2,$y2
side=1
[/have_unit]
[then]
# The chest looks better when it's offset 10px to the north
[item]
x,y=$x1,$y1
image=misc/blank-hex.png~BLIT(items/chest-open.png~CROP(0,10,72,62),0,0)
[/item]
[if]
[have_unit]
x,y=$x2,$y2
race=bats
[/have_unit]
[then]
[message]
speaker=second_unit
message= _ "Neep, neep!"
[/message]
[message]
speaker=Kai Krellis
message= _ "It seems that orc was rich! He has a chest here with over 100 pieces of gold!"
[/message]
[/then]
[else]
[message]
speaker=second_unit
message= _ "It seems that orc was rich! He has a chest here with over 100 pieces of gold!"
[/message]
[/else]
[/if]
[/then]
[else]
[message]
speaker=Kai Krellis
message= _ "Now we must defeat the undead."
[/message]
[/else]
[/if]
[sound]
name=gold.ogg
[/sound]
[gold]
side=1
amount=106
[/gold]
[if]
[variable]
name=number_of_undead
equals=0
[/variable]
[then]
[endlevel]
result=victory
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[else]
[show_objectives]
[/show_objectives]
[/else]
[/if]
[/event]
[event]
name=last breath
[filter]
id=Marg-Tonz
[/filter]
[message]
speaker=Marg-Tonz
message= _ "I hate mermen!"
[/message]
[/event]
# In the next event, orcs come out of a village and stand next to
# the keep. The keep disappears one hex at a time, and the orcs go
# back to the village.
#define REMOVE_KEEP X Y
[delay]
time=200
[/delay]
[terrain]
terrain=Re
x={X}
y={Y}
[/terrain]
[redraw]
[/redraw]
#enddef
[event]
name=turn 2
[move_unit_fake]
type=Orcish Grunt
side=2
x=36,35,34,34,34
y=13,18,18,19,20
[/move_unit_fake]
[unit]
type=Orcish Grunt
x=34
y=20
side=2
[/unit]
[move_unit_fake]
type=Orcish Grunt
side=2
x=36,37
y=13,18
[/move_unit_fake]
[unit]
type=Orcish Grunt
x=37
y=18
side=2
[/unit]
[move_unit_fake]
type=Orcish Grunt
side=2
x=36,35
y=13,18
[/move_unit_fake]
[unit]
type=Orcish Grunt
x=35
y=18
side=2
[/unit]
{REMOVE_KEEP 36 20}
{REMOVE_KEEP 35 20}
{REMOVE_KEEP 35 19}
{REMOVE_KEEP 36 18}
{REMOVE_KEEP 36 19}
{REMOVE_KEEP 37 19}
{REMOVE_KEEP 37 20}
# In the following kill events, we need to be careful with
# which unit we’re killing, because Kai Krellis could be
# standing where the grunt was supposed to. In that case, the
# grunt will be misplaced by a hex.
[kill]
type=Orcish Grunt
[filter_location]
x=34
y=20
radius=1
[/filter_location]
animate=no
fire_event=no
[/kill]
[move_unit_fake]
type=Orcish Grunt
side=2
x=34,34,34,35,36
y=20,19,18,18,13
[/move_unit_fake]
[kill]
type=Orcish Grunt
[filter_location]
x=35
y=18
radius=1
[/filter_location]
animate=no
fire_event=no
[/kill]
[move_unit_fake]
type=Orcish Grunt
side=2
x=35,36
y=18,13
[/move_unit_fake]
[kill]
type=Orcish Grunt
[filter_location]
x=37
y=18
radius=1
[/filter_location]
animate=no
fire_event=no
[/kill]
[move_unit_fake]
type=Orcish Grunt
side=2
x=37,36
y=18,13
[/move_unit_fake]
[/event]
#undef REMOVE_KEEP
#undef CITY_GUARD
#undef GHOST
#undef WRAITH
#undef WAKE_ORCS
{HERO_DEATHS}
[/scenario]