// creator  : weidu.exe (version 23600)
// argument : EDWINP.DLG
// game     : .
// source   : ./override/EDWINP.DLG
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

BEGIN ~EDWINP~

IF ~  !HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
Global("KickedOut","LOCALS",1)
~ THEN BEGIN 0 // from:
  SAY #15463 /* ~It is about time you returned! If I had waited another moment you would surely have regretted it! Let's get moving!~ */
  IF ~~ THEN REPLY #15464 /* ~That is a bit presumptuous of you. I have no desire to have you back just yet.~ */ GOTO 2
  IF ~~ THEN REPLY #15465 /* ~Though I do not enjoy your manner, I do have need of your talents. Welcome back.~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.1
  SAY #15466 /* ~Save your pleasantries. (I will suffer their company merely because they are useful.)~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
ChangeAIScript("",DEFAULT)
SetGlobal("KickedOut","LOCALS",0)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 2 // from: 0.0
  SAY #15467 /* ~You would cast me aside yet again? Do not press me further! I will wait here, but do not tarry!~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
~ EXIT
END

IF ~  !HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
Global("KickedOut","LOCALS",0)
~ THEN BEGIN 3 // from:
  SAY #15434 /* ~You would have me leave the group? I agree to do so, but only as it serves my purposes for the time being. (I will wait here, but I am not a patient man.)~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
~ EXIT
END

IF ~  HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
~ THEN BEGIN 4 // from:
  SAY #15435 /* ~You would cast me out as though I were a servant? (They will all pay for their insolence!)~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
ChangeAIScript("",DEFAULT)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 5 // from: DENAK:11.2
  SAY #46649 /* ~Never double-cross a Red Wizard of Thay, <CHARNAME>. Unfortunately, you will not live to enjoy the benefits of this lesson.~ */
  IF ~~ THEN DO ~SetGlobal("X#EdwinReturn","GLOBAL",3)
~ EXIT
  IF ~  Global("X#EdwinReturn","GLOBAL",2)
!Dead("Edwin")
!InParty("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
See("denak")
~ THEN DO ~SetGlobal("X#EdwinReturn","GLOBAL",3)
~ GOTO 6
END

IF ~~ THEN BEGIN 6 // from: DENAK:11.1 5.1
  SAY #46650 /* ~Have I not told you that I shall return? I was busying myself with preparing a surprise for you.~ */
  IF ~~ THEN DO ~SetGlobal("X#EdwinReturn","GLOBAL",3)
CreateCreature("FGOLEM",[-1.-1],S)
CreateCreature("FGOLEM",[-1.-1],S)
~ EXIT
END
