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

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

IF ~~ THEN BEGIN 0 // from:
  SAY #82265 /* ~Hello, I assume you're the new guests.  I'm Koveras, a purveyor of knowledge like yourselves.  I've been searching for you since I arrived.  I have vital knowledge I wish to impart to you somewhere private.  Are you willing to listen?~ */
  IF ~~ THEN REPLY #82266 /* ~We don't need any knowledge, we know everything.~ */ GOTO 1
  IF ~~ THEN REPLY #82267 /* ~Sure, where can we go to talk?~ */ GOTO 2
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #82268 /* ~Ah, okay.  I'll leave you to yourselves.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #82269 /* ~Just follow me.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 3 // from:
  SAY #82270 /* ~Aren't you coming?~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 2.0
  SAY #82271 /* ~I used to work with your father Gorion.  I ran messages for him to his Harper friends in Waterdeep.  I am saddened to hear about his death, but that is why I am here.  He wanted you to have his old family ring and what limited gold he possessed.  I assume you already know of the Iron Throne presence here in Candlekeep.  I cannot help you deal with them as I must report this to my masters up north.  I know Gorion would be proud to see you continuing his work.  I must leave now, perhaps we will soon meet again.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from:
  SAY #82273 /* ~I am honored to be here before such a respected assemblage of noblemen.  I accept my new position with full awareness to my new responsibilities, and I will have many of them.~ */
  IF ~~ THEN GOTO 6
  IF ~Global("X#GarSar1","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GarSar1","GLOBAL",1)~ EXTERN ~_GARRIJ~ 106
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #82274 /* ~I would first like to address many of the questions that had been asked earlier.  The rumors about Amn's mobilization for war are entirely true, as is the involvement of their Zhentarim cohorts.  But do not worry, we are not bereft of a defense.  Although the recent Zhentish attempt at depriving us of the most valuable war resource, iron, has weakened us, it has not crippled us.  When my father was most recently murdered, I inherited his control over the western branch of the Iron Throne.  They have a great deal of stock piled iron, enough for all of our needs.  I will give this to the city to do with as you will.  Unfortunately our greatest military commander lies on his death bed, a grievous blow to this city.  To insure that the Flaming Fist is well led, I will be assuming control of the mercenary regiment, with permission from its current steward, Angelo.~ */
  IF ~~ THEN EXTERN ~_BELT~ 5
END

IF ~~ THEN BEGIN 7 // from: _NOBLPA3:2.0
  SAY #84771 /* ~Instead of waiting for the war to come to us, we will take it to them.  With the Flaming Fist we should be able to easily take the town of Nashkel, and then quickly fortify the mountain pass through the Cloud Peaks.  What!?  Who dares to interrupt!~ */
  IF ~~ THEN DO ~SetGlobal("NobleDopple","GLOBAL",1)
~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 11 13 even though they appear after this state */
~Dead("liia")
Dead("belt")
Global("SarevokBehavior","GLOBAL",0)
~ THEN BEGIN 8 // from:
  SAY #84772 /* ~The Grand Dukes are dead, killed by assassins in our midst.  Look there!  The killers accused of murdering the leaders of the Iron Throne!  They must be part of the plot.  I don't want them alive!  Kill them!  Kill them all!!!  You have FAILED <CHARNAME>!!~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",3)
TriggerActivation("door0200",FALSE)
TriggerActivation("door0109a",FALSE)
TriggerActivation("door0109b",FALSE)
TriggerActivation("door0111",FALSE)
SetGlobalTimer("EndGame","GLOBAL",1)
CreateCreature("_ANGELO",[469.707],0)
ActionOverride("angelo",Enemy())
Wait(1)
CreateCreature("_FLAME",[469.707],0)
CreateCreature("_FLAME",[469.707],0)
CreateCreature("_FLAME",[469.707],0)
CreateCreature("_FLAME",[469.707],0)
CreateCreature("_FLAME",[469.707],0)
CreateCreature("_FLAME",[469.707],0)
Shout(2)
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 9 // from:
  SAY #84773 /* ~Angelo!  They are the ones wanted on multiple counts of murder. KILL them!~ */
  IF ~~ THEN EXTERN ~_LIIA~ 7
END

IF ~~ THEN BEGIN 10 // from:
  SAY #84774 /* ~You don't need to read that document, but since I know you're too stupid to take my advice, I'll just take your head.~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",4)
TriggerActivation("door0200",FALSE)
TriggerActivation("door0109a",FALSE)
TriggerActivation("door0109b",FALSE)
TriggerActivation("door0111",FALSE)
SetGlobalTimer("SarevokRun","GLOBAL",10)
Shout(2)
Enemy()
~ EXIT
END

IF WEIGHT #1 /* Triggers after states #: 13 even though they appear after this state */
~GlobalTimerExpired("SarevokRun","GLOBAL")
Global("SarevokBehavior","GLOBAL",4)
~ THEN BEGIN 11 // from:
  SAY #84775 /* ~You and I aren't finished yet, <CHARNAME>.  I'll kill you, just as I killed Gorion.  The only way you'll ever live in peace is if you kill me first.~ [_SAREV02] */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",1)
EscapeArea()
~ EXIT
  IF ~Global("X#SAREVO11","GLOBAL",0)
InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#SAREVO11","GLOBAL",1)~ GOTO 26
  IF ~Global("X#SAREVO11","GLOBAL",0)
InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#SAREVO11","GLOBAL",1)~ EXTERN ~_XANJ~ 266
  IF ~Global("X#SAREVO11","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#SAREVO11","GLOBAL",1)~ GOTO 28
  IF ~Global("X#SAREVO11","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#SAREVO11","GLOBAL",1)~ EXTERN ~_VICONJ~ 223
END

IF ~~ THEN BEGIN 12 // from:
  SAY #84776 /* ~You have come to your death, brother.  You can't hide behind friends, this fight is between us.  Our father would have wanted it this way, two sons of murder in a duel to the death.  You are one of the strong; but then, we do share the same blood.  Let us decide who is the stronger.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~Global("SarevokBehavior","GLOBAL",2)
~ THEN BEGIN 13 // from:
  SAY #84777 /* ~You are indeed family.  No other could have lived to oppose me in person.  Of course, it will not matter in the end.  Ultimately I will prevail, and a new era will be born unto the Realms.~ [_SAREV01] */
  IF ~~ THEN REPLY #84778 /* ~You are mad!  What do you hope to gain by resurrecting a dead god?~ */ GOTO 14
  IF ~Gender(LastTalkedToBy,MALE)
~ THEN REPLY #84779 /* ~Your evil ways end here tonight!  This god stays dead and you will join him!~ */ GOTO 15
  IF ~~ THEN REPLY #84780 /* ~There must be another way, brother!  We could rally, and fight this evil together!~ */ GOTO 17
  IF ~~ THEN REPLY #84781 /* ~By what right do you claim ownership of this new era?  What if I intend to take it from you?~ */ GOTO 18
  IF ~Gender(LastTalkedToBy,FEMALE)
~ THEN REPLY #84779 /* ~Your evil ways end here tonight!  This god stays dead and you will join him!~ */ GOTO 16
END

IF ~~ THEN BEGIN 14 // from: 13.0
  SAY #84782 /* ~Father Bhaal is dead, but the slaughter I will orchestrate shall prove me to be his most worthy successor.  It will raise his power from the ashes.  The streets will run red with blood when my work is finished!~ [_SAREV05] */
  IF ~~ THEN REPLY #84783 /* ~Successor?  Deities are not known for sharing their power willingly!~ */ GOTO 20
  IF ~Gender(LastTalkedToBy,MALE)
~ THEN REPLY #84784 /* ~You are worthy of nothing more than the death you will receive by my hand.~ */ GOTO 15
  IF ~~ THEN REPLY #84785 /* ~And what if I can prove myself to be more deserving of such power?~ */ GOTO 18
  IF ~Gender(LastTalkedToBy,FEMALE)
~ THEN REPLY #84784 /* ~You are worthy of nothing more than the death you will receive by my hand.~ */ GOTO 16
  IF ~Global("X#GarSar2","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GarSar2","GLOBAL",1)~ EXTERN ~_GARRIJ~ 107
END

IF ~~ THEN BEGIN 15 // from: 17.1 14.1 13.1
  SAY #84786 /* ~Yes, brother!  Bring your rage to bear, and we shall end this in a manner befitting our heritage! Face me!  Face the new LORD OF MURDER!  Angelo!  Tazok!  Reveal yourselves and let's finish this now!~ [_SAREV12] */
  IF ~~ THEN DO ~SetGlobal("X#KivanSarevokTazok","GLOBAL",1)
SetGlobal("SarevokBehavior","GLOBAL",3)
TriggerActivation("door0123",FALSE)
ActionOverride("galdor",Enemy())
ActionOverride("semaj",Enemy())
ActionOverride("tazok",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 16 // from: 17.2 14.3 13.4
  SAY #84787 /* ~Yes, sister!  Bring your rage to bear, and we shall end this in a manner befitting our heritage!  Face me!  Face the new LORD OF MURDER!  Angelo!  Tazok!  Reveal yourselves and let's finish this now!~ [_SAREV12] */
  IF ~~ THEN DO ~SetGlobal("X#KivanSarevokTazok","GLOBAL",1)
SetGlobal("SarevokBehavior","GLOBAL",3)
TriggerActivation("door0123",FALSE)
ActionOverride("galdor",Enemy())
ActionOverride("semaj",Enemy())
ActionOverride("tazok",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 17 // from: 13.2
  SAY #84788 /* ~Do you not yet realize?  There is no great evil to fight, save that within ourselves!~ */
  IF ~~ THEN REPLY #84789 /* ~But I have heard the voices!  I have felt the influence of his shadow!  He is there!~ */ GOTO 19
  IF ~Gender(LastTalkedToBy,MALE)
~ THEN REPLY #84790 /* ~Your evil is all that concerns me now!  You will not leave here alive!~ */ GOTO 15
  IF ~Gender(LastTalkedToBy,FEMALE)
~ THEN REPLY #84790 /* ~Your evil is all that concerns me now!  You will not leave here alive!~ */ GOTO 16
  IF ~~ THEN REPLY #84791 /* ~But together we could face such evil, regardless of its source.  Together we could be stronger!~ */ GOTO 21
END

IF ~~ THEN BEGIN 18 // from: 14.2 13.3
  SAY #84792 /* ~You would seek to take my destiny?  It is truly divine arrogance you display!  You have not the skill or knowledge to steal this future!  It was years in the making while you sat cloistered in a foolish library!  Simple wars spill countless waves of blood and no godly wrath is raised.  It is but my will that will shape the screams of the dying into the power I seek!  You could no more assume my role, than I could back away from it!  It is fitting though that you should try, and an ample testament to our bloodline.  Face me!  Face the new LORD OF MURDER!  Angelo!  Tazok!  Reveal yourselves and let's finish this now!~ [_SAREV12] */
  IF ~~ THEN DO ~SetGlobal("X#KivanSarevokTazok","GLOBAL",1)
SetGlobal("SarevokBehavior","GLOBAL",3)
TriggerActivation("door0123",FALSE)
ActionOverride("galdor",Enemy())
ActionOverride("semaj",Enemy())
ActionOverride("tazok",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 19 // from: 17.0
  SAY #84793 /* ~You have heard nothing but your pathetic little mind trying to comprehend its own ability!  Bhaal is dead, and his consciousness has long since wafted away on the celestial winds!  I seek only his power, not his resurrection!  You who would stop me will die here tonight! Face me!  Face the new LORD OF MURDER!  Angelo!  Tazok!  Reveal yourselves and let's finish this now!~ [_SAREV12] */
  IF ~~ THEN DO ~SetGlobal("X#KivanSarevokTazok","GLOBAL",1)
SetGlobal("SarevokBehavior","GLOBAL",3)
TriggerActivation("door0123",FALSE)
ActionOverride("galdor",Enemy())
ActionOverride("semaj",Enemy())
ActionOverride("tazok",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 20 // from: 14.0
  SAY #84794 /* ~Fool!  I do not wish to RESTORE his power, merely to RAISE it!  With the divine blood that flows through these veins I shall assume control over that which he so foolishly lost!  I shall BECOME Bhaal.  THAT... is the only acceptable outcome.  All that is left is for us to end this in a manner... befitting our heritage.  Face me!  Face the new LORD OF MURDER!  Angelo!  Tazok!  Reveal yourselves and let's finish this now!~ [_SAREV12] */
  IF ~~ THEN DO ~SetGlobal("X#KivanSarevokTazok","GLOBAL",1)
SetGlobal("SarevokBehavior","GLOBAL",3)
TriggerActivation("door0123",FALSE)
ActionOverride("galdor",Enemy())
ActionOverride("semaj",Enemy())
ActionOverride("tazok",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 21 // from: 17.3
  SAY #84795 /* ~I cannot be stronger; I am strong now!  It is you who are the weak one, you who destroyed your slayer within.  I have TAMED mine, and use him as I see fit!  The god is dead but his power is there, waiting for a will.  That will is mine, and all others will fall by the wayside!  Come and face your brother!  Face me!  Face the new LORD OF MURDER!  Angelo!  Tazok!  Reveal yourselves and let's finish this now!~ [_SAREV12] */
  IF ~~ THEN DO ~SetGlobal("X#KivanSarevokTazok","GLOBAL",1)
SetGlobal("SarevokBehavior","GLOBAL",3)
TriggerActivation("door0123",FALSE)
ActionOverride("galdor",Enemy())
ActionOverride("semaj",Enemy())
ActionOverride("tazok",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 22 // from:
  SAY #84796 /* ~You're perceptive for an old man.  You know why I'm here.  Hand over your ward and no one will be hurt.  If you resist it shall be a waste of your life!~ */
  IF ~~ THEN EXTERN ~_GORION~ 4
END

IF ~~ THEN BEGIN 23 // from:
  SAY #84828 /* ~I'm sorry that you feel that way, old man.~ */
  IF ~~ THEN EXTERN ~_GORION~ 5
END

IF ~~ THEN BEGIN 24 // from:
  SAY #84829 /* ~Angelo!  Those men are the ones wanted on multiple counts of murder!  KILL them!~ */
  IF ~~ THEN EXTERN ~_BELT~ 10
END

IF ~~ THEN BEGIN 25 // from: _VICONJ:84.1
  SAY #84830 /* ~Accuse me of high treason!  You will die for your insolence!  Grand Dukes, let us make short work of these trespassers.  Use your most powerful magics to strike them down!~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",10)
Wait(1)
ActionOverride("belt",ForceSpell(Player1,SAREVOK_STRIKE))
ActionOverride("liia",ForceSpell(Player1,SAREVOK_STRIKE))
Wait(2)
Kill(Player1)
~ EXIT
END

IF ~~ THEN BEGIN 26 // from: 11.1
  SAY #103553 /* ~That choice was always before you.~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",1)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 27 // from: _XANJ:266.1
  SAY #103553 /* ~That choice was always before you.~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",1)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 28 // from: 11.3
  SAY #103551 /* ~You are welcome to try.~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",1)
EscapeArea()
~ EXIT
  IF ~  InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN GOTO 29
  IF ~  InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN EXTERN ~_XANJ~ 267
END

IF ~~ THEN BEGIN 29 // from: _XANJ:267.1 28.1
  SAY #103553 /* ~That choice was always before you.~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",1)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 30 // from: _VICONJ:223.3
  SAY #103551 /* ~You are welcome to try.~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",1)
EscapeArea()
~ EXIT
  IF ~  InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN GOTO 31
  IF ~  InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN EXTERN ~_XANJ~ 268
END

IF ~~ THEN BEGIN 31 // from: _XANJ:268.1 _VICONJ:223.1 30.1
  SAY #103553 /* ~That choice was always before you.~ */
  IF ~~ THEN DO ~SetGlobal("SarevokBehavior","GLOBAL",1)
EscapeArea()
~ EXIT
END
