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

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

IF ~~ THEN BEGIN 0 // from:
  SAY #1118 /* ~We live in a time of miracles, and nature allows the rebirth of many that have passed beyond the veil, but there is a time when... when it is better to let go.~ */
  IF ~~ THEN EXTERN ~SONNER~ 0
END

IF ~~ THEN BEGIN 1 // from:
  SAY #1119 /* ~I will mourn according to what I believe.  His death... his death is horrible, but I am still trapped and we are still in danger.  Should sorrow doom us all?~ */
  IF ~~ THEN EXTERN ~SONNER~ 4
END

IF ~~ THEN BEGIN 2 // from:
  SAY #1120 /* ~This is one of the missing lenses of the Rhynn Lanthorn. It must be taken back to Elhan.~ */
  IF ~~ THEN REPLY #1801 /* ~I say... I say take your name and eat it! I'll not be your puppet!~ */ DO ~IncrementGlobal("FisherPrice","GLOBAL",20)
~ JOURNAL #6279 /* ~Getting Inside the Palace in Suldanessellar

Irenicus is apparently inside the palace, and has sealed the gates with his magic.  Queen Ellesime is also within, as is the Tree of Life... This must be Irenicus' true target.~ */ EXTERN ~SONNER~ 5
  IF ~~ THEN REPLY #1802 /* ~Do not anger me, Nalia. I can help or hinder, I've done it before.~ */ JOURNAL #6283 /* ~~ */ EXTERN ~JEBADO~ 4
END

IF WEIGHT #5 /* Triggers after states #: 8 10 11 12 even though they appear after this state */
~Global("HelpJebadoh","GLOBAL",1)
~ THEN BEGIN 3 // from:
  SAY #1121 /* ~Minotaur~ */
  IF ~Dead("Tenya")
~ THEN REPLY #1803 /* ~She said her wishes. Whether you respect them or not, you will let them stand.~ */ GOTO 7
  IF ~Global("ReturnedToTelman","GLOBAL",0)
Global("TenyaStory","GLOBAL",1)
~ THEN REPLY #1804 /* ~Now that WAS a threat. I'm watching you. Best hope I don't find something I don't like. Understand?~ */ DO ~SetGlobal("ReturnedToTelman","GLOBAL",1)
~ GOTO 4
  IF ~Global("ReturnedToTelman","GLOBAL",0)
Global("TenyaStory","GLOBAL",1)
~ THEN REPLY #1805 /* ~I think it best if we all just take a step back and cool off. Only spite will come out of comments like that.~ */ DO ~SetGlobal("ReturnedToTelman","GLOBAL",1)
~ JOURNAL #6282 /* ~~ */ GOTO 5
  IF ~~ THEN REPLY #1806 /* ~Your comment is asinine. Obviously she does not know what her wishes should be. Just look at her choice of company. I will leave... for now. This is unfinished.~ */ EXTERN ~SONNER~ 13
  IF ~~ THEN REPLY #16577 /* ~I am Harper in my heart; you know this.  It is my duty to bring you to them but... but I no more want to make the trip than you do.  Nevertheless, we must go.~ */ DO ~~ GOTO 14
END

IF ~~ THEN BEGIN 4 // from: 3.1
  SAY #1122 /* ~Minotaur~ */
  IF ~~ THEN EXTERN ~SONNER~ 11
END

IF ~~ THEN BEGIN 5 // from: 3.2
  SAY #1123 /* ~Bone Golem~ */
  IF ~~ THEN EXTERN ~JEBADO~ 5
END

IF ~~ THEN BEGIN 6 // from:
  SAY #1124 /* ~I can't stand seeing all these taverns around the city.  They exist simply to drain the poorer classes of their money and throw them into such a stupor that they can't even realize their oppression.~ [NALIA54] */
  IF ~~ THEN EXTERN ~JEBADO~ 6
END

IF ~~ THEN BEGIN 7 // from: 3.0
  SAY #1125 /* ~Aye, my darling loon, drink is to the poor what theater is to the rich: a costly chance to play out fantasies that never shall come true.~ [HAERDA65] */
  IF ~~ THEN EXTERN ~SONNER~ 18
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 8 // from:
  SAY #6924 /* ~Holy Sword~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 9 // from:
  SAY #9004 /* ~Are you weak? Do you require the sitting as a baby? Prove yourself.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~NumTimesTalkedTo(0)
ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
~ THEN BEGIN 10 // from:
  SAY #768 /* ~It is my right as heir to choose who leads this place.  I couldn't stand before the Roenalls effectively.  You, with your... talents, would prove a daunting figure.~ */
  IF ~~ THEN DO ~ActionOverride("Jebadoh",SetNumTimesTalkedTo(1))
ActionOverride("Sonner",SetNumTimesTalkedTo(1))
~ EXTERN ~JEBADO~ 0
END

IF WEIGHT #3 ~NumTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN BEGIN 11 // from:
  SAY #866 /* ~BANG!~ */
  IF ~~ THEN DO ~ActionOverride("Jebadoh",SetNumTimesTalkedTo(1))
ActionOverride("Sonner",SetNumTimesTalkedTo(1))
~ EXTERN ~JEBADO~ 1
END

IF WEIGHT #4 ~NumTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN BEGIN 12 // from:
  SAY #959 /* ~Do not get too close; if I could reach you, you would regret it.~ */
  IF ~~ THEN DO ~ActionOverride("Jebadoh",SetNumTimesTalkedTo(1))
ActionOverride("Sonner",SetNumTimesTalkedTo(1))
~ EXTERN ~JEBADO~ 2
END

IF WEIGHT #6 ~Global("HelpJebadoh","GLOBAL",2)
~ THEN BEGIN 13 // from:
  SAY #1032 /* ~If a group is noticed, there is a good chance it will not be mine. Understand?~ */
  IF ~~ THEN DO ~~ EXTERN ~SONNER~ 9
END

IF ~~ THEN BEGIN 14 // from: 3.4
  SAY #16578 /* ~No, I am not interested.~ */
  IF ~~ THEN DO ~~ EXIT
END
