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

BEGIN ~SUDEMINX~

IF ~NumTimesTalkedTo(0)~ THEN BEGIN 0 // from:
  SAY #54288 /* ~Island Concerns: Ginia's Tale

I told Ginia that I killed Chremy. Now I have agreed to pay the smuggler Calahan to take Ginia and her brother off the isle.~ */
  IF ~~ THEN EXIT
END

IF ~Global("ElvenAvatar","GLOBAL",0)
Global("TalkedToDemin","GLOBAL",0)
Dead("suadsaan")
Dead("surakraj")
NumDeadGT("suraksha",1)~ THEN BEGIN 1 // from:
  SAY #54289 /* ~Island Concerns: Ginia's Tale

I told Ginia that I killed Chremy, but I also said that I will not pay the smuggler Calahan to take her and her brother off the isle.~ */
  IF ~~ THEN REPLY #54290 /* ~Island Concerns: Ginia's Tale

I told Ginia that I killed Chremy and paid Calahan to take her and her brother off the isle. She was ecstatic, of course.~ */ DO ~SetGlobal("TalkedToDemin","GLOBAL",1)~ GOTO 2
  IF ~~ THEN REPLY #54291 /* ~Island Concerns: Ginia's Tale

I told Ginia that I paid Calahan to take her and her brother off the isle. She was happy, but I still have to deal with Chremy to free them.~ */ DO ~SetGlobal("TalkedToDemin","GLOBAL",1)~ GOTO 5
  IF ~Race(Player1,ELF)~ THEN REPLY #54293 /* ~Restore Kangaxx's Body

I have encountered a golden skull in the Docks District which has promised me wealth and power beyond my dreams if only I save him from his curse and restore his body.  He believes his arms, legs and torso to have been scattered about the tombs within the city.~ */ DO ~SetGlobal("TalkedToDemin","GLOBAL",1)~ GOTO 6
  IF ~!Race(Player1,ELF)~ THEN REPLY #54301 /* ~Fireseeds Created~ */ DO ~SetGlobal("TalkedToDemin","GLOBAL",1)~ GOTO 7
END

IF ~~ THEN BEGIN 2 // from: 8.0 1.0
  SAY #54294 /* ~The container you are standing on or near is locked.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 5.0 2.0
  SAY #54295 /* ~The container you are standing on or near is trapped.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #54296 /* ~The container you are standing on or near appears trapped.~ */
  IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Imoen2")
!IsValidForPartyDialog("Mazzy")~ THEN REPLY #54298 /* ~Cause Serious Wounds~ */ GOTO 9
  IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Imoen2")
!IsValidForPartyDialog("Mazzy")~ THEN REPLY #54300 /* ~Cause Critical Wounds~ */ GOTO 11
  IF ~IsValidForPartyDialog("Aerie")~ THEN EXTERN ~AERIEJ~ 156
  IF ~!IsValidForPartyDialog("Aerie")
IsValidForPartyDialog("Imoen2")~ THEN EXTERN ~IMOEN2J~ 27
  IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Imoen2")
IsValidForPartyDialog("Mazzy")~ THEN EXTERN ~MAZZYJ~ 179
END

IF ~~ THEN BEGIN 5 // from: 8.1 1.1
  SAY #54303 /* ~Miscast Magic~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 6 // from: 1.2
  SAY #54307 /* ~Spell Immunity~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 7 // from: 1.3
  SAY #54309 /* ~True Seeing~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0 6.0
  SAY #54312 /* ~Improved Haste~ */
  IF ~~ THEN REPLY #54315 /* ~Spell Trigger~ */ GOTO 2
  IF ~~ THEN REPLY #54318 /* ~Deaf~ */ GOTO 5
END

IF ~~ THEN BEGIN 9 // from: 4.0
  SAY #54331 /* ~Webbed~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #54332 /* ~Polymorphed~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 10.0 4.1
  SAY #54333 /* ~Mental Combat~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #54335 /* ~Bleeding~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #54336 /* ~Enraged~ */
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("Imoen2")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ GOTO 14
  IF ~IsValidForPartyDialog("Keldorn")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~KELDORJ~ 211
  IF ~!IsValidForPartyDialog("Keldorn")
IsValidForPartyDialog("Aerie")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~AERIEJ~ 157
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Aerie")
IsValidForPartyDialog("Cernd")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~CERNDJ~ 117
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
IsValidForPartyDialog("Edwin")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~EDWINJ~ 121
  IF ~!IsValidForPartyDialog("Keldorn")
!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
!IsValidForPartyDialog("Edwin")
IsValidForPartyDialog("Imoen2")~ THEN UNSOLVED_JOURNAL #23506 /* ~Getting Inside the Palace in Suldanessellar

High Priestess Demin informed me that Irenicus holds Queen Ellesime inside the palace, and that he has sealed the gates with his magic.  The only way to get inside is to deal with the creatures ravaging the city.  This is according to her, of course... there may be another way in, but she is determined to save her people.~ */ EXTERN ~IMOEN2J~ 28
END

IF ~~ THEN BEGIN 14 // from: 13.0
  SAY #54337 /* ~Diseased~ */
  IF ~~ THEN REPLY #54338 /* ~This isn't over yet, follow me if you dare!~ */ GOTO 21
  IF ~~ THEN REPLY #54341 /* ~Dark Elven Chain~ */ GOTO 21
  IF ~~ THEN REPLY #54339 /* ~Handmaiden's Mace~ */ GOTO 15
  IF ~~ THEN REPLY #54340 /* ~This mace has been crafted finely by the drow, and specially treated to survive the glare of the sun.  It is made for surface raids by the subterranean race... and its black metal glistens with a dark poison that seems to be generated from within and causes incredible damage upon a successful impact.
The mace seems almost alive and warm to the touch, and slithers away from those whom it does not like... namely drow or those who are similar enough to not make a difference.  In the hands of anyone else, the mace becomes mere dead weight.

STATISTICS:

Combat Ability: A creature hit by this mace must make a saving throw vs. poison or suffer 2 points of damage each round for 10 rounds.
THAC0: +2 bonus
Damage:  1D6 + 3
Damage type:  crushing
Weight: 8
Speed Factor: 6
Proficiency Type: Mace
Type:  1-handed
Usable By:
 Elven or Half-Elven Evil-Aligned Clerics~ */ GOTO 16
END

IF ~~ THEN BEGIN 15 // from: 26.1 14.2
  SAY #54342 /* ~Plant Growth~ */
  IF ~~ THEN REPLY #54343 /* ~Create Shadows~ */ GOTO 21
  IF ~~ THEN REPLY #54344 /* ~Imoen does not know when or how she acquired this belt, and despite all of her efforts and magic it cannot be removed or unbuckled.~ */ GOTO 16
  IF ~~ THEN REPLY #54345 /* ~Imoen's Belt~ */ GOTO 17
  IF ~~ THEN REPLY #54346 /* ~Healing spells cast on rest.~ */ GOTO 20
END

IF ~~ THEN BEGIN 16 // from: 15.1 14.3
  SAY #54347 /* ~Healing spells cast on rest until fully healed.~ */
  IF ~~ THEN REPLY #54348 /* ~~ [CSCOW103] */ GOTO 21
  IF ~~ THEN REPLY #54349 /* ~~ [CSCOW502] */ GOTO 17
  IF ~~ THEN REPLY #54350 /* ~ Yes?~ [JAHEIR23] */ GOTO 20
END

IF ~~ THEN BEGIN 17 // from: 26.2 16.1 15.2
  SAY #54351 /* ~Mage Book~ */
  IF ~~ THEN GOTO 18
END

IF ~~ THEN BEGIN 18 // from: 17.0
  SAY #54352 /* ~Cleric Spells~ */
  IF ~~ THEN REPLY #54353 /* ~Greater Otyugh~ */ GOTO 19
  IF ~~ THEN REPLY #54355 /* ~Greater Otyugh~ */ GOTO 21
  IF ~~ THEN REPLY #54356 /* ~Small Spider~ */ GOTO 20
END

IF ~~ THEN BEGIN 19 // from: 18.0
  SAY #54357 /* ~Small Spider~ */
  IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
!IsValidForPartyDialog("Keldorn")~ THEN DO ~Enemy()
ActionOverride("Aerie",LeaveParty())
ActionOverride("Aerie",Enemy())
ActionOverride("Cernd",LeaveParty())
ActionOverride("Cernd",Enemy())
ActionOverride("Keldorn",LeaveParty())
ActionOverride("Keldorn",Enemy())
ActionOverride("Mazzy",LeaveParty())
ActionOverride("Mazzy",Enemy())
ActionOverride("Jaheira",LeaveParty())
ActionOverride("Jaheira",Enemy())
ActionOverride("Valygar",LeaveParty())
ActionOverride("Valygar",Enemy())~ EXIT
  IF ~IsValidForPartyDialog("Aerie")~ THEN DO ~Enemy()~ EXTERN ~AERIEJ~ 158
  IF ~!IsValidForPartyDialog("Aerie")
IsValidForPartyDialog("Cernd")~ THEN DO ~Enemy()~ EXTERN ~CERNDJ~ 118
  IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Cernd")
IsValidForPartyDialog("Keldorn")~ THEN DO ~Enemy()~ EXTERN ~KELDORJ~ 213
END

IF ~~ THEN BEGIN 20 // from: 18.2 16.2 15.3
  SAY #54358 /* ~Cannot equip off-handed weapon when a ranged weapon is equipped.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #23481 /* ~Getting Inside the Palace in Suldanessellar

I refused to hear Demin's plan, for I have no time to go about saving the elves.  There must be another way inside the palace, despite what she says!  Demin is too weak to go far, so she simply told me to return once I changed my mind.~ */ EXIT
END

IF ~~ THEN BEGIN 21 // from: 26.0 18.1 16.0 15.0 14.1 14.0
  SAY #54361 /* ~Cannot equip off-handed weapon when a launcher is equipped.~ */
  IF ~~ THEN GOTO 22
END

IF ~~ THEN BEGIN 22 // from: 21.0
  SAY #54368 /* ~Cannot equip ranged weapon when an off-handed weapon is equipped.~ */
  IF ~~ THEN GOTO 23
END

IF ~~ THEN BEGIN 23 // from: 22.0
  SAY #54370 /* ~Cannot equip launcher when an off-handed weapon is equipped.~ */
  IF ~~ THEN REPLY #54376 /* ~Restore Kangaxx's Body

I have restored the body pieces I discovered to the golden skull... only to have it reform itself into none other than a lich!  The creature immediately attacked with its powerful magics.  Obviously I should beware offers from strange skulls in the future...~ */ GOTO 24
END

IF ~~ THEN BEGIN 24 // from: 23.0
  SAY #54377 /* ~Guardian Vottnar~ */
  IF ~~ THEN REPLY #54379 /* ~Guardian Vottnar~ */ GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 24.0
  SAY #54381 /* ~Paused for text screen~ */
  IF ~~ THEN DO ~SetGlobal("DerminJob","GLOBAL",1)~ UNSOLVED_JOURNAL #23482 /* ~Getting Inside the Palace in Suldanessellar

Demin's plan is to summon the avatar of the elven god Rillifane.  He will awaken the forest spirit guardians to save the elves, and he has the power to break the seal on the palace.
Irenicus' creatures stole three relics from Rillifane's temple and I must return them. It was a cup, a talisman and a moonblade.  The more powerful monsters will have them, including, Demin suspects, Irenicus' black dragon in the northwest.  Once I gather the items I must enter Rillifane's temple and place the relics on his statue... that should summon the avatar.  I must move quickly before Irenicus completes whatever plan he has set in motion here.~ */ EXIT
END

IF ~Global("DerminJob","GLOBAL",0)
Global("ElvenAvatar","GLOBAL",0)
Global("TalkedToDemin","GLOBAL",1)
Dead("suadsaan")
Dead("surakraj")
NumDeadGT("suraksha",1)~ THEN BEGIN 26 // from:
  SAY #54383 /* ~Relonar~ */
  IF ~~ THEN REPLY #54385 /* ~Relonar~ */ GOTO 21
  IF ~~ THEN REPLY #54386 /* ~This is all that remains of an enchanted weapon.~ */ GOTO 15
  IF ~~ THEN REPLY #54387 /* ~Lower Fire Resistance~ */ GOTO 17
  IF ~~ THEN REPLY #54388 /* ~~ */ GOTO 27
END

IF ~~ THEN BEGIN 27 // from: 26.3
  SAY #54389 /* ~~ */
  IF ~~ THEN EXIT
END

IF ~Global("DerminJob","GLOBAL",1)
Global("TalkedToDemin","GLOBAL",1)
Global("ElvenAvatar","GLOBAL",0)
Dead("suadsaan")
Dead("surakraj")
NumDeadGT("suraksha",1)~ THEN BEGIN 28 // from:
  SAY #54390 /* ~Entrance to the Underdark~ */
  IF ~~ THEN REPLY #54391 /* ~Elhan's Tent~ */ GOTO 29
  IF ~PartyHasItem("miscb1")
PartyHasItem("miscb2")
PartyHasItem("miscb3")~ THEN REPLY #54392 /* ~Deathsong~ */ GOTO 31
  IF ~OR(3)
!PartyHasItem("miscb1")
!PartyHasItem("miscb2")
!PartyHasItem("miscb3")~ THEN REPLY #54393 /* ~The power of Lolth herself keeps this door closed.~ */ GOTO 32
  IF ~~ THEN REPLY #54394 /* ~These berries are a potential clue to solving the murders in the Bridge District. Take them to Rose Bouquet to see if she recognizes the smell.~ */ GOTO 33
  IF ~~ THEN REPLY #54405 /* ~Export Filename:~ */ GOTO 30
END

IF ~~ THEN BEGIN 29 // from: 28.0
  SAY #54395 /* ~Area Map~ */
  IF ~~ THEN GOTO 30
END

IF ~~ THEN BEGIN 30 // from: 33.0 32.0 31.0 29.0 28.4
  SAY #54396 /* ~Poison Mist~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 31 // from: 28.1
  SAY #54400 /* ~Poison Mist~ */
  IF ~~ THEN UNSOLVED_JOURNAL #11883 /* ~Getting Inside the Palace in Suldanessellar

Demin has confirmed that I have collected the necessary relics... I must now make my way to the temple and place them on Rillifane's statue.~ */ GOTO 30
END

IF ~~ THEN BEGIN 32 // from: 28.2
  SAY #54401 /* ~You cannot save at this time because you do not have control of all your party members.~ */
  IF ~~ THEN GOTO 30
END

IF ~~ THEN BEGIN 33 // from: 28.3
  SAY #54404 /* ~You cannot rest at this time because you do not have control of all your party members.~ */
  IF ~~ THEN GOTO 30
END

IF ~Global("ElvenAvatar","GLOBAL",1)
Dead("suadsaan")
Dead("surakraj")
NumDeadGT("suraksha",1)~ THEN BEGIN 34 // from:
  SAY #54406 /* ~~ */
  IF ~~ THEN GOTO 35
END

IF ~~ THEN BEGIN 35 // from: 34.0
  SAY #54407 /* ~AHHHHHHHHHH!~ */
  IF ~~ THEN GOTO 36
END

IF ~~ THEN BEGIN 36 // from: 35.0
  SAY #54409 /* ~Additional Casting Ability~ */
  IF ~~ THEN GOTO 37
END

IF ~~ THEN BEGIN 37 // from: 36.0
  SAY #54414 /* ~General Sovalidaas~ */
  IF ~~ THEN DO ~EscapeArea()~ SOLVED_JOURNAL #15718 /* ~Getting Inside the Palace in Suldanessellar

Now that the guardians have been summoned, Demin has left to aid the wounded in the city.  She told me before she left that Irenicus plans to do something to the Tree of Life... and that only Ellesime may have the power to stop him. I will need to find the Stone Harp and Horn to get through the palace.~ */ EXIT
END
