// creator  : weidu.exe (version 23100)
// argument : DEGARD.DLG
// game		 : .
// source	 : ./DATA/DIALOG.BIF
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~DEGARD~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #1 /* Triggers after states #: 12 even though they appear after this state */
~Global("TalkedDegardan","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #7425 /* ~Hold up, wayfarers. I've a few queries for this lowly group of middling pilgrims.~ */
  IF ~~ THEN REPLY #7428 /* ~Sorry, we have no time to speak with you at the moment.~ */ DO ~SetGlobal("TalkedDegardan","GLOBAL",1)
SetGlobalTimer("DegardanSpawn","GLOBAL",TWO_DAYS)~ GOTO 1
  IF ~~ THEN REPLY #7429 /* ~What is it that you wish to know?~ */ DO ~SetGlobal("TalkedDegardan","GLOBAL",1)
SetGlobalTimer("DegardanSpawn","GLOBAL",TWO_DAYS)~ GOTO 3
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #7430 /* ~I've traveled an arduous distance.  A Red Wizard of Thay needn't explain himself. If my inquiries are ignored, I will interrogate you in a painful fashion.~ */
  IF ~~ THEN REPLY #7432 /* ~How about forget it. No questions and don't let the door hit you in the ass on the way out.~ */ GOTO 2
  IF ~~ THEN REPLY #7433 /* ~Alright then, what are these questions that can't wait until later?~ */ GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #7434 /* ~I know, I know. Fine. None of you are afraid to die... you just don't want to be there when it happens. I'll make this quick then.~ */
  IF ~~ THEN DO ~Enemy()~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 1.1 0.1
  SAY #7435 /* ~We are interested in the whereabouts of Edwin, a long-winded bag of gas.  Homeland magics indicate this area to be a likely place for the vulture to roost.~ */
  IF ~~ THEN REPLY #7438 /* ~Why exactly are you seeking Edwin?~ */ GOTO 11
  IF ~~ THEN REPLY #7439 /* ~Sorry, I have no idea who this Edwin is, or where he might be.~ */ GOTO 4
  IF ~~ THEN REPLY #7440 /* ~See that woman over there? That's your man, though he is now a she through the effects of a curse.~ */ EXTERN ~EDWINJ~ 176
END

IF ~~ THEN BEGIN 4 // from: 5.1 3.1
  SAY #7442 /* ~There is a king's ransom for the kind soul who would be so obliging as to turn the impotent imposter over to the proper judicial authority.~ */
  IF ~~ THEN REPLY #7446 /* ~Reward, eh? That's Edwin right there... the woman. Now that I've done a good turn it's time to show me the money.~ */ EXTERN ~EDWINJ~ 176
  IF ~~ THEN REPLY #7447 /* ~If I should happen across this "Edwin" I'll be sure to seek you out and let you know where he is.~ */ DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 5 // from: 11.0
  SAY #7443 /* ~As it happens, his prowess as a spellcaster consists of parlor tricks and balls under coconut shells. Did I mention the fantastic reward as well?~ */
  IF ~~ THEN REPLY #7449 /* ~Fantastic? Edwin is standing right here, disguised as a woman. Don't be fooled, it's him.~ */ EXTERN ~EDWINJ~ 176
  IF ~~ THEN REPLY #7451 /* ~I haven't seen Edwin but I'll be watching for him.~ */ UNSOLVED_JOURNAL #46840 /* ~Edwin is being hunted by the Red Wizards?

A Red Wizard by the name of Degardan appears to be hunting Edwin... our mage seems to have a hefty price on his head for angering his former colleagues.  I have covered for Edwin, for now, but I have the feeling this is not the last time I've seen Degardan.~ */ GOTO 4
END

IF ~~ THEN BEGIN 6 // from: EDWINW:6.0 EDWINJ:176.0
  SAY #7454 /* ~It draws to a close, Edwin. Let your friends applaud. You've tempted the cold touch of fate once too often. The comedy is over, your day is done.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 /* Triggers after states #: 12 even though they appear after this state */
~Global("TalkedDegardan","GLOBAL",1)~ THEN BEGIN 7 // from:
  SAY #7460 /* ~Greetings again, friends of Edwin. The guise as a woman reeks of shabby amateur glamers. The fix is in, Edwin. Your time here is done.~ */
  IF ~~ THEN EXTERN ~EDWINJ~ 177
END

IF ~~ THEN BEGIN 8 // from: EDWINW:7.0 EDWINJ:177.0
  SAY #7462 /* ~In your own inimitable fashion, Edwin, you are prodigious... at lying. Certainly not at magic or spinning wholly credible yarns.~ */
  IF ~~ THEN EXTERN ~EDWINJ~ 178
END

IF ~~ THEN BEGIN 9 // from: EDWINW:12.0 EDWINJ:182.0
  SAY #7464 /* ~Gods! This fictional world you live in must be a glorious place, Edwin. But in our world, I'm going to reveal your true nature with this dweomer.~ */
  IF ~~ THEN DO ~ForceSpell("edwin",EDWIN_CHANGE_BACK)
Wait(1)
SetGlobal("TalkedDegardan","GLOBAL",2)~ EXIT
END

IF ~~ THEN BEGIN 10 // from: EDWINJ:16.0
  SAY #7466 /* ~Edwin, you've always been a verbose charlatan. Your maudlin skills barely manifest a lowly cantrip, never mind magics to shake the earth.~ */
  IF ~~ THEN EXTERN ~EDWINJ~ 17
END

IF ~~ THEN BEGIN 11 // from: 3.0
  SAY #18439 /* ~Edwin is a self-serving nerveless worm. He's gone rogue.  He tithes nothing and has vilified the masters of the order and sullied their good names.~ */
  IF ~~ THEN GOTO 5
END

IF WEIGHT #0 ~Global("TurnedInEdwin","GLOBAL",1)
Dead("Edwin")
!Allegiance(Myself,ENEMY)~ THEN BEGIN 12 // from:
  SAY #61249 /* ~My thanks for your assistance.  I have little doubt you were as plagued by the foolish wizard as we were.  As I mentioned, here is your reward.  Good day to you.~ */
  IF ~~ THEN DO ~GiveGoldForce(5000)
AddExperienceParty(5000)
EscapeArea()~ EXIT
END
