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

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

IF WEIGHT #4 /* Triggers after states #: 3 4 5 6 even though they appear after this state */
~RandomNum(3,1)
~ THEN BEGIN 0 // from:
  SAY #42790 /* ~Fairness in trade is enforced here, with magic to detect lying if necessary.  I suppose that's why the other trade towns get more business than we do.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 /* Triggers after states #: 3 4 5 6 even though they appear after this state */
~RandomNum(3,2)
~ THEN BEGIN 1 // from:
  SAY #42792 /* ~I am a member of the militia, here... but I am also a magic-user.  Mostly, my magic is used to enforce fair play amongst the merchants, a practice set for us by Waukeen.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 /* Triggers after states #: 3 4 5 6 even though they appear after this state */
~RandomNum(3,3)
~ THEN BEGIN 2 // from:
  SAY #42793 /* ~Best watch yourself - thievery and fraud are not permitted in this town, and you'll get away with neither.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #1 /* Triggers after states #: 6 even though they appear after this state */
~!Dead("cefald01")
RandomNum(3,1)~ THEN BEGIN 3 // from:
  SAY #42794 /* ~Trademeet is a peaceful town... we haven't even had the Sythillisian Empire to worry about, yet.  And yet we are attacked by wild animals... it is almost beyond belief!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 /* Triggers after states #: 6 even though they appear after this state */
~Dead("cefald01")
!Global("GeniesGone","GLOBAL",1)
RandomNum(3,1)~ THEN BEGIN 4 // from:
  SAY #42795 /* ~I understand a Shadow Druid was responsible for our problems.  (sigh)  Between such as her and the wizards of the Twisted Rune, magic-users are given a poor name in Amn.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 6 even though they appear after this state */
~Dead("cefald01")
Global("GeniesGone","GLOBAL",1)
RandomNum(3,1)~ THEN BEGIN 5 // from:
  SAY #42797 /* ~Those genies were powerful... there was little we could do to stop their monopoly while the town was under siege.  We are thankful for all your help, truly.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~Global("StartBattle","LOCALS",1)
~ THEN BEGIN 6 // from:
  SAY #49383 /* ~The days grow more dangerous and the shadows of the woodlands grow longer. Something must be done before the animals overrun us!~ */
  IF ~~ THEN DO ~SetGlobal("StartBattle","LOCALS",2)
~ EXIT
END
