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

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

IF WEIGHT #4 /* Triggers after states #: 6 7 8 16 even though they appear after this state */
~True()
~ THEN BEGIN 0 // from:
  SAY #29713 /* ~Hmph.  You there... any reason in particular that you're here?~ */
  IF ~~ THEN REPLY #29719 /* ~Who are you?~ */ GOTO 1
  IF ~

~ THEN REPLY #29720 /* ~I'm just looking around.~ */ GOTO 4
  IF ~~ THEN REPLY #29721 /* ~Actually, no.  I'll be on my way, then.~ */ GOTO 3
  IF ~!Dead("Jan")
Global("JanFree","GLOBAL",0)
Global("JanMove","GLOBAL",1)
~ THEN REPLY #35550 /* ~I'm here to see Jan Jansen.~ */ GOTO 8
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #29729 /* ~I'm the keeper of this here prison, and what I says goes.  I'm sure there ain't nothin' to interest you, here, so why don't you just turn around and go home?~ */
  IF ~~ THEN REPLY #29731 /* ~I would like to just take a quick look around, if I could.~ */ GOTO 4
  IF ~~ THEN REPLY #29732 /* ~All right, I'm leaving.~ */ GOTO 3
END

IF ~~ THEN BEGIN 2 // from:
  SAY #29733 /* ~There isn't anything for you to see here, <GIRLBOY>.  Now just turn your tail about and get gone, alright?~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 3 // from: 4.1 1.1 0.2
  SAY #29734 /* ~Fine.  Be on your way.  Prison's a dangerous place for folk like you, at any rate.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 1.0 0.1
  SAY #29735 /* ~There isn't anything interesting for you to see here, <GIRLBOY>... an' I don't let strangers crawl around my prison without reason.  Off you go.~ */
  IF ~~ THEN REPLY #29738 /* ~Perhaps some gold might change your mind?~ */ GOTO 5
  IF ~~ THEN REPLY #29739 /* ~Alright, I'm going.~ */ GOTO 3
END

IF ~~ THEN BEGIN 5 // from: 4.0
  SAY #29740 /* ~I'll just pretend I didn't hear that.  Now leave, before I forget that rending you limb from limb might make you feel... unwelcome.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~Global("TrapDisabled","GLOBAL",1)
~ THEN BEGIN 6 // from:
  SAY #29741 /* ~Go on and talk to yer friend, if you wish.  He's not goin' anywhere, that's for sure.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 ~Global("TrapDisabled","GLOBAL",2)
~ THEN BEGIN 7 // from:
  SAY #29742 /* ~I warned you not to go in, didn't I?!  Fools!  INTRUDERS!!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~Global("JanMove","GLOBAL",1)
Global("JanFree","GLOBAL",0)
~ THEN BEGIN 8 // from: 0.3
  SAY #30413 /* ~Ah, the fabled savior of yonder gnome. You've come to pay his fine?~ */
  IF ~~ THEN REPLY #30414 /* ~Yes, I would like to pay his fine.~ */ GOTO 9
  IF ~~ THEN REPLY #30415 /* ~I don't know what you're talking about. What gnome?~ */ GOTO 11
  IF ~~ THEN REPLY #30416 /* ~He would like to think so but I am not planning to pay his way out of jail.~ */ GOTO 13
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #30412 /* ~Thank the gods! That gnome is the most annoying prisoner I ever had!  He's constantly picking the lock, complaining of my personal hygiene...  Take him! Just pay the damn 800gp!~ */
  IF ~!Dead("Jan")
~ THEN REPLY #30417 /* ~I'm afraid that I don't have enough gold right now.~ */ GOTO 10
  IF ~~ THEN REPLY #30418 /* ~I've changed my mind. Enjoy your day!~ */ GOTO 13
  IF ~!Dead("Jan")
PartyGoldGT(799)
~ THEN REPLY #30419 /* ~Here is your gold.~ */ GOTO 14
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #30420 /* ~Look, I can spot you 200gp. Do you have just 600gp?~ */
  IF ~!Dead("Jan")
PartyGoldGT(599)
~ THEN REPLY #30421 /* ~Yes, I do. It's a deal.~ */ GOTO 15
  IF ~PartyGoldLT(600)
~ THEN REPLY #30422 /* ~I'm afraid that I just don't have enough.~ */ GOTO 13
  IF ~~ THEN REPLY #30423 /* ~I refuse to take your charity. You'll simply have to wait.~ */ GOTO 12
END

IF ~~ THEN BEGIN 11 // from: 8.1
  SAY #30424 /* ~You're not <CHARNAME>? Ah, well. I suppose I shall have to cling to the hope that someone will bail him or at least buy me enough liquor to drink myself senseless.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 12 // from: 13.0 10.2
  SAY #30425 /* ~Ah, well. I suppose I shall have to cling to the hope that someone will bail him out or at least buy me enough liquor to drink myself senseless.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 13 // from: 10.1 9.1 8.2
  SAY #30426 /* ~Am I to be cursed with this gnome forever?  You're driving me to drink!  If you have it in your heart to take pity on a simple man, come back and pay the fine.~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 14 // from: 9.2
  SAY #30427 /* ~Excellent! He is free so, please, take him and go.~ */
  IF ~~ THEN DO ~TakePartyGold(800)
SetGlobal("JanFree","GLOBAL",1)
~ UNSOLVED_JOURNAL #19688 /* ~Free Jan Jansen from prison.

Well, the jailkeep has been paid the fine to get Jan Jansen out of prison... and he's more than eager to see the garrulous gnome go.  Only thing to do now is tell Jan he's free.~ */ EXIT
END

IF ~~ THEN BEGIN 15 // from: 10.0
  SAY #30428 /* ~Most excellent! He is free so, please, take him and go. Remember, you do owe me 200gp.~ */
  IF ~~ THEN DO ~TakePartyGold(600)
SetGlobal("JanFree","GLOBAL",1)
SetGlobal("Owe","LOCALS",1)
~ UNSOLVED_JOURNAL #47987 /* ~Free Jan Jansen from prison.

Well, Jan Jansen's fine has been paid to the jailkeep... who was eager enough to see the garrulous gnome leave that he lent me 200 gp.  He does expect to be paid back, though.  I suppose the only thing to do now is to tell Jan he's free.~ */ EXIT
END

IF WEIGHT #3 ~Global("Owe","LOCALS",1)
~ THEN BEGIN 16 // from:
  SAY #30429 /* ~Are you back to repay that loan I gave you?~ */
  IF ~PartyGoldGT(199)
~ THEN REPLY #30430 /* ~Yes. Here's the money. Thanks for the loan.~ */ GOTO 18
  IF ~~ THEN REPLY #30431 /* ~I'm a bit short right now.~ */ GOTO 17
  IF ~~ THEN REPLY #30432 /* ~Maybe later.~ */ GOTO 17
END

IF ~~ THEN BEGIN 17 // from: 16.2 16.1
  SAY #30433 /* ~Well don't take forever. I've got an enormous tab racked up at the Sea's Bounty.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 18 // from: 16.0
  SAY #30434 /* ~Much obliged. Now take a hike if you haven't any other business here.~ */
  IF ~~ THEN DO ~EraseJournalEntry(47987)
SetGlobal("Owe","LOCALS",0)
TakePartyGold(200)
AddexperienceParty(2000)
~ SOLVED_JOURNAL #47988 /* ~Free Jan Jansen from prison.

The jailkeep who lent me the 200 gp toward Jan's fine has been paid back.~ */ EXIT
END
