// creator  : weidu.exe (version 23600)
// argument : IZEFIA.DLG
// game     : .
// source   : ./override/IZEFIA.DLG
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

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

IF WEIGHT #5 /* Triggers after states #: 1 8 11 12 13 even though they appear after this state */
~  InParty("Jaheira")
~ THEN BEGIN 0 // from:
  SAY #10763 /* ~You are friends of Jaheira, are you not? She is of the druidic order that follows Seniyad, one of the three archdruids. Well, I do not share their philosophy! It is because of their pacifist doctrines that atrocities against nature continue, like the fool to the northwest that entraps animals and enslaves them for his petty tasks! As a Shadow Druid, I fight so that nature is left untouched; there is no room for society to live alongside! This must be enforced through fear, and the removal of the naive taint Jaheira and her kind have sown!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
  IF ~Global("X#JaheiraIzefia","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#JaheiraIzefia","GLOBAL",1)~ EXTERN ~JAHEIJ~ 116
END

IF WEIGHT #4 /* Triggers after states #: 8 11 12 13 even though they appear after this state */
~  InParty("Faldorn")
~ THEN BEGIN 1 // from:
  SAY #10772 /* ~Faldorn travels with you, and so you shall live to see the glory of tomorrow's sunrise. If she can stand your presence, then so shall I. Perhaps you even share her Shadow Druid temperament. If so, you will want to know this: There is a fool in a cave to the northeast that dares to enslave the animals of this wood for his petty tasks. I shall give Faldorn the honor of feeding him to his own captives.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
  IF ~Global("X#FALDORNIZEFIA1","GLOBAL",0)
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FALDORNIZEFIA1","GLOBAL",1)~ EXTERN ~FALDOJ~ 80
END

IF WEIGHT #6 /* Triggers after states #: 8 11 12 13 even though they appear after this state */
~  True()
~ THEN BEGIN 2 // from:
  SAY #10775 /* ~You've the audacity of an ogre mage, the way you strut through this wood! Well, you'll not get much further than this if your purpose here does not counter the damage you might do to nature! Who do you claim to be and why should I let you pass?~ */
  IF ~~ THEN REPLY #10783 /* ~I "claim" to be someone you should not bother. I wouldn't want to have to hurt you.~ */ GOTO 4
  IF ~~ THEN REPLY #10784 /* ~I beg of you, let me pass. There are villains in these woods that will do it more harm than I. I must track them down.~ */ GOTO 5
  IF ~~ THEN REPLY #10785 /* ~I don't mean the forest any harm. I simply wish to walk amongst the trees and enjoy their majesty.~ */ GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.2
  SAY #10786 /* ~It is fools like you who do the most harm! The trees were not placed for your enjoyment, and to treat them as mere entertainment is to demean them in ways I cannot stand! No Shadow Druid would ever condone such flagrant squandering of the gifts of the earth! I shall avenge each flower you might have trod on, and every leaf you might have shaken loose in your passing!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 4 // from: 2.0
  SAY #10787 /* ~Contrariwise, I would love to have to hurt you! Your attitude only proves that you should not be allowed to proceed through this wood! Likewise you should not be allowed to live, lest you walk through some other wood in the future! Shadow Druids such as me are the last line of defense, and must protect nature against brutes like you!~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 5 // from: 2.1
  SAY #10789 /* ~You display the same fervor that drives the other Shadow Druids and me. Perhaps there is merit in letting you continue. You might even prove useful. There is an infidel in a cave to the northeast of here who dares to capture creatures of the wood and bend them to his petty purposes. No doubt you would like to see him fed to his captives as much as I. Please proceed, and dispose of him at your leisure.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 6 // from: JAHEIJ:116.1
  SAY #45249 /* ~You will find no slaves here, Jaheira. Only willing warriors, both humans and beasts. But I can see that it is true - you are among those who lie willingly about us. You want to kill me and prove yourself the stronger? Do it, then, but know that by your hand a true defender of nature shall be slain.~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from: FALDOJ:80.1
  SAY #45415 /* ~Hatchlings, rather than cubs, but it makes no difference. Go, Faldorn. Come talk to me afterwards.~ */
  IF ~~ THEN DO ~EscapeArea()
SetGlobal("X#ReportIzefia","GLOBAL",1)
~ EXIT
END

IF WEIGHT #0 ~  Global("X#ReportIzefia","GLOBAL",1)
Dead("peter")
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN BEGIN 8 // from:
  SAY #45416 /* ~How did it go?~ */
  IF ~~ THEN EXTERN ~FALDOJ~ 81
END

IF ~~ THEN BEGIN 9 // from: FALDOJ:81.0
  SAY #45418 /* ~The hatchlings are dead, then? A pity. But what of the human?~ */
  IF ~~ THEN EXTERN ~FALDOJ~ 82
END

IF ~~ THEN BEGIN 10 // from: FALDOJ:82.0
  SAY #45420 /* ~That is good to hear. You have done well, Faldorn.~ */
  IF ~~ THEN DO ~SetGlobal("X#ReportIzefia","GLOBAL",2)
AddXPObject("faldorn",100)
GiveItemCreate("POTN08","faldorn",1,0,0)
GiveItemCreate("POTN20","faldorn",1,0,0)
~ EXIT
END

IF WEIGHT #1 ~  Global("X#ReportIzefia","GLOBAL",1)
Dead("peter")
OR(3)
!InParty("faldorn")
!InMyArea("faldorn")
StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN BEGIN 11 // from:
  SAY #45416 /* ~How did it go?~ */
  IF ~~ THEN REPLY #45401 /* ~No, not yet. We'll go look for him right now.~ */ EXIT
END

IF WEIGHT #2 ~  Global("X#ReportIzefia","GLOBAL",1)
!Dead("peter")
OR(3)
!InParty("faldorn")
!InMyArea("faldorn")
StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN BEGIN 12 // from:
  SAY #45416 /* ~How did it go?~ */
  IF ~~ THEN REPLY #45401 /* ~No, not yet. We'll go look for him right now.~ */ EXIT
END

IF WEIGHT #3 ~  Global("X#ReportIzefia","GLOBAL",1)
!Dead("peter")
InParty("faldorn")
InMyArea("faldorn")
!StateCheck("faldorn",CD_STATE_NOTVALID)
~ THEN BEGIN 13 // from:
  SAY #45416 /* ~How did it go?~ */
  IF ~~ THEN EXTERN ~FALDOJ~ 83
END

IF ~~ THEN BEGIN 14 // from: FALDOJ:83.0
  SAY #45421 /* ~Be strong! Go with the Nature's blessings.~ */
  IF ~~ THEN EXIT
END
