code:
package com.lilithsthrone.game.dialogue.npcDialogue.dominion;

import com.lilithsthrone.game.character.CharacterUtils;
import com.lilithsthrone.game.character.GameCharacter;
import com.lilithsthrone.game.character.attributes.CorruptionLevel;
import com.lilithsthrone.game.character.fetishes.Fetish;
import com.lilithsthrone.game.character.npc.NPC;
import com.lilithsthrone.game.dialogue.DialogueFlagValue;
import com.lilithsthrone.game.dialogue.DialogueNode;
import com.lilithsthrone.game.dialogue.places.dominion.RedLightDistrict;
import com.lilithsthrone.game.dialogue.responses.Response;
import com.lilithsthrone.game.dialogue.responses.ResponseCombat;
import com.lilithsthrone.game.dialogue.responses.ResponseEffectsOnly;
import com.lilithsthrone.game.dialogue.responses.ResponseSex;
import com.lilithsthrone.game.dialogue.responses.ResponseTag;
import com.lilithsthrone.game.dialogue.utils.InventoryInteraction;
import com.lilithsthrone.game.dialogue.utils.UtilText;
import com.lilithsthrone.game.sex.Sex;
import com.lilithsthrone.game.sex.SexPace;
import com.lilithsthrone.game.sex.managers.universal.SMGeneric;
import com.lilithsthrone.main.Main;
import com.lilithsthrone.utils.Util;
import com.lilithsthrone.world.WorldType;
import com.lilithsthrone.world.places.AbstractPlaceType;
import com.lilithsthrone.world.places.PlaceType;

/**
 * @since 0.1.95
 * @version 0.2.2
 * @author Innoxia
 */
public class AlleywayProstituteDialogue {

	private static int prostitutePrice() {
		return CharacterUtils.getProstitutePrice(getProstitute());
	}

	private static boolean isCanal() {
		AbstractPlaceType pt = getProstitute().getLocationPlace().getPlaceType();
		return pt.equals(PlaceType.DOMINION_ALLEYS_CANAL_CROSSING)
				|| pt.equals(PlaceType.DOMINION_CANAL)
				|| pt.equals(PlaceType.DOMINION_CANAL_END);
	}

	private static NPC getProstitute() {
		return Main.game.getActiveNPC();
	}

	public static final DialogueNode ALLEY_PROSTITUTE = new DialogueNode("Prostitute", "You run into someone who's selling their body.", true) {

		@Override
		public String getLabel(){
			return "Prostitute";
		}

		@Override
		public String getContent() {

			UtilText.nodeContentSB.setLength(0);

			// You've encountered them before:
			if(getProstitute().getLastTimeEncountered() != -1) {

				if(isCanal()) {
					UtilText.nodeContentSB.append(
							"
"
								+ "You find yourself wandering down the path that runs alongside Dominion's canal, staying alert for any sign of trouble."
								+ " Up ahead, you suddenly spot the familiar figure of [npc.name], [npc.a_fullRace(true)], leaning back against a brick wall."
							+ "
");

				} else {
					UtilText.nodeContentSB.append(
							"
"
								+ "You find yourself wandering down yet another of Dominion's dark, isolated alleyways, staying alert for any sign of trouble."
								+ " Reaching a turn in your path, you step around the corner to see a rare sign of life, taking the form of the familiar figure of [npc.name], [npc.a_fullRace(true)], leaning back against one wall."
							+ "
");
				}

				if(getProstitute().getFoughtPlayerCount()>0) { // You've fought them before, so they're a little scared:
					if(getProstitute().isVisiblyPregnant()){ // Pregnant encounters:
						if(!getProstitute().isCharacterReactedToPregnancy(Main.game.getPlayer())) {
							UtilText.nodeContentSB.append(
									"
"
										+ "Instantly, your eyes are drawn down to the clearly-visible bump in [npc.her] stomach, and as [npc.name] looks across at you, [npc.she] lets out a shocked gasp."
										+ UtilText.returnStringAtRandom(
												"[npc.speech(Oh, it's you again... There's no need for violence this time, ok? Look! You knocked me up!)]",
												"[npc.speech(Oh, hi again... There's no need for violence, ok? Look what you did! I'm carrying your kids!)]",
												"[npc.speech(Hey again... We don't need to fight this time, ok? Anyway, look, you managed to knock me up!)]")
									+ "
"
									+ "
"
										+ "[pc.speech(How can you be sure that it's mine?)]"
										+ " you ask, concerned over the possibility that [npc.namePos] pregnant by another of [npc.her] clients."
									+ "
"
									+ "
"
										+ "[npc.speech(Well, it's kind of hard getting business around here, you know."
											+ " You're the only one who... used me... around the time I could have got knocked up, so, unless it's some crazy kind of arcane spell, yeah... it's yours.)]"
									+ "
"
									+ "
"
										+ "You step up to [npc.name], allowing [npc.her] to take hold of your [pc.hands] and hesitantly guide them down to stroke [npc.her] swollen bump."
										+ " [npc.She] lets out a nervous little laugh, clearly worried that you're going to attack [npc.herHim] again, before biting [npc.her] [npc.lip] and batting [npc.her] eyelids at you."
										+ " [npc.speech(So, you wanna fuck a pregnant "+(getProstitute().isFeminine()?"chick":"dude")+"? I'll even give you a discount; twenty percent off for the father of our kids!)]"
									+ "
");
						} else {
							UtilText.nodeContentSB.append(
									"
"
										+ "Instantly, your eyes are drawn down to the still-visible bump in [npc.her] stomach, and as [npc.name] looks across at you, [npc.she] lets out a shocked gasp."
										+ UtilText.returnStringAtRandom(
												"[npc.speech(Oh, it's you again... There's no need for violence this time, ok? I'm still waiting for our kids to pop out!)]",
												"[npc.speech(Oh, hi again... There's no need for violence, ok? Take a look, I'm still carrying your kids!)]",
												"[npc.speech(Hey again... We don't need to fight this time, ok? These kids of ours sure do take a while to grow!)]")
									+ "
"
									+ "
"
										+ "You walk up to [npc.name], once again allowing [npc.her] to take hold of your [pc.hands] and gingerly guide them down to stroke [npc.her] swollen bump."
										+ " [npc.She] lets out hesitant laugh, before biting [npc.her] [npc.lip] and batting [npc.her] eyelids at you."
										+ " [npc.speech(So, you wanna fuck a pregnant "+(getProstitute().isFeminine()?"chick":"dude")+"? I'll even give you a discount; twenty percent off for the father of our kids!)]"
									+ "
");
						}

					} else {
						UtilText.nodeContentSB.append("
"
									+ "Looking over at you, [npc.she] smiles and steps back, clearly nervous about what your intentions are, "
									+ UtilText.returnStringAtRandom(
											"[npc.speech(Oh, it's you again... There's no need for violence this time, ok? You lookin' for a good time?)]",
											"[npc.speech(Oh, hi again... There's no need for violence, ok? You want a good time?)]",
											"[npc.speech(Hey again... We don't need to fight this time, ok? I can show you a real good time!)]")
								+"
"
								+ "
"
									+ "From [npc.her] slutty clothing, the heavy amount of makeup on [npc.her] face, and, of course, [npc.her] reaction upon seeing you, it's quite obvious that [npc.sheIs] still working as a prostitute."
									+ " You've seen plenty of other hookers offering their services out in the main streets of Dominion, and you wonder why this particular one would be hiding so far away from the safety of those areas."
									+ " You assume that [npc.she] must have run afoul of the law, for there's no other reason to be working in a place as dangerous and client-starved as these alleyways."
								+ "
"
								+ "
"
									+ "As you're wondering how to react, the [npc.race] whines,"
									+ " [npc.speech(Come on! Only "+Util.intToString(prostitutePrice())+" flames, and [npc.namePos] all yours!)]"
								+ "
");
					}
				} else {
					if(getProstitute().isVisiblyPregnant()){ // Pregnant encounters:
						if(!getProstitute().isCharacterReactedToPregnancy(Main.game.getPlayer())) {
							UtilText.nodeContentSB.append(
									"
"
										+ "Instantly, your eyes are drawn down to the clearly-visible bump in [npc.her] stomach, and as [npc.name] looks across at you, [npc.she] lets out a little laugh."
										+ UtilText.returnStringAtRandom(
												"[npc.speech(Yeah, that's right, hot stuff! You knocked me up!)]",
												"[npc.speech(Hey again, babe! Look what you did! I'm carrying your kids!)]",
												"[npc.speech(Hey again, good lookin'! Check it out! You managed to knock me up!)]")
									+ "
"
									+ "
"
										+ "[pc.speech(How can you be sure that it's mine?)]"
										+ " you ask, concerned over the possibility that [npc.namePos] pregnant by another of [npc.her] clients."
									+ "
"
									+ "
"
										+ "[npc.speech(Well, it's kind of hard getting business around here, you know."
											+ " You're the only one I slept with around the time I could have got knocked up, so, unless it's some crazy kind of arcane spell, yeah... it's yours.)]"
									+ "
"
									+ "
"
										+ "You step up to [npc.name], allowing [npc.her] to take hold of your [pc.hands] and guide them down to stroke [npc.her] swollen bump."
										+ " [npc.She] lets out another little laugh, before biting [npc.her] [npc.lip] and batting [npc.her] eyelids at you."
										+ " [npc.speech(So, you wanna fuck a pregnant "+(getProstitute().isFeminine()?"chick":"dude")+"? I'll even give you a discount; twenty percent off for the father of our kids!)]"
									+ "
");
						} else {
							UtilText.nodeContentSB.append(
									"
"
										+ "Instantly, your eyes are drawn down to the still-visible bump in [npc.her] stomach, and as [npc.name] looks across at you, [npc.she] lets out a little laugh."
										+ UtilText.returnStringAtRandom(
												"[npc.speech(Yeah, that's right, hot stuff! I'm still waiting for them to pop out!)]",
												"[npc.speech(Hey again, babe! Yeah, that's right, I'm still carrying your kids!)]",
												"[npc.speech(Hey again, good lookin'! These kids of ours sure do take a while to grow!)]")
									+ "
"
									+ "
"
										+ "You walk up to [npc.name], once again allowing [npc.her] to take hold of your [pc.hands] and guide them down to stroke [npc.her] swollen bump."
										+ " [npc.She] lets out another little laugh, before biting [npc.her] [npc.lip] and batting [npc.her] eyelids at you,"
										+ " [npc.speech(So, you wanna fuck a pregnant "+(getProstitute().isFeminine()?"chick":"dude")+"? I'll even give you a discount; twenty percent off for the father of our kids!)]"
									+ "
");
						}

					} else {
						UtilText.nodeContentSB.append("
"
									+ "Looking over at you, [npc.she] smiles and steps forwards, blocking your way. "
									+ UtilText.returnStringAtRandom(
											"[npc.speech(Hey again, hot stuff! You lookin' for a good time?)]",
											"[npc.speech(Hey again, babe! You want a good time?)]",
											"[npc.speech(Hey again, good lookin'! I can show you a real good time!)]")
								+"
"
								+ "
"
									+ "From [npc.her] slutty clothing, the heavy amount of makeup on [npc.her] face, and, of course, [npc.her] reaction upon seeing you, it's quite obvious that [npc.sheIs] still working as a prostitute."
									+ " You've seen plenty of other hookers offering their services out in the main streets of Dominion, and you wonder why this particular one would be hiding so far away from the safety of those areas."
									+ " You assume that [npc.she] must have run afoul of the law, for there's no other reason to be working in a place as dangerous and client-starved as these alleyways."
								+ "
"
								+ "
"
									+ "As you're wondering how to react, the [npc.race] whines,"
									+ " [npc.speech(Come on! Only "+Util.intToString(prostitutePrice())+" flames, and [npc.namePos] all yours!)]"
								+ "
");
					}
				}

			} else {

				if(isCanal()) {
					UtilText.nodeContentSB.append(
							"
"
								+ "You find yourself wandering down the path that runs alongside Dominion's canal, staying alert for any sign of trouble."
								+ " Up ahead, you suddenly spot a rare sign of life, taking the form of [npc.a_fullRace(true)], leaning back against a brick wall."
							+ "
");

				} else {
					UtilText.nodeContentSB.append(
							"
"
								+ "You find yourself wandering down yet another of Dominion's dark, isolated alleyways, staying alert for any sign of trouble."
								+ " Reaching a turn in your path, you step around the corner to see a rare sign of life, taking the form of [npc.a_fullRace(true)], leaning back against one wall."
							+ "
");
				}

				UtilText.nodeContentSB.append("
"
						+ "Looking over at you, [npc.she] smiles and steps forwards, blocking your way. "
						+ UtilText.returnStringAtRandom(
								"[npc.speech(Hey, hot stuff! You lookin' for a good time?)]",
								"[npc.speech(Hey, babe! You want a good time?)]",
								"[npc.speech(Hey, good lookin'! I can show you a real good time!)]")
					+"
"
					+ "
"
						+ "From [npc.her] slutty clothing, the heavy amount of makeup on [npc.her] face, and, of course, [npc.her] reaction upon seeing you, it's quite obvious that [npc.sheIs] a prostitute."
						+ " You've seen plenty of other hookers offering their services out in the main streets of Dominion, and you wonder why this particular one would be hiding so far away from the safety of those areas."
						+ " You assume that [npc.she] must have run afoul of the law, for there's no other reason to be working in a place as dangerous and client-starved as these alleyways."
					+ "
"
					+ "
"
						+ "As you're wondering what to make of [npc.herHim], the [npc.race] whines,"
						+ " [npc.speech(Come on! Only "+Util.intToString(prostitutePrice())+" flames, and [npc.namePos] all yours!)]"
					+ "
");
			}

			return UtilText.nodeContentSB.toString();
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new Response("Leave", "You're not at all interested in having sex with a prostitute. Walk around [npc.herHim] and continue on your way.", Main.game.getDefaultDialogueNoEncounter()) {
					@Override
					public void effects() {
						if(getProstitute().isVisiblyPregnant()){
							getProstitute().setCharacterReactedToPregnancy(Main.game.getPlayer(), true);
						}
						Main.game.getTextStartStringBuilder().append(
								"
"
									+ "[pc.speech(I'm not interested,)] you say, stepping around [npc.name] and continuing on your way."
								+ "
"
								+ "
"
									+ "As you walk off, [npc.she] calls out after you,"
									+ " [npc.speech(Come back if you ever want the best fuck of your life! Oh, and tell your friends too!)]"
								+ "
");
					}
				};

			} else if (index == 2) {
				int cost = prostitutePrice();

				if(Main.game.getPlayer().getMoney()<cost) {
					return new Response("Dominant Sex ("+UtilText.formatAsMoney(cost, "span")+")", "You don't have "+cost+" flames, so you can't afford a good time with [npc.name].", null);

				} else {
					return new ResponseSex("Dominant Sex ("+UtilText.formatAsMoney(cost, "span")+")",
							"Pay [npc.name] "+cost+" flames to have a good time with [npc.herHim].",
							true, false,
							new SMGeneric(
									Util.newArrayListOfValues(Main.game.getPlayer()),
									Util.newArrayListOfValues(getProstitute()),
							null,
							null) {
								public SexPace getStartingSexPaceModifier(GameCharacter character) {
									if(!character.isPlayer()) {
										return SexPace.SUB_NORMAL;
									}
									return super.getStartingSexPaceModifier(character);
								}
							},
							AFTER_SEX_PAID,
							"
"
									+ "[pc.speech(Sure, I could do with having a good time,)]"
									+ " you reply, handing over "+cost+" flames to the [npc.race]."
								+ "
"
								+ "
"
									+ "[npc.speech(~Mmm~ You've got me for an hour,)]"
									+ " [npc.name] [npc.moans]."
									+ " [npc.speech(Follow me!)]"
								+ "
"
								+ (isCanal()
										?"
"
											+ "Leading you a little way down the canal, [npc.name] suddenly turns off the path, crossing a small clearing as [npc.she] leads you over to a nondescript doorway."
											+ " Producing a key from [npc.her] bag, the [npc.race] reaches towards the lock, and, after a twist and a shove, opens the door."
											+ " Motioning for you to follow [npc.herHim] in, [npc.name] then steps inside."
											+ " Trailing in [npc.her] footsteps, you enter the [npc.race]'s apartment, and find yourself pleasantly surprised by the clean, well-lit interior."
										+ "
"
										:"
"
											+ "Producing a key from [npc.her] bag, the [npc.race] turns around, before unlocking a nondescript door behind [npc.herHim]."
											+ " Opening the door and motioning for you to follow [npc.herHim] in, [npc.name] steps inside."
											+ " Trailing in [npc.her] footsteps, you enter the [npc.race]'s apartment, and find yourself pleasantly surprised by the clean, well-lit interior."
										+ "
")
								+ "
"
									+ "Closing the door behind you, [npc.name] then leads you into [npc.her] bedroom, where [npc.she] turns around and grins at you."
									+ " [npc.speech(Let's get this party started!)]"
								+ "
") {
						@Override
						public void effects() {
							if(getProstitute().isVisiblyPregnant()){
								getProstitute().setCharacterReactedToPregnancy(Main.game.getPlayer(), true);
							}
							Main.game.getPlayer().incrementMoney(-cost);
						}
					};
				}

			} else if (index == 3) {
				int cost = prostitutePrice();

				if(Main.game.getPlayer().getMoney()<cost) {
					return new Response("Submissive Sex ("+UtilText.formatAsMoney(cost, "span")+")", "You don't have "+cost+" flames, so you can't afford a good time with [npc.name].", null);

				} else {
					return new ResponseSex("Submissive Sex ("+UtilText.formatAsMoney(cost, "span")+")",
							"Pay [npc.name] "+cost+" flames to have a good time with [npc.herHim].",
							true, true,
							new SMGeneric(
									Util.newArrayListOfValues(getProstitute()),
									Util.newArrayListOfValues(Main.game.getPlayer()),
							null,
							null) {
								public SexPace getStartingSexPaceModifier(GameCharacter character) {
									if(!character.isPlayer()) {
										return SexPace.DOM_NORMAL;
									}
									return super.getStartingSexPaceModifier(character);
								}
							},
							AFTER_SEX_PAID,
							"
"
								+ "[pc.speech(Sure, I could do with having a good time,)]"
								+ " you reply,"
								+ " [pc.speech(but only if you're on top...)]"
							+ "
"
							+ "
"
								+ "[npc.speech(~Mmm~ Don't you worry, sweet thing, I can take charge,)]"
								+ " [npc.name] [npc.moans], stepping up to you and taking the "+cost+" flames from your [pc.hand]."
								+ " [npc.speech(Follow me!)]"
							+ "
"
							+ "
"
							+ (isCanal()
									?"
"
										+ "Leading you a little way down the canal, [npc.name] suddenly turns off the path, crossing a small clearing as [npc.she] leads you over to a nondescript doorway."
										+ " Producing a key from [npc.her] bag, the [npc.race] reaches towards the lock, and, after a twist and a shove, opens the door."
										+ " Motioning for you to follow [npc.herHim] in, [npc.name] then steps inside."
										+ " Trailing in [npc.her] footsteps, you enter the [npc.race]'s apartment, and find yourself pleasantly surprised by the clean, well-lit interior."
									+ "
"
									:"
"
										+ "Producing a key from [npc.her] bag, the [npc.race] turns around, before unlocking a nondescript door behind [npc.herHim]."
										+ " Opening the door and motioning for you to follow [npc.herHim] in, [npc.name] steps inside."
										+ " Trailing in [npc.her] footsteps, you enter the [npc.race]'s apartment, and find yourself pleasantly surprised by the clean, well-lit interior."
									+ "
")
							+ "
"
							+ "
"
								+ "Closing the door behind you, [npc.name] then leads you into [npc.her] bedroom, where [npc.she] turns around and grins at you."
								+ " [npc.speech(Let's get this party started!)]"
							+ "
") {
						@Override
						public void effects() {
							if(getProstitute().isVisiblyPregnant()){
								getProstitute().setCharacterReactedToPregnancy(Main.game.getPlayer(), true);
							}
							Main.game.getPlayer().incrementMoney(-cost);
						}
					};
				}

			} else if (index == 4) {
				return new Response("Attack",
						"If you really wanted to, there's nothing stopping you from attacking [npc.name]. After all, if [npc.sheIs] run afoul of the law, as you assume [npc.she] has, then [npc.sheIs] fair game!",
						ALLEY_PROSTITUTE_FIGHT) {
					@Override
					public void effects() {
						if(getProstitute().isVisiblyPregnant()){
							getProstitute().setCharacterReactedToPregnancy(Main.game.getPlayer(), true);
						}
					}
					@Override
					public boolean isCombatHighlight() {
						return true;
					}
				};

			} else if (index == 5 && Main.game.getDialogueFlags().hasFlag(DialogueFlagValue.prostitutionLicenseObtained)) {
				if(RedLightDistrict.isSpaceForMoreProstitutes()) {
					return new Response("Angel's Kiss", "Offer [npc.name] a job at Angel's Kiss.", ALLEY_PROSTITUTE_SAVED) {
						@Override
						public void effects() {
							if(getProstitute().isVisiblyPregnant()){
								getProstitute().setCharacterReactedToPregnancy(Main.game.getPlayer(), true);
							}
							Main.game.getPlayer().incrementKarma(25);
							getProstitute().setDescription(UtilText.parse(getProstitute(), "You first found [npc.name] in the alleyways of Dominion, where [npc.she] was illegally selling [npc.her] body."
									+ " You offered [npc.herHim] the chance to move and work out of Angel's Kiss; an offer that [npc.she] happily accepted."));
							Main.game.getTextEndStringBuilder().append(getProstitute().incrementAffection(Main.game.getPlayer(), 50));
							getProstitute().setRandomUnoccupiedLocation(WorldType.ANGELS_KISS_GROUND_FLOOR, PlaceType.ANGELS_KISS_BEDROOM, true);
						}
					};

				} else {
					return new Response("Angel's Kiss", "There's no room available at Angel's Kiss for another prostitute...", null);
				}

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ALLEY_PROSTITUTE_SAVED = new DialogueNode("", "", true, true) {

		@Override
		public String getContent() {
			return "
"
						+ "Knowing that if your suspicions are correct, [npc.name] may act in an unpredictable manner, you try to look as non-threatening as possible as you ask,"
						+ " [pc.speech(You're working out of these alleyways illegally, aren't you? If you had a prostitution license, you'd be out on the streets, or working out of a brothel in the red-light district.)]"
					+ "
"
					+ "
"
						+ "A look of panic quickly flashes over [npc.namePos] face, and [npc.she] cries out,"
						+ " [npc.speech(N-No, I-I just like working back here, t-that's all!)]"
					+ "
"
					+ "
"
						+ "[pc.speech(You can relax,)]"
						+ " you say,"
						+ " [pc.speech(I'm not with the Enforcers or anything."
						+ " I'm only asking because if that's the truth, then I can offer you some help."
						+ " There's a large brothel in the middle of the red-light district, called 'Angel's Kiss', and I have an offer for you from the owner."
						+ " She's in desperate need of prostitutes to come and work for her, and would be willing to provide you with a safe place to work out of.)]"
					+ "
"
					+ "
"
						+ "[npc.NamePos] [npc.eyes] light up as you say this, and [npc.she] gasps,"
						+ " [npc.speech(R-Really?! Y-You're not tricking me or anything? I can... I can finally escape these alleyways?!)]"
					+ "
"
					+ "
"
						+ "[pc.speech(What would I have to gain from tricking you like that? I'm telling the truth,)]"
						+ " you continue,"
						+ " [pc.speech(so if you're interested, just make your way over there and ask for 'Angel'. Tell her that [pc.name] sent you to come and work for her.)]"
					+ "
"
					+ "
"
						+ "With tears in [npc.her] eyes, [npc.name] accepts your offer."
						+ " [npc.speech(Thank you, thank you so much! I can't really... That is, I'm so grateful... I-I don't know what to say...)]"
					+ "
"
					+ "
"
						+ "[pc.speech(Don't worry about saying anything, and you're welcome,)]"
						+ " you say, smiling at [npc.name]."
					+ "
"
					+ "
"
						+ "Quickly grabbing [npc.her] things, [npc.name] hurries off in the direction of the red-light district, and you prepare to carry on your way, happy with the fact that you've helped [npc.name] to escape these dangerous alleyways."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new Response("Continue", "Continue on your way through Dominion's alleyways...", Main.game.getDefaultDialogueNoEncounter());

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ALLEY_PROSTITUTE_FIGHT = new DialogueNode("", "", true, true) {

		@Override
		public String getContent() {
				return "
"
							+ "Grinning at the [npc.race], you look into [npc.her] [npc.eyes] and question [npc.herHim],"
							+ " [pc.speech(So, why don't you work out in the streets like all the other prostitutes?)]"
						+ "
"
						+ "
"
							+ "A look of worry flashes across [npc.namePos] face, and [npc.she] takes a step back, clearly afraid of your intentions."
							+ " [npc.speech(I-I just prefer it back here! There's no other reason!)]"
						+ "
"
						+ "
"
							+ "You laugh at the obvious lie."
							+ " [pc.speech(I don't think so! You're wanted by the Enforcers, aren't you? I wonder what punishment they've got in store for you?)]"
						+ "
"
						+ "
"
							+ "Realising that [npc.sheIs] been caught, [npc.namePos] expression quickly turns into one of anger, and [npc.she] launches [npc.herself] at you in a blind fury."
							+ " [npc.speech(I'll never be a slave! Fuck you!)]"
						+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new ResponseCombat("Fight", "[npc.Name] is determined not to be caught, leaving you with no choice but to defend yourself!", getProstitute());

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode AFTER_COMBAT_VICTORY = new DialogueNode("Victory", "", true) {

		@Override
		public String getDescription() {
			return "You have defeated [npc.name]!";
		}

		@Override
		public String getContent() {
			return UtilText.parse(getProstitute(),
					"
"
						+ "[npc.Name] collapses to the floor, completely defeated."
						+ " [npc.She] looks up at you, and you see that there's a desperate, wild look in [npc.her] [npc.eyes]."
						+ " Making a pitiful little whining noise, [npc.she] begs,"
						+ " [npc.speech(Do what you want with me! Just, please, I don't want to be a slave! Don't hand me over to the Enforcers!)]"
					+ "
"
					+ "
"
						+ "Despite the awful situation that [npc.she] finds [npc.herself] in, it appears as though your powerful arcane aura is having a strong effect on [npc.name]."
						+ " Even as [npc.she] begs for you to have mercy, you see [npc.herHim] glance down hungrily at your body."
						+ " Seemingly unaware of what [npc.sheIs] doing, [npc.her] [npc.hands] suddenly drop down between [npc.her] [npc.legs], and [npc.she] lets out [npc.a_moan+] as [npc.she] starts touching [npc.herself]."
					+ "
"
					+ "
"
						+ "Now that you've revealed [npc.namePos] status as a fugitive from the law, you realise that this will be the last time you ever see [npc.herHim], as [npc.sheIs] sure to move on once you leave."
					+ "
");
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new Response("Leave", "Leave [npc.name] and carry on your way. [npc.Name] will disappear from this area!", Main.game.getDefaultDialogueNoEncounter()){
					@Override
					public void effects() {
						Main.game.banishNPC(getProstitute());
					}
				};

			} else if (index == 2) {
				return new ResponseSex("Have some fun",
						"It's clear that [npc.she] wants you. Have some fun with [npc.name].",
						true, false,
						new SMGeneric(
								Util.newArrayListOfValues(Main.game.getPlayer()),
								Util.newArrayListOfValues(getProstitute()),
						null,
						null),
						AFTER_SEX_VICTORY,
						"");

			} else if (index == 3) {
				return new ResponseSex("Gentle fun",
						"It's clear that [npc.she] wants you. Have some fun with [npc.name]. (Start the sex scene in the 'gentle' pace.)",
						true, false,
						new SMGeneric(
								Util.newArrayListOfValues(Main.game.getPlayer()),
								Util.newArrayListOfValues(getProstitute()),
								null, null,
								ResponseTag.START_PACE_PLAYER_DOM_GENTLE),
						AFTER_SEX_VICTORY,
						"");

			} else if (index == 4) {
				return new ResponseSex("Rough fun",
						"It's clear that [npc.she] wants you. Have some fun with [npc.name]. (Start the sex scene in the 'rough' pace.)",
						true, false,
						new SMGeneric(
								Util.newArrayListOfValues(Main.game.getPlayer()),
								Util.newArrayListOfValues(getProstitute()),
								null, null,
								ResponseTag.START_PACE_PLAYER_DOM_ROUGH),
						AFTER_SEX_VICTORY,
						"");

			} else if (index == 5) {
				return new ResponseSex("Submit",
						"You're not really sure what to do now...
"
							+ "Perhaps it would be best to let [npc.name] choose what to do next?",
						Util.newArrayListOfValues(Fetish.FETISH_SUBMISSIVE), null, CorruptionLevel.THREE_DIRTY, null, null, null,
						false, false,
						new SMGeneric(
								Util.newArrayListOfValues(getProstitute()),
								Util.newArrayListOfValues(Main.game.getPlayer()),
						null,
						null),
						AFTER_SEX_DEFEAT,
						"
"
							+ "You really aren't sure what to do next, and start to feel pretty uncomfortable with the fact that you just beat up this poor [npc.race]."
							+ " Leaning down, you do the first thing that comes into your mind, and start apologising,"
							+ " [pc.speech(Sorry... I don't know what I was thinking... Erm... Is there anything I can do to make it up to you?)]"
						+ "
"
						+ "
"
							+ "For a moment, a look of confusion crosses over [npc.namePos] face, but as [npc.she] sees that you're genuinely troubled by what you've just done, an evil grin crosses [npc.her] face."
							+ " Consumed by [npc.her] lust that's being brought about due to your powerful arcane aura, [npc.she] stands up, and, grabbing you by the [pc.arm], roughly pulls you into [npc.her] as [npc.she] growls,"
							+ " [npc.speech(How about you start by apologising properly?!)]"
						+ "
"
						+ "
"
							+ "[npc.NamePos] strong, dominant grip on your [pc.arm] causes you to let out a lewd little moan, and your submissive nature takes over as you do as [npc.she] asks."
							+ " [pc.speech(I'm really sorry! Please forgive me! I'll do anything! Anything you ask! Just please, don't be mad!)]"
						+ "
"
						+ "
"
							+ "[npc.Name] roughly yanks you forwards, and with a menacing growl, [npc.she] forces [npc.her] tongue into your mouth."
							+ " You let out a muffled yelp as your opponent takes charge, but as you feel [npc.her] [npc.hands] reaching down to start roughly groping your ass,"
								+ " you realise that you couldn't be happier with how things have turned out..."
						+ "
");

			} else if (index == 6) {
				return new ResponseEffectsOnly("Inventory", "Now that you've defeated [npc.name], there's nothing stopping you from helping yourself to [npc.her] clothing and items..."){
					@Override
					public void effects() {
						Main.mainController.openInventory(getProstitute(), InventoryInteraction.FULL_MANAGEMENT);
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode AFTER_COMBAT_DEFEAT = new DialogueNode("Defeat", "", true) {

		@Override
		public String getDescription() {
			return "You have been defeated by [npc.name]!";
		}

		@Override
		public String getContent() {
			if(getProstitute().isAttractedTo(Main.game.getPlayer()) && getProstitute().isWillingToRape()) {
				return UtilText.parse(getProstitute(),
						"
"
							+ "You can't carry on fighting any more, and you feel your [pc.legs] giving out beneath you as you collapse to the ground, defeated."
							+ " A mocking laugh causes you to look up, and you see [npc.name] grinning down at you."
						+ "
"
						+ "
"
							+ "[npc.speech(Hah! That was too easy!)] [npc.she] says, before leaning down to grab one of your [pc.arms]."
							+ " Pulling you to your feet, [npc.name] pushes you against a nearby wall, before growling,"
							+ " [npc.speech(Looks like I'll be having to move on again now. I'm not sticking around for your little Enforcer friends to show up and arrest me!"
							+ " But before I go, I think I'll teach you a lesson not to fuck around with strangers!)]"
						+ "
"
						+ "
"
							+ "Now that you've revealed [npc.namePos] status as a fugitive from the law, you realise that this will be the last time you ever see [npc.herHim], as [npc.sheIs] sure to move on once [npc.sheHas] had [npc.her] fun with you."
						+ "
");
			} else {
				return UtilText.parse(getProstitute(),
						"
"
							+ "You can't carry on fighting any more, and you feel your [pc.legs] giving out beneath you as you collapse to the ground, defeated."
							+ " A mocking laugh causes you to look up, and you see [npc.name] grinning down at you."
						+ "
"
						+ "
"
							+ "[npc.speech(Hah! That was too easy!)] [npc.she] says, before leaning down to grab one of your [pc.arms]."
						+ "
"
						+ "
"
							+ "Pulling you to your feet, [npc.name] pushes you against a nearby wall, before demanding that you hand over your money."
							+ " Reluctantly, you do as [npc.she] says, and, after giving [npc.herHim] some of your cash, [npc.she] roughly pushes you to the floor once more."
						+ "
"
						+ "
"
							+ "[npc.speech(Looks like I'll be having to move on again now. I'm not sticking around for your little Enforcer friends to show up and arrest me!)] [npc.she] growls down at you, before turning around and running off."
						+ "
"
						+ "
"
							+ "Now that you've revealed [npc.namePos] status as a fugitive from the law, you realise that this was the last time you'll ever see [npc.herHim]."
						+ "
");
			}
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(getProstitute().isAttractedTo(Main.game.getPlayer()) && getProstitute().isWillingToRape()) {
				if (index == 1) {
					return new ResponseSex("Sex",
							"[npc.Name] forces [npc.herself] on you...",
							false, false,
							new SMGeneric(
									Util.newArrayListOfValues(getProstitute()),
									Util.newArrayListOfValues(Main.game.getPlayer()),
							null,
							null), AFTER_SEX_DEFEAT, "
"
								+ "[npc.NamePos] [npc.arms] wrap around your back, and [npc.she] continues passionately making out with you for a few moments, before finally pulling away."
								+ " Giving you an evil grin, [npc.she] hungrily licks [npc.her] [npc.lips], and you realise that [npc.sheIs] probably not going to be content with just a kiss..."
							+ "
");

				} else if (index == 2) {
					return new ResponseSex("Eager Sex",
							"[npc.Name] forces [npc.herself] on you...",
							false, false,
							new SMGeneric(
									Util.newArrayListOfValues(getProstitute()),
									Util.newArrayListOfValues(Main.game.getPlayer()),
									null,
									null,
									ResponseTag.START_PACE_PLAYER_SUB_EAGER),
							AFTER_SEX_DEFEAT,
							"
"
								+ "[npc.NamePos] [npc.arms] wrap around your back, and you eagerly lean into [npc.herHim], passionately returning [npc.her] kiss for a few moments, before [npc.she] breaks away from you."
								+ " Giving you an evil grin, [npc.she] hungrily licks [npc.her] [npc.lips], and you feel a rush of excitement as you realise that [npc.sheIs] going to want more than just a kiss..."
							+ "
");

				} else if (index == 3 && Main.game.isNonConEnabled()) {
					return new ResponseSex("Resist Sex",
							"[npc.Name] forces [npc.herself] on you...",
							false, false,
							new SMGeneric(
									Util.newArrayListOfValues(getProstitute()),
									Util.newArrayListOfValues(Main.game.getPlayer()),
									null,
									null,
									ResponseTag.START_PACE_PLAYER_SUB_RESISTING),
							AFTER_SEX_DEFEAT,
							"
"
								+ "[npc.NamePos] [npc.arms] wrap around your back, and you let out a distressed cry as [npc.she] pulls you into a forceful kiss."
								+ " Summoning the last of your strength, you desperately try to push [npc.herHim] away, pleading for [npc.herHim] to stop."
								+ " Giving you an evil grin, [npc.she] ignores your protests, and as you see [npc.herHim] hungrily licking [npc.her] [npc.lips], you realise that [npc.sheIs] not going to let you go..."
							+ "
");

				} else {
					return null;
				}

			} else {
				if (index == 1) {
					return new Response("Continue", "Carry on your way.", AFTER_COMBAT_DEFEAT){
						@Override
						public DialogueNode getNextDialogue() {
							return Main.game.getDefaultDialogueNoEncounter();
						}
					};

				} else {
					return null;
				}
			}
		}
	};

	public static final DialogueNode AFTER_SEX_PAID = new DialogueNode("Step back", "", true) {

		@Override
		public String getDescription(){
			return "Now that you've had your fun, you can step back and leave [npc.name] to recover.";
		}

		@Override
		public String getContent() {
			if(Sex.getNumberOfOrgasms(getProstitute()) >= getProstitute().getOrgasmsBeforeSatisfied()) {
				return UtilText.parse(getProstitute(),
						"
"
							+ "As you step back from [npc.name], [npc.she] sinks back onto [npc.her] bed, totally worn out from [npc.her] orgasm"+(Sex.getNumberOfOrgasms(getProstitute()) > 1?"s":"")+"."
							+ " Looking up at you, a satisfied smile settles across [npc.her] face, and [npc.she] sighs,"
							+ " [npc.speech(Damn, you're good! It looks like I've got a new favourite customer! Please come back again soon!)]"
						+ "
");
			} else {
				return UtilText.parse(getProstitute(),
						"
"
							+ "As you step back from [npc.name], [npc.she] sinks back onto [npc.her] bed, letting out a deep sigh as [npc.she] realises that you've finished."
							+ " Looking up at you, a tired smile settles across [npc.her] face, and [npc.she] sighs,"
							+ " [npc.speech(I hope you had a good time! Be sure to come back again soon!)]"
						+ "
");
			}
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new Response("Continue", "Carry on your way.", Main.game.getDefaultDialogueNoEncounter()){
					@Override
					public void effects() {
						Main.game.getTextStartStringBuilder().append(
								"
"
									+ "You grin down at the panting [npc.race], taking one last look at [npc.her] well-used body, before turning around and heading out of [npc.her] apartment."
									+ " Satisfied that you got your money's worth, you head back out into the alleyways, ready to continue on your journey."
								+ "
");
					}
				};

			} if (index == 2) {
				return new Response("Attack", "If you really wanted to, there's nothing stopping you from attacking [npc.name]. After all, if [npc.sheIs] run afoul of the law, as you assume [npc.she] has, then [npc.sheIs] fair game!", AFTER_SEX_PAID_FIGHT) {
					@Override
					public boolean isCombatHighlight() {
						return true;
					}
				};

			} else if (index == 10) {
				if(Main.game.getPlayer().getMoney()<5000) {
					return new Response("Remove character ("+UtilText.formatAsMoney(5000, "span")+")", "You don't have 5000 flames, so you can't afford to pay [npc.name] to leave this area.", null);
				} else {
					return new Response(
							"Remove character ("+UtilText.formatAsMoney(5000, "span")+")",
							"Give [npc.name] enough money to pay off the Enforcers who are after [npc.herHim], which would allow [npc.her] to stop having to work in these dangerous alleyways."
									+ " This will permanently remove [npc.herHim] from the game.",
							AFTER_SEX_PAID_PAY_THEM_TO_LEAVE) {
						@Override
						public void effects() {
							Main.game.getPlayer().incrementMoney(-5000);
						}
					};
				}

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode AFTER_SEX_PAID_FIGHT = new DialogueNode("", "", true, true) {

		@Override
		public String getContent() {
				return "
"
							+ "Grinning down at the panting [npc.race], you take a step forwards."
							+ " [pc.speech(So, why don't you work out in the streets like all the other prostitutes?)]"
						+ "
"
						+ "
"
							+ "A look of worry flashes across [npc.namePos] face, and [npc.she] shuffles back on the bed, clearly afraid of your intentions."
							+ " [npc.speech(I-I just prefer it back here! There's no other reason!)]"
						+ "
"
						+ "
"
							+ "You laugh at the obvious lie."
							+ " [pc.speech(I don't think so! You're wanted by the Enforcers, aren't you? I wonder what punishment they've got in store for you?)]"
						+ "
"
						+ "
"
							+ "Realising that [npc.sheIs] been caught, [npc.namePos] expression quickly turns into one of anger, and [npc.she] launches [npc.herself] at you in a blind fury."
							+ " [npc.speech(I'll never be a slave! Fuck you!)]"
						+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new ResponseCombat("Defend yourself", "[npc.Name] is determined not to be caught, leaving you with no choice but to defend yourself!", getProstitute());

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode AFTER_SEX_PAID_PAY_THEM_TO_LEAVE = new DialogueNode("", "", true, true) {

		@Override
		public String getContent() {
				return "
"
							+ "Looking down at the panting [npc.race], you ask [npc.herHim] the question at the forefront of your mind,"
							+ " [pc.speech(So, why don't you work out in the streets like all the other prostitutes?)]"
						+ "
"
						+ "
"
							+ "A look of worry flashes across [npc.namePos] face, and [npc.she] shuffles back on the bed, clearly afraid of your intentions."
							+ " [npc.speech(I-I just prefer it back here! There's no other reason!)]"
						+ "
"
						+ "
"
							+ "You let out a sigh at the obvious lie."
							+ " [pc.speech(You're wanted by the Enforcers, aren't you?)]"
						+ "
"
						+ "
"
							+ "[npc.Name] lets out a panicked gasp, proving your assumption correct."
							+ " Before [npc.she] can say anything in response, you continue,"
							+ " [pc.speech(What would it take to get them off your back? I want to help.)]"
						+ "
"
						+ "
"
							+ "[npc.speech(I must be crazy to be telling you this...)]"
							+ " [npc.name] starts, but despite the hesitation in [npc.her] voice, [npc.she] lets out a sigh and continues,"
							+ " [npc.speech(I owe someone very powerful almost five-thousand flames, and they've got the Enforcers to brand me as a criminal until I can pay up...)]"
						+ "
"
						+ "
"
							+ "Not wanting to leave [npc.herHim] trapped in such a horrible situation, you step forwards and hand the [npc.race] a bag of money."
							+ " [pc.speech(There's five-thousand flames in there. Try not to let this happen again; I doubt I'll be around to help out if there's a next time.)]"
						+ "
"
						+ "
"
							+ "[npc.speech(Oh my goodness!)]"
							+ " [npc.name] cries, clasping [npc.her] [npc.hands] over [npc.her] mouth, before slowly reaching out to take the money, almost as if [npc.she] expects you to pull it away a the last moment."
							+ " No such thing is on your mind, however, and you let [npc.name] take the bag from you."
						+ "
"
						+ "
"
							+ "[npc.speech(I don't know what to say! Thank you! Thank you so much! With this, I won't have to loiter around in the alleys anymore!)]"
							+ " [npc.name] sobs, crying tears of joy as [npc.she] looks up into your [pc.eyes]."
						+ "
"
						+ "
"
							+ "[pc.speech(Don't mention it,)]"
							+ " you say, smiling down at the [npc.race] one last time, before turning around and heading out of [npc.her] apartment."
							+ " Satisfied that you've done a good deed, you head back out into the alleyways, ready to continue on your journey."
						+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new Response(
						"Continue",
						"Continue on your way.",
						Main.game.getDefaultDialogueNoEncounter()){
					@Override
					public void effects() {
						Main.game.banishNPC(getProstitute());
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode AFTER_SEX_VICTORY = new DialogueNode("Step back", "", true) {

		@Override
		public String getDescription(){
			return "Now that you've had your fun, you can step back and leave [npc.name] to recover.";
		}

		@Override
		public String getContent() {
			if(Sex.getNumberOfOrgasms(getProstitute()) >= getProstitute().getOrgasmsBeforeSatisfied()) {
				return UtilText.parse(getProstitute(),
						"
"
							+ "As you step back from [npc.name], [npc.she] sinks to the floor, totally worn out from [npc.her] orgasm"+(Sex.getNumberOfOrgasms(getProstitute()) > 1?"s":"")+"."
							+ " Looking up at you, a satisfied smile settles across [npc.her] face, and you realise that you gave [npc.herHim] exactly what [npc.she] wanted."
						+ "
"
						+ "
"
							+ "Now that you've revealed [npc.namePos] status as a fugitive from the law, you realise that this will be the last time you ever see [npc.herHim], as [npc.sheIs] sure to move on once you leave."
						+ "
");
			} else {
				return UtilText.parse(getProstitute(),
						"
"
							+ "As you step back from [npc.name], [npc.she] sinks to the floor, letting out a desperate whine as [npc.she] realises that you've finished."
							+ " [npc.Her] [npc.hands] dart down between [npc.her] [npc.legs], and [npc.she] frantically starts masturbating as [npc.she] seeks to finish what you started."
						+ "
"
						+ "
"
							+ "Now that you've revealed [npc.namePos] status as a fugitive from the law, you realise that this will be the last time you ever see [npc.herHim], as [npc.sheIs] sure to move on once you leave."
						+ "
");
			}

		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new Response("Leave", "Leave [npc.name] and carry on your way. [npc.Name] will disappear from this area!", Main.game.getDefaultDialogueNoEncounter()){
					@Override
					public void effects() {
						Main.game.banishNPC(getProstitute());
					}
				};

			} else if (index == 6) {
				return new ResponseEffectsOnly("Inventory", "There's nothing stopping you from helping yourself to [npc.namePos] clothing and items..."){
					@Override
					public void effects() {
						Main.mainController.openInventory(getProstitute(), InventoryInteraction.FULL_MANAGEMENT);
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode AFTER_SEX_DEFEAT = new DialogueNode("Collapse", "", true) {

		@Override
		public int getSecondsPassed() {
			return 15*60;
		}

		@Override
		public String getDescription(){
			return "You're completely worn out from [npc.namePos] dominant treatment, and need a while to recover.";
		}

		@Override
		public String getContent() {
			return UtilText.parse(getProstitute(),
					"
"
						+ "As [npc.name] steps back and sorts [npc.her] clothes out, you sink to the floor, totally worn out from [npc.her] dominant treatment of you."
						+ " [npc.She] looks down at you, and you glance up to see a very satisfied smile cross [npc.her] face."
						+ " [npc.She] leans down and pats you on the head,"
						+ " [npc.speech(Farewell forever! You and your Enforcer cronies will have to try harder than that to catch me!)]"
					+ "
"
					+ "
"
						+ "With that, [npc.she] walks off, leaving you panting on the ground."
						+ " It takes a little while for you to recover from your ordeal, but eventually you feel strong enough to get your things in order and carry on your way."
					+ "
"
					+ "
"
						+ "Now that you've revealed [npc.namePos] status as a fugitive from the law, you realise that this was the last time you'll ever see [npc.herHim], as [npc.sheIs] sure to move on to a new location."
					+ "
");
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if (index == 1) {
				return new Response("Continue", "Carry on your way.", Main.game.getDefaultDialogueNoEncounter()){
					@Override
					public void effects() {
						Main.game.banishNPC(getProstitute());
					}
				};

			} else {
				return null;
			}
		}
	};

}


code:
package com.lilithsthrone.game.dialogue.npcDialogue.dominion;

import java.util.Set;

import com.lilithsthrone.game.character.GameCharacter;
import com.lilithsthrone.game.character.body.CoverableArea;
import com.lilithsthrone.game.character.fetishes.Fetish;
import com.lilithsthrone.game.character.npc.NPC;
import com.lilithsthrone.game.character.npc.dominion.Cultist;
import com.lilithsthrone.game.character.race.Subspecies;
import com.lilithsthrone.game.dialogue.DialogueNode;
import com.lilithsthrone.game.dialogue.responses.Response;
import com.lilithsthrone.game.dialogue.responses.ResponseCombat;
import com.lilithsthrone.game.dialogue.responses.ResponseSex;
import com.lilithsthrone.game.dialogue.utils.BodyChanging;
import com.lilithsthrone.game.dialogue.utils.UtilText;
import com.lilithsthrone.game.inventory.InventorySlot;
import com.lilithsthrone.game.inventory.clothing.AbstractClothing;
import com.lilithsthrone.game.inventory.clothing.AbstractClothingType;
import com.lilithsthrone.game.inventory.weapon.AbstractWeaponType;
import com.lilithsthrone.game.inventory.weapon.WeaponType;
import com.lilithsthrone.game.sex.Sex;
import com.lilithsthrone.game.sex.managers.dominion.cultist.SMAltarMissionary;
import com.lilithsthrone.game.sex.managers.dominion.cultist.SMAltarMissionarySealed;
import com.lilithsthrone.game.sex.managers.dominion.cultist.SMCultistKneeling;
import com.lilithsthrone.game.sex.positions.slots.SexSlotUnique;
import com.lilithsthrone.main.Main;
import com.lilithsthrone.utils.Colour;
import com.lilithsthrone.utils.Util;
import com.lilithsthrone.utils.Util.Value;

/**
 * @since 0.1.88
 * @version 0.3.2
 * @author Innoxia
 */
public class CultistDialogue {

	private static NPC getCultist() {
		return Main.game.getActiveNPC();
	}

	public static final DialogueNode ENCOUNTER_START = new DialogueNode("A Witch Appears!", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "As you walk down yet another of Dominion's busy streets, you notice that this particular area is extravagantly decorated for Lilith's October celebrations."
						+ " Banners and streamers, of orange, black, and purple, fly from every lamp post, and numerous posters praising Lilith's rule are plastered over every wall."
						+ " There are a considerable number of succubi in this area wearing witch's costumes, and you see them approaching members of the public, before dragging them off down nearby alleyways."
					+ "
"
					+ "
"
						+ "One of these witch-themed succubi suddenly rushes over towards you, gripping a witch's broomstick tightly in one hand and smiling in delight as she blocks your path and introduces herself,"
						+ " [npc.speech(Heya! I'm [npc.name], do you have a moment to talk?!)]"
					+ "
"
					+ "
"
						+ "You open your mouth to answer, but before you're able to say anything, the excitable witch cuts you off,"
						+ " [npc.speech(Sure you do! Everyone has the time to talk about how great Lilith is, right?! I'm out here with my sisters to make sure that everyone is having fun in this special month of October!"
						+ " I'm a part of the Cult of Lilith, and I want you to come visit our chapel so that I can give you a special gift!)]"
					+ "
"
					+ "
"
						+ "The succubus reaches down to grab you by the [pc.arm], and starts trying to pull you off down a nearby alleyway."
						+ " As her fingers press into your [pc.armSkin], you feel an overwhelming sense of power radiating from her arcane aura."
						+ " This demon's power is sure to rival that of Lilaya's, and if she gets you alone down that alleyway, there's no telling what she might do."
					+ "
"
					+ "
"
						+ "You could pull away and make an excuse to leave, or let her lead you to her chapel, where there's a promise of a 'gift'..."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Leave", "Make your excuses and get away from this annoying cultist.", ENCOUNTER_START){
					@Override
					public void effects() {
						Main.game.getTextStartStringBuilder().append(UtilText.parse(getCultist(),
								"
"
									+ "You pull your [pc.arm] away from [npc.name] and take a step back."
									+ " [pc.speech(I don't have time right now.)]"
								+ "
"
								+ "
"
									+ "You see a brief flash of anger in [npc.namePos] [npc.eyes+], but it only lasts for a moment before the smile returns to her face."
									+ " [npc.speech(Just remember to praise Lilith, or else we'll find out!)]"
								+ "
"
								+ "
"
									+ "[npc.NamePos] words are followed by a little laugh, but despite her attempt to pass off her remark as a joke, you detect the distinct hint of malice in her tone."
									+ " Not wanting to get caught up in conversation with this overbearing cultist, you turn around and carry on your way."
								+ "
"));
					}
					@Override
					public DialogueNode getNextDialogue(){
						return Main.game.getDefaultDialogueNoEncounter();
					}
				};

			} else if(index==2) {
				return new Response("Chapel", "Do as the cultist asks and follow her down a nearby back-alley. What could possibly go wrong?", ENCOUNTER_CHAPEL) {
					@Override
					public void effects() {
						// Pull up dress:
						getCultist().displaceClothingForAccess(CoverableArea.PENIS, null);
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL = new DialogueNode("The Witch's Chapel", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "[pc.speech(Sure, I've got time to come visit your chapel,)]"
						+ " you say, allowing the excitable cultist to pull you towards the foreboding alleyway."
					+ "
"
					+ "
"
						+ "[npc.speech(Excellent! I knew you weren't like all the others! This is going to be fun!)]"
						+ " [npc.name] replies, practically skipping in excitement as she leads the way."
					+ "
"
					+ "
"
						+ "The hustle and bustle of the busy street is soon left behind as [npc.name] hurriedly pulls you down a couple of dark and dingy passageways."
						+ " Thankfully, her chapel doesn't seem to be too far into the maze of alleyways, and after just a minute, you find yourself stepping out into a tidy little courtyard."
						+ " A life-sized statue of a breathtakingly beautiful demon, who you assume to be Lilith, stands in the centre."
						+ " Past this statue, you see your destination taking the form of a small, one-story building, with a pillared facade and red-tiled roof."
					+ "
"
					+ "
"
						+ "It's towards this building that [npc.name] pulls you, and after quickly crossing the small courtyard, you find yourself stepping through the doorway."
						+ " Just as the diminutive exterior suggested, the interior of the chapel consists of a single, long room."
						+ " Rows of benches line either side of a central aisle, and at the far end, a dark-maroon cloth is draped over a waist-high altar."
						+ " As [npc.name] leads you towards this altar, you see that the walls are covered in detailed murals, each one portraying a demon engaged in a different sex position."
					+ "
"
					+ "
"
						+ "[npc.speech(We're here!)] [npc.name] exclaims, stopping before the altar and turning to face you."
						+ " [npc.speech(You've been such a good [pc.girl]! I usually like to show people around a little first, but I just can't wait any longer! It's time for your gift!)]"
					+ "
"
					+ "
"
						+ "[npc.Name] lets out a mischievous giggle, before reaching down and pulling up the skirt of her witch's dress."
						+ " Following the movement of her hands, you look down to see that her now-exposed underwear are completely crotchless, allowing her huge demonic cock to flop free between her legs."
						+ " Her right hand reaches down beneath her monstrous shaft to stroke her dripping-wet pussy, and her giggle turns into a sensual moan as she bites her lip and looks up at you."
						+ " [npc.speech(Be a good [pc.girl] now and get down on your knees! You can start with my pussy, and then finish with my cock! You'll be getting your gift straight down your throat soon enough!"
							+ " Oh! And don't even think of trying to back out now!)]"
					+ "
"
					+ "
"
						+ "You can tell from the threatening tone of her voice that she's definitely not going to take no for an answer."
						+ " It looks like you'll either have to do as she commands, or try and fight her off..."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new ResponseCombat("Fight", "You're left with no choice but to fight!", getCultist(), Util.newHashMapOfValues(
						new Value<>(Main.game.getPlayer(), "You tell the succubus that you're not interested, and just as you expected, she moves to attack!"),
						new Value<>(getCultist(), "[npc.Name] readies her broomstick and shouts, [npc.speech(How dare you try to refuse my gift! I'll give it to you by force!)]")));

			} else if(index==2) {
				return new ResponseSex("Accept", "Drop to your knees and prepare to service her orally.",
						true, true,
						new SMCultistKneeling(
								Util.newHashMapOfValues(new Value<>(getCultist(), SexSlotUnique.KNEELING_RECEIVING_ORAL_CULTIST)),
								Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(), SexSlotUnique.KNEELING_PERFORMING_ORAL_CULTIST))) {
							@Override
							public boolean isPublicSex() {
								return false;
							}
						},
						null,
						null,
						ENCOUNTER_CHAPEL_POST_ORAL_SEX,
						"
"
							+ "You do as [npc.name] commands, and obediently drop to your knees in front of her."
							+ " Looking down at your submissive form, the succubus cultist coos in delight,"
							+ " [npc.speech(Good [pc.girl]! You're eager for my gift, aren't you?!)]"
						+ "
"
						+ (!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.MOUTH, true)
								?"
"
									+ "You look up to see her happy smile turn into a puzzled frown as she realises that you're not able to get access to your mouth."
									+ " Reaching down to your sealed clothing, she focuses her arcane energy into removing the seal."
									+ " [npc.speech(There you go! Now you can suck cock to your heart's content!)]"
								+ "
"
								:"")
						+ "
"
							+ "Stepping forwards, [npc.name] strokes the top of your head, before gently pulling you towards her crotch..."
						+ "
") {
					@Override
					public void effects() {
						// Remove jinxes so that player can get access to mouth:
						if(!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.MOUTH, true)) {
							AbstractClothing clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.MOUTH, true);
							while (clothing != null) {
								clothing.setSealed(false);

								clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.MOUTH, true);
							}
						}
					}
				};

			} else if(index == 3) {
				if(Main.game.getPlayer().hasVagina()) {
					return new ResponseSex("Offer Pussy", "Offer [npc.name] your pussy instead.", Util.newArrayListOfValues(Fetish.FETISH_PREGNANCY),
							null, Fetish.FETISH_PREGNANCY.getAssociatedCorruptionLevel(), null, null, null,
							true, false,
							new SMAltarMissionary(
									Util.newHashMapOfValues(new Value<>(getCultist(), SexSlotUnique.MISSIONARY_ALTAR_STANDING_BETWEEN_LEGS)),
									Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(), SexSlotUnique.MISSIONARY_ALTAR_LYING_ON_ALTAR))) {
								@Override
								public boolean isPublicSex() {
									return false;
								}
							},
							null,
							null, ENCOUNTER_CHAPEL_POST_VAGINAL_SEX, "
"
								+ "You smirk at [npc.name], before batting your eyelids and putting on the most seductive voice you can muster,"
								+ " [pc.speech(Please [npc.name], could I get your gift elsewhere?)]"
							+ "
"
							+ "
"
								+ "You slowly trace your fingers over your pussy, drawing [npc.namePos] eyes down between your [pc.legs+]."
								+ " She smiles as she realises what you're suggesting, and eagerly grabs your [pc.arm] once again, before pushing you down onto your back on top of the chapel's altar."
								+ " [npc.speech(What better way to praise Lilith than by filling an eager slut's womb with my seed?! Your belly's going to be nice and swollen with "
								+(Main.game.getPlayer().getSubspecies()==Subspecies.HUMAN?"imps":"my demonic brood")+" soon enough!)]"
							+ "
"
							+ (!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.VAGINA, true)
									?"
"
										+ "You look up to see her happy smile turn into a puzzled frown as she realises that she's not able to get access to your pussy."
										+ " Reaching down to your seal clothing, she focuses her arcane energy into removing the seal."
										+ " [npc.speech(There we go! Now it's time for your special gift!)]"
									+ "
"
									:"")) {
						@Override
						public void effects() {
							((Cultist)getCultist()).setRequestedAnal(false);

							// Remove jinxes so that player can get access to vagina:
							if(!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.VAGINA, true)) {
								AbstractClothing clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.VAGINA, true);
								while (clothing != null) {
									clothing.setSealed(false);
									System.out.println(clothing.getName());
									clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.VAGINA, true);
								}
							}
						}
					};

				} else {
					return new Response("Offer Pussy", "You'd need a vagina in order to offer it to [npc.name]...", null);
				}

			} else if(index==4) {
				return new ResponseSex("Offer Ass", "Offer [npc.name] your ass instead.", Util.newArrayListOfValues(Fetish.FETISH_ANAL_RECEIVING),
						null, Fetish.FETISH_ANAL_RECEIVING.getAssociatedCorruptionLevel(), null, null, null,
						true, false,
						new SMAltarMissionary(
								Util.newHashMapOfValues(new Value<>(getCultist(), SexSlotUnique.MISSIONARY_ALTAR_STANDING_BETWEEN_LEGS)),
								Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(), SexSlotUnique.MISSIONARY_ALTAR_LYING_ON_ALTAR))) {
							@Override
							public boolean isPublicSex() {
								return false;
							}
						},
						null,
						null, ENCOUNTER_CHAPEL_POST_ANAL_SEX, "
"
							+ "You smirk at [npc.name], before stepping forwards and asking,"
							+ " [pc.speech(Please [npc.name], could I get your gift elsewhere?)]"
						+ "
"
						+ "
"
							+ "You slowly turn to one side, tracing your fingers over your ass in order to draw [npc.namePos] eyes down to your rear end."
							+ " She smiles as she realises what you're suggesting, and eagerly grabs your [pc.arm] once again, before pushing you down onto your back on top of the chapel's altar."
							+ " [npc.speech(What better way to praise Lilith than by filling some slut's ass with my seed?!)]"
						+ "
"
						+ (!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.ANUS, true)
								?"
"
									+ "You look up to see her happy smile turn into a puzzled frown as she realises that she's not able to get access to your asshole."
									+ " Reaching down to your sealed clothing, she focuses her arcane energy into removing the seal."
									+ " [npc.speech(There we go! Now it's time for your special gift!)]"
								+ "
"
								:"")) {
					@Override
					public void effects() {
						((Cultist)getCultist()).setRequestedAnal(true);

						// Remove jinxes so that player can get access to vagina:
						if(!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.ANUS, true)) {
							AbstractClothing clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.ANUS, true);
							while (clothing != null) {
								clothing.setSealed(false);

								clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.ANUS, true);
							}
						}
					}
				};
			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_REPEAT = new DialogueNode("The Witch's Chapel", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "Deciding to pay [npc.name] another visit, you set off down the dark passageway that leads to her chapel."
						+ " The route is quite easy to remember, and after just a minute you find yourself stepping out into a very familiar courtyard."
						+ " Once again you pass the life-sized statue of Lilith, and after approaching the small, one-story building, you push open the chapel's wooden door and step inside."
					+ "
"
					+ "
"
						+ "The interior is just as you remember it, with rows of benches lining either side of a central aisle, and at the far end, a dark-maroon cloth is draped over a waist-high altar."
						+ " The familiar figure of [npc.name] is standing beside the stone block, and as the door swings shut behind you, she turns to see who's entered her sanctum."
					+ "
"
					+ "
"
						+ "[npc.speech(You're back!)] [npc.name] exclaims, smiling in delight."
						+ " [npc.speech(What a good [pc.girl]! You've come back for another gift!)]"
					+ "
"
					+ "
"
						+ "[npc.Name] lets out a mischievous giggle, before reaching down and pulling up the skirt of her witch's dress."
						+ " Following the movement of her hands, you look down to see that her now-exposed underwear are completely crotchless, allowing her huge demonic cock to flop free between her legs."
						+ " Her right hand reaches down beneath her monstrous shaft to stroke her dripping-wet pussy, and her giggle turns into a sensual moan as she bites her lip and looks up at you."
						+ " [npc.speech(Now show me what a good [pc.girl] you are and get down on your knees!"
							+ " You can start with my pussy, and then finish with my cock! You'll be getting your gift straight down your throat soon enough!"
							+ " Oh! And don't even think of trying to back out now!)]"
					+ "
"
					+ "
"
						+ "You can tell from the threatening tone of her voice that she's definitely not going to take no for an answer."
						+ " It looks like you'll either have to do as she commands, or try and fight her off..."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			return ENCOUNTER_CHAPEL.getResponse(0, index);
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_LEAVING = new DialogueNode("The Witch's Chapel", "", true, true) {

		@Override
		public String getContent() {
			return "
"
						+ "Leaving [npc.name] panting and exhausted on the altar, you turn to make your exit."
						+ " As you're walking towards the door, you notice that there's a spare Witch's outfit neatly folded on one of the empty benches."
						+ " There's even a spare broomstick lying beside it, and you wonder if you should help yourself to these rare items as way of compensation for [npc.namePos] behaviour..."
					+ "
"
					+ "
"
						+ "Open your inventory to view the items."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Continue", "Leave the chapel and head back out into the streets of Dominion.", ENCOUNTER_CHAPEL_LEAVING){
					@Override
					public DialogueNode getNextDialogue(){
						return Main.game.getDefaultDialogueNoEncounter();
					}
				};

			} else if(index==10) {
				return new Response(
						"Remove character",
						"Scare [npc.name] away. This will remove [npc.herHim] from this area, allowing another character to move into this tile.",
						ENCOUNTER_CHAPEL_LEAVING){
					@Override
					public DialogueNode getNextDialogue() {
						return Main.game.getDefaultDialogueNoEncounter();
					}
					@Override
					public void effects() {
						Main.game.banishNPC(getCultist());
					}
				};

			} else {
				return null;
			}
		}

		@Override
		public boolean isInventoryDisabled() {
			return false;
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_COMBAT_VICTORY = new DialogueNode("The Witch's Chapel", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "[npc.Name] staggers back, gripping the edge of the altar with one hand as she pants from exertion."
						+ " [npc.speech(I-Impossible! How could I be defeated?!)]"
					+ "
"
					+ "
"
						+ "You step forwards, but before you can respond, [npc.name] lets out an incredibly lewd moan,"
						+ " [npc.speech(~Aaaaa!~ You're so strong! Come and claim your reward!)]"
					+ "
"
					+ "
"
						+ "With that, the horny witch lies back on the altar, pulling up her dress to expose her hard demonic cock and dripping-wet pussy."
						+ " She continues to moan and squirm as she presents herself, begging for you to come and use her body as you see fit."
					+ "
"
					+ "
"
						+ "You notice that in her haste to submit to you, she's dropped her broomstick on the floor, and you wonder if you should use this opportunity to give [npc.name] a taste of her own medicine..."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Leave", "Turn around and head for the door.", ENCOUNTER_CHAPEL_LEAVING){
					@Override
					public void effects(){
						Colour colour = Colour.CLOTHING_BLACK;
						if(getCultist().getClothingInSlot(InventorySlot.TORSO_UNDER) != null && getCultist().getClothingInSlot(InventorySlot.TORSO_UNDER).getColour() == Colour.CLOTHING_WHITE) {
							 colour = Colour.CLOTHING_WHITE;
						}

						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_boots_thigh_high", colour, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_boots", colour, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_dress", colour, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_hat", colour, Colour.CLOTHING_GOLD, colour, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_hat_wide", colour, Colour.CLOTHING_GOLD, colour, false));
						Main.game.getPlayerCell().getInventory().addWeapon(AbstractWeaponType.generateWeapon(WeaponType.MAIN_WITCH_BROOM));
					}
				};

			} else if(index==2) {
				return new ResponseSex("Sex", "Sex.",
						true, false,
						new SMAltarMissionary(
								Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(), SexSlotUnique.MISSIONARY_ALTAR_STANDING_BETWEEN_LEGS)),
								Util.newHashMapOfValues(new Value<>(getCultist(), SexSlotUnique.MISSIONARY_ALTAR_LYING_ON_ALTAR))) {
							@Override
							public boolean isPublicSex() {
								return false;
							}
						},
						null,
						null, ENCOUNTER_CHAPEL_POST_DOM_SEX, "
"
							+ "You decide against using her broomstick, and step forwards so that you're standing between [npc.namePos] legs."
							+ " She lets out an excited moan as you run your [pc.hands] up the length of her soft thighs, and props herself up on her elbows as she bites her lip at you."
							+ " [npc.speech(~Mmm!~ Yes! Use me however you want!)]"
						+ "
") {
				};

			} else if(index == 3) {
				return new ResponseSex("Witch's Seal", "Use her broomstick to cast Witch's Seal on her.",
						false, false,
						new SMAltarMissionarySealed(
								Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(), SexSlotUnique.MISSIONARY_ALTAR_SEALED_STANDING_BETWEEN_LEGS)),
								Util.newHashMapOfValues(new Value<>(getCultist(), SexSlotUnique.MISSIONARY_ALTAR_SEALED_LYING_ON_ALTAR))) {
							@Override
							public boolean isPublicSex() {
								return false;
							}
							@Override
							public Set<GameCharacter> getCharactersSealed() {
								return Util.newHashSetOfValues(getCultist());
							}
						},
						null,
						null, ENCOUNTER_CHAPEL_POST_DOM_SEALED_SEX, "
"
							+ "As you pick up [npc.namePos] broomstick, you feel a powerful surge of arcane energy flowing into your body."
							+ " Without even needing to be told, you instantly know exactly how to harness the spells within this powerful weapon."
							+" As you gain knowledge of the spell 'Witch's Seal', you realise that you have the opportunity to give [npc.name] a taste of her own medicine..."
						+ "
"
						+ "
"
							+ "Stepping towards the horny witch, you thrust out with the broomstick, channelling your energy into casting the powerful immobilising spell."
							+ " A jolt of purple energy shoots out and strikes [npc.name], and as a ghostly purple pentagram flashes beneath her body, she suddenly stops moving."
						+ "
"
						+ "
"
							+ "Dropping the broomstick to the floor, you step forwards between her legs and make sure that she's ok."
							+ " Thankfully, as you take a closer look, you see that she's still breathing, and her eyes flick up to gaze into yours as you stand over her vulnerable form."
							+ " The Witch's Seal appears to have completely immobilised her, but as you reach out and lift one of her legs, you discover that the spell still allows you to move her around."
						+ "
"
						+ "
"
							+ "Grinning down at your new fuck-doll, you push her thighs apart to fully expose her groin, and prepare to have some fun..."
						+ "
") {
				};

			} else if (index == 4) {
				return new Response("Full transformations",
						"Take a very detailed look at what [npc.name] can transform [npc.herself] into...",
						BodyChanging.BODY_CHANGING_CORE){
					@Override
					public void effects() {
						Main.game.saveDialogueNode();
						BodyChanging.setTarget(getCultist());
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_COMBAT_LOSS = new DialogueNode("The Witch's Chapel", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "You stagger back against the altar, reaching one hand out to grip the hard edge as you pant from exertion."
						+ " Although you gave it your best shot, you were no match for a succubus as powerful as this one, and as you use what little energy you have left to focus on keeping yourself standing, you hear the witch let out a mocking laugh."
					+ "
"
					+ "
"
						+ "[npc.speech(Hahaha! Silly little [pc.race]!)]"
						+ " she sneers, stepping forwards and roughly grabbing your chin in one hand."
						+ " [npc.speech(I think I'll have some fun with you!)]"
					+ "
"
					+ "
"
						+ "With that, she steps back, and you look up just in time to see her thrust her broomstick out towards you."
						+ " A jolt of purple energy shoots out, striking you directly in the chest and causing you to fall back against the altar."
						+ " You try to push yourself back up, but find that your body won't listen to your commands."
						+ " You then try to let out a cry, only to find that it takes all of your energy just to utter a little whimper."
					+ "
"
					+ "
"
						+ "[npc.speech(How pathetic!)]"
						+ " [npc.name] mocks, reaching down to pull you up, before pushing you down onto the stone altar."
						+ " [npc.speech(I wonder if you'll keep on mewling like that as I fuck you senseless! Try and struggle all you want, it's no use; this Witch's Seal I've cast upon you has turned you into my very own fuck-doll!)]"
					+ "
"
					+ "
"
						+ "As she talks, the witch moves you around into position, and you find that you're totally powerless as she spreads your legs and steps forwards."
						+ " [npc.speech(Now, let's have some fun!)]"
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index == 1) {
				return new ResponseSex("Witch's Toy", "You're completely immobilised, and can do nothing as the witch prepares to use you as her toy.",
						false, false,
						new SMAltarMissionarySealed(
								Util.newHashMapOfValues(new Value<>(getCultist(), SexSlotUnique.MISSIONARY_ALTAR_SEALED_STANDING_BETWEEN_LEGS)),
								Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(), SexSlotUnique.MISSIONARY_ALTAR_SEALED_LYING_ON_ALTAR))) {
							@Override
							public boolean isPublicSex() {
								return false;
							}
							@Override
							public Set<GameCharacter> getCharactersSealed() {
								return Util.newHashSetOfValues(Main.game.getPlayer());
							}
						},
						null,
						null,
						ENCOUNTER_CHAPEL_POST_SUB_SEALED_SEX,
						(!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.VAGINA, true) || !Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.ANUS, true)
							?"
"
								+ "You look up to see [npc.namePos] grin turn into a puzzled frown as she realises that she's not able to get access to your groin."
								+ " Reaching down to your sealed clothing, she focuses her arcane energy into removing the seal."
								+ " [npc.speech(There we go! Now let's both find out how much you love being my fuck-toy!)]"
							+ "
"
							:"")) {
					@Override
					public void effects() {
						((Cultist)getCultist()).setRequestedAnal(false);

						// Remove jinxes so that player can get access to vagina:
						if(!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.VAGINA, true)) {
							AbstractClothing clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.VAGINA, true);
							while (clothing != null) {
								clothing.setSealed(false);

								clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.VAGINA, true);
							}
						}
						// Remove jinxes so that player can get access to anus:
						if(!Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.ANUS, true)) {
							AbstractClothing clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.ANUS, true);
							while (clothing != null) {
								clothing.setSealed(false);

								clothing = Main.game.getPlayer().getClothingBlockingCoverableAreaAccess(CoverableArea.ANUS, true);
							}
						}
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_POST_ORAL_SEX = new DialogueNode("Post-sex", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "[npc.Name] steps back, grinning down at you as she sorts her clothing out."
						+ " [npc.speech(I hope you enjoyed your gift just as much as I did in giving it to you! Now, I have some cult business to attend to, so run along!)]"
					+ "
"
					+ "
"
						+ "You move to do as [npc.name] says, and as soon as you've finished getting your things together, she grabs you by the arm and starts marching towards the door."
						+ " You're a little taken aback at how quickly she wants to get rid of you, but before you can object, you're being pushed out of the door."
						+ " [npc.speech(Come back some other time if you want another gift!)]"
					+ "
"
					+ "
"
						+ "With that, the wooden door to the chapel slams shut, leaving you to walk back out to the street with the taste of demonic cum still on your tongue..."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Leave", "Turn around and head for the door.", ENCOUNTER_CHAPEL_POST_ORAL_SEX){
					@Override
					public DialogueNode getNextDialogue(){
						return Main.game.getDefaultDialogueNoEncounter();
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_POST_VAGINAL_SEX = new DialogueNode("Post-sex", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "[npc.Name] steps back, grinning down at you as she sorts her clothing out."
						+ " [npc.speech(I hope you enjoyed your gift just as much as I did in giving it to you! Now, I have some cult business to attend to, so run along!)]"
					+ "
"
					+ "
"
						+ "You move to do as [npc.name] says, and as soon as you've finished getting your things together, she grabs you by the arm and starts marching towards the door."
						+ " You're a little taken aback at how quickly she wants to get rid of you, but before you can object, you're being pushed out of the door."
						+ " [npc.speech(Come back some other time if you want another gift!)]"
					+ "
"
					+ "
"
						+ "With that, the wooden door to the chapel slams shut, leaving you to walk back out to the street with the wet feeling of demonic cum still between your legs..."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Leave", "Turn around and head for the door.", ENCOUNTER_CHAPEL_POST_VAGINAL_SEX){
					@Override
					public DialogueNode getNextDialogue(){
						return Main.game.getDefaultDialogueNoEncounter();
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_POST_ANAL_SEX = new DialogueNode("Post-sex", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "[npc.Name] steps back, grinning down at you as she sorts her clothing out."
						+ " [npc.speech(I hope you enjoyed your gift just as much as I did in giving it to you! Now, I have some cult business to attend to, so run along!)]"
					+ "
"
					+ "
"
						+ "You move to do as [npc.name] says, and as soon as you've finished getting your things together, she grabs you by the arm and starts marching towards the door."
						+ " You're a little taken aback at how quickly she wants to get rid of you, but before you can object, you're being pushed out of the door."
						+ " [npc.speech(Come back some other time if you want another gift!)]"
					+ "
"
					+ "
"
						+ "With that, the wooden door to the chapel slams shut, leaving you to walk back out to the street with the wet feeling of demonic cum still in your ass..."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Continue", "Continue on your way.", ENCOUNTER_CHAPEL_POST_VAGINAL_SEX){
					@Override
					public DialogueNode getNextDialogue(){
						return Main.game.getDefaultDialogueNoEncounter();
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_POST_SUB_SEALED_SEX = new DialogueNode("Post-sex", "", true) {

		@Override
		public String getContent() {
			return "
"
						+ "[npc.Name] steps back, grinning down at you as she sorts her clothing out."
						+ " [npc.speech(I hope you enjoyed your gift just as much as I did in giving it to you! Now, it may take a few more minutes for that spell to wear off. If only my assistant were here...)]"
					+ "
"
					+ "
"
						+ "[femaleNPC.speech(Mistress, I'm back! Ooh! Who's this?)]"
						+ " a strange voice calls out from the doorway."
					+ "
"
					+ "
"
						+ "[npc.speech(What took you so long?! You were meant to be back here half an hour ago!)]"
						+ " [npc.name] responds."
						+ " [npc.speech(Well, nevermind! Just drag this [pc.race] out to a bench somewhere, I've finished with [pc.herHim].)]"
					+ "
"
					+ "
"
						+ "[femaleNPC.speech(Yes, Mistress!)]"
						+ " the stranger calls out, and after just a few seconds, the black-furred face of a greater cat-girl hovers into view."
						+ " [femaleNPC.speech(Aww! I missed out on all the fun!)]"
					+ "
"
					+ "
"
						+ "After being shouted at once more by [npc.name], the cat-girl grabs you under the arms and drags you outside."
						+ " She puffs and pants as she pulls you down the dark alleyways, but despite the sounds of exertion, it doesn't her take too long before she's brought you all the way back out to the street where you first met [npc.name]."
						+ " Rather unceremoniously dumping you down onto an empty bench, the cat-girl takes one last look at you before rushing back off to the chapel."
					+ "
"
					+ "
"
						+ "Thankfully, it only takes a couple of minutes before the spell finally wears off, and with the wet feeling of demonic cum still between your legs, you continue on your travels..."
					+ "
";
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Continue", "Continue on your way.", ENCOUNTER_CHAPEL_POST_ORAL_SEX){
					@Override
					public DialogueNode getNextDialogue(){
						return Main.game.getDefaultDialogueNoEncounter();
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_POST_DOM_SEX = new DialogueNode("Post-sex", "", true) {

		@Override
		public String getContent() {
			if(Sex.getNumberOfOrgasms(getCultist()) >= getCultist().getOrgasmsBeforeSatisfied()) {
				return "
"
							+ "You step back from the altar, grinning down at the witch as she lets out a deeply satisfied sigh."
							+ " You quickly get your things in order, and before you turn to leave, the succubus calls out,"
							+ " [npc.speech(Come visit me again! Next time, I'll be the one using you!)]"
						+ "
";
			} else {
				return "
"
						+ "You step back from the altar, grinning down at the witch as she lets out a deeply frustrated moan."
						+ " You quickly get your things in order, and before you turn to leave, the succubus calls out,"
						+ " [npc.speech(You didn't even let me get off! Next time, I'll be the one using you!)]"
					+ "
";
			}
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Leave", "Turn around and head for the door.", ENCOUNTER_CHAPEL_LEAVING){
					@Override
					public void effects(){
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_boots_thigh_high", Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_boots", Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_dress", Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_hat", Colour.CLOTHING_BLACK, Colour.CLOTHING_GOLD, Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_hat_wide", Colour.CLOTHING_BLACK, Colour.CLOTHING_GOLD, Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addWeapon(AbstractWeaponType.generateWeapon(WeaponType.MAIN_WITCH_BROOM));
					}
				};

			} else {
				return null;
			}
		}
	};

	public static final DialogueNode ENCOUNTER_CHAPEL_POST_DOM_SEALED_SEX = new DialogueNode("Post-sex", "", true) {

		@Override
		public String getContent() {
			if(Sex.getNumberOfOrgasms(getCultist()) >= getCultist().getOrgasmsBeforeSatisfied()) {
				return "
"
							+ "You step back from the altar, grinning down at the witch as she lets out a deeply satisfied sigh."
							+ " You quickly get your things in order, and before you turn to leave, the Witch's Seal starts to wear off, allowing [npc.name] to call out,"
							+ " [npc.speech(Come visit me again! Next time, I'll be the one using you!)]"
						+ "
";
			} else {
				return "
"
						+ "You step back from the altar, grinning down at the witch as she lets out a deeply frustrated moan."
						+ " You quickly get your things in order, and before you turn to leave, the Witch's Seal starts to wear off, allowing [npc.name] to call out,"
						+ " [npc.speech(You didn't even let me get off! Next time, I'll be the one using you!)]"
					+ "
";
			}
		}

		@Override
		public Response getResponse(int responseTab, int index) {
			if(index==1) {
				return new Response("Leave", "Turn around and head for the door.", ENCOUNTER_CHAPEL_LEAVING){
					@Override
					public void effects(){
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_boots_thigh_high", Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_boots", Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_dress", Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_hat", Colour.CLOTHING_BLACK, Colour.CLOTHING_GOLD, Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addClothing(AbstractClothingType.generateClothing("innoxia_witch_witch_hat_wide", Colour.CLOTHING_BLACK, Colour.CLOTHING_GOLD, Colour.CLOTHING_BLACK, false));
						Main.game.getPlayerCell().getInventory().addWeapon(AbstractWeaponType.generateWeapon(WeaponType.MAIN_WITCH_BROOM));
					}
				};

			} else {
				return null;
			}
		}
	};
}

repo_name: klorpa/Pedo

license: unknown