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

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

IF WEIGHT #1 /* Triggers after states #: 5 even though they appear after this state */
~NumTimesTalkedTo(0)~ THEN BEGIN 0 // from:
  SAY #50842 /* ~Intruder! Get thee gone! This is no place for one whom is not a druid!~ */
  IF ~~ THEN REPLY #50844 /* ~Is this pool of some significance?~ */ GOTO 1
  IF ~~ THEN REPLY #50849 /* ~I apologize. I will leave.~ */ GOTO 2
  IF ~~ THEN REPLY #50851 /* ~I shall go nowhere, you pitiful little man. Get out of my way.~ */ GOTO 3
END

IF ~~ THEN BEGIN 1 // from: 4.0 0.0
  SAY #50852 /* ~This is the Holy Font of the Grove. It is a mystical pool whose powers are open only to friends of the Grove. You are not one. Leave!~ */
  IF ~~ THEN REPLY #50853 /* ~I shall leave.~ */ GOTO 2
  IF ~~ THEN REPLY #50864 /* ~What would happen to the Grove if the Font was... for example... poisoned?~ */ GOTO 3
  IF ~~ THEN REPLY #50865 /* ~I shall go nowhere, you pitiful little man. Get out of my way.~ */ GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 4.1 1.0 0.1
  SAY #50854 /* ~It is sacrilege for you to even look upon the Holy Font! Do not return!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 3 // from: 4.2 1.2 1.1 0.2
  SAY #50866 /* ~Wait until Faldorn hears of your impertinence! She shall surely change her mind and kill you where you stand! Leave the Grove and do not return!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 /* Triggers after states #: 5 even though they appear after this state */
~NumTimesTalkedToGT(0)
Global("GrovePoisoned","GLOBAL",0)~ THEN BEGIN 4 // from:
  SAY #50867 /* ~What audacity! Have I not made it clear that you are not welcome here?~ */
  IF ~~ THEN REPLY #50868 /* ~I just wanted to know what sort of pool this is.~ */ GOTO 1
  IF ~~ THEN REPLY #50869 /* ~You have made it clear. I shall leave.~ */ GOTO 2
  IF ~~ THEN REPLY #50870 /* ~Hah! You are certainly not one to be giving orders to me!~ */ GOTO 3
END

IF WEIGHT #0 ~Global("GrovePoisoned","GLOBAL",1)
~ THEN BEGIN 5 // from:
  SAY #50871 /* ~Hold! What are you doing? What have you placed in the Holy Font? Oh my...~ */
  IF ~OR(3)
!IsValidForPartyDialog("Aerie")
GlobalGT("AerieRomance","GLOBAL",0)
GlobalLT("AerieRomance","GLOBAL",3)
!IsValidForPartyDialog("Jaheira")
!IsValidForPartyDialog("Cernd")~ THEN DO ~ActionOverride("Valygar",LeaveParty())
ActionOverride("Valygar",Enemy())
ActionOverride("Minsc",LeaveParty())
ActionOverride("Minsc",Enemy())
ActionOverride("Keldorn",LeaveParty())
ActionOverride("Keldorn",Enemy())
ActionOverride("Mazzy",LeaveParty())
ActionOverride("Mazzy",Enemy())~ GOTO 6
  IF ~IsValidForPartyDialog("Aerie")
!GlobalGT("AerieRomance","GLOBAL",0)
!GlobalLT("AerieRomance","GLOBAL",3)~ THEN EXTERN ~AERIEJ~ 167
  IF ~OR(3)
!IsValidForPartyDialog("Aerie")
GlobalGT("AerieRomance","GLOBAL",0)
GlobalLT("AerieRomance","GLOBAL",3)
IsValidForPartyDialog("Jaheira")~ THEN EXTERN ~JAHEIRAJ~ 491
  IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Jaheira")
IsValidForPartyDialog("Cernd")~ THEN EXTERN ~CERNDJ~ 125
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #50882 /* ~BY THE GODS! What have you done <MANWOMAN>??? Faldorn! Come quickly!!~ */
  IF ~~ THEN DO ~SetGlobal("Yelled","LOCALS",1)
SetGlobal("cefald04Spawn","AR1901",1)
CreateCreatureObject("CEFALD04",Myself,0,0,0)
~ EXIT
END
