-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
10_The_Flaming_Sword.cfg
1137 lines (1017 loc) · 33.9 KB
/
10_The_Flaming_Sword.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
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#textdomain wesnoth-dw
# You defeat the lich to try to get the sword, but as soon as the lich
# drops it, Caladon teleports in and picks it up. Now, you need to
# defeat Caladon to get the sword. He grants you time to leave, which
# is actually a turn to remove any very damaged units from the
# vicinity as Caladon is pretty dangerous. You can attack him now, or
# wait a turn for him to get impatient and attack you. When he
# attacks, or you attack him, he summons fire guardians (stolen from
# UtBS). He does not also recruit, because that would just be
# mean. (There is no reason he would have much gold anyway.)
[scenario]
name= _ "The Flaming Sword"
map_data="{campaigns/Dead_Water/maps/The_Flaming_Sword.map}"
id=10_The_Flaming_Sword
next_scenario=11_Getting_Help
[story]
[part]
{DW_BIGMAP}
story= _ "Caladon led them just a little way up the shore. Despite its name, the swamp was not actually desolate on the outskirts. A hardy population of humans coaxed a living out of the damp soil."
[/part]
[/story]
{DW_TRACK {JOURNEY_10_NEW} }
{DEFAULT_SCHEDULE}
{TURNS4 30 28 28 28}
victory_when_enemies_defeated=no
# wmllint: validate-off
[side]
{SIDE_1}
fog=yes
{GOLD4 120 120 120 120}
[/side]
# wmllint: validate-on
{STARTING_VILLAGES 1 6}
[side]
side=2
controller=ai
type=Lich
id=Mal-Govon
name= _ "Mal-Govon"
canrecruit=yes
user_team_name= _ "Mal-Govon"
team_name=bad guys
# The first turn, I want the lich to recruit fairly weak
# scouts to get villages. That way he'll have more gold for
# strong units on the next turns--units to use to
# attack. There is an event that gives him all the rest of his
# recruits on a later turn. If I don't do this, he uses all
# his money for a few Spectres and has no income left. There
# aren't enough units to beat the player, even though they are
# strong ones.
recruit="Blood Bat, Ghost"
[ai]
village_value=5
recruitment_pattern=scout
scout_village_targeting=5
[/ai]
{FLAG_VARIANT undead}
{INCOME4 30 35 40 45}
{GOLD4 500 600 700 800}
[/side]
{STARTING_VILLAGES 2 5}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Blood Bat) 4}
[side]
side=3
no_leader=yes
team_name=good guys
user_team_name= _ "Villagers"
# I want Howyrth to stay out of the nearby castle so the
# player will always be able to use it.
[ai]
village_value=0
[avoid]
x=21,20
y=18,17
[/avoid]
[/ai]
[/side]
[side]
side=4
no_leader=yes
id=Caladon
name= _ "Caladon"
team_name=Caladon
user_team_name= _ "Caladon"
income=-2
gold=0
controller=null
[/side]
[event]
name=turn 2
[allow_recruit]
side=2
#ifdef EASY
type="Blood Bat, Ghost, Wraith, Spectre, Shadow, Bone Shooter, Deathblade, Revenant, Ghoul, Necrophage"
#endif
#ifdef NORMAL
type="Blood Bat, Dread Bat, Ghost, Wraith, Spectre, Shadow, Bone Shooter, Deathblade, Ghoul, Necrophage, Chocobone"
#endif
#ifdef HARD
type="Blood Bat, Dread Bat, Ghost, Wraith, Spectre, Shadow, Bone Shooter, Banebow, Deathblade, Ghoul, Necrophage, Chocobone"
#endif
#ifdef NIGHTMARE
type="Blood Bat, Dread Bat, Ghost, Wraith, Spectre, Shadow, Bone Shooter, Banebow, Deathblade, Ghoul, Necrophage, Chocobone"
#endif
[/allow_recruit]
[modify_side]
side=2
[ai]
recruitment_pattern=fighter,fighter,archer,scout,scout,scout # The scouts are to get more ghost variants.
scout_village_targeting=5
[goal]
name=protect_location
[criteria]
x,y=36,23
[/criteria]
protect_radius=8
value=200
[/goal]
[/ai]
[/modify_side]
#ifdef EASY
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Wraith) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Shadow) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Spectre) 1}
#endif
#ifdef NORMAL
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Dread Bat) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Wraith) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Spectre) 1}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Shadow) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Bone Shooter) 3}
#endif
#ifdef HARD
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Dread Bat) 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Wraith) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Spectre) 1}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Shadow) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Bone Shooter) 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Banebow) 1}
#endif
#ifdef NIGHTMARE
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Dread Bat) 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Wraith) 5}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Spectre) 1}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Shadow) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Bone Shooter) 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Banebow) 2}
#endif
[/event]
[event]
name=prestart
[music]
name=the_city_falls.ogg
[/music]
{RECALL_LOYAL_UNITS}
[objectives]
side=1
[objective]
description= _ "Pry the flaming sword from the dead hand of its owner"
condition=win
[/objective]
[objective]
description= _ "Death of Kai Krellis"
condition=lose
[/objective]
[objective]
description= _ "Death of Cylanna"
condition=lose
[/objective]
[objective]
description= _ "Death of Caladon"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[role]
side=1
race=merman
[filter_wml]
upkeep=full
[/filter_wml]
type=Mermaid Siren,Mermaid Diviner,Merman Entangler,Mermaid Enchantress,Mermaid Priestess,Merman Netcaster,Merman Brawler,Mermaid Initiate,Merman Javelineer,Merman Spearman,Merman Hunter,Merman Citizen
role=spy
[/role]
[recall]
role=spy
[/recall]
[store_unit]
[filter]
role=spy
[/filter]
variable=spy_unit
[/store_unit]
[modify_side]
side=1
income=$spy_unit.level # Since you have little gold, and maybe didn't plan to recall this unit, it is free. You're welcome.
[/modify_side]
{VARIABLE sword_x 999}
{VARIABLE sword_y 999}
# This is where the lich starts, so he will pick up this
# object immediately:
{FLAMING_SWORD 37 3 flaming-sword1}
[recall]
id=Caladon
x,y=8,27
[/recall]
[/event]
[event]
name=start
# The player gets gold more slowly without Siddry and friends, so we'll
# compensate a little:
[if]
[variable]
name=Siddry_stored
equals=no
[/variable]
[then]
[gold]
amount=20
side=1
[/gold]
[/then]
[/if]
[message]
speaker=$spy_unit.id
message= {WHISPER ( _ "(whisper) Kai, I heard Caladon muttering about the sword. I think he may try to take it for himself.")}
[/message]
[message]
speaker=Kai Krellis
message= {WHISPER ( _ "Thank you, $spy_unit.name|. I will keep that in mind, but it may be hard for us to stop him with that teleporting trick he has.")}
[/message]
[clear_variable]
name=spy_unit
[/clear_variable]
[message]
speaker=Caladon
message= _ "Here we are. There’s a castle up ahead in the fog. That’s where Agnovon has the sword."
[/message]
[message]
speaker=Kai Krellis
message= _ "The lich is Agnovon?"
[/message]
[message]
speaker=Caladon
message= _ "Well, he calls himself Mal-Govon now, but yes. He called this land the KINGDOM of Agnovon. He was its first king. And its last, and every one in between, too! He kept getting older and older, but he never died. Well, NOW he’s dead of course. He still putters around in that castle over there, but he hasn’t really cared about keeping his kingdom under control for a good long while. I bet I can wake him up, though. Watch THIS!"
[/message]
[message]
speaker=narrator
message= _ "Suddenly, Caladon’s strident voice shrieked out louder than seemed possible, as if there were dozens of men shouting at once."
image=wesnoth-icon.png
[/message]
[message]
speaker=Caladon
message= _ "AGNOVON, I’VE COME FOR YOUR SWORD! TODAY YOU WILL REMEMBER FEAR! Heh heh. Nice trick, huh?"
[/message]
[message]
speaker=narrator
message= _ "A voice came back like wind moaning through dry leaves. Though it was only whispered, all heard it better than they wanted."
image=wesnoth-icon.png
[/message]
[message]
speaker=Mal-Govon
message= _ "What I remember, you old fool, is you leaving behind the smoldering bodies of the orcs you had hired to steal my sword. Now, you bring mermen. When they lay expiring like gasping fish on the shore, will you not flee again? Do not speak to <i>me</i> of fear."
[/message]
[message]
speaker=Kai Krellis
message= _ "We are here of our own accord, and we will take that sword."
[/message]
[message]
speaker=Mal-Govon
message= _ "The merman speaks. Tell it to go away, Caladon, if it doesn’t want to get hurt."
[/message]
[message]
speaker=Kai Krellis
message= _ "That does it. Attack!"
[/message]
[/event]
[event]
name=turn 2
[message]
speaker=Caladon
message= _ "A word of warning, young Kai. I carry a staff of righteous FLAME. If you let me die, I will take YOU all with me!"
[/message]
[/event]
[event]
name=moveto
[filter]
[filter_location]
x=17
y=19
radius=3
[/filter_location]
side=1
[/filter]
[unit]
type=Outlaw
side=3
x=18
y=18
id=Howyrth
name= _ "Howyrth"
unrenamable=yes
ai_special=guardian
[modifications]
{TRAIT_QUICK}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
[delay]
time=500
[/delay]
[message]
speaker=Howyrth
message= _ "Hello there! Who are you? Were you the ones shouting about taking a sword?"
[/message]
[message]
speaker=Kai Krellis
message= _ "I am Kai Krellis of Jotha. I am attempting to defeat Mal-Govon and take his sword. Will you to join us in battle against a common enemy?"
[/message]
[message]
speaker=Howyrth
message= _ "I don’t know if that creature really is our enemy. He has never bothered us, and I should stay at my post anyway. However, I’m sure many townsfolk would welcome the extra income if you want to hire them. I guess we would be happy to get rid of the monster just in case."
[/message]
[message]
speaker=narrator
message= _ "You can now recruit human villagers, but you will not be able to recall them in future scenarios."
image=wesnoth-icon.png
[/message]
[allow_recruit]
type=Trapper, Bandit, Poacher, Thug, Footpad, Peasant, Woodsman, Ruffian
side=1
[/allow_recruit]
[if]
[variable]
name=Siddry_stored
not_equals=no
[/variable]
[then]
[move_unit_fake]
type=$Siddry_stored.type
side=1
x=23,19
y=14,19
[/move_unit_fake]
[set_variable]
name=Siddry_stored.x
value=19
[/set_variable]
[set_variable]
name=Siddry_stored.y
value=19
[/set_variable]
# Siddry may have been stored low on hitpoints, and
# after he had moved or attacked, so we'll fix all
# that now:
[set_variable]
name=Siddry_stored.hitpoints
value=37 #Hard coded because he is resillient so max_hitpoints is too low
[/set_variable]
[set_variable]
name=Siddry_stored.moves
value=$Siddry_stored.max_moves
[/set_variable]
[set_variable]
name=Siddry_stored.attacks_left
value=$Siddry_stored.max_attacks
[/set_variable]
[unstore_unit]
variable=Siddry_stored
[/unstore_unit]
[message]
speaker=Siddry
message= _ "Kai Krellis! What are you doing here? I thought you were traveling south when I met you."
[/message]
[message]
speaker=Kai Krellis
message= _ "Friend Siddry!"
[/message]
[message]
speaker=Howyrth
message= _ "You know each other?!"
[/message]
[message]
speaker=Siddry
message= _ "Kai Krellis is the one who saved me from slavery, Howyrth. I told him I would repay him if I could, and here is my chance. My friends and I will join you in your fight, Kai Krellis. We are yours to command, and we refuse to be paid."
[/message]
[unit]
type=Footpad
x=18
y=18
side=1
gender=female
id=Lyllan
name=Lyllan
[modifications]
{TRAIT_LOYAL}
{TRAIT_DEXTROUS}
[/modifications]
{IS_LOYAL}
[/unit]
[unit]
type=Thug
x=18
y=18
side=1
id=Trudd
name=Trudd
[modifications]
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[/unit]
[unit]
type=Thug
x=20
y=18
side=1
id=Dorcyn
name=Dorcyn
[modifications]
{TRAIT_LOYAL}
{TRAIT_QUICK}
[/modifications]
{IS_LOYAL}
[/unit]
{CLEAR_VARIABLE Siddry_stored}
[/then]
[else]
[unit]
type=Footpad
x=18
y=18
side=1
gender=male
id=Dorcyn
name=Dorcyn
[modifications]
{TRAIT_RESILIENT}
{TRAIT_DEXTROUS}
[/modifications]
[/unit]
[message]
speaker=Dorcyn
message= _ "I’ll join you right now! That monster is just unnatural."
[/message]
[/else]
[/if]
[/event]
# The variable "Caladon_leader_status" can be one of several values:
# <empty>: Caladon is not a leader. He is still a unit on side 1
#
# "passive": His side still has "controller=null" set. (He is
# giving the mermen time to leave before attacking them.)
#
# "impatient": Caladon’s side now has "controller=ai" set. (He's
# tired of waiting for the mermen to leave.) This is actually
# *set* on the players turn, because Caladon’s side doesn't *get*
# a turn until it is set. On his first turn after "impatient" is
# set, he will say something and summon fire guardians.
#
# "angry": Player attacked Caladon. (...and Caladon summoned the
# first fire guardians immediately, so he no longer has to on his
# turn.)
#
# "leader": He is a normal leader now. He has started his turns,
# and is summoning two fire guardians per turn.
#
# "dead": Keeps any of the other events from happening.
#define ACTIVATE_CALADON
[modify_side]
side=4
controller=ai
[/modify_side]
#enddef
#define SUMMON_FIRE_GUARDIANS NUMBER
[store_unit]
[filter]
id=Caladon
[/filter]
variable=Caladon_stored
[/store_unit]
{REPEAT {NUMBER} (
[unit]
type=Fire Guardian
# The guardians are summoned on Caladon’s position, so they
# will surround him or surround his attackers if there are
# any:
x=$Caladon_stored.x
y=$Caladon_stored.y
side=4
animate=yes
generate_name=yes
[/unit]
)}
#enddef
[event]
name=die
[filter]
id=Mal-Govon
[/filter]
# It seems strange to have to kill him in a "die" event, but
# he's only *mostly* dead otherwise, and Caladon can't
# teleport to his location:
[kill]
id=Mal-Govon
[/kill]
{PLACE_IMAGE items/flame-sword.png $x1 $y1}
[message]
speaker=narrator
message= _ "The mermen clapped their hands over their ears as a terrible wail echoed off the castle walls."
image=wesnoth-icon.png
[/message]
[delay]
time=600
# Gives you half a second to see the sword before the
# message (probably) covers it up.
[/delay]
[if]
[variable]
name=second_unit.id
equals=Kai Krellis
[/variable]
[then]
{VARIABLE staff_tip_off Cylanna}
[/then]
[else]
{VARIABLE staff_tip_off second_unit}
[/else]
[/if]
[message]
speaker=second_unit
message= _ "Now we have the sword!"
[/message]
[message]
speaker=Caladon
message= _ "Correction. Now I have the sword!"
[/message]
[store_unit]
[filter]
id=Caladon
[/filter]
variable=Caladon_stored
[/store_unit]
[remove_unit_overlay]
x=$Caladon_stored.x
y=$Caladon_stored.y
image=misc/hero-icon.png
[/remove_unit_overlay]
[store_unit]
[filter]
id=Caladon
[/filter]
kill=yes
variable=Caladon_stored
[/store_unit]
{VARIABLE Caladon_stored.side 4}
{VARIABLE Caladon_stored.canrecruit yes}
{VARIABLE Caladon_stored.ellipse ""}
# He is not going to recruit, but summon guardians each
# turn. Still, he needs this variable set to get a crown icon,
# and to show up in the status table.
[unstore_unit]
variable=Caladon_stored
[/unstore_unit]
[animate_unit]
flag=pre_teleport
[/animate_unit]
[teleport]
[filter]
id=Caladon
[/filter]
x=$x1
y=$y1
[/teleport]
[animate_unit]
flag=post_teleport
[/animate_unit]
# Remove the death of Caladon from a the loss conditions, but
# we probably don't need to make a point of it, so silent=yes.
[objectives]
silent=yes
side=1
[objective]
description= _ "Pry the flaming sword from the dead hand of its owner"
condition=win
[/objective]
{HOW_TO_LOSE}
[/objectives]
[delay]
time=700
# Gives you time to see that Caladon teleported to the
# sword before the message (probably) covers him up
# (because he will be near the top of the screen).
[/delay]
{FLAMING_SWORD $x1 $y1 flaming-sword2}
[object]
id=drop_staff
silent=yes
[filter]
x=$x1
y=$y1
[/filter]
[effect]
apply_to=remove_attacks
name=staff
[/effect]
[/object]
[message]
speaker=Caladon
message= _ "It’s MINE! The Flaming Sword of Agnovon IS ALL MINE! I can feel warmth SPREADING through me!"
[/message]
[object]
id=healer
silent=yes
[filter]
x=$x1
y=$y1
[/filter]
[effect]
apply_to=hitpoints
heal_full=yes
[/effect]
[/object]
[sound]
name=heal.wav
[/sound]
[delay]
time=400
# Wait for the sound to play (mostly) until scrolling to Kai Krellis
[/delay]
[message]
speaker=Kai Krellis
message= _ "What? We won that sword!"
[/message]
[message]
speaker=Caladon
message= _ "Well, it’s true that you helped, so I won’t kill you. But I don’t trust you, so leave my realm. Go on. I will grant you some time. The benevolence of Caladon will be LEGENDARY! Heh heh, HA!"
[/message]
[message]
speaker=$staff_tip_off
message= {WHISPER ( _ "Kai! He dropped his staff! We can attack him whenever we want now!")}
[/message]
[message]
speaker=Cylanna
message= {WHISPER ( _ "We can pretend we are going to leave though. That would buy me some time to heal the wounded.")}
[/message]
{VARIABLE Caladon_leader_status passive}
# see note above on this variable
[clear_variable]
name=staff_tip_off
[/clear_variable]
[/event]
[event]
name=attack
first_time_only=no
[filter]
side=1
[/filter]
[filter_second]
side=4
[/filter_second]
[if]
[variable]
name=Caladon_leader_status # see note above
equals=passive
[/variable]
[or]
[variable]
name=Caladon_leader_status
equals=impatient
[/variable]
[/or]
[then]
{ACTIVATE_CALADON}
[message]
speaker=Caladon
message= _ "You DARE attack ME! You will regret that. Witness the POWER of the Flaming Sword of Caladon! I call on the ELEMENT OF FIRE to DO MY BIDDING!"
[/message]
{SUMMON_FIRE_GUARDIANS 6}
{VARIABLE Caladon_leader_status leader}
[/then]
[/if]
[/event]
[event]
name=side turn
first_time_only=no
[if]
[variable]
name=side_number
equals=1
[/variable]
[and]
[variable]
name=Caladon_leader_status # see note above
equals=passive
[/variable]
[/and]
[then]
{ACTIVATE_CALADON}
{VARIABLE Caladon_leader_status impatient}
[/then]
[/if]
[/event]
[event]
name=side turn
first_time_only=no
[if]
[variable]
name=side_number
equals=4
[/variable]
[and]
[variable]
name=Caladon_leader_status # see note above
not_equals=dead
[/variable]
[/and]
[then]
[if]
[variable]
name=Caladon_leader_status
equals=leader
[/variable]
[then]
{SUMMON_FIRE_GUARDIANS 2}
[/then]
[/if]
[if]
[variable]
name=Caladon_leader_status
equals=impatient
[/variable]
[then]
[message]
speaker=Caladon
message= _ "You haven’t left yet? My patience is at an END! Witness the POWER of the Flaming Sword of Caladon! I call on the ELEMENT OF FIRE to DO MY BIDDING!"
[/message]
{SUMMON_FIRE_GUARDIANS 6}
{VARIABLE Caladon_leader_status leader}
[/then]
[/if]
[/then]
[/if]
[/event]
[event]
name=die
[filter]
id=Caladon
side=1
[/filter]
[sound]
name=lightning.ogg
[/sound]
[sound]
name=rumble.ogg
[/sound]
[kill]
[filter]
[/filter]
[/kill]
{VARIABLE color 250}
{VARIABLE delta 8}
{REPEAT 14 (
[set_variable]
name=delta
sub=3
[/set_variable]
[set_variable]
name=color
add=$delta
[/set_variable]
[color_adjust]
red,green,blue=$color|,$color|,$color
[/color_adjust]
[delay]
time=100
[/delay]
)}
[color_adjust]
red,green,blue=0,0,0
[/color_adjust]
[/event]
[event]
name=die
[filter]
id=Caladon
side=4
[/filter]
[set_variable]
name=sword_x
value=$x1
[/set_variable]
[set_variable]
name=sword_y
value=$y1
[/set_variable]
{PLACE_IMAGE items/flame-sword.png $sword_x $sword_y}
[delay]
time=600
# Gives you half a second to see the sword before the
# message (probably) covers it up (because it will be near
# the top of the screen).
[/delay]
[message]
speaker=Kai Krellis
message= _ "Now we can finally grab that sword."
[/message]
[/event]
[event]
name=moveto
first_time_only=yes
[allow_undo][/allow_undo]
[filter]
x=$sword_x
y=$sword_y
side=1
race=human
[/filter]
[message]
speaker=unit
message= _ "I am not going with you. One of your people should take the sword."
[/message]
[/event]
# The first_time_only moveto causes the sword's attacks to be
# explained. The moved unit gets the option to take it.
# If the unit takes it, a sword *object* is put on the hex, and
# the unit gets it because he is standing there already.
# If the unit does not take it, another moveto event is
# added. This one is *not* first_time_only, but it does the same
# thing without the explanation. If a unit does not take the
# sword, an [allow_undo] is added to the event.
[event]
name=moveto
first_time_only=yes
[filter]
x=$sword_x
y=$sword_y
side=1
[not]
race=human
[/not]
[/filter]
[message]
speaker=narrator
message= _ "This sword is 8-4, magical, with <i>fire</i> damage."
image=wesnoth-icon.png
[/message]
[message]
speaker=unit
[option]
message= _ "I’ll carry this sword and destroy undead with blasts of flame."
[command]
[set_variable]
name=get_sword
value=yes
[/set_variable]
[/command]
[/option]
[option]
message= _ "This sword is not right for me. Let someone else have it."
[/option]
[/message]
[if]
[variable]
name=get_sword
equals=yes
[/variable]
[then]
{FLAMING_SWORD $sword_x $sword_y flaming-sword3}
{CLEAR_VARIABLE get_sword}
{CLEAR_VARIABLE sword_x}
{CLEAR_VARIABLE sword_y}
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[else]
[allow_undo][/allow_undo]
[event]
name=moveto
first_time_only=no
[filter]
x=$sword_x
y=$sword_y
side=1