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

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

IF WEIGHT #0 ~Dead("Wyvern")
InParty("Coran")
Global("CoranReward","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #16789 /* ~We know of your treachery, Irenicus! Where have you taken our brethren?!~ [GAELEN36] */
  IF ~~ THEN DO ~SetGlobal("CoranReward","GLOBAL",1)
~ EXIT
END

IF ~~ THEN BEGIN 1 // from: BRIELB:0.0
  SAY #16790 /* ~I'm not looking for any one p-p-person, <SIRMAAM>.  I was sent to find someone who could h-help my village.  Terrible things are happening there, and nobody knows what to do!~ */
  IF ~~ THEN DO ~~ EXTERN ~BRIELB~ 1
END

IF ~~ THEN BEGIN 2 // from: BRIELB:1.0
  SAY #16791 /* ~You dare attack me here?! Do you even know whom you face?!~ [IRENIC02] */
  IF ~~ THEN DO ~~ EXTERN ~BRIELB~ 2
END

IF ~~ THEN BEGIN 3 // from: BRIELB:2.0
  SAY #16792 /* ~You know nothing of me! You know nothing of what I must do! You will suffer! You will all suffer!~ [IRENIC07] */
  IF ~~ THEN REPLY #16793 /* ~Y-yes, <SIRMAAM>.  You're very kind.  But it'll p-p-probably just get stolen again, and I haven't found anyone who can help my village.~ */ DO ~LeaveParty()
EscapeArea()
~ EXTERN ~BRIELB~ 11
  IF ~~ THEN REPLY #16794 /* ~Men! Kill him!~ [GAELEN37] */ DO ~~ EXTERN ~BRIELB~ 7
END

IF ~~ THEN BEGIN 4 // from: BRIELB:13.0
  SAY #16795 /* ~You! You are no Herald! What is going on here?~ */
  IF ~~ THEN DO ~~ EXTERN ~BRIELB~ 14
END

IF WEIGHT #1 ~!Dead("Wyvern")
GlobalTimerExpired("Coran","GLOBAL")
Global("CoranWyvern","GLOBAL",1)
~ THEN BEGIN 5 // from:
  SAY #17222 /* ~Red is my color of choice.~ */
  IF ~~ THEN DO ~SetGlobal("CoranWyvern","GLOBAL",2)
LeaveParty()
EscapeArea()
~ EXIT
END

IF WEIGHT #2 ~!Dead("Wyvern")
GlobalTimerExpired("Coran","GLOBAL")
Global("CoranWyvern","GLOBAL",0)
~ THEN BEGIN 6 // from:
  SAY #17223 /* ~Yellow is what I prefer.~ */
  IF ~~ THEN DO ~SetGlobalTimer("Coran","GLOBAL",EIGHT_DAYS)
SetGlobal("CoranWyvern","GLOBAL",1)
~ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 8 even though they appear after this state */
~True()
~ THEN BEGIN 7 // from:
  SAY #11839 /* ~I will take the cells and revive the other servants. Have peace at last.~ */
  IF ~~ THEN DO ~LeaveParty()
SetDialog("CoranP")
~ EXIT
END

IF WEIGHT #3 ~HappinessLT(Myself,0)
~ THEN BEGIN 8 // from:
  SAY #11840 /* ~I don't need these cells or crystals to escape this place. I will not help you.~ */
  IF ~~ THEN DO ~LeaveParty()
EscapeArea()
~ EXIT
END
