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

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

IF WEIGHT #2 /* Triggers after states #: 13 even though they appear after this state */
~NumTimesTalkedTo(0)
Global("DiggersPossessed","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #8627 /* ~Stop whining, magpie.  Oh terribly sorry, bird metaphors are forbidden because you can't fly anymore.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 13 even though they appear after this state */
~NumTimesTalkedTo(1)
Global("DiggersPossessed","GLOBAL",0)
~ THEN BEGIN 1 // from:
  SAY #8628 /* ~Viconia, why are you so cruel?  There's absolutely no reason to be so foul and petty.  No reason at all.~ [AERIE45] */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 13 even though they appear after this state */
~NumTimesTalkedTo(2)
Global("DiggersPossessed","GLOBAL",0)
~ THEN BEGIN 2 // from:
  SAY #8629 /* ~After a desperate battle, Bodhi has retreated to her coffin. It is time to end this. If you have a stake, you can destroy her and free Imoen's soul.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 /* Triggers after states #: 13 even though they appear after this state */
~NumTimesTalkedTo(3)
Global("DiggersPossessed","GLOBAL",0)
~ THEN BEGIN 3 // from:
  SAY #8630 /* ~It is finally finished. Bodhi will torment you no longer. She shall pay in the abyss for the evils that she has inflicted upon the world.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 /* Triggers after states #: 13 even though they appear after this state */
~NumTimesTalkedTo(4)
Global("DiggersPossessed","GLOBAL",0)
~ THEN BEGIN 4 // from:
  SAY #8631 /* ~Screen Shake~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from:
  SAY #8632 /* ~To Unknown Shores.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6 // from: CUTCHAR:1.0
  SAY #8633 /* ~CHAPTER FOUR

Aran Linvail has proven trustworthy, you are soon under sail with the flamboyant Saemon Havarian at the helm. The journey is uneventful, and if there were other ships on the same course they must have kept a discreet distance. You make good time, and soon there is a sizable island on the horizon. It might have been considered a pleasant place, but a grim shadow extends the length of it. The asylum, Spellhold, looms from a cliff side.~ [CHAPT04A] */
  IF ~~ THEN EXTERN ~CUTCHAR~ 0
END

IF ~~ THEN BEGIN 7 // from: CUTCHAR:0.0
  SAY #8634 /* ~To a Watery Grave?~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #8635 /* ~Minor Sequencer Activated~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #8636 /* ~You open the door and peer through but you see nothing. There is no room, no house just emptiness, darkness. It is a bizarre thing to behold. You do not know what would happen if you stepped through.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #8637 /* ~Celestial Fury~ */
  IF ~~ THEN DO ~ActionOverride("Charleston",SetDialog("charle"))
EndCutsceneMode()
SetGlobal("DiggersPossessed","GLOBAL",1)
~ EXIT
END

IF WEIGHT #7 /* Triggers after states #: 13 even though they appear after this state */
~RandomNum(1,1)
Global("DiggersPossessed","GLOBAL",1)
~ THEN BEGIN 11 // from:
  SAY #8638 /* ~Spell Sequencer - Melf's Minute Meteors~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #8 /* Triggers after states #: 13 even though they appear after this state */
~RandomNum(2,1)
Global("DiggersPossessed","GLOBAL",1)
~ THEN BEGIN 12 // from:
  SAY #8639 /* ~You peer into the nothingness behind the door and the Rogue Stone in your backpack glows fiercely and disappears. You are pulled into the blackness.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
Global("DiggersPossessed","GLOBAL",0)
~ THEN BEGIN 13 // from:
  SAY #8974 /* ~Odd time to develop a spine, Cernd. I was expecting him to attack right there.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 14 // from:
  SAY #8975 /* ~It's not so much in me as in a puddle around me. Scared myself, I did. It worked though. Let's see what our friend brings back with him.~ */
  IF ~~ THEN EXIT
END
