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

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

IF WEIGHT #4 /* Triggers after states #: 1 11 13 14 even though they appear after this state */
~True()
~ THEN BEGIN 0 // from: 3.0
  SAY #64897 /* ~The defense of the walls of Saradush demands all my attentions.  I cannot spare the time to speak to you.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~Global("KiserJob","GLOBAL",1)
Global("ErrardJob","GLOBAL",0)
Global("ErrardCastDivinationSpell","GLOBAL",0)~ THEN BEGIN 1 // from:
  SAY #64898 /* ~The defense of the walls of Saradush demands all my attentions.  I cannot spare the time to speak to you.~ */
  IF ~Global("CountessJob","GLOBAL",1)
~ THEN REPLY #64899 /* ~I have come from the Countess.  I must speak to you about Ardic, her son.~ */ GOTO 4
  IF ~~ THEN REPLY #64900 /* ~I need to speak to you about Ardic's disappearance.~ */ GOTO 3
  IF ~~ THEN REPLY #64901 /* ~I have some bad news, old man.  It's time for you to die!~ */ GOTO 2
  IF ~!Dead("sarkis01")~ THEN REPLY #64905 /* ~Kiser Jhaeri sent me to kill you, but I'm not going to do it.~ */ GOTO 6
END

IF ~~ THEN BEGIN 2 // from: 1.2
  SAY #64902 /* ~To arms, my fellows!  We are attacked within our own walls!~ */
  IF ~~ THEN DO ~Shout(99)
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 1.1
  SAY #64903 /* ~One of many who have given their lives defending these walls.  But there is not time to mourn.  Now please excuse me.~ */
  IF ~~ THEN GOTO 0
END

IF ~~ THEN BEGIN 4 // from: 1.0
  SAY #64904 /* ~I sympathize with the noble woman's grief, yet there is little I can do to ease her suffering.  Her son is dead.~ */
  IF ~~ THEN REPLY #64907 /* ~No, Ardic is being held captive by Kiser Jhaeri.~ */ GOTO 6
END

IF ~~ THEN BEGIN 5 // from: 6.1 6.0
  SAY #64906 /* ~Impossible! Everyone knows Mateo is the traitor.  Ardic was a witness:  he caught him red-handed, or so I hear.~ */
  IF ~~ THEN REPLY #64911 /* ~Mateo is just the fall guy.  I think Kiser is the real traitor.~ */ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 4.0 1.3
  SAY #64908 /* ~Kiser Jhaeri?  Why would he do such a thing?~ */
  IF ~~ THEN REPLY #64909 /* ~He claims you betrayed Saradush by allowing the enemy into the city.~ */ GOTO 5
  IF ~~ THEN REPLY #64910 /* ~Because he betrayed Saradush by allowing the enemy into the city.~ */ GOTO 5
END

IF ~~ THEN BEGIN 7 // from: 5.0
  SAY #64914 /* ~The word of a Bhaalspawn counts for little here in Saradush.  But for the safety of the city, I must investigate the truth of your accusations.  We must find Ardic.~ */
  IF ~~ THEN REPLY #64916 /* ~That's what I've been trying to tell you!~ */ GOTO 8
  IF ~!Dead("sarkis01")~ THEN REPLY #64918 /* ~Kiser swears he will never reveal Ardic's location until you are dead.~ */ GOTO 8
  IF ~~ THEN REPLY #64920 /* ~Brilliant.  Glad *you* came up with that idea.~ */ GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.2 7.1 7.0
  SAY #64921 /* ~Now that I know Ardic lives, and that Kiser was involved in his disappearance, I may be able to use my powers of magical divination to reveal where Ardic is being held.~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #64923 /* ~Alas, I will not be able to do much more than this.  As urgent as Ardic's testimony is in discovering a traitor in our midst, I cannot leave my place on the wall for more than a few minutes.~ */
  IF ~~ THEN REPLY #64925 /* ~Show me where Ardic is and I shall take care of the rest.~ */ GOTO 10
  IF ~~ THEN REPLY #64926 /* ~Fine.  I'll do all the actual work.  As usual.~ */ GOTO 10
  IF ~~ THEN REPLY #64927 /* ~Reveal Ardic's location, and I shall thwart Kiser's evil scheme!~ */ GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.2 9.1 9.0
  SAY #64928 /* ~Hold - my enchantment begins.~ */
  IF ~~ THEN DO ~SetGlobal("ErrardCastDivinationSpell","GLOBAL",1)
ForceSpell(Myself,SAR_DIVINATION)
Wait(1)
StartDialogNoSet(LastTalkedToBy)~ EXIT
END

IF WEIGHT #1 ~Global("ErrardCastDivinationSpell","GLOBAL",1)~ THEN BEGIN 11 // from:
  SAY #64929 /* ~My spell is complete.  Ardic yet lives, as you have claimed!  But this is most strange.~ */
  IF ~~ THEN DO ~SetGlobal("ErrardJob","GLOBAL",1)
SetGlobal("ErrardCastDivinationSpell","GLOBAL",0)
~ GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #64930 /* ~All the signs point to the home of Kiser Jhaeri.  I suggest you investigate Kiser's home more thoroughly.  It is there you shall find the son of the Countess.~ */
  IF ~~ THEN REPLY #64936 /* ~You're not coming with me?~ */ DO ~SetGlobal("ErrardJob","GLOBAL",2)~ GOTO 13
END

IF WEIGHT #2 ~Global("ErrardJob","GLOBAL",2)
!Dead("sarkis01")~ THEN BEGIN 13 // from: 12.0
  SAY #64931 /* ~I must stay to defend the walls of Saradush against the magics of our enemy.  Find Ardic - only his testimony can save Mateo.~ */
  IF ~~ THEN DO ~

~ UNSOLVED_JOURNAL #65049 /* ~Betrayal at the Gates

The wizard Errard told me Ardic is being held somewhere in Kiser's home.  I need to return there to find Ardic so that his testimony can free Mateo and help convict Kiser Jhaeri.~ */ EXIT
END

IF WEIGHT #3 ~Global("ErrardJob","GLOBAL",2)
Dead("sarkis01")
~ THEN BEGIN 14 // from:
  SAY #64940 /* ~I appreciate what you have done to save the town from Kiser's plot, Bhaalspawn.  But I cannot speak; I must defend the walls of Saradush.~ */
  IF ~~ THEN EXIT
END
