// creator  : weidu.exe (version 23600)
// argument : FARTHI.DLG
// game     : .
// source   : ./DATA/DIALOG.BIF
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

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

IF WEIGHT #0 ~  Global("Kaishas1","GLOBAL",0)
Global("FarDoll","GLOBAL",0)
Global("FarTalk","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #21079 /* ~You sure are big. Does Kaishas know that you're here? You should go and see her.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27052 /* ~The Mysterious Island
The villagers here all suggest that I talk to their headwoman before wandering about.~ */ EXIT
END

IF WEIGHT #7 /* Triggers after states #: 9 10 11 12 13 14 even though they appear after this state */
~  Global("Kaishas1","GLOBAL",1)
Global("FarDoll","GLOBAL",0)
Global("FarTalk","GLOBAL",0)
Global("GotDoll","GLOBAL",0)
~ THEN BEGIN 1 // from:
  SAY #21080 /* ~My name's Farthing. I'm only five. In a few years my papa will let me hunt. Are you allowed to hunt?~ */
  IF ~~ THEN REPLY #21089 /* ~No, I'm only three so they only let me fish and play with dolls.~ */ DO ~SetGlobal("FarTalk","GLOBAL",1)
~ GOTO 2
  IF ~~ THEN REPLY #21090 /* ~Indeed, little girl. I can hunt at will.~ */ DO ~SetGlobal("FarTalk","GLOBAL",1)
~ GOTO 3
  IF ~~ THEN REPLY #21091 /* ~I believe that animals should be cherished and admired, not hunted and killed.~ */ DO ~SetGlobal("FarTalk","GLOBAL",2)
~ GOTO 4
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #21081 /* ~Just like me! We can be friends if you want. I've lost my dolly out in the woods. The gatekeeper won't let me go and get it. Can you get it for me?~ */
  IF ~~ THEN REPLY #21092 /* ~If I see it on my travels, I will bring it back to you.~ */ DO ~SetGlobal("FarDoll","GLOBAL",1)
~ UNSOLVED_JOURNAL #27070 /* ~Farthing's Dolly
If I spot a dolly anywhere on the island, I should bring it back to Farthing.~ */ GOTO 5
  IF ~~ THEN REPLY #21093 /* ~I have more important things to do, little girl.~ */ GOTO 6
END

IF ~~ THEN BEGIN 3 // from: 1.1
  SAY #21082 /* ~You're lucky. I don't like you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 1.2
  SAY #21083 /* ~You're weird. What would we eat?~ */
  IF ~~ THEN REPLY #21094 /* ~There is an enchanted bush in Shaar that grows a strange and wonderful food called Tofufruit. Should you find that unappealing, there is mystic Couscous and holy Bean Sprouts. These and other wonderful, bland foods await one who renounces the flesh of innocent animals.~ */ GOTO 7
  IF ~~ THEN REPLY #21098 /* ~Vegetables and mayhaps some fish, but that's it.~ */ GOTO 7
END

IF ~~ THEN BEGIN 5 // from: 14.0 2.0
  SAY #21084 /* ~Thank you. You can play with dolly on the way back if you want.~ */
  IF ~~ THEN REPLY #22190 /* ~Thanks, I will.~ */ DO ~SetGlobal("FarDoll","GLOBAL",1)
~ UNSOLVED_JOURNAL #27070 /* ~Farthing's Dolly
If I spot a dolly anywhere on the island, I should bring it back to Farthing.~ */ EXIT
END

IF ~~ THEN BEGIN 6 // from: 14.1 2.1
  SAY #21085 /* ~You're mean. I don't like you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7 // from: 4.1 4.0
  SAY #21086 /* ~You are weird.~ */
  IF ~~ THEN DO ~SetGlobal("FarTalk","GLOBAL",2)
~ EXIT
END

IF WEIGHT #8 /* Triggers after states #: 9 10 11 12 13 14 even though they appear after this state */
~  Global("FarTalk","GLOBAL",2)
Global("FarDoll","GLOBAL",0)
!Dead("karoug")
~ THEN BEGIN 8 // from:
  SAY #21087 /* ~I'm not talking to you.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~  PartyHasItem("misc1g")
~ THEN BEGIN 9 // from:
  SAY #21099 /* ~Thanks for my dolly! I'm so happy you brought it back... I just want to hug you and... er... pet you and stuff. Bye-bye.~ */
  IF ~~ THEN DO ~SetGlobal("GotDoll","GLOBAL",1)
TakePartyItem("misc1g")
AddexperienceParty(1400)
EraseJournalEntry(27070)
~ SOLVED_JOURNAL #27071 /* ~Farthing's Dolly
Farthing was delighted by the return of her doll.~ */ EXIT
END

IF WEIGHT #2 ~  Dead("karoug")
Global("GotDoll","GLOBAL",1)
~ THEN BEGIN 10 // from:
  SAY #21103 /* ~You killed the bad people and brought my dolly back. Wow, you're real heroes now.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27072 /* ~The Mysterious Island
Farthing seemed quite happy that I killed Karoug and his lot. She was quite calm about it, though I don't know how she could be so accustomed to violence, living in this peaceful place.~ */ EXIT
END

IF WEIGHT #3 ~  Dead("karoug")
!PartyHasItem("misc1g")
~ THEN BEGIN 11 // from:
  SAY #22191 /* ~You killed the bad people... you're a big hero now!~ */
  IF ~~ THEN UNSOLVED_JOURNAL #27072 /* ~The Mysterious Island
Farthing seemed quite happy that I killed Karoug and his lot. She was quite calm about it, though I don't know how she could be so accustomed to violence, living in this peaceful place.~ */ EXIT
END

IF WEIGHT #4 ~  Global("GotDoll","GLOBAL",1)
!Dead("karoug")
~ THEN BEGIN 12 // from:
  SAY #21088 /* ~You brought back my dolly, thanks!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 ~  Global("FarDoll","GLOBAL",1)
!Dead("karoug")
~ THEN BEGIN 13 // from:
  SAY #22192 /* ~Please find my dolly. I left it in the woods somewhere. A monster is probably playing with it right now!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 ~  Global("FarTalk","GLOBAL",1)
~ THEN BEGIN 14 // from:
  SAY #23307 /* ~We can be friends if you want. I've lost my dolly out in the woods. The gatekeeper won't let me go and get it. Can you get it for me?~ */
  IF ~~ THEN REPLY #23308 /* ~If I see it on my travels, I will bring it back to you.~ */ DO ~SetGlobal("FarDoll","GLOBAL",1)
~ GOTO 5
  IF ~~ THEN REPLY #23309 /* ~I have more important things to do, little girl.~ */ GOTO 6
END
