// creator  : weidu.exe (version 23100)
// argument : _YAGO.DLG
// game		 : .
// source	 : ./override/_YAGO.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

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

IF WEIGHT #1 /* Triggers after states #: 7 even though they appear after this state */
~Allegiance(Myself,NEUTRAL)
OR(2)
NumberOfTimesTalkedTo(0)
Global("BrielbaraMove","GLOBAL",1)
~ THEN BEGIN 0 // from:
  SAY #81776 /* ~What in the Nine Hells are the lot of you doing in my room?~ */
  IF ~Global("BrielbaraMove","GLOBAL",1)
~ THEN REPLY #81777 /* ~We're here for the cure to the curse you've placed on Brielbara's daughter.~ */ GOTO 1
  IF ~~ THEN REPLY #81778 /* ~We're here to end your miserable life.~ */ GOTO 2
  IF ~~ THEN REPLY #81779 /* ~We're members of the Flaming Fist, and we've been ordered to confiscate all spell books in the town.  You needn't worry, you'll get yours back in a few days.~ */ GOTO 3
  IF ~~ THEN REPLY #81780 /* ~Sorry for bothering you, we'll be on our way.~ */ EXIT
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #81781 /* ~So the bitch hired some adventurers to get a cure for her precious daughter.  She should have sent someone who was up to the task, instead of you rabble.~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
  IF ~Global("X#DynaheirYago","GLOBAL",0)
InParty("dynaheir")
InMyArea("dynaheir")
!StateCheck("dynaheir",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#DynaheirYago","GLOBAL",1)~ EXTERN ~_DYNAHJ~ 85
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #81782 /* ~Assassins!  I'm not the one who'll be dying.~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 0.2
  SAY #81783 /* ~Your deception won't work on me, simpletons!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 7 even though they appear after this state */
~HPLT(Myself,11)
Allegiance(Myself,ENEMY)
~ THEN BEGIN 4 // from:
  SAY #81784 /* ~Please!  Let me live.  I give up.  I'll give you anything you want, just don't kill me.~ */
  IF ~~ THEN REPLY #81785 /* ~We don't take prisoners.~ */ DO ~SetGlobal("YagoFight","GLOBAL",1)
~ EXIT
  IF ~Global("BrielbaraMove","GLOBAL",1)
~ THEN REPLY #81786 /* ~Give us the book and we'll be off.~ */ GOTO 5
  IF ~~ THEN REPLY #81787 /* ~Get out of here coward!~ */ DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 5 // from: 4.1
  SAY #81788 /* ~Here's my spell book, thank you for letting me live, thank you.~ */
  IF ~~ THEN DO ~ActionOverride(Player1,SmallWait(1))
ActionOverride(Player2,SmallWait(1))
ActionOverride(Player3,SmallWait(1))
ActionOverride(Player4,SmallWait(1))
ActionOverride(Player5,SmallWait(1))
ActionOverride(Player6,SmallWait(1))
GiveItem("_BOOK70",LastTalkedToBy)
ChangeEnemyAlly(Myself,NEUTRAL)
EscapeArea()
~ EXIT
END

IF WEIGHT #3 /* Triggers after states #: 7 even though they appear after this state */
~True()
~ THEN BEGIN 6 // from:
  SAY #81789 /* ~Haven't you bothered me enough!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 7 // from:
  SAY #81790 /* ~Life has been pretty lousy lately; how about you friend?  My bitch of a wife slept with some elven mongrel, and even had his child.  By the Nine Hells, does she ever have gall.  Anyway, she's not laughing anymore; I cursed the child of that unholy union, so that it would die an early death.  I hope the little brat drowns in its own vomit.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from:
  SAY #74940 /* ~Get out of my sight!  I'll do nothing for you!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 9 // from:
  SAY #99664 /* ~A mage who does not use his knowledge as he pleases is a fool. And I think I know just how I want to apply mine right now!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END
