Search in sources :

Example 1 with ListValue

use of com.lilithsthrone.utils.Util.ListValue in project liliths-throne-public by Innoxia.

the class MainController method moveEast.

/**
 * Moves the player East.
 */
public void moveEast() {
    if (Main.game.getPlayer().getLocation().getX() + 1 < Main.game.getActiveWorld().WORLD_WIDTH) {
        if (Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation().getX() + 1, Main.game.getPlayer().getLocation().getY()).getPlace().getPlaceType() != PlaceType.GENERIC_IMPASSABLE) {
            if (Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).getPlace().isItemsDisappear()) {
                Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).resetInventory(Util.newArrayListOfValues(new ListValue<>(Rarity.LEGENDARY)));
            }
            Main.game.getPlayer().setLocation(new Vector2i(Main.game.getPlayer().getLocation().getX() + 1, Main.game.getPlayer().getLocation().getY()));
            DialogueNodeOld dn = Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).getPlace().getDialogue(true);
            Main.game.setContent(new Response("", "", dn));
        }
    }
}
Also used : Response(com.lilithsthrone.game.dialogue.responses.Response) ListValue(com.lilithsthrone.utils.Util.ListValue) DialogueNodeOld(com.lilithsthrone.game.dialogue.DialogueNodeOld) Vector2i(com.lilithsthrone.utils.Vector2i)

Example 2 with ListValue

use of com.lilithsthrone.utils.Util.ListValue in project liliths-throne-public by Innoxia.

the class MainController method moveSouth.

/**
 * Moves the player South.
 */
public void moveSouth() {
    if (Main.game.getPlayer().getLocation().getY() - 1 >= 0) {
        if (Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation().getX(), Main.game.getPlayer().getLocation().getY() - 1).getPlace().getPlaceType() != PlaceType.GENERIC_IMPASSABLE) {
            if (Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).getPlace().isItemsDisappear()) {
                Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).resetInventory(Util.newArrayListOfValues(new ListValue<>(Rarity.LEGENDARY)));
            }
            Main.game.getPlayer().setLocation(new Vector2i(Main.game.getPlayer().getLocation().getX(), Main.game.getPlayer().getLocation().getY() - 1));
            DialogueNodeOld dn = Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).getPlace().getDialogue(true);
            Main.game.setContent(new Response("", "", dn));
        }
    }
}
Also used : Response(com.lilithsthrone.game.dialogue.responses.Response) ListValue(com.lilithsthrone.utils.Util.ListValue) DialogueNodeOld(com.lilithsthrone.game.dialogue.DialogueNodeOld) Vector2i(com.lilithsthrone.utils.Vector2i)

Example 3 with ListValue

use of com.lilithsthrone.utils.Util.ListValue in project liliths-throne-public by Innoxia.

the class SlaveryManagementDialogue method getCosmeticsResponse.

private static Response getCosmeticsResponse(int responseTab, int index) {
    if (index == 1) {
        if (BodyChanging.getTarget().getBodyMaterial() == BodyMaterial.SLIME) {
            return new Response("Makeup", UtilText.parse(BodyChanging.getTarget(), "Kate is unable to apply any makeup to [npc.name]'s slimy body!"), null);
        } else {
            return new Response("Makeup", "Kate offers a wide range of different cosmetic services, and several pages of the brochure are devoted to images displaying different styles and colours of lipstick, nail polish, and other forms of makeup.", SLAVE_MANAGEMENT_COSMETICS_MAKEUP);
        }
    } else if (index == 2) {
        return new Response("Hair", "There's a double-page spread of all the different dyes, styles, and lengths of hair that Kate's able to work with.", SLAVE_MANAGEMENT_COSMETICS_HAIR);
    } else if (index == 3) {
        return new Response("Piercings", "Kate offers a wide range of different piercings.", SLAVE_MANAGEMENT_COSMETICS_PIERCINGS);
    } else if (index == 4) {
        return new Response("Eyes", "There's a special page near the front of the brochure, advertising Kate's ability to recolour a person's eyes." + " Just like skin recolourings, this is quite demanding on her aura, and is therefore very expensive.", SLAVE_MANAGEMENT_COSMETICS_EYES);
    } else if (index == 5) {
        return new Response("Coverings", "There's a special page in the middle of the brochure, advertising Kate's special ability to harness the arcane in order to recolour a person's skin or fur." + " Apparently, this is quite demanding on her aura, and is therefore very expensive.", SLAVE_MANAGEMENT_COSMETICS_COVERINGS) {

            @Override
            public void effects() {
                CoveringsNamesMap = new LinkedHashMap<>();
                if (BodyChanging.getTarget().getBodyMaterial() == BodyMaterial.SLIME) {
                    CoveringsNamesMap.put(BodyCoveringType.SLIME, Util.newArrayListOfValues(new ListValue<>("SLIME")));
                } else {
                    for (BodyPartInterface bp : BodyChanging.getTarget().getAllBodyParts()) {
                        if (bp.getType().getBodyCoveringType(BodyChanging.getTarget()) != null && bp.getType().getBodyCoveringType(BodyChanging.getTarget()).getRace() != null && !(bp instanceof Hair) && !(bp instanceof Eye)) {
                            String name = bp.getName(BodyChanging.getTarget());
                            if (bp instanceof Skin) {
                                name = "torso";
                            } else if (bp instanceof Vagina) {
                                name = "vagina";
                            }
                            if (CoveringsNamesMap.containsKey(bp.getType().getBodyCoveringType(BodyChanging.getTarget()))) {
                                CoveringsNamesMap.get(bp.getType().getBodyCoveringType(BodyChanging.getTarget())).add(name);
                            } else {
                                CoveringsNamesMap.put(bp.getType().getBodyCoveringType(BodyChanging.getTarget()), Util.newArrayListOfValues(new ListValue<>(name)));
                            }
                        }
                    }
                    CoveringsNamesMap.put(BodyCoveringType.ANUS, Util.newArrayListOfValues(new ListValue<>("anus")));
                    CoveringsNamesMap.put(BodyCoveringType.MOUTH, Util.newArrayListOfValues(new ListValue<>("mouth")));
                    CoveringsNamesMap.put(BodyCoveringType.NIPPLES, Util.newArrayListOfValues(new ListValue<>("nipples")));
                    CoveringsNamesMap.put(BodyCoveringType.TONGUE, Util.newArrayListOfValues(new ListValue<>("tongue")));
                }
            }
        };
    } else if (index == 6) {
        return new Response("Other", "Kate can offer other miscellaneous services, such as anal bleaching.", SLAVE_MANAGEMENT_COSMETICS_OTHER);
    } else if (index == 7) {
        return new Response("Tattoos", "Most of the brochure is taken up with drawings and photographs displaying Kate's considerable artistic talents." + " She's even able to apply arcane-enchanted tattoos, but they look to be very expensive...</br>" + "<b>Will be done as soon as possible!</b>", null);
    } else if (index == 0) {
        return new Response("Back", "Return to the slave management screen.", SLAVE_MANAGEMENT) {

            @Override
            public DialogueNodeOld getNextDialogue() {
                return SlaveryManagementDialogue.getSlaveryManagementDialogue(Main.game.getDialogueFlags().getSlaveTrader());
            }

            @Override
            public void effects() {
                Main.game.getDialogueFlags().setSlaveryManagerSlaveSelected(null);
            }
        };
    } else {
        return null;
    }
}
Also used : Response(com.lilithsthrone.game.dialogue.responses.Response) Hair(com.lilithsthrone.game.character.body.Hair) Eye(com.lilithsthrone.game.character.body.Eye) ListValue(com.lilithsthrone.utils.Util.ListValue) BodyPartInterface(com.lilithsthrone.game.character.body.BodyPartInterface) Vagina(com.lilithsthrone.game.character.body.Vagina) Skin(com.lilithsthrone.game.character.body.Skin)

Example 4 with ListValue

use of com.lilithsthrone.utils.Util.ListValue in project liliths-throne-public by Innoxia.

the class SlaveryUtil method generateNPCInteractionEvent.

/**
 * @param hour Pass in hour of the day
 * @param slave
 * @param otherSlavesPresent
 * @return
 */
public static SlaveryEventLogEntry generateNPCInteractionEvent(int day, int hour, NPC slave, List<NPC> otherSlavesPresent) {
    if (slave.getSlaveJob() == SlaveJob.PUBLIC_STOCKS) {
        return null;
    }
    Collections.shuffle(otherSlavesPresent);
    for (NPC npc : otherSlavesPresent) {
        if (!npc.equals(slave)) {
            if (slave.getLastTimeHadSex() + 24 * 60 < Main.game.getMinutesPassed()) {
                // They only want sex once a day, to stop the logs from being flooded
                if (slave.isAttractedTo(npc) && npc.hasSlavePermissionSetting(SlavePermissionSetting.SEX_RECEIVE_SLAVES) && slave.hasSlavePermissionSetting(SlavePermissionSetting.SEX_INITIATE_SLAVES)) {
                    System.out.println("x");
                    boolean canImpregnate = slave.hasSlavePermissionSetting(SlavePermissionSetting.SEX_IMPREGNATE) && npc.hasSlavePermissionSetting(SlavePermissionSetting.SEX_IMPREGNATED) && slave.hasPenis() && slave.isAbleToAccessCoverableArea(CoverableArea.PENIS, true) && npc.hasVagina() && npc.isAbleToAccessCoverableArea(CoverableArea.VAGINA, true);
                    boolean canBeImpregnated = slave.hasSlavePermissionSetting(SlavePermissionSetting.SEX_IMPREGNATED) && npc.hasSlavePermissionSetting(SlavePermissionSetting.SEX_IMPREGNATE) && npc.hasPenis() && npc.isAbleToAccessCoverableArea(CoverableArea.PENIS, true) && slave.hasVagina() && slave.isAbleToAccessCoverableArea(CoverableArea.VAGINA, true);
                    boolean impregnationAttempt = false, gettingPregnantAttempt = false;
                    // Apply sex effects:
                    if (canImpregnate) {
                        npc.rollForPregnancy(slave);
                        if (slave.getPenisRawCumProductionValue() > 0) {
                            npc.addStatusEffect(StatusEffect.CREAMPIE_VAGINA, 240);
                        }
                        npc.setVaginaVirgin(false);
                        impregnationAttempt = true;
                    }
                    if (canBeImpregnated) {
                        slave.rollForPregnancy(npc);
                        if (npc.getPenisRawCumProductionValue() > 0) {
                            slave.addStatusEffect(StatusEffect.CREAMPIE_VAGINA, 240);
                        }
                        slave.setVaginaVirgin(false);
                        gettingPregnantAttempt = true;
                    }
                    slave.setLastTimeHadSex((day * 24 * 60l) + hour * 60l, true);
                    switch(slave.getSlaveJob()) {
                        case CLEANING:
                            return new SlaveryEventLogEntry(hour, slave, SlaveEvent.SLAVE_SEX, null, Util.newArrayListOfValues(new ListValue<>("While dusting one of the first-floor corridors, " + slave.getName() + " caught sight of [npc.name]," + " and couldn't resist pulling [npc.herHim] into an empty room and giving [npc.herHim] a " + slave.getSexPaceDomPreference().getName() + " fucking." + (impregnationAttempt ? UtilText.parse(npc, "</br>[style.colourSex([npc.Name] might have gotten pregnant!)]") : "") + (gettingPregnantAttempt ? "</br>[style.colourSex(" + slave.getName() + " might have gotten pregnant!)]" : ""))), true);
                        case // TODO
                        IDLE:
                            return new SlaveryEventLogEntry(hour, slave, SlaveEvent.SLAVE_SEX, null, Util.newArrayListOfValues(new ListValue<>(slave.getName() + " gave [npc.name] a " + slave.getSexPaceDomPreference().getName() + " fucking." + (impregnationAttempt ? UtilText.parse(npc, "</br>[style.colourSex([npc.Name] might have gotten pregnant!)]") : "") + (gettingPregnantAttempt ? "</br>[style.colourSex(" + slave.getName() + " might have gotten pregnant!)]" : ""))), true);
                        case KITCHEN:
                            return new SlaveryEventLogEntry(hour, slave, SlaveEvent.SLAVE_SEX, null, Util.newArrayListOfValues(new ListValue<>("While working in the kitchen, " + slave.getName() + " saw [npc.name] enter the pantry alone," + " and couldn't resist following [npc.herHim] inside, before locking the door and giving [npc.herHim] a " + slave.getSexPaceDomPreference().getName() + " fucking." + (impregnationAttempt ? UtilText.parse(npc, "</br>[style.colourSex([npc.Name] might have gotten pregnant!)]") : "") + (gettingPregnantAttempt ? "</br>[style.colourSex(" + slave.getName() + " might have gotten pregnant!)]" : ""))), true);
                        case LAB_ASSISTANT:
                        case TEST_SUBJECT:
                            return new SlaveryEventLogEntry(hour, slave, SlaveEvent.SLAVE_SEX, null, Util.newArrayListOfValues(new ListValue<>("When Lilaya left the lab to take a break, " + slave.getName() + " used the opportunity to give [npc.name] a " + slave.getSexPaceDomPreference().getName() + " fucking on one of the lab's tables." + (impregnationAttempt ? UtilText.parse(npc, "</br>[style.colourSex([npc.Name] might have gotten pregnant!)]") : "") + (gettingPregnantAttempt ? "</br>[style.colourSex(" + slave.getName() + " might have gotten pregnant!)]" : ""))), true);
                        case LIBRARY:
                            return new SlaveryEventLogEntry(hour, slave, SlaveEvent.SLAVE_SEX, null, Util.newArrayListOfValues(new ListValue<>(slave.getName() + " pulled [npc.name] behind one of the shelves in the Library, before giving [npc.herHim] a " + slave.getSexPaceDomPreference().getName() + " fucking." + (impregnationAttempt ? UtilText.parse(npc, "</br>[style.colourSex([npc.Name] might have gotten pregnant!)]") : "") + (gettingPregnantAttempt ? "</br>[style.colourSex(" + slave.getName() + " might have gotten pregnant!)]" : ""))), true);
                        case PUBLIC_STOCKS:
                            break;
                    }
                }
            }
        }
    }
    return null;
}
Also used : NPC(com.lilithsthrone.game.character.npc.NPC) ListValue(com.lilithsthrone.utils.Util.ListValue) SlaveryEventLogEntry(com.lilithsthrone.game.dialogue.eventLog.SlaveryEventLogEntry)

Example 5 with ListValue

use of com.lilithsthrone.utils.Util.ListValue in project liliths-throne-public by Innoxia.

the class MainController method moveNorth.

/**
 * Moves the player North.
 */
public void moveNorth() {
    if (Main.game.getPlayer().getLocation().getY() + 1 < Main.game.getActiveWorld().WORLD_HEIGHT) {
        if (Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation().getX(), Main.game.getPlayer().getLocation().getY() + 1).getPlace().getPlaceType() != PlaceType.GENERIC_IMPASSABLE) {
            if (Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).getPlace().isItemsDisappear()) {
                Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).resetInventory(Util.newArrayListOfValues(new ListValue<>(Rarity.LEGENDARY)));
            }
            Main.game.getPlayer().setLocation(new Vector2i(Main.game.getPlayer().getLocation().getX(), Main.game.getPlayer().getLocation().getY() + 1));
            DialogueNodeOld dn = Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).getPlace().getDialogue(true);
            Main.game.setContent(new Response("", "", dn));
        }
    }
}
Also used : Response(com.lilithsthrone.game.dialogue.responses.Response) ListValue(com.lilithsthrone.utils.Util.ListValue) DialogueNodeOld(com.lilithsthrone.game.dialogue.DialogueNodeOld) Vector2i(com.lilithsthrone.utils.Vector2i)

Aggregations

ListValue (com.lilithsthrone.utils.Util.ListValue)6 Response (com.lilithsthrone.game.dialogue.responses.Response)5 DialogueNodeOld (com.lilithsthrone.game.dialogue.DialogueNodeOld)4 Vector2i (com.lilithsthrone.utils.Vector2i)4 BodyPartInterface (com.lilithsthrone.game.character.body.BodyPartInterface)1 Eye (com.lilithsthrone.game.character.body.Eye)1 Hair (com.lilithsthrone.game.character.body.Hair)1 Skin (com.lilithsthrone.game.character.body.Skin)1 Vagina (com.lilithsthrone.game.character.body.Vagina)1 NPC (com.lilithsthrone.game.character.npc.NPC)1 SlaveryEventLogEntry (com.lilithsthrone.game.dialogue.eventLog.SlaveryEventLogEntry)1