// creator  : weidu.exe (version 23100)
// argument : _AMNIS.DLG
// game		 : .
// source	 : ./override/_AMNIS.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

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

IF WEIGHT #2 /* Triggers after states #: 4 12 even though they appear after this state */
~RandomNum(12,1)
Global("MetBrage","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #75993 /* ~The Commander was friend to many before he found that sword.  He's not the man he was, by Helm.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #75994 /* ~The tale of Captain Brage

Brage, the Captain of the Guard in Nashkel, apparently changed greatly after acquiring his new sword.~ */ EXIT
END

IF WEIGHT #3 /* Triggers after states #: 4 12 even though they appear after this state */
~RandomNum(12,2)
Global("MetBrage","GLOBAL",0)
~ THEN BEGIN 1 // from:
  SAY #75995 /* ~The reward for the Commander's head is a king's ransom, but I'll not be lifting MY sword against a brother soldier.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #75996 /* ~The tale of Captain Brage

There is a large reward for the head of Brage!  His former comrades seem unwilling to try to collect it, however.~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 4 12 even though they appear after this state */
~RandomNum(12,3)
Global("MetBrage","GLOBAL",0)
~ THEN BEGIN 2 // from:
  SAY #75997 /* ~An entire unit went west after Brage to try and talk some sense to him.  It's been a week and none have returned.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #75998 /* ~The tale of Captain Brage

A large force of men from Nashkel went to reclaim Brage a week ago.  None have returned.~ */ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 4 12 even though they appear after this state */
~RandomNum(12,4)
Global("MetBrage","GLOBAL",0)
~ THEN BEGIN 3 // from:
  SAY #75999 /* ~I am sorry for my mood.  All the guard are still grieving the... loss of Commander Brage.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #76000 /* ~The tale of Captain Brage

Brage was popular and well-liked.  His recent behavior is puzzling to everyone.~ */ EXIT
END

IF WEIGHT #0 ~RandomNum(12,5)
Global("MetBrage","GLOBAL",0)
~ THEN BEGIN 4 // from:
  SAY #76001 /* ~I'll not believe a man of Brage's rank could kill his own family.  'Twas evil magics of some sort.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #76002 /* ~The tale of Captain Brage

Some believe Brage to be under an evil enchantment.  It's certainly possible.~ */ EXIT
  IF ~Global("X#AMNIS4","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#AMNIS4","GLOBAL",1)~ EXTERN ~_VICONJ~ 212
  IF ~Global("X#AMNIS4","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#AMNIS4","GLOBAL",1)~ EXTERN ~_GARRIJ~ 223
END

IF WEIGHT #6 /* Triggers after states #: 12 even though they appear after this state */
~RandomNum(12,6)
~ THEN BEGIN 5 // from:
  SAY #76003 /* ~Why are you not at the fair, citizen?  'Tis but a moment's walk east of Nashkel.~ */
  IF ~~ THEN JOURNAL #75176 /* ~There is a festival east of Nashkel.  Many people are gathering there.~ */ EXIT
END

IF WEIGHT #7 /* Triggers after states #: 12 even though they appear after this state */
~RandomNum(12,7)
GlobalLT("Chapter","GLOBAL",3)
~ THEN BEGIN 6 // from:
  SAY #76004 /* ~My sword is chipped and tarnished, but we'll not be given new until prices come down.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #76005 /* ~Troubles in the region

The soldiers are rapidly wearing out their old weapons, and cannot re-equip themselves because of the scarcity and price of iron-forged tools and weapons.~ */ EXIT
END

IF WEIGHT #8 /* Triggers after states #: 12 even though they appear after this state */
~RandomNum(12,8)
GlobalLT("Chapter","GLOBAL",3)
~ THEN BEGIN 7 // from:
  SAY #76006 /* ~We don't have the manpower to patrol the mines, what with the problem of bandits up north.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #76007 /* ~Troubles in the region

The problem in the Nashkel mine goes unchecked, because the guards are needed to combat a rash of banditry in the north.~ */ EXIT
END

IF WEIGHT #9 /* Triggers after states #: 12 even though they appear after this state */
~RandomNum(12,9)
OR(2)
Global("OublekBounty1","GLOBAL",0)
Global("OublekBounty2","GLOBAL",0)
~ THEN BEGIN 8 // from:
  SAY #76008 /* ~If ye be a bounty hunter, rewards can be collected with Oublek, just outside of the garrison.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #76009 /* ~Oublek the bounty officer

Rewards and bounties can be collected from Oublek, who can be found just outside of the garrison in Nashkel.~ */ EXIT
END

IF WEIGHT #10 /* Triggers after states #: 12 even though they appear after this state */
~RandomNum(12,10)
~ THEN BEGIN 9 // from:
  SAY #76010 /* ~Travel lightly, wanderer.  The woods harbor strange things.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #11 /* Triggers after states #: 12 even though they appear after this state */
~RandomNum(12,11)
~ THEN BEGIN 10 // from:
  SAY #76011 /* ~Move along citizen.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #12 /* Triggers after states #: 12 even though they appear after this state */
~RandomNum(12,12)
Global("MetBrage","GLOBAL",0)
~ THEN BEGIN 11 // from:
  SAY #76012 /* ~Even if we find the Captain, a court would surely have his head for his crimes.  Such a waste!~ */
  IF ~~ THEN UNSOLVED_JOURNAL #76013 /* ~The tale of Captain Brage

Even if Captain Brage were to be captured alive, he would most assuredly be put to death for his crimes.~ */ EXIT
END

IF WEIGHT #1 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 12 // from:
  SAY #76014 /* ~I'm only a guard, all I know is the rumors flying about town.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 13 // from:
  SAY #74910 /* ~I'll box your ears if you step an inch closer!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #13 ~True()
~ THEN BEGIN 14 // from:
  SAY #76011 /* ~Move along citizen.~ */
  IF ~~ THEN EXIT
END
