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

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

IF WEIGHT #2 /* Triggers after states #: 10 17 even though they appear after this state */
~NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #81202 /* ~Shaella sees through the mists of the lady that you are strong and worthy adventurers.~ */
  IF ~~ THEN REPLY #81203 /* ~Who is Shaella?~ */ GOTO 1
  IF ~~ THEN REPLY #81204 /* ~Shaella sees clearly, indeed.~ */ GOTO 2
  IF ~~ THEN REPLY #81205 /* ~No, we're just passing through, ma'am.~ */ GOTO 3
  IF ~Global("X#TSBGSED","GLOBAL",0)
InParty("tiax")
InMyArea("tiax")
!StateCheck("tiax",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#TSBGSED","GLOBAL",1)~ EXTERN ~_TIAXJ~ 38
END

IF ~~ THEN BEGIN 1 // from: _TIAXJ:38.0 18.0 0.0
  SAY #81206 /* ~It is Shaella, Most High Middling Priestess of the Mistshadow, who is here before you, speaking through the mists of Leira.~ */
  IF ~~ THEN REPLY #81207 /* ~Leira? Who's that?~ */ GOTO 5
  IF ~~ THEN REPLY #81208 /* ~I don't see any mist.~ */ GOTO 4
END

IF ~~ THEN BEGIN 2 // from: _TIAXJ:38.1 18.1 0.1
  SAY #81209 /* ~What insolence from one so young. Shaella sees not clearly but dimly, ever peering through the mists of Leira.~ */
  IF ~~ THEN REPLY #81207 /* ~Leira? Who's that?~ */ GOTO 5
  IF ~~ THEN REPLY #81208 /* ~I don't see any mist.~ */ GOTO 4
END

IF ~~ THEN BEGIN 3 // from: _TIAXJ:38.2 18.2 0.2
  SAY #81210 /* ~We are ever passing through the mists of Leira, our hulls brushing against the reefs of knowledge but we never run aground, the winds of truth tear us not asunder. Travel well, then, safe in the calm of ignorance.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 2.1 1.1
  SAY #81211 /* ~Stare deep into the Mistshadow, and mark your devotion to Leira, Mistress of Mists and Lady of the Unknowing. Stare into it and know that knowledge is unknowable.~ */
  IF ~~ THEN REPLY #81212 /* ~If knowledge is unknowable, then how can I know that in the first place?~ */ GOTO 6
  IF ~~ THEN REPLY #81207 /* ~Leira? Who's that?~ */ GOTO 5
  IF ~~ THEN REPLY #81213 /* ~I'm sorry, I don't have the time for this right now. Perhaps another day.~ */ GOTO 7
END

IF ~~ THEN BEGIN 5 // from: 4.1 2.0 1.0
  SAY #81214 /* ~Leira, Lady of Mists, Mother of All Illusion, the Guardian of Deception, the Mistshadow. Some say she died in the Time of Troubles, killed by Cyric, betrayed by Mask. Some say she loved Mask and loves him still. Some say gods can die. Some say gods can be born. Some say gods can live. Some say gods are an illusion we create for our own contentment. Some say gods are an illusion we create to disguise our fear of living, our fear of dying, our fear of being. If gods are a disguise, if gods are an illusion, then perhaps Leira is the only beacon of truth in our entire pantheon of lies. But if gods are real and true and all-knowing, than Leira cannot be a god and must be dead if indeed she ever lived at all.~ */
  IF ~~ THEN REPLY #81215 /* ~But how can you worship what you cannot know?~ */ GOTO 6
  IF ~~ THEN REPLY #81216 /* ~Oh my, look at the time!~ */ GOTO 7
  IF ~~ THEN REPLY #81217 /* ~I don't want to know other people's opinions. What do you say about Leira?~ */ GOTO 8
  IF ~Global("X#GarSha","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GarSha","GLOBAL",1)~ EXTERN ~_GARRIJ~ 112
END

IF ~~ THEN BEGIN 6 // from: 5.0 4.0
  SAY #81218 /* ~More or less precisely my point.~ */
  IF ~~ THEN REPLY #81219 /* ~But I don't understand.~ */ GOTO 9
  IF ~~ THEN REPLY #41371 /* ~I see.~ */ GOTO 10
  IF ~~ THEN REPLY #81220 /* ~This is all really too much theology for one day. Perhaps I'll talk to you another time.~ */ GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 9.2 8.0 6.2 5.1 4.2
  SAY #81221 /* ~The mists of Leira are ever-present. Should you need a haven from knowledge, an escape from what is real, perhaps Shaella will be here for you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 5.2
  SAY #81222 /* ~Shaella says what Shaella has said, does she not?~ */
  IF ~~ THEN REPLY #81223 /* ~My head hurts. I think it would be best if I just went and found a place to lay down for a while.~ */ GOTO 7
  IF ~~ THEN REPLY #81224 /* ~I'm afraid I really don't understand.~ */ GOTO 9
  IF ~~ THEN REPLY #81225 /* ~Aha! That clarifies everything!~ */ GOTO 10
END

IF ~~ THEN BEGIN 9 // from: 8.1 6.0
  SAY #81226 /* ~Ah, then you are truly one of us, you are truly with Shaella in the Mists of Leira. May Shaella grace you with a quest from the Lady?~ */
  IF ~~ THEN REPLY #10039 /* ~Certainly.~ */ GOTO 12
  IF ~~ THEN REPLY #81227 /* ~I'm not sure.~ */ DO ~SetGlobal("HelpShaella","GLOBAL",1)
AddJournalEntry(81232,QUEST)
~ GOTO 11
  IF ~~ THEN REPLY #81228 /* ~Thank you, Shaella. You follow a most interesting faith but I'm afraid I seek a solid image, not a blur.~ */ GOTO 7
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 10 // from: 15.2 14.2 8.2 6.1
  SAY #81229 /* ~Insolence! Begone, all who seek to dispel the mists of Leira!~ */
  IF ~~ THEN DO ~EraseJournalEntry(81232)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 11 // from: 9.1
  SAY #81230 /* ~Ah, indeed. You walk well with Shaella in the mists of Leira. Forgotten deep in the library of Candlekeep, lies the Great Book of the Unknowing. Bound with the chameleon's hide, it too walks in the mists of Leira, changing always, as does Shaella. Ask no one there of it for all who have touched it are blessed with the ignorance it grants. But you can always find it somewhere in the inner rooms, wreathed in the mists of Leira. Go to it, make your pilgrimage, and you too may be blessed with unknowing.~ */
  IF ~~ THEN REPLY #81231 /* ~Thank you, Shaella, for this gift of the Unknowing. Perhaps, as you suggest, I shall seek it out and, in finding it, shall lose it for all time. Walk well in the mists of Leira.~ */ GOTO 12
  IF ~~ THEN REPLY #81233 /* ~Have you ever seen the Great Book of the Unknowing?~ */ GOTO 13
END

IF ~~ THEN BEGIN 12 // from: 15.0 11.0 9.0
  SAY #81234 /* ~Walk well in the mists of Leira.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 13 // from: 11.1
  SAY #81235 /* ~Perhaps I have. Perhaps a thousand times.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 17 even though they appear after this state */
~Global("Chapter","GLOBAL",7)
Global("HelpShaella","GLOBAL",1)
~ THEN BEGIN 14 // from:
  SAY #81236 /* ~Elnaedra sees through the mists of the lady that you are strong and worthy adventurers.~ */
  IF ~~ THEN REPLY #81237 /* ~Elnaedra? What happened to Shaella?~ */ GOTO 15
  IF ~~ THEN REPLY #81238 /* ~I have searched every inch of Candlekeep and cannot find the Great Book of the Unknowing which is said to be housed there.~ */ GOTO 16
  IF ~~ THEN REPLY #81239 /* ~Elnaedra, I have found the Great Book of the Unknowing and have tasted of its wonders!~ */ GOTO 10
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #81240 /* ~Elnaedra knows not of whom you speak and you are but strangers to her.~ */
  IF ~~ THEN REPLY #81241 /* ~Strangers? But Shaella, we spoke at length. Don't you remember?~ */ GOTO 12
  IF ~~ THEN REPLY #81238 /* ~I have searched every inch of Candlekeep and cannot find the Great Book of the Unknowing which is said to be housed there.~ */ GOTO 16
  IF ~~ THEN REPLY #81242 /* ~Elnaedra, I have seen the Great Book of the Unknowing and have tasted of its wonders!~ */ GOTO 10
END

IF ~~ THEN BEGIN 16 // from: 15.1 14.1
  SAY #81243 /* ~Then the Lady has been kind to you for you have found it. Walk well in the mists of Leira.~ */
  IF ~~ THEN DO ~EraseJournalEntry(81232)
SetGlobal("HelpShaella","GLOBAL",2)
~ SOLVED_JOURNAL #88978 /* ~The Great Book of the Unknowing

I... don't know... if I found the Great Book of the Unknowing within Candlekeep.  So says Shaella... or Elnaedra... I think.~ */ EXIT
END

IF WEIGHT #1 ~False()
~ THEN BEGIN 17 // from:
  SAY #81244 /* ~May the mists of Leira enshroud you at your burial.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 18 // from: _TIAXJ:38.3
  SAY #99265 /* ~What insolence from one so young. Shaella sees not clearly but dimly, ever peering through the mists of Leira. I am pleased, however, that you have been touched by Leira's gift of blindness and illusion.~ */
  IF ~~ THEN REPLY #81203 /* ~Who is Shaella?~ */ GOTO 1
  IF ~~ THEN REPLY #81204 /* ~Shaella sees clearly, indeed.~ */ GOTO 2
  IF ~~ THEN REPLY #81205 /* ~No, we're just passing through, ma'am.~ */ GOTO 3
END
