// creator  : weidu (version 130)
// argument : MORIJ.DLG
// game     : .
// source   : ./override/MORIJ.DLG
// dialog   : ./dialog.tlk
// dialogF  : ./dialogf.tlk

BEGIN ~MORIJ~ 16699 // non-zero flags may indicate non-pausing dialogue
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #4 /* Triggers after states #: 2 3 5 6 even though they appear after this state */
~nParty("Jeanna")
~ THEN BEGIN 0 // from:
  SAY @1 /* ~As ye would have it.  I likely would have put a dagger in ye eventually, but for now ye have been adequately useful.~ #16699 */
  IF ~~ THEN DO ~LeaveParty()

SetDialog("MoriP")

A~ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 2 3 5 6 even though they appear after this state */
~InParty("Xzar")
~ THEN BEGIN 1 // from:
  SAY @2 /* ~As ye would have it.  I likely would have put a dagger in ye eventually, but for now ye have been adequately useful.  Come wizard, we are inseparable until the day ye die.~ #16700 */
  IF ~~ THEN DO ~ctionOverride("Jeanna",ChangeAIScript("",DEFAULT))

ActionOverride("Jeanna",LeaveParty())

ActionOverride("Jeanna",SetDialog("JeannP"))

LeaveParty()

SetDialog("Mori~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 5 6 even though they appear after this state */
~essLT(Myself,0)
!InParty("Jeanna")
Happ~ THEN BEGIN 2 // from:
  SAY @3 /* ~And good riddance to yer bad rubbish!  I suggest ye sleep with one eye open from now on.~ #16701 */
  IF ~~ THEN DO ~P")

LeaveParty()

EscapeAre~ EXIT
END

IF WEIGHT #3 /* Triggers after states #: 5 6 even though they appear after this state */
~inessLT(Myself,0)
InParty("Jeanna")
!I~ THEN BEGIN 3 // from:
  SAY @4 /* ~And good riddance to yer bad rubbish!  I suggest ye sleep with one eye open from now on.  Come wizard!  I'll not miss yer inevitable death by leavin' ye behind!~ #16702 */
  IF ~~ THEN DO ~a()

ActionOverride("Jeanna",ChangeAIScript("",DEFAULT))

ActionOverride("Jeanna",LeaveParty())

ActionOverride("Jeanna",EscapeArea())

LeaveParty()

Esc~ EXIT
END

IF ~~ THEN BEGIN 4 // from:
  SAY @5 /* ~Now you've gone and set him off!  Blasted mage will blither for hours!  Off wit ye!  I'll not suffer the both of ye!~ #16712 */
  IF ~~ THEN DO ~apeArea()

ActionOverride("Jeanna",LeaveParty())

ActionOverride("Jeanna",EscapeArea())

LeaveParty()
~ EXIT
END

IF WEIGHT #0 ~GlobalTimerExpired("Morik","GLOBAL")
Global("FindRagefast","GLOBAL",0)
Global("Chapter","GLOBAL",1)
Glo~ THEN BEGIN 5 // from:
  SAY @6 /* ~Ye waste my time and test my patience!  To Nashkel we must go!~ #17206 */
  IF ~~ THEN DO ~
EscapeArea()

SetGlobalTimer("Morik","GLOBAL",NINE_DAYS)

SetGlobal("FindRagefast","~ EXIT
END

IF WEIGHT #1 ~balTimerExpired("Morik","GLOBAL")
Global("FindRagefast","GLOBAL",1)
Global("Chapter","GLOBAL",1)
Happin~ THEN BEGIN 6 // from:
  SAY @7 /* ~Nashkel is where I must go.  If ye will not go there yerself, then here is where we part company!  Sleep lightly, if ye dare to sleep at all!~ #17207 */
  IF ~~ THEN DO ~Global",1)

ActionOverride("Jeanna",LeaveParty())

ActionOverride("Jeanna",EscapeArea())

LeaveParty()~ EXIT
END
