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

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

IF ~~ THEN BEGIN 0 // from:
  SAY #66804 /* ~Thieving wench!  Begging won't save you now!~ [3AMERC06] */
  IF ~~ THEN EXTERN ~AMMERC04~ 0
END

IF ~~ THEN BEGIN 1 // from: AMMAYOR:0.0
  SAY #66808 /* ~Pure?  How do you justify your daughter's theft of our hard-earned gold, Mayor Haraad?~ [3AMERC07] */
  IF ~~ THEN EXTERN ~AMMAYOR~ 1
END

IF ~~ THEN BEGIN 2 // from: AMMERC04:1.0
  SAY #66811 /* ~Stay clear, Mayor; you can do nothing here.  Make peace with your god, Asana... your life is forfeit.~ [3AMERC08] */
  IF ~~ THEN EXTERN ~AMMAYOR~ 2
END

IF WEIGHT #2 /* Triggers after states #: 4 5 even though they appear after this state */
~Global("AsanaPlot","GLOBAL",2)~ THEN BEGIN 3 // from: 5.0
  SAY #66839 /* ~Do you have any final words, girl?  Any last requests before you pay for your crimes?~ */
  IF ~~ THEN DO ~SetGlobal("Merc3Spoken","LOCALS",1)~ EXTERN ~AMASANA~ 2
END

IF WEIGHT #0 ~Dead("amasana")
~ THEN BEGIN 4 // from:
  SAY #66844 /* ~Let this be a lesson to all the rest of you townsfolk who might be thinking of stealing our gold!~ */
  IF ~~ THEN DO ~ActionOverride("ammerc04",EscapeArea())
EscapeArea()
~ EXIT
END

IF WEIGHT #1 ~Global("AsanaPlot","GLOBAL",1)~ THEN BEGIN 5 // from:
  SAY #66845 /* ~This does not concern you, stranger.  Move along.~ */
  IF ~~ THEN REPLY #66846 /* ~Of course.  Continue about your business.~ */ DO ~SetGlobal("AsanaPlot","GLOBAL",2)
SetGlobal("Merc3Spoken","LOCALS",1)~ GOTO 3
  IF ~~ THEN REPLY #66847 /* ~I will not permit you to murder this girl!~ */ DO ~SetGlobal("Merc3Spoken","LOCALS",1)~ GOTO 6
  IF ~~ THEN REPLY #66848 /* ~I'll make my own decisions about what does or does not concern me!~ */ DO ~SetGlobal("Merc3Spoken","LOCALS",1)~ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 7.2 5.1
  SAY #66849 /* ~This woman is a thief, and she will pay for her crimes!~ */
  IF ~~ THEN REPLY #66857 /* ~She stole to feed a bunch of starving children - justifiable, if you ask me.~ */ EXTERN ~AMMERC04~ 3
  IF ~~ THEN REPLY #66859 /* ~True, but don't you think execution is a little bit harsh?~ */ EXTERN ~AMMERC04~ 3
  IF ~~ THEN REPLY #66861 /* ~If you don't release her at once, you'll be the only one executed around here!~ */ GOTO 8
END

IF ~~ THEN BEGIN 7 // from: 5.2
  SAY #66850 /* ~Are you looking for a fight, <RACE>?  Because you might get more than you bargained for.~ */
  IF ~~ THEN REPLY #66851 /* ~You can't bully me around like these cowering townsfolk!~ */ GOTO 8
  IF ~~ THEN REPLY #66852 /* ~You talk big, but can you back it up with a blade?~ */ GOTO 8
  IF ~~ THEN REPLY #66853 /* ~I'm not looking for a fight, but I won't allow you to kill an innocent girl.~ */ GOTO 6
END

IF ~~ THEN BEGIN 8 // from: 11.2 9.0 7.1 7.0 6.2
  SAY #66854 /* ~Good!  I was worried our fighting skills were getting a mite rusty!~ */
  IF ~~ THEN DO ~ActionOverride("ammerc04",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 9 // from: AMMERC04:3.0
  SAY #66865 /* ~Now stand aside and let justice prevail, or face the consequences!~ */
  IF ~~ THEN REPLY #66866 /* ~I will not stand aside!~ */ GOTO 8
  IF ~~ THEN REPLY #66867 /* ~Very well, you are right. Justice demands she be punished.~ */ DO ~SetGlobal("AsanaPlot","GLOBAL",2)~ EXTERN ~AMMERC04~ 2
  IF ~~ THEN REPLY #66868 /* ~What if I repay what was taken?~ */ EXTERN ~AMMERC04~ 4
END

IF ~~ THEN BEGIN 10 // from: AMMERC04:4.0
  SAY #66875 /* ~And think of the message we'd be sending to all the other would be thieves if we let her go.  We need at least another thousand to offset the inconvenience.~ */
  IF ~~ THEN REPLY #66877 /* ~Five thousand gold?? I think I know who the real thief is.~ */ GOTO 11
  IF ~PartyGoldGT(4999)
~ THEN REPLY #66878 /* ~Fine... here you go.~ */ DO ~TakePartyGold(5000)
~ GOTO 12
  IF ~~ THEN REPLY #66879 /* ~I'll need some time to get that much money together.~ */ GOTO 11
  IF ~OR(2)
ReputationGT(LastTalkedToBy,15)
CheckStatGT(LastTalkedToBy,14,CHR)
PartyGoldGT(2999)
~ THEN REPLY #66880 /* ~I'll give you three thousand.~ */ DO ~TakePartyGold(3000)
~ GOTO 12
  IF ~ReputationLT(LastTalkedToBy,16)
CheckStatLT(LastTalkedToBy,15,CHR)
~ THEN REPLY #66881 /* ~I'll give you three thousand.~ */ GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 10.4 10.2 10.0
  SAY #66882 /* ~Sorry, 5,000 gold right now or the girl dies.~ */
  IF ~PartyGoldGT(4999)
~ THEN REPLY #66883 /* ~Fine... here is your blood money.~ */ DO ~TakePartyGold(5000)
~ GOTO 12
  IF ~~ THEN REPLY #66884 /* ~Just kill her then.  She's not worth it.~ */ EXTERN ~AMMERC04~ 2
  IF ~~ THEN REPLY #66885 /* ~I'm done bargaining - release her or feel my wrath!~ */ GOTO 8
END

IF ~~ THEN BEGIN 12 // from: 11.0 10.3 10.1
  SAY #66886 /* ~Then we have a deal, my good <MANWOMAN>.  A pleasure doing business with you, <SIRMAAM>.  Asana, you are free to go.~ */
  IF ~~ THEN DO ~ActionOverride("ammerc04",EscapeArea())
EscapeArea()
~ EXTERN ~AMASANA~ 3
END
