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

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

IF WEIGHT #7 /* Triggers after states #: 3 4 5 6 7 8 9 even though they appear after this state */
~  !HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
Global("KickedOut","LOCALS",1)
~ THEN BEGIN 0 // from:
  SAY #15453 /* ~It seems we have crossed paths yet again. Shall we renew our partnership and travel together?~ */
  IF ~~ THEN REPLY #15454 /* ~Your company was missed by all. Welcome back to the group.~ */ GOTO 1
  IF ~~ THEN REPLY #15455 /* ~I've no need of your services quite yet. Perhaps in the future, but not now.~ */ GOTO 2
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #15456 /* ~Ah, old friends made new again. A pairing that cannot be beaten.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
ChangeAIScript("",DEFAULT)
SetGlobal("KickedOut","LOCALS",0)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #15457 /* ~Ah well, even the best things pass away. Your company was enjoyable while it lasted. Perhaps we shall meet again.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
~ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 6 7 8 9 even though they appear after this state */
~  !HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
Global("KickedOut","LOCALS",0)
~ THEN BEGIN 3 // from:
  SAY #15432 /* ~Ah well, even the best things pass away. Your company was enjoyable while it lasted. Perhaps we shall meet again.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
SetDialogue("CoranP")
LeaveParty()
~ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 6 7 8 9 even though they appear after this state */
~  HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
~ THEN BEGIN 4 // from:
  SAY #15433 /* ~It is too hard to be stealthy with a group like this. I should have known not to have joined you in the first place.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
ChangeAIScript("",DEFAULT)
EscapeArea()
LeaveParty()
~ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 6 7 8 9 even though they appear after this state */
~  StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 5 // from:
  SAY #16796 /* ~What knowledge would you like from me? I could tell you about the beautiful forests of Tethyr, or the many gorgeous damsels that have fallen for my charms. I have studied up on the wyverns that prey upon the area. They have wicked barbs upon their tales, which they use to poison their victims. They are cruel beasts that enjoy inflicting suffering upon their prey. I really have not much more to say.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 7 8 9 even though they appear after this state */
~  Global("X#XQSlavesExchanged","GLOBAL",1)
~ THEN BEGIN 6 // from:
  SAY #48349 /* ~Oh, Hanali...~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 /* Triggers after states #: 8 9 even though they appear after this state */
~  Global("P#CoranMoves","GLOBAL",6)
~ THEN BEGIN 7 // from:
  SAY #48485 /* ~Ah, here you are. Back to adventure! ~ */
  IF ~~ THEN DO ~SetGlobal("P#CoranMoves","GLOBAL",7)
JoinParty()
~ EXIT
END

IF WEIGHT #1 /* Triggers after states #: 9 even though they appear after this state */
~  Global("X#CoranCharmed","GLOBAL",1)
~ THEN BEGIN 8 // from:
  SAY #48763 /* ~Amelia... I adore Amelia...~ */
  IF ~~ THEN DO ~EscapeAreaMove("AR4500",4040,2091,SWW)
~ EXIT
END

IF WEIGHT #0 ~  Global("P#CoranMoves","GLOBAL",2)
~ THEN BEGIN 9 // from:
  SAY #54931 /* ~A'maelamin <CHARNAME>, cormamin lindua ele lle...~ */
  IF ~~ THEN REPLY #54932 /* ~*smile* And so does mine heart sing at the sight of you.~ */ DO ~SetGlobal("P#CoranMoves","GLOBAL",3)
SetGlobal("P#CoranBack","GLOBAL",2)
~ GOTO 10
  IF ~~ THEN REPLY #54933 /* ~Coran, I conclude from the shine in your eyes that you are happy to see me, but what you are saying sounds elvish to me.~ */ DO ~SetGlobal("P#CoranMoves","GLOBAL",3)
SetGlobal("P#CoranBack","GLOBAL",2)
~ GOTO 11
  IF ~~ THEN REPLY #54934 /* ~It better be good news... what are you saying?~ */ DO ~SetGlobal("P#CoranMoves","GLOBAL",3)
SetGlobal("P#CoranBack","GLOBAL",2)
~ GOTO 11
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #54935 /* ~Ah, a'maelamin, I have missed you so! *Coran catches you in his arms and swirls you around.*~ */
  IF ~~ THEN REPLY #54936 /* ~*laugh* It's like you have never been gone!~ */ GOTO 12
  IF ~~ THEN REPLY #54937 /* ~Put me down! Put me DOWN! And fall back in line, you impossible, silly, terrible- *kiss Coran*~ */ GOTO 12
  IF ~~ THEN REPLY #54938 /* ~You know, Coran, how they say: 'Out of sight, out of mind?' I... I do not-~ */ GOTO 13
END

IF ~~ THEN BEGIN 11 // from: 9.2 9.1
  SAY #54939 /* ~Ah, I am sorry, I was talking to you in my thoughts all the way here and slipped to elvish inadvertently. My heart sings to see thee, beloved. Hmm... it sounds more... natural in elvish than in Common. Never mind! *Coran catches you in his arms and swirls you around.*~ */
  IF ~~ THEN REPLY #54936 /* ~*laugh* It's like you have never been gone!~ */ GOTO 12
  IF ~~ THEN REPLY #54937 /* ~Put me down! Put me DOWN! And fall back in line, you impossible, silly, terrible- *kiss Coran*~ */ GOTO 12
  IF ~~ THEN REPLY #54938 /* ~You know, Coran, how they say: 'Out of sight, out of mind?' I... I do not-~ */ GOTO 13
END

IF ~~ THEN BEGIN 12 // from: 11.1 11.0 10.1 10.0
  SAY #54940 /* ~How have you been, my love? Unhurt? And not seduced by some irresponsible vagabond? I want to know of every moment I have missed...~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",0)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 13 // from: 11.2 10.2
  SAY #54941 /* ~Do not try to explain. The flaming Nine Hells, woman, you did not believe a word I was saying, did you? Ah, well, bugger it all.~ */
  IF ~~ THEN DO ~SetGlobal("P#CoranRomanceInactive","GLOBAL",1)
EscapeArea()
~ EXIT
END
