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

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

IF WEIGHT #1 /* Triggers after states #: 29 even though they appear after this state */
~NumTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #1146 /* ~Bone Golem~ */
  IF ~~ THEN REPLY #1821 /* ~I must go. Think on what I've said, and bring anything you learn to Corgeig Axehand in the government district main building. He is Isaea's commander.~ */ GOTO 1
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #1822 /* ~Is there a reason you are here? You should make an appointment to request an audience, or speak directly with officer Roenall. He serves well as liaison to the nobility.~ [CORGEI02] */ GOTO 2
  IF ~~ THEN REPLY #1823 /* ~You should stop and examine him a bit closer. He is not as he seems!~ */ GOTO 2
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #1824 /* ~Sorry to bother you, I was just looking around.~ */ GOTO 14
END

IF ~~ THEN BEGIN 1 // from: 15.2 0.0
  SAY #1147 /* ~I will not suffer this!  You will learn the limits and understand, but I will not bear this idiocy now!  Find your own path; I will not travel with you!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 2 // from: 15.1 15.0 0.2 0.1
  SAY #1148 /* ~Aye, Anomen, talk as you wish.  For all your swagger, you wouldn't last a day upon the Planes.~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 3 // from:
  SAY #1149 /* ~You will learn. There are things that cannot change, and others that cannot remain. And others...~ */
  IF ~~ THEN DO ~Enemy()
~ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #1150 /* ~Another day!  We must live to pose a bigger threat!  There is no point joining the fray today; we would only end up dead or back in our cells.  Another day...~ */
  IF ~~ THEN REPLY #14143 /* ~A friend of mine tells me another guild o' robbers is competin' now with the Shadow Thieves.  They can't like that, aye?  Must be why crime is so bad, now, too.~ */ DO ~~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 29 even though they appear after this state */
~Global("TenyaHit","GLOBAL",1)
~ THEN BEGIN 5 // from:
  SAY #1152 /* ~Of course I am afraid, what fool wouldn't be? We were captured with little difficulty, held with even less, and have escaped with friends dead or wounded.~ */
  IF ~~ THEN REPLY #1831 /* ~Isaea Roenall deals in slaves. His insignia was used on slave documents.~ */ DO ~SetGlobal("TenyaHit","GLOBAL",2)
ChangeEnemyAlly(Myself,NEUTRAL)
ClearAllActions()
SetGlobal("TenyaStory","GLOBAL",1)
~ JOURNAL #6286 /* ~~ */ GOTO 7
  IF ~~ THEN REPLY #1832 /* ~Serious charges indeed. However, I am familiar with the young woman in question, and she is hardly to be considered innocent by default.~ */ DO ~SetGlobal("TenyaHit","GLOBAL",2)
ChangeEnemyAlly(Myself,NEUTRAL)
ClearAllActions()
SetGlobal("TenyaStory","GLOBAL",1)
~ JOURNAL #6285 /* ~~ */ GOTO 16
  IF ~~ THEN REPLY #1833 /* ~I thank you for the concern you have shown, but in this instance it is misguided. Have you anything else I can help you with?~ */ DO ~SetGlobal("TenyaHit","GLOBAL",2)
SetGlobal("TenyaStory","GLOBAL",1)
~ JOURNAL #6288 /* ~Madulf and the village make an arrangement.

A peaceful arrangement has been set up between Madulf and his fellow deserters and the village of Imnesvale.  The deserters will protect the village and the village will allow them to live in peace and perhaps even trade with them once in a while.  Overall, a satisfactory arrangement.~ */ GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.2
  SAY #1153 /* ~We will exact vengeance when it is to our advantage.  I will not start a losing battle.  A guaranteed loss is a fool's endeavor.  Another day... another day...~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.0
  SAY #1154 /* ~Yuan-Ti mage~ */
  IF ~~ THEN DO ~SetGlobal("HelpTenya","GLOBAL",1)
~ EXIT
END

IF WEIGHT #3 /* Triggers after states #: 29 even though they appear after this state */
~Global("HelpTenya","GLOBAL",1)
~ THEN BEGIN 8 // from:
  SAY #1155 /* ~Are you afraid? I know I would be if my mate had been killed.~ */
  IF ~Dead("Jebadoh")
Dead("Telman")
Dead("Sonner")
~ THEN REPLY #1835 /* ~Please, good citizen, if you are to besmirch the name of one of my officers you had best make sure you can back up said arguments.~ */ GOTO 10
  IF ~PartyHasItem("MISC53")
~ THEN REPLY #1836 /* ~No. That will be all. I may have been premature in my judgements.~ */ GOTO 11
  IF ~~ THEN REPLY #1837 /* ~Perhaps. I still think Isaea should be looked into closely.~ */ DO ~~ JOURNAL #6329 /* ~~ */ GOTO 9
  IF ~~ THEN REPLY #1838 /* ~A scathing claim, but not enough to pursue a man. Barg is a known scoundrel; his testimony is questionable. Have you other charges that cast further doubt?~ */ DO ~~ JOURNAL #6288 /* ~Madulf and the village make an arrangement.

A peaceful arrangement has been set up between Madulf and his fellow deserters and the village of Imnesvale.  The deserters will protect the village and the village will allow them to live in peace and perhaps even trade with them once in a while.  Overall, a satisfactory arrangement.~ */ GOTO 12
  IF ~~ THEN REPLY #1839 /* ~Not at this time.~ */ DO ~~ JOURNAL #6285 /* ~~ */ GOTO 13
END

IF ~~ THEN BEGIN 9 // from: 8.2
  SAY #1156 /* ~I couldn't agree more. Let's leave these heavy hitters and get out of here!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 10 // from: 8.0
  SAY #1157 /* ~Turn and run if you will, but I am not a coward!~ */
  IF ~~ THEN DO ~SetGlobal("HelpTenya","GLOBAL",2)
TakePartyItem("MISC53")
AddexperienceParty(2500)
SetGlobal("TalkedToTenya","GLOBAL",1)
ForceSpell(Myself,DRYAD_TELEPORT)
~ JOURNAL #6330 /* ~Finding Irenicus in Hell

A demon gave me a sword, 'Blackrazor', saying it is the only way to defeat a powerful creature who holds the Tear of Bhaal I seek.~ */ EXIT
END

IF ~~ THEN BEGIN 11 // from: 8.1
  SAY #1158 /* ~I agree, there is no point to a hopeless battle. We will do no good by dying.~ */
  IF ~~ THEN DO ~SetGlobal("HelpTenya","GLOBAL",2)
SetGlobal("TalkedToTenya","GLOBAL",1)
TakePartyItem("MISC53")
AddexperienceParty(2500)
ForceSpell(Myself,DRYAD_TELEPORT)
~ JOURNAL #6330 /* ~Finding Irenicus in Hell

A demon gave me a sword, 'Blackrazor', saying it is the only way to defeat a powerful creature who holds the Tear of Bhaal I seek.~ */ EXIT
END

IF ~~ THEN BEGIN 12 // from: 8.3
  SAY #1159 /* ~Only an idiot is not afraid when he should be.  We were captured and held with ease!  Yes we have earned our freedom, but it was at the cost of our friends!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 13 // from: 8.4
  SAY #1160 /* ~Agreed. We will exact justice when we have hope of succeeding. Until then... I will not forget... another time and place...~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToTenya","GLOBAL",1)
SetGlobal("KillFishermen","GLOBAL",1)
ForceSpell(Myself,DRYAD_TELEPORT)
~ JOURNAL #6331 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 14 // from: 0.3
  SAY #1825 /* ~As you will, but you may not be allowed access to some areas. This is the heart of government, after all.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 29 even though they appear after this state */
~Global("HelpTenya","GLOBAL",0)
~ THEN BEGIN 15 // from:
  SAY #1826 /* ~So you are suggesting that one of my officers has behaved inappropriately? What is your evidence of this? What are your claims?~ */
  IF ~~ THEN REPLY #1828 /* ~He imprisoned Nalia de'Arnise to force her submission to an arranged marriage.~ */ GOTO 2
  IF ~~ THEN REPLY #1829 /* ~Isaea finances pirates. I have a witness to these events; a man named Barg.~ */ GOTO 2
  IF ~~ THEN REPLY #1830 /* ~Isaea has possession of smuggled gems, a fact proven by his own records.~ */ GOTO 1
END

IF ~~ THEN BEGIN 16 // from: 5.1
  SAY #1834 /* ~I fear I may have been too rash in my conclusions. Forgive my outburst.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 /* Triggers after states #: 29 even though they appear after this state */
~False()
~ THEN BEGIN 17 // from:
  SAY #1840 /* ~Isaea has possession of smuggled gems, a fact proven by his own records.~ */
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #1846 /* ~Any number of factors could place his insignia there and not directly involve him. Alone it is not worth the risk of defaming an innocent man. Have you other charges?~ */ GOTO 19
  IF ~Dead("Jebadoh")
Dead("Sonner")
Dead("Telman")
~ THEN REPLY #1847 /* ~Not at this time.~ */ GOTO 20
  IF ~~ THEN REPLY #1848 /* ~Isaea finances pirates. I have a witness to these events; a man named Barg.~ */ GOTO 22
  IF ~!Dead("Jebadoh")
!Dead("Sonner")
!Dead("Telman")
~ THEN REPLY #1849 /* ~Isaea has possession of smuggled gems, a fact proven by his own records.~ */ GOTO 20
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #1850 /* ~If you make further claims of a circumstantial nature you had better provide enough of them that they warrant investigation despite their inconclusive nature alone.~ */ GOTO 19
END

IF ~~ THEN BEGIN 18 // from:
  SAY #1841 /* ~Isaea Roenall deals in slaves. His insignia was used on slave documents.~ */
  IF ~ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
~ THEN REPLY #1851 /* ~This may have been a simple clerical error. Combined with other charges it might warrant an inquiry, but alone it does not. Have you other charges to make?~ */ GOTO 19
  IF ~ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
Dead("Jebadoh")
Dead("Sonner")
Dead("Telman")
~ THEN REPLY #1852 /* ~Not at this time.~ */ GOTO 21
  IF ~~ THEN REPLY #1853 /* ~Isaea Roenall deals in slaves. His insignia was used on slave documents.~ */ GOTO 22
  IF ~ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
~ THEN REPLY #1854 /* ~Any number of factors could place his insignia there. Combined with the previous it does seem odd, but still more is needed to warrant investigation.~ */ GOTO 20
  IF ~ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
~ THEN REPLY #1855 /* ~I have nothing else at this time.~ */ GOTO 20
END

IF ~~ THEN BEGIN 19 // from: 18.0 17.4 17.0
  SAY #1842 /* ~This may have been a simple clerical error. Combined with other charges it might warrant an inquiry, but alone it does not. Have you other charges to make?~ */
  IF ~~ THEN DO ~SetGlobal("BOYBODY","GLOBAL",1)
GiveItemCreate("MISC54",LastTalkedToBy,0,0,0)
~ JOURNAL #1827 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 20 // from: 18.4 18.3 17.3 17.1
  SAY #1843 /* ~Not at this time.~ */
  IF ~~ THEN DO ~SetGlobal("BOYBODY","GLOBAL",1)
GiveItemCreate("MISC54",LastTalkedToBy,0,0,0)
EscapeArea()
~ JOURNAL #6332 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 21 // from: 18.1
  SAY #1844 /* ~Isaea finances pirates. I have a witness to these events; a man named Barg.~ */
  IF ~~ THEN DO ~SetGlobal("BOYBODY","GLOBAL",1)
GiveItemCreate("MISC54",LastTalkedToBy,0,0,0)
~ JOURNAL #1827 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 22 // from: 18.2 17.2
  SAY #1845 /* ~Isaea Roenall deals in slaves. His insignia was used on slave documents.~ */
  IF ~~ THEN DO ~GiveItemCreate("MISC54",LastTalkedToBy,0,0,0)
Shout(1)
EscapeArea()
~ JOURNAL #6332 /* ~~ */ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 29 even though they appear after this state */
~False()
~ THEN BEGIN 23 // from:
  SAY #1856 /* ~Isaea has possession of smuggled gems, a fact proven by his own records.~ */
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #1857 /* ~Any hint of association with the slave trade can ruin a man, and your claims are all circumstantial, but there is enough here to warrant investigating officially.~ */ GOTO 24
  IF ~ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
~ THEN REPLY #1858 /* ~This may be a clerical error, but combined with the previous it does seem suspicious.  We must endeavor to uncover the truth of the matter as best we can.~ */ GOTO 26
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #6333 /* ~Though dishonor seems to fit you like a well-worn cloak, I do not have the luxury that your lack of morals allows you.  We must track down the one who has enacted this ruse!~ */ GOTO 25
  IF ~ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
~ THEN REPLY #6334 /* ~Skin of the Ghoul +4~ */ GOTO 27
END

IF ~~ THEN BEGIN 24 // from: 23.0
  SAY #1859 /* ~A scathing claim, but this 'Barg' is a known scoundrel; his testimony is questionable. With the previous it is suspicious, but not enough to slander Isaea's name.~ */
  IF ~~ THEN DO ~Shout(1)
EscapeArea()
~ JOURNAL #6355 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 25 // from: 23.2
  SAY #1860 /* ~I have nothing else at this time.~ */
  IF ~~ THEN DO ~GiveItemCreate("MISC54",LastTalkedToBy,0,0,0)
~ JOURNAL #6354 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 26 // from: 23.1
  SAY #1861 /* ~Isaea Roenall deals in slaves. His insignia was used on slave documents.~ */
  IF ~~ THEN DO ~GiveItemCreate("MISC54",LastTalkedToBy,0,0,0)
~ JOURNAL #6354 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 27 // from: 23.3
  SAY #1862 /* ~Any number of factors could place his insignia there and still not prove an association with slavers. With the previous it does appear alarming, but more is needed.~ */
  IF ~~ THEN DO ~Shout(1)
EscapeArea()
~ JOURNAL #6355 /* ~~ */ EXIT
END

IF WEIGHT #7 /* Triggers after states #: 29 even though they appear after this state */
~False()
~ THEN BEGIN 28 // from:
  SAY #6340 /* ~Do you have the documents I asked for? This matter is more important than your average simple correspondence.~ [EDWIN75] */
  IF ~~ THEN DO ~~ JOURNAL #6356 /* ~~ */ EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 29 // from:
  SAY #6925 /* ~Holy Sword (Alteration) 
Level: 4
Sphere: Combat
Range: Touch 
Duration: 4 rounds + 1 round/level 
Casting Time: 2 
Area of Effect: 1 normal sword
Saving Throw: None 

This spell enables the caster to create a magical sword very similar to the Holy Avenger that paladins seek after.  This sword gives a +5 bonus to hit and +5 bonus to damage.  Also, the sword grants the caster temporary knowledge on how to wield it properly, so the caster does not receive any penalties for using this sword.~ */
  IF ~~ THEN EXIT
END
