//*** Imprisonment ***//       //// This file was overlooked and the proofread was never applied.


/* Should trigger upon activating ALL of the windows on the Imprisonment device in the Underdark and after killing all the summoned enemies */
ADD_TRANS_ACTION UDTRAP05
BEGIN 0 END
BEGIN 0 1 END
~SetGlobal("MRUdTrap5Released","AR2100",1)~

APPEND IMOEN2J

	IF ~Global("MRSphere","AR2100",1)~ THEN BEGIN MRImprisonedSphere
		SAY ~Poor bastards.~
			++ ~'Poor bastards'? They attacked us!~ DO ~SetGlobal("MRSphere","AR2100",2)~ GOTO MRImprisonedSphereWhat
			++ ~You'd think even madmen would realize that attacking us is suicide.~ DO ~SetGlobal("MRSphere","AR2100",2)~ GOTO MRImprisonedSphereWhat
			++ ~Yeah, being imprisoned like that... I wouldn't wish that on anyone.~ DO ~SetGlobal("MRSphere","AR2100",2)~ GOTO MRImprisonedSphereNice
			++ ~Another day, another death. Let's move on.~ DO ~SetGlobal("MRSphere","AR2100",2)~ GOTO MRImprisonedSphereEmp
	END

	IF ~~ THEN BEGIN MRImprisonedSphereWhat
		SAY ~Yeah. But I mean, how sane would YOU be, after being locked up that thing for who knows how many years?~
		=
		~And I thought Spellhold was bad...~
		++ ~Oh, don't start being melodramatic.~ GOTO MRImprisonedSphereEmp
		++ ~You really think this would be worse than Spellhold?~ GOTO MRImprisonedSphereSpell
		++ ~I wouldn't wish either of them upon anyone.~ DO ~SetGlobal("MRCastImprisonment","GLOBAL",1)~ GOTO MRImprisonedSphereNice
	END

	IF ~~ THEN BEGIN MRImprisonedSphereSpell
		SAY ~At least in Spellhold I could move and talk and see things and do things. I could *breathe*. Can you imagine not being able to do any of that? Just walled up as a speck of soul, for years on end?~
		=
		~Not even having a mouth to scream?~
		++ ~Oh, don't start being melodramatic.~ GOTO MRImprisonedSphereEmp
		++ ~Yeah, being imprisoned like that... I wouldn't wish that on anyone.~ GOTO MRImprisonedSphereNice
		IF ~CheckStatGT(Player1,15,INT) IsValidForPartyDialog("Cernd") PartyGoldGT("10000") PartyGoldLT("15000")~ THEN REPLY ~Didn't know you were a Harlan Ellison fan, Im.~ GOTO MRImprisonedSphereEE
	END

	IF ~~ THEN BEGIN MRImprisonedSphereEE
		SAY ~Geez, do you have to ruin my dramatic lines EVERY TIME?~
		=
		~Stupid Easter Eggs. I'm starting to hate these things.~


		 IF ~~ THEN EXIT
	END

	IF ~~ THEN BEGIN MRImprisonedSphereNice
		SAY ~I know you wouldn't. Unlike some people, you're actually a decent human being... and I can't tell you how grateful I am for that, <CHARNAME>.~
		IF ~~ THEN GOTO MRImprisonedSphereEnd
	END

	IF ~~ THEN BEGIN MRImprisonedSphereEnd
		SAY ~This place gives me the chills, though. Can we just... go somewhere else?~
		 IF ~~ THEN EXIT
	END

	IF ~~ THEN BEGIN MRImprisonedSphereEmp
		SAY ~(Imoen shoots you a dark look as her lips crease into a frown.)~
		=
		~And the word we're looking for is 'empathy', boys and girls. You should try it sometime, <CHARNAME>.~
		 IF ~~ THEN EXIT
	END


	//*** Attacking Adalon ***//

	/* Should trigger immediately if Imoen is Valid for Party Dialog and Adalon (UDSILVER?) is dead */

	IF ~Global("MRAdalonDead","AR2102",1)~ THEN BEGIN MRKilledAdalon
		SAY ~I- I think I'm going to be sick...~
			++ ~Oh gods, you're not pregnant, are you?~ DO ~SetGlobal("MRAdalonDead","AR2102",2)~ GOTO MRKilledAdalon2
			++ ~What's wrong, Im?~ DO ~SetGlobal("MRAdalonDead","AR2102",2)~ GOTO MRKilledAdalon2
			++ ~Well, go puke somewhere else.~ DO ~SetGlobal("MRAdalonDead","AR2102",2)~ GOTO MRKilledAdalon2
	END

	IF ~~ THEN BEGIN MRKilledAdalon2
		SAY ~(Imoen covers her mouth with the back of her hand as she regards Adalon's fallen corpse.)~
		=
		~We just killed- we killed-~
		=
		~(Abruptly she turns away, runs several steps distant, and empties her stomach onto the cave floor.)~
			++ ~Yes, yes, we killed the noble silver dragon. Get a hold of yourself!~ + MRKilledAdalon3
			++ ~Are you okay?~ + MRKilledAdalon5
			++ ~Oh gods, you're not pregnant, are you?~ GOTO MRKilledAdalon3
			++ ~(Ignore her. This is no time to be weak)~ + MRKilledAdalon4
	END

	IF ~~ THEN BEGIN MRKilledAdalon3
		SAY ~Don't- don't talk to me. Just don't talk to me. I can't even look at you right now.~
		IF ~~ THEN EXIT
	END

	IF ~~ THEN BEGIN MRKilledAdalon4
		SAY ~(She shudders and turns away as you loot the dragon's body, unable to even meet your eyes.)~
		IF ~~ THEN EXIT
	END

	IF ~~ THEN BEGIN MRKilledAdalon5
		SAY ~Don't- don't talk to me. Just don't talk to me. I can't even look at you right now.~
		IF ~~ THEN EXIT
	END


	// *** Drow-skin *** //
	IF ~Global("MRDrowSkin","AR2100",1)~ THEN BEGIN MRDrowSkin
		SAY ~Gosh. Y'know, after Spellhold I was hoping to get a tan again, but this is a little extreme.~
		IF ~~ THEN DO ~SetGlobal("MRDrowSkin","AR2100",2)~ GOTO MRDrowSkin2
	END

	IF ~~ THEN BEGIN MRDrowSkin2
		SAY ~And I have this weird urge to kill lowly surfacers in the name of Lolth.~
		IF ~OR(2) PartyHasItem("Misc3E") PartyHasItem("C2KIT")~ THEN GOTO MRDrowSpider
		IF ~!PartyHasItem("Misc3E") !PartyHasItem("C2KIT")~ THEN GOTO MRDrowSkin3
	END


	IF ~~ THEN BEGIN MRDrowSpider
		SAY ~Maybe get a pet spider...~
		IF ~PartyHasItem("MISC3E")~ THEN REPLY ~In that case - meet Kitthix, the Black Spider! (Start to pull out your figurine.)~ GOTO MRDrowSpider2
		IF ~PartyHasItem("C2KIT")~ THEN REPLY ~In that case - meet IMPROVED KITTHIX, the Super Black Spider! (Start to pull out your figurine.)~ GOTO MRDrowSpider2
		IF ~!PartyHasItem("MISC3E") !PartyHasItem("C2KIT")~ THEN GOTO MRDrowSkin3

	END

	IF ~~ THEN BEGIN MRDrowSpider2
		SAY ~Ugh! No, no, get that thing outta my sight! If I have to watch that beast eat one more goblin corpse, I swear I'll retch. Maybe this whole drow thing will help with that, though.~

		IF ~~ THEN GOTO MRDrowSkin3
	END
END

CHAIN IMOEN2J MRDrowSkin3
	~And look, my breasts are bigger! Wait, actually, *don't* look.~
	== IMOEN2J IF ~IsValidForPartyDialog("Aerie")~ THEN
	~Hey, Aerie, didn't you say you hated the drow?~
	== AERIEJ IF ~IsValidForPartyDialog("Aerie")~ THEN
	~Oh, just... just don't remind me of it, please...~
	== IMOEN2J IF ~IsValidForPartyDialog("Mazzy")~ THEN


	~Hmm... Mazzy, weren't you taller before? You were definitely taller. You look short as a drow.~
	== MAZZYJ IF ~IsValidForPartyDialog("Mazzy")~ THEN
	~Imoen... I will *make the effort* and try to take that as a compliment.~
	== IMOEN2J IF ~IsValidForPartyDialog("Korgan")~ THEN
	~Oh wow, Korgan, is *that* you? Yer quite the hunk now! How does it feel to be able to see others' faces from above?~
	== KORGANJ IF ~IsValidForPartyDialog("Korgan")~ THEN
	~Better ye nay be screwin' with one *dwarven* drow, lass! Me axe be as big as it was before, an' these black limbs can wield it as deadly!~
	== IMOEN2J IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",FEMALE)~ THEN
	~Oh my, Edwin, you're such a beautiful drow woman.~
	== EDWINJ IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",FEMALE)~ THEN
	~Any other word about it, girl, and I will-~
	== IMOEN2J IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",FEMALE)~ THEN
	~Do a striptease?~
	== EDWINJ IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",FEMALE)~ THEN
	~AGH! You are close to being incinerated, you pathetic excuse for a-~
	== IMOEN2J IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",FEMALE)~ THEN
	~Hahah, why're ya so upset, Edwhiney? Is it one of "those" days? Don't worry, I understand. I'm gettin' there myself...~
	== EDWINJ IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",FEMALE)~ THEN
	~I AM NOT A WOMAN! And YOU do *not* understand me!~
	== IMOEN2J IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",MALE) GlobalTimerExpired("EdwinScroll","GLOBAL")~ THEN
	~Hah! First a woman, now a drow... what'll come next, Edwin?~
	== EDWINJ IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",MALE) GlobalTimerExpired("EdwinScroll","GLOBAL")~ THEN
	~Any other word about it, girl, and I will incinerate you!~
	== IMOEN2J IF ~IsValidForPartyDialog("Edwin") Gender("Edwin",MALE) GlobalTimerExpired("EdwinScroll","GLOBAL")~ THEN
	~Hahah, I'd like to see you try!~
	== IMOEN2J ~I gotta say, <CHARNAME>, adventuring with just gets better and better. Let's go!~
EXIT