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

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

IF WEIGHT #1 /* Triggers after states #: 16 even though they appear after this state */
~GlobalTimerExpired("StopAttaking","GLOBAL")
HPPercent("gemfar01",100)
~ THEN BEGIN 0 // from:
  SAY #31959 /* ~Leave 'em be, Enna. They know what they're lookin' for and there ain't no room on this farm for secrets, anyways.~ */
  IF ~~ THEN DO ~SetGlobal("HendrickHostile","GLOBAL",1)
ChangeEnemyAlly("gemfar01",NEUTRAL)
ActionOverride("gemfar01",EscapeArea())
EscapeArea()~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 16 even though they appear after this state */
~GlobalTimerExpired("StopAttaking","GLOBAL")
OR(2)
Dead("gemfar01")
HPPercentLT("gemfar01",100)~ THEN BEGIN 1 // from:
  SAY #31960 /* ~By Beshaba's curse, what have you done to my Enna!~ */
  IF ~~ THEN DO ~Enemy()
Shout(99)
~ EXIT
END

IF WEIGHT #3 /* Triggers after states #: 16 even though they appear after this state */
~Global("AttackedChickens","GLOBAL",0)
~ THEN BEGIN 2 // from:
  SAY #31961 /* ~We're just goodfolk fled from the outer farmlands, stranger.  We ask nothin' of ye other than that ye leaves us be.~ */
  IF ~~ THEN REPLY #37305 /* ~What can you tell me about the murders, here?~ */ GOTO 3
  IF ~Global("KnowsAboutGem","GLOBAL",0)~ THEN REPLY #37306 /* ~Why do you have all these chickens?~ */ GOTO 4
  IF ~Global("KnowsAboutGem","GLOBAL",1)~ THEN REPLY #37307 /* ~How much are you asking for the chickens?  I'll buy them off you.~ */ GOTO 5
  IF ~Global("KnowsAboutGem","GLOBAL",1)~ THEN REPLY #37308 /* ~I know your secret, old man... give me the chicken or there's going to be trouble.~ */ GOTO 6
  IF ~~ THEN REPLY #37309 /* ~Very well, I'll be going.~ */ GOTO 7
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #37310 /* ~I can tell ye nothin'.  We're just frightened and wants nothin' but to go home again.  Just leave us be, me <LADYLORD>.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 2.1
  SAY #37311 /* ~'Tis none of yer concern, me <LADYLORD>.  They're nothin' but chickens for eatin', is all.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from: 2.2
  SAY #37312 /* ~They are not for sale.~ */
  IF ~~ THEN REPLY #37313 /* ~Are you sure?  I can offer you a good price for them.~ */ GOTO 8
  IF ~~ THEN REPLY #37314 /* ~I'm only interested in one chicken, truly... a chicken that swallowed something quite valuable...~ */ GOTO 9
  IF ~~ THEN REPLY #37315 /* ~Never mind the ruse, old man.  I know what those chickens hide!  Hand it over!~ */ GOTO 6
  IF ~~ THEN REPLY #37316 /* ~As you wish.~ */ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 8.1 5.2 2.3
  SAY #37317 /* ~I... you're a terrible, evil <MANWOMAN>, you are!  'Tis all I have left of my daughter!  All we have in the world, dead!  Dead!~ */
  IF ~~ THEN REPLY #37318 /* ~That's too bad.  Hand it over.~ */ GOTO 10
  IF ~~ THEN REPLY #37319 /* ~I'll pay you fairly for it... then you don't have to hide it anymore.~ */ GOTO 9
  IF ~~ THEN REPLY #37320 /* ~I've no wish to deprive you of anything from your daughter.  Keep it, if you must.~ */ GOTO 9
END

IF ~~ THEN BEGIN 7 // from: 8.2 5.3 2.4
  SAY #37321 /* ~Go, then, and leave us be.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 5.0
  SAY #37322 /* ~What are you implyin', stranger?  I said they're not for sale.~ */
  IF ~~ THEN REPLY #37323 /* ~I know there's something valuable in one of those chickens, and I'm willing to buy it off you, is all.~ */ GOTO 9
  IF ~~ THEN REPLY #37324 /* ~Give up the ruse, old man... I know your secret.  Hand over the chicken!~ */ GOTO 6
  IF ~~ THEN REPLY #37325 /* ~Very well, then, I'll be going.~ */ GOTO 7
END

IF ~~ THEN BEGIN 9 // from: 8.0 6.2 6.1 5.1
  SAY #37326 /* ~(sigh)  I s'pose it's best not t' be hangin' onto it any longer.  Eventually someone will come an' take it from us.  What... what can ye pay me for it, me <LADYLORD>?~ */
  IF ~~ THEN REPLY #37327 /* ~Nothing.  Hand it over or there's going to be trouble.~ */ GOTO 10
  IF ~PartyGoldGT(9)
~ THEN REPLY #37328 /* ~10 gold pieces sounds like a fair price.~ */ GOTO 12
  IF ~PartyGoldGT(49)
~ THEN REPLY #37329 /* ~I'll give you 50 gold pieces for it.~ */ GOTO 13
  IF ~PartyGoldGT(99)
~ THEN REPLY #37330 /* ~100 gold pieces... more than fair, I am sure.~ */ GOTO 14
  IF ~~ THEN REPLY #37331 /* ~Forget it... I've changed my mind.~ */ GOTO 15
END

IF ~~ THEN BEGIN 10 // from: 9.0 6.0
  SAY #37332 /* ~If it must be, it must be.  Someone would have stolen it, sooner or later.~ */
  IF ~~ THEN EXTERN ~GEMFAR01~ 13
END

IF ~~ THEN BEGIN 11 // from: GEMFAR01:13.0
  SAY #37334 /* ~Nay, Enna, there be no sense in causin' trouble over it.  Here you go, stranger... I hope it makes you happy wi' yourself.~ */
  IF ~~ THEN DO ~SetGlobal("HendrickHostile","GLOBAL",1)
EraseJournalEntry(9918)
GiveItemCreate("MISC6Z",Player1,0,0,0)
ActionOverride("gemch02",DestroySelf())
ActionOverride("gemfar01",EscapeArea())
EscapeArea()
~ SOLVED_JOURNAL #19286 /* ~There's a WHAT in their chicken?

I have found a Beljuril gem which a farmer in Imnesvale had attempted to hide away inside one of his chickens.~ */ EXIT
END

IF ~~ THEN BEGIN 12 // from: 9.1
  SAY #37335 /* ~'Tis a terrible price, seein' as me daughter paid for it with her life.  But if it must be, it must be.  Here... an' I hope it makes ye happy with yerself.~ */
  IF ~~ THEN DO ~SetGlobal("HendrickHostile","GLOBAL",1)
EraseJournalEntry(9918)
GiveItemCreate("MISC6Z",Player1,0,0,0)
ActionOverride("gemch02",DestroySelf())
ActionOverride("gemfar01",EscapeArea())
EscapeArea()
~ SOLVED_JOURNAL #5827 /* ~There's a WHAT in their chicken?

I purchased a Beljuril gem from a farmer in Imnesvale who had hidden it from thieves inside one of his chickens.~ */ EXIT
END

IF ~~ THEN BEGIN 13 // from: 9.2
  SAY #37336 /* ~Aye, you're more than fair, I suppose.  Take it, then.  Me wife an' I shall find some other way t' remember our daughter.~ */
  IF ~~ THEN DO ~EraseJournalEntry(9918)
GiveItemCreate("MISC6Z",Player1,0,0,0)
ActionOverride("gemch02",DestroySelf())
ActionOverride("gemfar01",EscapeArea())
EscapeArea()
~ SOLVED_JOURNAL #7944 /* ~There's a WHAT in their chicken?

I purchased a Beljuril gem from a farmer in Imnesvale who had hidden it from thieves inside one of his chickens.  I paid the man a fair price, for which he was glad... apparently, his adventurer daughter had paid for the gem with her own life.~ */ EXIT
END

IF ~~ THEN BEGIN 14 // from: 9.3
  SAY #37337 /* ~Aye... aye, 'tis more than fair.  This will pay for a fine headstone for our daughter an' more.  A better tribute than a hidden gem in a chicken.  Take it, then... you've been more an' kind.~ */
  IF ~~ THEN DO ~EraseJournalEntry(9918)
GiveItemCreate("MISC6Z",Player1,0,0,0)
ActionOverride("gemch02",DestroySelf())
ActionOverride("gemfar01",EscapeArea())
EscapeArea()
~ SOLVED_JOURNAL #7944 /* ~There's a WHAT in their chicken?

I purchased a Beljuril gem from a farmer in Imnesvale who had hidden it from thieves inside one of his chickens.  I paid the man a fair price, for which he was glad... apparently, his adventurer daughter had paid for the gem with her own life.~ */ EXIT
END

IF ~~ THEN BEGIN 15 // from: 9.4
  SAY #37338 /* ~As ye wish, then, me <LADYLORD>.  I would ask ye not t' be tellin' anyone else of it, but I s'pose ye'll do as ye wishes.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~Global("HendrickHostile","GLOBAL",1)~ THEN BEGIN 16 // from:
  SAY #61933 /* ~Leave us alone.~ */
  IF ~~ THEN EXIT
END
