Search in sources :

Example 1 with Kate

use of com.lilithsthrone.game.character.npc.dominion.Kate in project liliths-throne-public by Innoxia.

the class Game method initNewGame.

public void initNewGame(DialogueNodeOld startingDialogueNode) {
    // Set up NPCs:
    try {
        NPCMap.clear();
        addNPC(new GenericMaleNPC(), false);
        addNPC(new GenericFemaleNPC(), false);
        addNPC(new GenericAndrogynousNPC(), false);
        addNPC(new PrologueMale(), false);
        addNPC(new PrologueFemale(), false);
        addNPC(new TestNPC(), false);
        // Story:
        Lilaya lilaya = new Lilaya();
        addNPC(lilaya, false);
        lilaya.setAffection(Main.game.getPlayer(), AffectionLevel.POSITIVE_ONE_FRIENDLY.getMedianValue());
        Rose rose = new Rose();
        addNPC(rose, false);
        rose.setAffection(Main.game.getPlayer(), AffectionLevel.POSITIVE_ONE_FRIENDLY.getMedianValue());
        lilaya.addSlave(rose);
        rose.setObedience(ObedienceLevel.POSITIVE_FIVE_SUBSERVIENT.getMedianValue());
        lilaya.setAffection(rose, AffectionLevel.POSITIVE_FOUR_LOVE.getMedianValue());
        rose.setAffection(lilaya, AffectionLevel.POSITIVE_FOUR_LOVE.getMedianValue());
        Brax brax = new Brax();
        addNPC(brax, false);
        CandiReceptionist candiReceptionist = new CandiReceptionist();
        addNPC(candiReceptionist, false);
        brax.setAffection(candiReceptionist, AffectionLevel.POSITIVE_TWO_LIKE.getMedianValue());
        candiReceptionist.setAffection(brax, AffectionLevel.POSITIVE_TWO_LIKE.getMedianValue());
        // Shopping Promenade:
        addNPC(new Ralph(), false);
        addNPC(new Nyan(), false);
        addNPC(new Vicky(), false);
        addNPC(new Pix(), false);
        addNPC(new Kate(), false);
        // Harpy nests:
        Scarlett scarlett = new Scarlett();
        addNPC(scarlett, false);
        Alexa alexa = new Alexa();
        addNPC(alexa, false);
        alexa.setAffection(scarlett, AffectionLevel.NEGATIVE_FOUR_HATE.getMedianValue());
        scarlett.setAffection(alexa, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        scarlett.setAffection(Main.game.getPlayer(), AffectionLevel.NEGATIVE_TWO_DISLIKE.getMedianValue());
        HarpyBimbo harpyBimbo = new HarpyBimbo();
        addNPC(harpyBimbo, false);
        HarpyBimboCompanion harpyBimboCompanion = new HarpyBimboCompanion();
        addNPC(harpyBimboCompanion, false);
        harpyBimbo.setAffection(harpyBimboCompanion, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        harpyBimboCompanion.setAffection(harpyBimbo, AffectionLevel.POSITIVE_FIVE_WORSHIP.getMedianValue());
        HarpyDominant harpyDominant = new HarpyDominant();
        addNPC(harpyDominant, false);
        HarpyDominantCompanion harpyDominantCompanion = new HarpyDominantCompanion();
        addNPC(harpyDominantCompanion, false);
        harpyDominant.setAffection(harpyDominantCompanion, AffectionLevel.POSITIVE_ONE_FRIENDLY.getMedianValue());
        harpyDominantCompanion.setAffection(harpyDominant, AffectionLevel.POSITIVE_FIVE_WORSHIP.getMedianValue());
        HarpyNympho harpyNympho = new HarpyNympho();
        addNPC(harpyNympho, false);
        HarpyNymphoCompanion harpyNymphoCompanion = new HarpyNymphoCompanion();
        addNPC(harpyNymphoCompanion, false);
        harpyNympho.setAffection(harpyNymphoCompanion, AffectionLevel.POSITIVE_FOUR_LOVE.getMedianValue());
        harpyNymphoCompanion.setAffection(harpyNympho, AffectionLevel.POSITIVE_FIVE_WORSHIP.getMedianValue());
        addNPC(new Pazu(), false);
        addNPC(new Finch(), false);
        // Zaranix:
        Zaranix zaranix = new Zaranix();
        addNPC(zaranix, false);
        ZaranixMaidKatherine katherine = new ZaranixMaidKatherine();
        addNPC(katherine, false);
        ZaranixMaidKelly kelly = new ZaranixMaidKelly();
        addNPC(kelly, false);
        Amber amber = new Amber();
        addNPC(amber, false);
        zaranix.setAffection(katherine, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        zaranix.setAffection(kelly, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        zaranix.setAffection(amber, AffectionLevel.POSITIVE_FOUR_LOVE.getMedianValue());
        amber.setAffection(zaranix, AffectionLevel.POSITIVE_FOUR_LOVE.getMedianValue());
        amber.setAffection(kelly, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        amber.setAffection(katherine, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        kelly.setAffection(zaranix, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        kelly.setAffection(katherine, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        kelly.setAffection(amber, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        katherine.setAffection(zaranix, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        katherine.setAffection(kelly, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        katherine.setAffection(amber, AffectionLevel.POSITIVE_THREE_CARING.getMedianValue());
        addNPC(new Arthur(), false);
        addNPC(new Ashley(), false);
        addNPC(new SupplierLeader(), false);
        addNPC(new SupplierPartner(), false);
    } catch (Exception e) {
        e.printStackTrace();
    }
    // This is due to the fact that on new world creation, the player is placed at coordinates (0, 0), which reveals the three squares at the bottom left corner of the map:
    Main.game.getActiveWorld().getCell(0, 0).setDiscovered(false);
    Main.game.getActiveWorld().getCell(0, 1).setDiscovered(false);
    Main.game.getActiveWorld().getCell(1, 0).setDiscovered(false);
    started = true;
    setContent(new Response(startingDialogueNode.getLabel(), startingDialogueNode.getDescription(), startingDialogueNode));
}
Also used : Ralph(com.lilithsthrone.game.character.npc.dominion.Ralph) Kate(com.lilithsthrone.game.character.npc.dominion.Kate) Amber(com.lilithsthrone.game.character.npc.dominion.Amber) Arthur(com.lilithsthrone.game.character.npc.dominion.Arthur) Rose(com.lilithsthrone.game.character.npc.dominion.Rose) Zaranix(com.lilithsthrone.game.character.npc.dominion.Zaranix) CandiReceptionist(com.lilithsthrone.game.character.npc.dominion.CandiReceptionist) HarpyNymphoCompanion(com.lilithsthrone.game.character.npc.dominion.HarpyNymphoCompanion) GenericAndrogynousNPC(com.lilithsthrone.game.character.npc.GenericAndrogynousNPC) HarpyBimbo(com.lilithsthrone.game.character.npc.dominion.HarpyBimbo) Scarlett(com.lilithsthrone.game.character.npc.dominion.Scarlett) HarpyBimboCompanion(com.lilithsthrone.game.character.npc.dominion.HarpyBimboCompanion) GenericMaleNPC(com.lilithsthrone.game.character.npc.GenericMaleNPC) HarpyDominant(com.lilithsthrone.game.character.npc.dominion.HarpyDominant) Finch(com.lilithsthrone.game.character.npc.dominion.Finch) SupplierPartner(com.lilithsthrone.game.character.npc.dominion.SupplierPartner) TestNPC(com.lilithsthrone.game.character.npc.dominion.TestNPC) HarpyDominantCompanion(com.lilithsthrone.game.character.npc.dominion.HarpyDominantCompanion) PrologueMale(com.lilithsthrone.game.character.npc.PrologueMale) Alexa(com.lilithsthrone.game.character.npc.dominion.Alexa) ZaranixMaidKelly(com.lilithsthrone.game.character.npc.dominion.ZaranixMaidKelly) Pazu(com.lilithsthrone.game.character.npc.dominion.Pazu) PrologueFemale(com.lilithsthrone.game.character.npc.PrologueFemale) TransformerException(javax.xml.transform.TransformerException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) GenericFemaleNPC(com.lilithsthrone.game.character.npc.GenericFemaleNPC) Lilaya(com.lilithsthrone.game.character.npc.dominion.Lilaya) Response(com.lilithsthrone.game.dialogue.responses.Response) Vicky(com.lilithsthrone.game.character.npc.dominion.Vicky) Brax(com.lilithsthrone.game.character.npc.dominion.Brax) Ashley(com.lilithsthrone.game.character.npc.dominion.Ashley) HarpyNympho(com.lilithsthrone.game.character.npc.dominion.HarpyNympho) Nyan(com.lilithsthrone.game.character.npc.dominion.Nyan) ZaranixMaidKatherine(com.lilithsthrone.game.character.npc.dominion.ZaranixMaidKatherine) SupplierLeader(com.lilithsthrone.game.character.npc.dominion.SupplierLeader) Pix(com.lilithsthrone.game.character.npc.dominion.Pix)

Example 2 with Kate

use of com.lilithsthrone.game.character.npc.dominion.Kate in project liliths-throne-public by Innoxia.

the class Game method endTurn.

public void endTurn(int turnTime, boolean advanceTime) {
    // long tStart = System.nanoTime();
    long startHour = getHour();
    if (advanceTime) {
        minutesPassed += turnTime;
        updateResponses();
    }
    if (Main.game.getCurrentWeather() != Weather.SNOW && Main.game.getSeason() != Season.WINTER) {
        Main.game.getDialogueFlags().values.remove(DialogueFlagValue.hasSnowedThisWinter);
        for (NPC npc : Main.game.getReindeerOverseers()) {
            if (npc.getLocation() != Main.game.getPlayer().getLocation()) {
                npc.setLocation(WorldType.EMPTY, PlaceType.GENERIC_EMPTY_TILE, true);
            }
        }
    }
    // Slavery: TODO
    int hoursPassed = (int) (getHour() - startHour);
    int hourStartTo24 = (int) (startHour % 24);
    for (int i = 1; i <= hoursPassed; i++) {
        slaveryUtil.performHourlyUpdate(this.getDayNumber(startHour * 60 + i * 60), (hourStartTo24 + i) % 24);
    }
    // If the time has passed midnight on this turn:
    boolean newDay = ((int) (minutesPassed / (60 * 24)) != (int) (((minutesPassed - turnTime) / (60 * 24))));
    if (newDay) {
        // TODO replace with methods in each GenericPlace:
        AbstractClothing goggles = AbstractClothingType.generateClothing(ClothingType.SCIENTIST_EYES_SAFETY_GOGGLES, Colour.CLOTHING_BLACK, false);
        if (!Main.game.getWorlds().get(WorldType.LILAYAS_HOUSE_GROUND_FLOOR).getCell(PlaceType.LILAYA_HOME_LAB).getInventory().hasClothing(goggles)) {
            Main.game.getWorlds().get(WorldType.LILAYAS_HOUSE_GROUND_FLOOR).getCell(PlaceType.LILAYA_HOME_LAB).getInventory().addClothing(goggles);
        }
        pendingSlaveInStocksReset = true;
        // Reindeer:
        for (NPC npc : Main.game.getReindeerOverseers()) {
            if (npc.getLocationPlace().getPlaceType() == PlaceType.DOMINION_STREET && !npc.getLocation().equals(Main.game.getPlayer().getLocation())) {
                npc.moveToAdjacentMatchingCellType();
                Main.game.getDialogueFlags().dailyReindeerReset(npc.getId());
            }
        }
    }
    if (pendingSlaveInStocksReset && Main.game.getPlayer().getLocationPlace().getPlaceType() != PlaceType.SLAVER_ALLEY_PUBLIC_STOCKS) {
        for (NPC npc : Main.game.getCharactersPresent(Main.game.getWorlds().get(WorldType.SLAVER_ALLEY).getCell(PlaceType.SLAVER_ALLEY_PUBLIC_STOCKS))) {
            if (npc instanceof SlaveInStocks) {
                Main.game.banishNPC(npc);
            }
        }
        for (int i = 0; i < 4; i++) {
            SlaveInStocks slave = new SlaveInStocks(GenderPreference.getGenderFromUserPreferences());
            if (Math.random() > 0.5f) {
                Main.game.getGenericFemaleNPC().addSlave(slave);
            } else {
                Main.game.getGenericMaleNPC().addSlave(slave);
            }
            try {
                Main.game.addNPC(slave, false);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        pendingSlaveInStocksReset = false;
    }
    handleAtmosphericConditions(turnTime);
    // Apply status effects and update all NPCs:
    isInNPCUpdateLoop = true;
    for (NPC npc : NPCMap.values()) {
        // Remove Dominion attackers if they aren't in alleyways: TODO this is because storm attackers need to be removed after a storm
        if (npc.getLocationPlace().getPlaceType() != PlaceType.DOMINION_BACK_ALLEYS && npc.getWorldLocation() == WorldType.DOMINION && npc instanceof DominionAlleywayAttacker && !Main.game.getPlayer().getLocation().equals(npc.getLocation())) {
            banishNPC(npc);
        }
        // Non-slave NPCs clean clothes:
        if (!npc.isSlave() && !Main.game.getPlayer().getLocation().equals(npc.getLocation())) {
            npc.cleanAllClothing();
            npc.cleanAllDirtySlots();
        }
        // Set NPC resource values:
        if (!Main.game.isInCombat() && !Main.game.isInSex()) {
            if (!Main.game.getPlayer().getLocation().equals(npc.getLocation())) {
                npc.setHealthPercentage(1);
                npc.setManaPercentage(1);
            // npc.setLust(npc.getRestingLust());
            }
            npc.alignLustToRestingLust(turnTime * 10);
        }
        npc.calculateStatusEffects(turnTime);
        if ((npc.isPendingClothingDressing() || (!npc.isSlave() && !npc.isUnique() && (npc.hasStatusEffect(StatusEffect.EXPOSED) || npc.hasStatusEffect(StatusEffect.EXPOSED_BREASTS) || npc.hasStatusEffect(StatusEffect.EXPOSED_PLUS_BREASTS)))) && (Main.game.getCurrentDialogueNode().equals(Main.game.getPlayer().getLocationPlace().getDialogue(false)) || !(npc.getWorldLocation() == Main.game.getPlayer().getWorldLocation() && npc.getLocation().equals(Main.game.getPlayer().getLocation())))) {
            npc.equipClothing(true, true);
            npc.setPendingClothingDressing(false);
        }
        if (npc.isPendingTransformationToGenderIdentity()) {
            npc.setBody(npc.getGenderIdentity(), RacialBody.valueOfRace(npc.getRace()), npc.getRaceStage());
            CharacterUtils.randomiseBody(npc);
            npc.setPendingTransformationToGenderIdentity(false);
        }
        // Prostitutes stay on promiscuity pills to avoid pregnancies, and, if the NPC is male, to avoid knocking up their clients
        if ((!npc.isPregnant() && !npc.isSlave() && npc.getHistory() == History.PROSTITUTE && !npc.hasStatusEffect(StatusEffect.PROMISCUITY_PILL) && !npc.getLocation().equals(Main.game.getPlayer().getLocation())) || (npc.isSlave() && npc.getSlaveJobSettings().contains(SlaveJobSetting.SEX_PROMISCUITY_PILLS))) {
            npc.useItem(AbstractItemType.generateItem(ItemType.PROMISCUITY_PILL), npc, false);
        }
        if (npc.isSlave() && npc.getSlaveJobSettings().contains(SlaveJobSetting.SEX_VIXENS_VIRILITY)) {
            npc.useItem(AbstractItemType.generateItem(ItemType.VIXENS_VIRILITY), npc, false);
        }
        if (npc.hasStatusEffect(StatusEffect.PREGNANT_3) && (minutesPassed - npc.getTimeProgressedToFinalPregnancyStage()) > (12 * 60)) {
            if (npc instanceof Lilaya) {
                if (!Main.game.getDialogueFlags().values.contains(DialogueFlagValue.reactedToPregnancyLilaya)) {
                    // Lilaya will only end pregnancy after you've seen it.
                    npc.endPregnancy(true);
                }
            } else {
                npc.endPregnancy(true);
                if (npc instanceof Kate) {
                    Main.game.getDialogueFlags().values.remove(DialogueFlagValue.reactedToKatePregnancy);
                }
            }
        }
        if (npc.getLocation().equals(Main.game.getPlayer().getLocation()) && npc.getWorldLocation() == Main.game.getPlayer().getWorldLocation()) {
            for (CoverableArea ca : CoverableArea.values()) {
                if (npc.isCoverableAreaExposed(ca) && ca != CoverableArea.MOUTH) {
                    npc.getPlayerKnowsAreas().add(ca);
                }
            }
        }
        if (newDay) {
            npc.dailyReset();
        }
    }
    isInNPCUpdateLoop = false;
    for (NPC npc : npcsToRemove) {
        NPCMap.remove(npc.getId());
    }
    for (NPC npc : npcsToAdd) {
        NPCMap.put(npc.getId(), npc);
    }
    npcsToRemove.clear();
    npcsToAdd.clear();
    // If not in combat:
    if (!isInCombat()) {
        // Regenerate health and stamina over time:
        if (!isInSex() && !currentDialogueNode.isRegenerationDisabled()) {
            if (Main.game.getPlayer().getHealthPercentage() < 1) {
                Main.game.getPlayer().incrementHealth(turnTime * 0.1f);
            }
            if (Main.game.getPlayer().getManaPercentage() < 1) {
                Main.game.getPlayer().incrementMana(turnTime * 0.1f);
            }
            Main.game.getPlayer().alignLustToRestingLust(turnTime);
        }
    }
    if (Main.game.getCurrentDialogueNode() != MiscDialogue.STATUS_EFFECTS) {
        Main.game.getPlayer().calculateStatusEffects(turnTime);
    }
    RenderingEngine.ENGINE.renderButtons();
    Main.mainController.updateUI();
    Main.mainController.getTooltip().hide();
    if (!Main.game.getPlayer().getStatusEffectDescriptions().isEmpty() && Main.game.getCurrentDialogueNode() != MiscDialogue.STATUS_EFFECTS) {
        if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.NORMAL) {
            Main.game.saveDialogueNode();
        }
        Main.game.setContent(new Response("", "", MiscDialogue.STATUS_EFFECTS) {

            @Override
            public void effects() {
                if (!Main.game.getPlayer().hasQuest(QuestLine.SIDE_ENCHANTMENT_DISCOVERY) && Main.game.getPlayer().hasNonArcaneEssences()) {
                    Main.game.getTextEndStringBuilder().append(Main.game.getPlayer().startQuest(QuestLine.SIDE_ENCHANTMENT_DISCOVERY));
                }
                if (!Main.game.getPlayer().hasQuest(QuestLine.SIDE_FIRST_TIME_PREGNANCY) && Main.game.getPlayer().isVisiblyPregnant()) {
                    Main.game.getTextEndStringBuilder().append(Main.game.getPlayer().startQuest(QuestLine.SIDE_FIRST_TIME_PREGNANCY));
                }
            }
        });
        Main.game.getPlayer().getStatusEffectDescriptions().clear();
    }
// System.out.println((System.nanoTime()-tStart)/1000000000d+"s");
}
Also used : TestNPC(com.lilithsthrone.game.character.npc.dominion.TestNPC) NPC(com.lilithsthrone.game.character.npc.NPC) GenericFemaleNPC(com.lilithsthrone.game.character.npc.GenericFemaleNPC) GenericAndrogynousNPC(com.lilithsthrone.game.character.npc.GenericAndrogynousNPC) GenericMaleNPC(com.lilithsthrone.game.character.npc.GenericMaleNPC) CoverableArea(com.lilithsthrone.game.character.body.CoverableArea) Kate(com.lilithsthrone.game.character.npc.dominion.Kate) AbstractClothing(com.lilithsthrone.game.inventory.clothing.AbstractClothing) TransformerException(javax.xml.transform.TransformerException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) Lilaya(com.lilithsthrone.game.character.npc.dominion.Lilaya) Response(com.lilithsthrone.game.dialogue.responses.Response) SlaveInStocks(com.lilithsthrone.game.character.npc.dominion.SlaveInStocks) DominionAlleywayAttacker(com.lilithsthrone.game.character.npc.dominion.DominionAlleywayAttacker)

Aggregations

GenericAndrogynousNPC (com.lilithsthrone.game.character.npc.GenericAndrogynousNPC)2 GenericFemaleNPC (com.lilithsthrone.game.character.npc.GenericFemaleNPC)2 GenericMaleNPC (com.lilithsthrone.game.character.npc.GenericMaleNPC)2 Kate (com.lilithsthrone.game.character.npc.dominion.Kate)2 Lilaya (com.lilithsthrone.game.character.npc.dominion.Lilaya)2 TestNPC (com.lilithsthrone.game.character.npc.dominion.TestNPC)2 Response (com.lilithsthrone.game.dialogue.responses.Response)2 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)2 TransformerException (javax.xml.transform.TransformerException)2 CoverableArea (com.lilithsthrone.game.character.body.CoverableArea)1 NPC (com.lilithsthrone.game.character.npc.NPC)1 PrologueFemale (com.lilithsthrone.game.character.npc.PrologueFemale)1 PrologueMale (com.lilithsthrone.game.character.npc.PrologueMale)1 Alexa (com.lilithsthrone.game.character.npc.dominion.Alexa)1 Amber (com.lilithsthrone.game.character.npc.dominion.Amber)1 Arthur (com.lilithsthrone.game.character.npc.dominion.Arthur)1 Ashley (com.lilithsthrone.game.character.npc.dominion.Ashley)1 Brax (com.lilithsthrone.game.character.npc.dominion.Brax)1 CandiReceptionist (com.lilithsthrone.game.character.npc.dominion.CandiReceptionist)1 DominionAlleywayAttacker (com.lilithsthrone.game.character.npc.dominion.DominionAlleywayAttacker)1