Search in sources :

Example 1 with BodyPartInterface

use of com.lilithsthrone.game.character.body.BodyPartInterface in project liliths-throne-public by Innoxia.

the class GameCharacter method setSkinCovering.

/**
 * @return Formatted description of skin colour change.
 */
public String setSkinCovering(Covering covering, boolean updateAllSkinColours) {
    if (this.getBodyMaterial() == BodyMaterial.SLIME) {
        switch(covering.getType()) {
            case MAKEUP_BLUSHER:
            case MAKEUP_EYE_LINER:
            case MAKEUP_EYE_SHADOW:
            case MAKEUP_LIPSTICK:
            case MAKEUP_NAIL_POLISH_FEET:
            case MAKEUP_NAIL_POLISH_HANDS:
                return "<p>" + "[style.colourDisabled(Slimes cannot wear makeup...)]" + "</p>";
            default:
                break;
        }
    }
    if (!getCovering(getSkinType().getBodyCoveringType(this)).equals(covering)) {
        BodyCoveringType coveringType = covering.getType();
        body.getCoverings().put(coveringType, covering);
        body.updateCoverings(false, false, false, updateAllSkinColours);
        List<String> affectedParts = new ArrayList<>();
        for (BodyPartInterface part : body.getAllBodyParts()) {
            if (part.getType().getBodyCoveringType(this) == coveringType) {
                affectedParts.add(part.getName(this));
            }
        }
        if (!affectedParts.isEmpty()) {
            if (isPlayer()) {
                return "<p>" + "The " + coveringType.getName(this) + " on your " + Util.stringsToStringList(affectedParts, false) + " suddenly start" + (coveringType.isDefaultPlural() ? "" : "s") + " to itch, and you let out a startled cry as " + (coveringType.isDefaultPlural() ? "they begin" : "it begins") + " to change colour.</br>" + "You now have " + covering.getFullDescription(this, true) + "." + "</p>" + postTransformationCalculation();
            } else {
                return UtilText.parse(this, "<p>" + "[npc.Name] feels the " + coveringType.getName(this) + " on [npc.her] " + Util.stringsToStringList(affectedParts, false) + " suddenly start to itch, and [npc.she] lets out a startled cry as " + (coveringType.isDefaultPlural() ? "they begin" : "it begins") + " to change colour.</br>" + "[npc.She] now has " + covering.getFullDescription(this, true) + "." + "</p>" + postTransformationCalculation());
            }
        } else {
            postTransformationCalculation();
        }
    }
    return "<p style='text-align:center;'>[style.colourDisabled(Nothing happens...)]</p>";
}
Also used : ArrayList(java.util.ArrayList) BodyPartInterface(com.lilithsthrone.game.character.body.BodyPartInterface) BodyCoveringType(com.lilithsthrone.game.character.body.types.BodyCoveringType)

Example 2 with BodyPartInterface

use of com.lilithsthrone.game.character.body.BodyPartInterface 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 3 with BodyPartInterface

use of com.lilithsthrone.game.character.body.BodyPartInterface in project liliths-throne-public by Innoxia.

the class CharacterUtils method setCoveringColours.

private static List<BodyCoveringType> setCoveringColours(Body body, GameCharacter character, List<BodyCoveringType> typesToInfluence) {
    List<BodyCoveringType> tempList = new ArrayList<>(typesToInfluence);
    // Skin & fur colours:
    for (BodyPartInterface bp : character.getAllBodyParts()) {
        if (bp.getType().getBodyCoveringType(character) != null && bp.getType().getBodyCoveringType(character).getRace() != null && !(bp instanceof Eye)) {
            if (tempList.contains(bp.getType().getBodyCoveringType(character))) {
                Covering covering = character.getCovering(bp.getType().getBodyCoveringType(character));
                body.getCoverings().put(bp.getType().getBodyCoveringType(character), new Covering(covering.getType(), covering.getPattern(), covering.getModifier(), covering.getPrimaryColour(), covering.isPrimaryGlowing(), covering.getSecondaryColour(), covering.isSecondaryGlowing()));
                tempList.remove(bp.getType().getBodyCoveringType(character));
            // System.out.println("Set: "+bp.getType().getName(character)+" : "+bp.getType().getBodyCoveringType().getName(character)+"("+bp.getType().getRace().getName()+") : "+covering.getPrimaryColour().getName());
            }
        }
    }
    List<BodyCoveringType> extraCoverings = new ArrayList<>();
    extraCoverings.add(BodyCoveringType.ANUS);
    extraCoverings.add(BodyCoveringType.NIPPLES);
    extraCoverings.add(BodyCoveringType.MOUTH);
    extraCoverings.add(BodyCoveringType.TONGUE);
    for (BodyCoveringType bct : extraCoverings) {
        if (tempList.contains(bct)) {
            Covering covering = character.getCovering(bct);
            body.getCoverings().put(bct, new Covering(covering.getType(), covering.getPattern(), covering.getModifier(), covering.getPrimaryColour(), covering.isPrimaryGlowing(), covering.getSecondaryColour(), covering.isSecondaryGlowing()));
            tempList.remove(bct);
        }
    // System.out.println("Set: "+bct+" : "+bct.getName(character)+" : "+covering.getPrimaryColour().getName());
    }
    return tempList;
}
Also used : Eye(com.lilithsthrone.game.character.body.Eye) ArrayList(java.util.ArrayList) BodyPartInterface(com.lilithsthrone.game.character.body.BodyPartInterface) Covering(com.lilithsthrone.game.character.body.Covering) BodyCoveringType(com.lilithsthrone.game.character.body.types.BodyCoveringType)

Example 4 with BodyPartInterface

use of com.lilithsthrone.game.character.body.BodyPartInterface in project liliths-throne-public by Innoxia.

the class CharacterUtils method generateBody.

public static Body generateBody(Gender startingGender, GameCharacter mother, GameCharacter father) {
    RacialBody startingBodyType = RacialBody.HUMAN;
    RacialBody motherBody = RacialBody.valueOfRace(mother.getSubspecies().getOffspringSubspecies().getRace());
    RacialBody fatherBody = RacialBody.valueOfRace(father.getSubspecies().getOffspringSubspecies().getRace());
    Subspecies raceTakesAfter = mother.getSubspecies();
    RaceStage stage = RaceStage.HUMAN;
    boolean takesAfterMother = true;
    boolean raceFromMother = true;
    boolean feminineGender = startingGender.isFeminine();
    NPC blankNPC = Main.game.getGenericAndrogynousNPC();
    GameCharacter parentTakesAfter = mother;
    // Core body type is random:
    if (Math.random() <= 0.5) {
        startingBodyType = motherBody;
        stage = mother.getRaceStage();
    } else {
        startingBodyType = fatherBody;
        stage = father.getRaceStage();
        raceTakesAfter = father.getSubspecies();
        raceFromMother = false;
    }
    switch(startingGender.isFeminine() ? Main.getProperties().subspeciesFeminineFurryPreferencesMap.get(raceTakesAfter) : Main.getProperties().subspeciesMasculineFurryPreferencesMap.get(raceTakesAfter)) {
        case HUMAN:
            stage = RaceStage.HUMAN;
            break;
        case MINIMUM:
            if (stage != RaceStage.HUMAN || stage != RaceStage.PARTIAL) {
                stage = RaceStage.PARTIAL;
            }
            break;
        case REDUCED:
            if (stage != RaceStage.HUMAN || stage != RaceStage.PARTIAL || stage != RaceStage.LESSER) {
                stage = RaceStage.LESSER;
            }
            break;
        case NORMAL:
            break;
        case MAXIMUM:
            stage = RaceStage.GREATER;
            break;
    }
    Body body = generateBody(startingGender, startingBodyType, stage);
    if (mother.getBodyMaterial() == BodyMaterial.SLIME) {
        body.setBodyMaterial(BodyMaterial.SLIME);
    }
    // Takes other features from the parent closest to their femininity:
    if (Math.abs(mother.getFemininityValue() - body.getFemininity()) > Math.abs(father.getFemininityValue() - body.getFemininity())) {
        takesAfterMother = false;
        parentTakesAfter = father;
    }
    float takesAfterMotherChance = takesAfterMother ? 0.75f : 0.25f;
    List<BodyCoveringType> typesToInfluence = new ArrayList<>();
    // Skin & fur colours:
    for (BodyPartInterface bp : body.getAllBodyParts()) {
        if (bp.getType().getBodyCoveringType(body) != null && bp.getType().getBodyCoveringType(body).getRace() != null && !(bp instanceof Eye)) {
            typesToInfluence.add(bp.getType().getBodyCoveringType(body));
        }
    }
    typesToInfluence.add(BodyCoveringType.ANUS);
    typesToInfluence.add(BodyCoveringType.NIPPLES);
    typesToInfluence.add(BodyCoveringType.MOUTH);
    typesToInfluence.add(BodyCoveringType.TONGUE);
    if (raceFromMother) {
        typesToInfluence = setCoveringColours(body, mother, typesToInfluence);
        setCoveringColours(body, father, typesToInfluence);
    } else {
        typesToInfluence = setCoveringColours(body, father, typesToInfluence);
        setCoveringColours(body, mother, typesToInfluence);
    }
    body.updateCoverings(false, false, true, false);
    // Iris colour:
    if (Math.random() >= 0.9f) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getCoverings().put(body.getEye().getType().getBodyCoveringType(body), new Covering(body.getEye().getType().getBodyCoveringType(body), mother.getCovering(mother.getEyeType().getBodyCoveringType(mother)).getPattern(), mother.getCovering(mother.getEyeType().getBodyCoveringType(mother)).getPrimaryColour(), mother.getCovering(mother.getEyeType().getBodyCoveringType(mother)).isPrimaryGlowing(), mother.getCovering(mother.getEyeType().getBodyCoveringType(mother)).getPrimaryColour(), mother.getCovering(mother.getEyeType().getBodyCoveringType(mother)).isPrimaryGlowing()));
        } else {
            body.getCoverings().put(body.getEye().getType().getBodyCoveringType(body), new Covering(body.getEye().getType().getBodyCoveringType(body), father.getCovering(father.getEyeType().getBodyCoveringType(father)).getPattern(), father.getCovering(father.getEyeType().getBodyCoveringType(father)).getPrimaryColour(), father.getCovering(father.getEyeType().getBodyCoveringType(father)).isPrimaryGlowing(), father.getCovering(father.getEyeType().getBodyCoveringType(father)).getPrimaryColour(), father.getCovering(father.getEyeType().getBodyCoveringType(father)).isPrimaryGlowing()));
        }
    }
    // Pupil colour:
    if (Math.random() >= 0.4f) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getCoverings().put(BodyCoveringType.EYE_PUPILS, new Covering(body.getEye().getType().getBodyCoveringType(body), mother.getCovering(BodyCoveringType.EYE_PUPILS).getPattern(), mother.getCovering(BodyCoveringType.EYE_PUPILS).getPrimaryColour(), mother.getCovering(BodyCoveringType.EYE_PUPILS).isPrimaryGlowing(), mother.getCovering(BodyCoveringType.EYE_PUPILS).getPrimaryColour(), mother.getCovering(BodyCoveringType.EYE_PUPILS).isPrimaryGlowing()));
        } else {
            body.getCoverings().put(BodyCoveringType.EYE_PUPILS, new Covering(body.getEye().getType().getBodyCoveringType(body), father.getCovering(BodyCoveringType.EYE_PUPILS).getPattern(), father.getCovering(BodyCoveringType.EYE_PUPILS).getPrimaryColour(), father.getCovering(BodyCoveringType.EYE_PUPILS).isPrimaryGlowing(), father.getCovering(BodyCoveringType.EYE_PUPILS).getPrimaryColour(), father.getCovering(BodyCoveringType.EYE_PUPILS).isPrimaryGlowing()));
        }
    }
    // Body core:
    // Height:
    body.setHeight(getSizeFromGenetics(body.getHeightValue(), (body.isFeminine() ? mother.isFeminine() : !mother.isFeminine()), mother.getHeightValue(), (body.isFeminine() ? father.isFeminine() : !father.isFeminine()), father.getHeightValue()));
    // Femininity:
    switch(startingGender.getType()) {
        case FEMININE:
            if (takesAfterMother) {
                if (mother.getFemininityValue() >= Femininity.FEMININE.getMinimumFemininity()) {
                    body.setFemininity(mother.getFemininityValue());
                }
            } else {
                if (father.getFemininityValue() >= Femininity.FEMININE.getMinimumFemininity()) {
                    body.setFemininity(father.getFemininityValue());
                }
            }
            break;
        case NEUTRAL:
            if (takesAfterMother) {
                if (mother.getFemininity() == Femininity.ANDROGYNOUS) {
                    body.setFemininity(mother.getFemininityValue());
                }
            } else {
                if (father.getFemininity() == Femininity.ANDROGYNOUS) {
                    body.setFemininity(father.getFemininityValue());
                }
            }
            break;
        case MASCULINE:
            if (takesAfterMother) {
                if (mother.getFemininityValue() < Femininity.ANDROGYNOUS.getMinimumFemininity()) {
                    body.setFemininity(mother.getFemininityValue());
                }
            } else {
                if (father.getFemininityValue() < Femininity.ANDROGYNOUS.getMinimumFemininity()) {
                    body.setFemininity(father.getFemininityValue());
                }
            }
            break;
    }
    // Body size:
    int minimumSize = Math.min(mother.getBodySizeValue(), father.getBodySizeValue()) - Util.random.nextInt(5);
    int maximumSize = Math.min(mother.getBodySizeValue(), father.getBodySizeValue()) + Util.random.nextInt(5);
    if (takesAfterMother) {
        minimumSize = Math.max(minimumSize, (feminineGender ? motherBody.getFemaleBodySize() - 30 : motherBody.getMaleBodySize() - 30));
        maximumSize = Math.max(maximumSize, (feminineGender ? motherBody.getFemaleBodySize() + 30 : motherBody.getMaleBodySize() + 30));
    } else {
        minimumSize = Math.max(minimumSize, (feminineGender ? fatherBody.getFemaleBodySize() - 30 : fatherBody.getMaleBodySize() - 30));
        maximumSize = Math.max(maximumSize, (feminineGender ? fatherBody.getFemaleBodySize() + 30 : fatherBody.getMaleBodySize() + 30));
    }
    int variance = (maximumSize == minimumSize ? 0 : Util.random.nextInt(maximumSize - minimumSize));
    body.setBodySize(minimumSize + variance);
    // Muscle:
    int minimumMuscle = Math.min(mother.getMuscleValue(), father.getMuscleValue()) - Util.random.nextInt(5);
    int maximumMuscle = Math.min(mother.getMuscleValue(), father.getMuscleValue()) + Util.random.nextInt(5);
    if (takesAfterMother) {
        minimumMuscle = Math.max(minimumMuscle, (feminineGender ? motherBody.getFemaleMuscle() - 30 : motherBody.getMaleMuscle() - 30));
        maximumMuscle = Math.max(maximumMuscle, (feminineGender ? motherBody.getFemaleMuscle() + 30 : motherBody.getMaleMuscle() + 30));
    } else {
        minimumMuscle = Math.max(minimumMuscle, (feminineGender ? fatherBody.getFemaleMuscle() - 30 : fatherBody.getMaleMuscle() - 30));
        maximumMuscle = Math.max(maximumMuscle, (feminineGender ? fatherBody.getFemaleMuscle() + 30 : fatherBody.getMaleMuscle() + 30));
    }
    variance = (maximumMuscle == minimumMuscle ? 0 : Util.random.nextInt(maximumMuscle - minimumMuscle));
    body.setMuscle(minimumMuscle + variance);
    // Body parts:
    boolean inheritsFromMotherFemininity = mother.isFeminine() == body.isFeminine();
    boolean inheritsFromFatherFemininity = father.isFeminine() == body.isFeminine();
    // Arm:
    if (Math.random() > 0.75) {
        body.getArm().setArmRows(blankNPC, parentTakesAfter.getArmRows());
    }
    // Ass:
    // Ass size:
    body.getAss().setAssSize(blankNPC, getSizeFromGenetics(body.getAss().getAssSize().getValue(), inheritsFromMotherFemininity, mother.getAssSize().getValue(), inheritsFromFatherFemininity, father.getAssSize().getValue()));
    // Hip size:
    body.getAss().setHipSize(blankNPC, getSizeFromGenetics(body.getAss().getHipSize().getValue(), inheritsFromMotherFemininity, mother.getHipSize().getValue(), inheritsFromFatherFemininity, father.getHipSize().getValue()));
    // Breasts:
    boolean inheritsFromMotherBreasts = mother.hasBreasts();
    boolean inheritsFromFatherBreasts = father.hasBreasts();
    if (body.getBreast().getRawSizeValue() > 0) {
        // Breast shape:
        if (Math.random() >= 0.8f) {
            if (inheritsFromMotherBreasts && inheritsFromFatherBreasts) {
                if (Math.random() >= takesAfterMotherChance) {
                    body.getBreast().setShape(blankNPC, mother.getBreastShape());
                } else {
                    body.getBreast().setShape(blankNPC, father.getBreastShape());
                }
            } else if (inheritsFromMotherBreasts) {
                body.getBreast().setShape(blankNPC, mother.getBreastShape());
            } else if (inheritsFromFatherBreasts) {
                body.getBreast().setShape(blankNPC, father.getBreastShape());
            }
        }
        // Breast size:
        body.getBreast().setSize(blankNPC, getSizeFromGenetics(body.getBreast().getSize().getMeasurement(), inheritsFromMotherBreasts, mother.getBreastSize().getMeasurement(), inheritsFromFatherBreasts, father.getBreastSize().getMeasurement()));
        // Breast rows:
        if (Math.random() >= 0.75) {
            if (Math.random() >= takesAfterMotherChance) {
                body.getBreast().setRows(blankNPC, mother.getBreastRows());
            } else {
                body.getBreast().setRows(blankNPC, father.getBreastRows());
            }
        }
        // Modifiers:
        for (OrificeModifier om : OrificeModifier.values()) {
            if (Math.random() >= 0.5) {
                if (inheritsFromMotherBreasts && inheritsFromFatherBreasts) {
                    if (Math.random() >= takesAfterMotherChance) {
                        if (mother.hasNippleOrificeModifier(om)) {
                            body.getBreast().getNipples().getOrificeNipples().addOrificeModifier(blankNPC, om);
                        }
                    } else {
                        if (father.hasNippleOrificeModifier(om)) {
                            body.getBreast().getNipples().getOrificeNipples().addOrificeModifier(blankNPC, om);
                        }
                    }
                } else if (inheritsFromMotherBreasts) {
                    if (mother.hasNippleOrificeModifier(om)) {
                        body.getBreast().getNipples().getOrificeNipples().addOrificeModifier(blankNPC, om);
                    }
                } else if (inheritsFromFatherBreasts) {
                    if (father.hasNippleOrificeModifier(om)) {
                        body.getBreast().getNipples().getOrificeNipples().addOrificeModifier(blankNPC, om);
                    }
                }
            }
        }
    }
    // Nipple count:
    if (Math.random() > 0.75f) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getBreast().setNippleCountPerBreast(blankNPC, mother.getNippleCountPerBreast());
        } else {
            body.getBreast().setNippleCountPerBreast(blankNPC, father.getNippleCountPerBreast());
        }
    }
    // Nipple shape:
    if (Math.random() >= 0.75f) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getBreast().getNipples().setNippleShape(blankNPC, mother.getNippleShape());
        } else {
            body.getBreast().getNipples().setNippleShape(blankNPC, father.getNippleShape());
        }
    }
    // Areolae shape:
    if (Math.random() >= 0.75f) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getBreast().getNipples().setAreolaeShape(blankNPC, mother.getAreolaeShape());
        } else {
            body.getBreast().getNipples().setAreolaeShape(blankNPC, father.getAreolaeShape());
        }
    }
    // Nipple size:
    body.getBreast().getNipples().setNippleSize(blankNPC, getSizeFromGenetics(body.getBreast().getNipples().getNippleSizeValue(), inheritsFromMotherBreasts, mother.getNippleSize().getValue(), inheritsFromFatherBreasts, father.getNippleSize().getValue()));
    // Areolae size:
    body.getBreast().getNipples().setAreolaeSize(blankNPC, getSizeFromGenetics(body.getBreast().getNipples().getAreolaeSizeValue(), inheritsFromMotherBreasts, mother.getAreolaeSize().getValue(), inheritsFromFatherBreasts, father.getAreolaeSize().getValue()));
    // Face:
    // Lip size:
    body.getFace().getMouth().setLipSize(blankNPC, getSizeFromGenetics(body.getFace().getMouth().getLipSizeValue(), inheritsFromMotherFemininity, mother.getLipSizeValue(), inheritsFromFatherFemininity, father.getLipSizeValue()));
    // Mouth modifiers:
    for (OrificeModifier om : OrificeModifier.values()) {
        if (Math.random() >= 0.5) {
            if (Math.random() >= takesAfterMotherChance) {
                if (mother.hasFaceOrificeModifier(om)) {
                    body.getFace().getMouth().getOrificeMouth().addOrificeModifier(blankNPC, om);
                }
            } else {
                if (father.hasFaceOrificeModifier(om)) {
                    body.getFace().getMouth().getOrificeMouth().addOrificeModifier(blankNPC, om);
                }
            }
        }
    }
    // Tongue modifiers:
    for (TongueModifier tm : TongueModifier.values()) {
        if (Math.random() >= 0.5) {
            if (Math.random() >= takesAfterMotherChance) {
                if (mother.hasTongueModifier(tm)) {
                    body.getFace().getTongue().addTongueModifier(blankNPC, tm);
                }
            } else {
                if (father.hasTongueModifier(tm)) {
                    body.getFace().getTongue().addTongueModifier(blankNPC, tm);
                }
            }
        }
    }
    // Eye pairs:
    if (Math.random() >= 0.75) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getEye().setEyePairs(blankNPC, mother.getEyePairs());
        } else {
            body.getEye().setEyePairs(blankNPC, father.getEyePairs());
        }
    }
    // Iris shape:
    if (Math.random() >= 0.75) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getEye().setIrisShape(blankNPC, mother.getIrisShape());
        } else {
            body.getEye().setIrisShape(blankNPC, father.getIrisShape());
        }
    }
    // Pupil shape:
    if (Math.random() >= 0.75) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getEye().setPupilShape(blankNPC, mother.getPupilShape());
        } else {
            body.getEye().setPupilShape(blankNPC, father.getPupilShape());
        }
    }
    // Horn rows:
    if (Math.random() >= 0.75) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getHorn().setHornRows(blankNPC, mother.getHornRows());
        } else {
            body.getHorn().setHornRows(blankNPC, father.getHornRows());
        }
    }
    // Penis:
    boolean inheritsFromMotherPenis = mother.hasPenis();
    boolean inheritsFromFatherPenis = father.hasPenis();
    if (body.getPenis().getType() != PenisType.NONE) {
        // Penis size:
        body.getPenis().setPenisSize(blankNPC, getSizeFromGenetics(body.getPenis().getRawSizeValue(), inheritsFromMotherPenis, mother.getPenisRawSizeValue(), inheritsFromFatherPenis, father.getPenisRawSizeValue()));
        // Penis modifiers:
        for (PenisModifier pm : PenisModifier.values()) {
            if (Math.random() >= 0.5) {
                if (inheritsFromMotherPenis && inheritsFromFatherPenis) {
                    if (Math.random() >= takesAfterMotherChance) {
                        if (mother.hasPenisModifier(pm)) {
                            body.getPenis().addPenisModifier(blankNPC, pm);
                        }
                    } else {
                        if (father.hasPenisModifier(pm)) {
                            body.getPenis().addPenisModifier(blankNPC, pm);
                        }
                    }
                } else if (inheritsFromMotherPenis) {
                    if (mother.hasPenisModifier(pm)) {
                        body.getPenis().addPenisModifier(blankNPC, pm);
                    }
                } else if (inheritsFromFatherPenis) {
                    if (father.hasPenisModifier(pm)) {
                        body.getPenis().addPenisModifier(blankNPC, pm);
                    }
                }
            }
        }
        // Urethra modifiers:
        for (OrificeModifier om : OrificeModifier.values()) {
            if (Math.random() >= 0.5) {
                if (inheritsFromMotherPenis && inheritsFromFatherPenis) {
                    if (Math.random() >= takesAfterMotherChance) {
                        if (mother.hasUrethraOrificeModifier(om)) {
                            body.getPenis().getOrificeUrethra().addOrificeModifier(blankNPC, om);
                        }
                    } else {
                        if (father.hasUrethraOrificeModifier(om)) {
                            body.getPenis().getOrificeUrethra().addOrificeModifier(blankNPC, om);
                        }
                    }
                } else if (inheritsFromMotherPenis) {
                    if (mother.hasUrethraOrificeModifier(om)) {
                        body.getPenis().getOrificeUrethra().addOrificeModifier(blankNPC, om);
                    }
                } else if (inheritsFromFatherPenis) {
                    if (father.hasUrethraOrificeModifier(om)) {
                        body.getPenis().getOrificeUrethra().addOrificeModifier(blankNPC, om);
                    }
                }
            }
        }
        // Testicles:
        // Testicle size:
        body.getPenis().getTesticle().setTesticleSize(blankNPC, getSizeFromGenetics(body.getPenis().getTesticle().getTesticleSize().getValue(), inheritsFromMotherPenis, mother.getTesticleSize().getValue(), inheritsFromFatherPenis, father.getTesticleSize().getValue()));
        // Testicle count:
        if (Math.random() >= 0.75) {
            if (inheritsFromMotherPenis && inheritsFromFatherPenis) {
                if (Math.random() >= takesAfterMotherChance) {
                    body.getPenis().getTesticle().setTesticleCount(blankNPC, mother.getTesticleCount());
                } else {
                    body.getPenis().getTesticle().setTesticleCount(blankNPC, father.getTesticleCount());
                }
            } else if (inheritsFromMotherPenis) {
                body.getPenis().getTesticle().setTesticleCount(blankNPC, mother.getTesticleCount());
            } else if (inheritsFromFatherPenis) {
                body.getPenis().getTesticle().setTesticleCount(blankNPC, father.getTesticleCount());
            }
        }
        // Internal testicles:
        if (Math.random() >= 0.75) {
            if (inheritsFromMotherPenis && inheritsFromFatherPenis) {
                if (Math.random() >= takesAfterMotherChance) {
                    if (mother.isInternalTesticles()) {
                        body.getPenis().getTesticle().setInternal(blankNPC, true);
                    }
                } else {
                    if (father.isInternalTesticles()) {
                        body.getPenis().getTesticle().setInternal(blankNPC, true);
                    }
                }
            } else if (inheritsFromMotherPenis) {
                if (mother.isInternalTesticles()) {
                    body.getPenis().getTesticle().setInternal(blankNPC, true);
                }
            } else if (inheritsFromFatherPenis) {
                if (father.isInternalTesticles()) {
                    body.getPenis().getTesticle().setInternal(blankNPC, true);
                }
            }
        }
        // Cum Production:
        body.getPenis().getTesticle().setCumProduction(blankNPC, getSizeFromGenetics(body.getPenis().getTesticle().getRawCumProductionValue(), inheritsFromMotherPenis, mother.getPenisRawCumProductionValue(), inheritsFromFatherPenis, father.getPenisRawCumProductionValue()));
    }
    // Tail:
    if (Math.random() > 0.75) {
        if (Math.random() >= takesAfterMotherChance) {
            body.getTail().setTailCount(blankNPC, mother.getTailCount());
        } else {
            body.getTail().setTailCount(blankNPC, father.getTailCount());
        }
    }
    // Vagina:
    boolean inheritsFromMotherVagina = mother.hasVagina();
    boolean inheritsFromFatherVagina = father.hasVagina();
    if (body.getVagina().getType() != VaginaType.NONE) {
        // Clitoris size:
        body.getVagina().setClitorisSize(blankNPC, getSizeFromGenetics(body.getVagina().getRawClitorisSizeValue(), inheritsFromMotherVagina, mother.getVaginaRawClitorisSizeValue(), inheritsFromFatherVagina, father.getVaginaRawClitorisSizeValue()));
        // Labia size:
        body.getVagina().setLabiaSize(blankNPC, getSizeFromGenetics(body.getVagina().getRawLabiaSizeValue(), inheritsFromMotherVagina, mother.getVaginaRawLabiaSizeValue(), inheritsFromFatherVagina, father.getVaginaRawLabiaSizeValue()));
        // // Capacity:
        // body.getVagina().getOrificeVagina().setCapacity(blankNPC, getSizeFromGenetics(
        // (int) body.getVagina().getOrificeVagina().getRawCapacityValue(),
        // inheritsFromMotherVagina, (int) mother.getVaginaRawCapacityValue(),
        // inheritsFromFatherVagina, (int) father.getVaginaRawCapacityValue()));
        // Wetness:
        body.getVagina().getOrificeVagina().setWetness(blankNPC, getSizeFromGenetics(body.getVagina().getOrificeVagina().getWetness(blankNPC).getValue(), inheritsFromMotherVagina, mother.getVaginaWetness().getValue(), inheritsFromFatherVagina, father.getVaginaWetness().getValue()));
        // Modifiers:
        for (OrificeModifier om : OrificeModifier.values()) {
            if (Math.random() >= 0.5) {
                if (inheritsFromMotherVagina && inheritsFromFatherVagina) {
                    if (Math.random() >= takesAfterMotherChance) {
                        if (mother.hasVaginaOrificeModifier(om)) {
                            body.getVagina().getOrificeVagina().addOrificeModifier(blankNPC, om);
                        }
                    } else {
                        if (father.hasVaginaOrificeModifier(om)) {
                            body.getVagina().getOrificeVagina().addOrificeModifier(blankNPC, om);
                        }
                    }
                } else if (inheritsFromMotherVagina) {
                    if (mother.hasVaginaOrificeModifier(om)) {
                        body.getVagina().getOrificeVagina().addOrificeModifier(blankNPC, om);
                    }
                } else if (inheritsFromFatherVagina) {
                    if (father.hasVaginaOrificeModifier(om)) {
                        body.getVagina().getOrificeVagina().addOrificeModifier(blankNPC, om);
                    }
                }
            }
        }
    }
    return body;
}
Also used : NPC(com.lilithsthrone.game.character.npc.NPC) ArrayList(java.util.ArrayList) Covering(com.lilithsthrone.game.character.body.Covering) RaceStage(com.lilithsthrone.game.character.race.RaceStage) BodyCoveringType(com.lilithsthrone.game.character.body.types.BodyCoveringType) RacialBody(com.lilithsthrone.game.character.race.RacialBody) Subspecies(com.lilithsthrone.game.character.race.Subspecies) PenisModifier(com.lilithsthrone.game.character.body.valueEnums.PenisModifier) Eye(com.lilithsthrone.game.character.body.Eye) TongueModifier(com.lilithsthrone.game.character.body.valueEnums.TongueModifier) BodyPartInterface(com.lilithsthrone.game.character.body.BodyPartInterface) Body(com.lilithsthrone.game.character.body.Body) RacialBody(com.lilithsthrone.game.character.race.RacialBody) OrificeModifier(com.lilithsthrone.game.character.body.valueEnums.OrificeModifier)

Example 5 with BodyPartInterface

use of com.lilithsthrone.game.character.body.BodyPartInterface in project liliths-throne-public by Innoxia.

the class GameCharacter method postTransformationCalculation.

public String postTransformationCalculation(boolean displayColourDiscovered) {
    StringBuilder postTFSB = new StringBuilder();
    // If this is the first time getting this covering type:
    for (BodyPartInterface bp : body.getAllBodyParts()) {
        BodyCoveringType bct = bp.getType().getBodyCoveringType(this);
        if (!body.getBodyCoveringTypesDiscovered().contains(bct)) {
            if (bct != null) {
                body.getBodyCoveringTypesDiscovered().add(bct);
                String bctName = bct.getRace().getName();
                if (bct == BodyCoveringType.HORN) {
                    bctName = "horn";
                }
                if (bct == BodyCoveringType.ANTLER_REINDEER) {
                    bctName = "antler";
                }
                if (displayColourDiscovered) {
                    if (isPlayer()) {
                        postTFSB.append("<b>You have discovered that your natural</b> " + (bct == BodyCoveringType.HORN ? "<b>" + bctName + "'s" : "<b style='color:" + bct.getRace().getColour().toWebHexString() + ";'>" + bctName + "'s</b> <b>" + bct.getName(this)) + " colour is " + getCovering(bct).getColourDescriptor(this, true, false) + "!</b>");
                    } else {
                        postTFSB.append(UtilText.parse(this, "<b>[npc.Name] has discovered that [npc.her] natural</b> " + (bct == BodyCoveringType.HORN ? "<b>" + bctName + "'s" : "<b style='color:" + bct.getRace().getColour().toWebHexString() + ";'>" + bctName + "'s</b> <b>" + bct.getName(this)) + " colour is " + getCovering(bct).getColourDescriptor(this, true, false) + "!</b>"));
                    }
                }
            }
        }
    }
    body.calculateRace();
    calculateSpecialAttacks();
    postTFSB.append(inventory.calculateClothingPostTransformation(this));
    updateInventoryListeners();
    updateAttributeListeners();
    return postTFSB.toString();
}
Also used : BodyPartInterface(com.lilithsthrone.game.character.body.BodyPartInterface) BodyCoveringType(com.lilithsthrone.game.character.body.types.BodyCoveringType)

Aggregations

BodyPartInterface (com.lilithsthrone.game.character.body.BodyPartInterface)5 BodyCoveringType (com.lilithsthrone.game.character.body.types.BodyCoveringType)4 Eye (com.lilithsthrone.game.character.body.Eye)3 ArrayList (java.util.ArrayList)3 Covering (com.lilithsthrone.game.character.body.Covering)2 Body (com.lilithsthrone.game.character.body.Body)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 OrificeModifier (com.lilithsthrone.game.character.body.valueEnums.OrificeModifier)1 PenisModifier (com.lilithsthrone.game.character.body.valueEnums.PenisModifier)1 TongueModifier (com.lilithsthrone.game.character.body.valueEnums.TongueModifier)1 NPC (com.lilithsthrone.game.character.npc.NPC)1 RaceStage (com.lilithsthrone.game.character.race.RaceStage)1 RacialBody (com.lilithsthrone.game.character.race.RacialBody)1 Subspecies (com.lilithsthrone.game.character.race.Subspecies)1 Response (com.lilithsthrone.game.dialogue.responses.Response)1 ListValue (com.lilithsthrone.utils.Util.ListValue)1