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

BEGIN ~KFTOWN01~ 2 // non-zero flags may indicate non-pausing dialogue
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #1 /* Triggers after states #: 17 even though they appear after this state */
~NumTimesTalkedTo(0)
Global("Attacked","LOCALS",1)
~ THEN BEGIN 0 // from:
  SAY #18758 /* ~Don't hurt me! Those horrible... peasants... have done enough!
~ */
  IF ~~ THEN DO ~RunAwayFrom(LastAttackerOf(Myself),150)
~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 17 even though they appear after this state */
~NumTimesTalkedTo(0)
~ THEN BEGIN 1 // from:
  SAY #18759 /* ~P-please don't hurt me!  Oh, what am I to do?!~ */
  IF ~~ THEN REPLY #20129 /* ~You... don't seem like any creature I've encountered before.~ */ GOTO 2
  IF ~~ THEN REPLY #20130 /* ~What exactly is going on here?~ */ GOTO 3
  IF ~~ THEN REPLY #20156 /* ~Who are you?~ */ GOTO 9
  IF ~~ THEN REPLY #20131 /* ~Very well, then, I'll leave you be.~ */ GOTO 8
END

IF ~~ THEN BEGIN 2 // from: 9.0 1.0
  SAY #20134 /* ~I'm NOT a creature!  Or, at least, I never used to be!  Not until the circus and everything changed!~ */
  IF ~~ THEN REPLY #20139 /* ~Well, who are you then?~ */ GOTO 9
  IF ~~ THEN REPLY #20140 /* ~What are you talking about?  What's going on?~ */ GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 9.1 2.1 1.1
  SAY #20141 /* ~Oh, I don't know!  All I know is that I came into the tent to watch the performance.~ */
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 4 // from: 15.0
  SAY #20143 /* ~It was quite silly... it was obvious that whatever the gnome was trying to do wasn't working.~ */
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 5 // from: 16.0
  SAY #20144 /* ~And then everything began changing!  People started transforming into creatures and then back into themselves.  The world shifted somehow and I felt so sick and horrified...~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #20147 /* ~... I think I passed out.  When I woke up, I had been turned into this... into this... monstrosity!~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #20150 /* ~I... I don't know what to do!  My son didn't come into the tent with me and I'm frightened to think what may have happened to him!~ */
  IF ~~ THEN REPLY #20158 /* ~Who are these peasants here?~ */ GOTO 10
  IF ~~ THEN REPLY #20160 /* ~Do you know where I can find this 'Kalah'?~ */ GOTO 11
  IF ~Global("SaveMyMom","GLOBAL",1)
Global("SonOutside","LOCALS",0)
~ THEN REPLY #20161 /* ~I think your son is still outside.  Wait here.~ */ DO ~SetGlobal("SonOutside","LOCALS",1)
~ GOTO 12
  IF ~~ THEN REPLY #20166 /* ~I must leave you for now.~ */ GOTO 13
END

IF ~~ THEN BEGIN 8 // from: 9.2 1.3
  SAY #20151 /* ~Oh, dear!  Watch out for those awful peasants!  Don't let them hurt you!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 9 // from: 2.0 1.2
  SAY #20152 /* ~My... my name's Hannah.  I came to the circus with my son, although he didn't come into the tent with me.  Oh, please help me!~ */
  IF ~~ THEN REPLY #20153 /* ~How is it that you became this creature, then?~ */ GOTO 2
  IF ~~ THEN REPLY #20154 /* ~What exactly is going on, here?~ */ GOTO 3
  IF ~~ THEN REPLY #20155 /* ~I'll try, but I must leave you for now.~ */ GOTO 8
END

IF ~~ THEN BEGIN 10 // from: 14.0 11.0 7.0
  SAY #20162 /* ~They... they're not people!  They're vicious and dangerous!  I've seen them kill people... you must stop them!~ */
  IF ~~ THEN REPLY #20163 /* ~I'll try.  Tell me... do you know where this 'Kalah' is?~ */ GOTO 11
  IF ~Global("SaveMyMom","GLOBAL",1)
Global("SonOutside","GLOBAL",0)
~ THEN REPLY #20164 /* ~I think your son is still outside.  Wait here.~ */ DO ~SetGlobal("SonOutside","GLOBAL",1)
~ GOTO 12
  IF ~~ THEN REPLY #20165 /* ~I must leave you for now.~ */ GOTO 13
END

IF ~~ THEN BEGIN 11 // from: 14.1 10.0 7.1
  SAY #20167 /* ~No, no I don't.  But that woman over there seems to know something about him.  Perhaps if you talked to her...~ */
  IF ~~ THEN REPLY #20168 /* ~I see.  And who are these peasants, here?~ */ GOTO 10
  IF ~Global("SaveMyMom","GLOBAL",1)
Global("SonOutside","GLOBAL",0)
~ THEN REPLY #20169 /* ~I think your son is still outside the tent.  Wait here.~ */ DO ~SetGlobal("SonOutside","GLOBAL",1)
~ GOTO 12
  IF ~~ THEN REPLY #20171 /* ~I must leave you for now.~ */ GOTO 13
END

IF ~~ THEN BEGIN 12 // from: 11.1 10.1 7.2
  SAY #20173 /* ~He is?  Oh, I will!  Oh, thank you!~ */
  IF ~~ THEN UNSOLVED_JOURNAL #34113 /* ~Find the boy's mother inside the circus tent.

I have found the mother of the boy outside the tent.  Now I must see if I can restore her to her original form... along with the rest of this mad circus.~ */ EXIT
END

IF ~~ THEN BEGIN 13 // from: 14.2 11.2 10.2 7.3
  SAY #20175 /* ~Al-alright.  Do be careful of those peasants!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 17 even though they appear after this state */
~True()
~ THEN BEGIN 14 // from:
  SAY #20178 /* ~Y-yes?~ */
  IF ~~ THEN REPLY #20180 /* ~I need you to tell me who these peasants are.~ */ GOTO 10
  IF ~~ THEN REPLY #20183 /* ~Do you know where this Kalah is?~ */ GOTO 11
  IF ~~ THEN REPLY #20184 /* ~Nothing.  I'll be going.~ */ GOTO 13
END

IF ~~ THEN BEGIN 15 // from: 3.0
  SAY #23271 /* ~A gnome came on the stage and began to perform some kind of magical act.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 16 // from: 4.0
  SAY #23272 /* ~His magic fizzled and everyone started laughing!  I thought it was part of the act, so I laughed too!~ */
  IF ~~ THEN GOTO 5
END

IF WEIGHT #0 ~Dead("KalahIllusion")~ THEN BEGIN 17 // from:
  SAY #24997 /* ~Legs and hands, I have hands again! I am free of this horrible place! Thank you so much! I must... Giran! I hope my son hasn't gone far. Momma's on her way!~ */
  IF ~~ THEN DO ~EraseJournalEntry(34112)
EraseJournalEntry(34113)
SetGlobal("RescuedMother","GLOBAL",1)
AddexperienceParty(500)
MoveToPointNoInterrupt([359.595])
EscapeArea()~ EXIT
END
