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

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

IF WEIGHT #5 /* Triggers after states #: 4 7 22 23 even though they appear after this state */
~RandomNum(16,1)
~ THEN BEGIN 0 // from:
  SAY #380 /* ~Trolls are large, so bigger rooms may be full. Be careful. Strange... trolls are destructive, but much has been left intact. Maybe I'm wrong. I've been wrong before.~ */
  IF ~~ THEN JOURNAL #7252 /* ~The Transformation and the Dream

With Imoen's help, I have defeated Bhaal... my instinct.  It was incredulous, but told me at the same time that my soul was weak and that it was gone... all that was left within me was my instinct.  At the same time as it died, so did Imoen... perhaps that part of me that was my soul, I do not know.

And then I awoke.~ */ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 4 7 22 23 even though they appear after this state */
~RandomNum(16,2)
~ THEN BEGIN 1 // from:
  SAY #847 /* ~This is the heart of the Sahuagin Prince Villynaty.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #7 /* Triggers after states #: 4 7 22 23 even though they appear after this state */
~RandomNum(16,3)
~ THEN BEGIN 2 // from:
  SAY #848 /* ~This is Cernd's child. The child is healthy and well fed despite Deril's apparent distaste for the boy.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 3 // from:
  SAY #849 /* ~Come get some!  Boo-yah!~ [SSWORD23] */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~GlobalGT("Chapter","GLOBAL",2)
~ THEN BEGIN 4 // from:
  SAY #850 /* ~This is the wardstone obtained from Perth the Adept. It should lower the wards that keep you from entering Spellhold.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #8 /* Triggers after states #: 7 22 23 even though they appear after this state */
~RandomNum(16,4)
~ THEN BEGIN 5 // from:
  SAY #851 /* ~This stone has a certain energy about it. It may come in useful although, at this point, you aren't sure where.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #9 /* Triggers after states #: 7 22 23 even though they appear after this state */
~RandomNum(16,5)
~ THEN BEGIN 6 // from:
  SAY #852 /* ~This is the crystal shard obtained from the avatar of Kurtulmak's whose essence was trapped within a large crystal. The kobolds seemed to worship it.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 7 // from:
  SAY #6419 /* ~Ashen Scales +2~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from:
  SAY #9058 /* ~As for the child, it is around here somewhere. The servants feed it from time to time.  At least I think they do, I hear it mewling on occasion. Why you think you are entitled to it? What do you intend to do here?~ [DERILX07] */
  IF ~~ THEN EXIT
END

IF WEIGHT #10 /* Triggers after states #: 22 23 even though they appear after this state */
~RandomNum(16,6)
~ THEN BEGIN 9 // from:
  SAY #15961 /* ~Aha!  Boo is your witch, then, I take it?~ */
  IF ~~ THEN DO ~~ EXIT
END

IF WEIGHT #11 /* Triggers after states #: 22 23 even though they appear after this state */
~RandomNum(16,7)
~ THEN BEGIN 10 // from:
  SAY #15962 /* ~Oh... I, I see.  I -- where was I?  Ah, yes, my <LADYLORD>!  You are, uh, still interested in examining my wares, yes?~ */
  IF ~~ THEN DO ~~ EXIT
END

IF WEIGHT #12 /* Triggers after states #: 22 23 even though they appear after this state */
~RandomNum(16,8)
~ THEN BEGIN 11 // from:
  SAY #15943 /* ~Ahhh, Maheer has all kinds to offer... scimitars, swords, even iron weapons from the Storm Horn Mountains!   Look at my wares for yourself!~ */
  IF ~~ THEN DO ~~ EXIT
END

IF WEIGHT #13 /* Triggers after states #: 22 23 even though they appear after this state */
~RandomNum(16,9)
~ THEN BEGIN 12 // from:
  SAY #16035 /* ~Just show me what you have to sell and let's leave it at that, shall we?~ */
  IF ~~ THEN DO ~~ EXIT
END

IF WEIGHT #18 /* Triggers after states #: 16 19 20 21 22 23 even though they appear after this state */
~RandomNum(16,16)
~ THEN BEGIN 13 // from:
  SAY #17701 /* ~Oh!  Oh, you are too kind, <SIRMAAM>.  This, this just might get some of us back home.  Thank you, truly.~ */
  IF ~~ THEN REPLY #17703 /* ~Well, here is 100 gold pieces, child.  Perhaps that will enable some of you to return to your homes.~ */ GOTO 15
  IF ~~ THEN REPLY #17704 /* ~I see.  Well, you are free, now, so run while you can!~ */ GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.1
  SAY #17705 /* ~Indeed.  You are free, now... go, while you can!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 15 // from: 13.0
  SAY #17707 /* ~It is about time you returned; I have been waiting here for who knows how long. We'd best get back together and get moving; I'll not serve nature or my fallen comrades by sitting about here.~ [JAHEIRE4] */
  IF ~~ THEN EXIT
END

IF WEIGHT #14 /* Triggers after states #: 22 23 even though they appear after this state */
~RandomNum(16,10)
~ THEN BEGIN 16 // from:
  SAY #17779 /* ~You must get our acorns back from Ilyich, the clan leader of Irenicus' duergar slaves.  He is somewhere within this dungeon.  Return to us when you have the acorns and we will tell you how to escape.~ */
  IF ~~ THEN REPLY #17780 /* ~Then I will not see them.~ */ GOTO 17
  IF ~~ THEN REPLY #17781 /* ~Then join the group and we will proceed inside.~ */ GOTO 18
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #17783 /* ~~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 18 // from: 16.1
  SAY #17786 /* ~I will get the acorns and return to you.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #15 /* Triggers after states #: 22 23 even though they appear after this state */
~RandomNum(16,11)
~ THEN BEGIN 19 // from:
  SAY #17971 /* ~I suspected as much.  Very well, then.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #16 /* Triggers after states #: 22 23 even though they appear after this state */
~RandomNum(16,12)
~ THEN BEGIN 20 // from:
  SAY #17973 /* ~I was hired to apprehend you, but I have reconsidered. What now?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #17 /* Triggers after states #: 22 23 even though they appear after this state */
~RandomNum(16,13)
~ THEN BEGIN 21 // from:
  SAY #17974 /* ~I see.  What do you propose, then?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 ~RandomNum(16,14)
~ THEN BEGIN 22 // from:
  SAY #10924 /* ~Why should I deal with you when I can merely kill you?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 ~RandomNum(16,15)
~ THEN BEGIN 23 // from:
  SAY #10927 /* ~I will think about it.~ */
  IF ~~ THEN EXIT
END
