Search in sources :

Example 1 with RaceStage

use of com.lilithsthrone.game.character.race.RaceStage in project liliths-throne-public by Innoxia.

the class SlaveInStocks method setBodyFromPreferences.

private void setBodyFromPreferences(int i, Gender gender, Subspecies species) {
    int choice = Util.random.nextInt(i) + 1;
    RaceStage raceStage = RaceStage.PARTIAL;
    if (choice == 1) {
        raceStage = RaceStage.PARTIAL;
    } else if (choice == 2) {
        raceStage = RaceStage.LESSER;
    } else {
        raceStage = RaceStage.GREATER;
    }
    setBody(gender, species, raceStage);
}
Also used : RaceStage(com.lilithsthrone.game.character.race.RaceStage)

Example 2 with RaceStage

use of com.lilithsthrone.game.character.race.RaceStage in project liliths-throne-public by Innoxia.

the class SubmissionAttacker method setBodyFromPreferences.

private void setBodyFromPreferences(int i, Gender gender, Subspecies species) {
    int choice = Util.random.nextInt(i) + 1;
    RaceStage raceStage = RaceStage.PARTIAL;
    if (choice == 1) {
        raceStage = RaceStage.PARTIAL;
    } else if (choice == 2) {
        raceStage = RaceStage.LESSER;
    } else {
        raceStage = RaceStage.GREATER;
    }
    setBody(gender, species, raceStage);
}
Also used : RaceStage(com.lilithsthrone.game.character.race.RaceStage)

Example 3 with RaceStage

use of com.lilithsthrone.game.character.race.RaceStage 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 4 with RaceStage

use of com.lilithsthrone.game.character.race.RaceStage in project liliths-throne-public by Innoxia.

the class NPC method generatePreferredBody.

private Body generatePreferredBody() {
    // Preferred gender:
    Gender preferredGender = Gender.N_P_V_B_HERMAPHRODITE;
    Map<Gender, Integer> desiredGenders = new HashMap<>();
    switch(this.getSexualOrientation()) {
        case AMBIPHILIC:
            if (this.isFeminine() && // complex but fair logic doesn't feel too required
            Main.getProperties().forcedTFTendency != ForcedTFTendency.FEMININE && Main.getProperties().forcedTFTendency != ForcedTFTendency.FEMININE_HEAVY) {
                desiredGenders.put(Gender.M_P_MALE, 14);
                // maybe it would be appropriate to raise these chances for impregnators?
                desiredGenders.put(Gender.M_P_V_HERMAPHRODITE, 2);
                desiredGenders.put(Gender.M_V_CUNTBOY, 2);
                desiredGenders.put(Gender.F_P_TRAP, 2);
            } else {
                // basic chances of cis-female preference
                desiredGenders.put(Gender.F_V_B_FEMALE, 14);
                // increase chances of growing a penis if fetishes increase desirability
                if (this.hasVagina() && (this.hasFetish(Fetish.FETISH_PREGNANCY) || this.hasFetish(Fetish.FETISH_BROODMOTHER))) {
                    desiredGenders.put(Gender.F_P_V_B_FUTANARI, 4);
                    desiredGenders.put(Gender.F_P_B_SHEMALE, 4);
                    desiredGenders.put(Gender.F_P_TRAP, 4);
                } else {
                    desiredGenders.put(Gender.F_P_V_B_FUTANARI, 2);
                    desiredGenders.put(Gender.F_P_B_SHEMALE, 2);
                    desiredGenders.put(Gender.F_P_TRAP, 2);
                }
                ;
                // heavy masculine forcedTFTendency option adds a bit of a chance for masculine preferenes here
                if (Main.getProperties().forcedTFTendency == ForcedTFTendency.MASCULINE_HEAVY) {
                    desiredGenders.put(Gender.M_P_V_HERMAPHRODITE, 4);
                    desiredGenders.put(Gender.M_V_CUNTBOY, 4);
                    desiredGenders.put(Gender.F_P_TRAP, 4);
                    desiredGenders.put(Gender.M_V_B_BUTCH, 4);
                }
            }
            break;
        case ANDROPHILIC:
            // Heavy feminine forcedTFTendency causes androphiles to lose the majority of masculine options
            if (Main.getProperties().forcedTFTendency != ForcedTFTendency.FEMININE_HEAVY) {
                desiredGenders.put(Gender.M_P_MALE, 14);
            }
            // base chance options regardless of forcedTFTendency option
            desiredGenders.put(Gender.M_P_V_HERMAPHRODITE, 2);
            desiredGenders.put(Gender.M_V_CUNTBOY, 2);
            // both feminine forcedTFTendency options add decent chances to get some feminine options despite tastes
            if (Main.getProperties().forcedTFTendency == ForcedTFTendency.FEMININE || Main.getProperties().forcedTFTendency == ForcedTFTendency.FEMININE_HEAVY) {
                desiredGenders.put(Gender.F_P_V_B_FUTANARI, 2);
                desiredGenders.put(Gender.F_P_B_SHEMALE, 2);
                desiredGenders.put(Gender.F_P_TRAP, 2);
                desiredGenders.put(Gender.M_V_B_BUTCH, 2);
            }
            break;
        case GYNEPHILIC:
            // base level of feminine options even if forcedTFTendency is heavy male
            if (this.hasVagina() && (this.hasFetish(Fetish.FETISH_PREGNANCY) || this.hasFetish(Fetish.FETISH_BROODMOTHER))) {
                desiredGenders.put(Gender.F_P_V_B_FUTANARI, 2);
                desiredGenders.put(Gender.F_P_B_SHEMALE, 2);
                desiredGenders.put(Gender.F_P_TRAP, 2);
            // much lower base chance of pure female preference for heavy masculine forcedTFTendency
            } else if (Main.getProperties().forcedTFTendency == ForcedTFTendency.MASCULINE_HEAVY) {
                desiredGenders.put(Gender.F_V_B_FEMALE, 4);
            } else {
                desiredGenders.put(Gender.F_V_B_FEMALE, 14);
            }
            // both masculine forcedTFTendency options add decent chances to get some masculine options despite tastes
            if (Main.getProperties().forcedTFTendency == ForcedTFTendency.MASCULINE || Main.getProperties().forcedTFTendency == ForcedTFTendency.MASCULINE_HEAVY) {
                desiredGenders.put(Gender.M_P_V_HERMAPHRODITE, 2);
                desiredGenders.put(Gender.M_V_CUNTBOY, 2);
                desiredGenders.put(Gender.M_V_B_BUTCH, 2);
                desiredGenders.put(Gender.F_P_TRAP, 2);
            }
            break;
    }
    int total = 0;
    for (Entry<Gender, Integer> entry : desiredGenders.entrySet()) {
        total += entry.getValue();
    }
    int count = Util.random.nextInt(total) + 1;
    total = 0;
    for (Entry<Gender, Integer> entry : desiredGenders.entrySet()) {
        if (total < count && total + entry.getValue() >= count) {
            preferredGender = entry.getKey();
            break;
        }
        total += entry.getValue();
    }
    // Leaving this present but commented out so it can be easily re-enabled by anyone wanting to tweak or check
    // the results of gender selection and the forcedTFTendency setting
    // System.out.println("PREFERRED GENDER");
    // System.out.println(preferredGender);
    // System.out.println(desiredGenders);
    // Preferred race:
    Subspecies species = getSubspecies();
    RaceStage stage = getRaceStage();
    if (Main.getProperties().forcedTFPreference == FurryPreference.HUMAN) {
        species = Subspecies.HUMAN;
        stage = RaceStage.HUMAN;
    } else {
        // Chance for predator races to prefer prey races:
        if (getRace() == Race.CAT_MORPH && Math.random() > 0.8f) {
            species = Subspecies.HARPY;
        }
        if ((getRace() == Race.WOLF_MORPH || getRace() == Race.DOG_MORPH) && Math.random() > 0.8f) {
            List<Subspecies> availableRaces = new ArrayList<>();
            availableRaces.add(Subspecies.CAT_MORPH);
            availableRaces.add(Subspecies.HARPY);
            availableRaces.add(Subspecies.COW_MORPH);
            availableRaces.add(Subspecies.SQUIRREL_MORPH);
            species = availableRaces.get(Util.random.nextInt(availableRaces.size()));
        }
        // Chance for race to be random:
        if (Math.random() > 0.85f) {
            List<Subspecies> availableRaces = new ArrayList<>();
            availableRaces.add(Subspecies.CAT_MORPH);
            availableRaces.add(Subspecies.DOG_MORPH);
            availableRaces.add(Subspecies.HARPY);
            availableRaces.add(Subspecies.HORSE_MORPH);
            availableRaces.add(Subspecies.HUMAN);
            availableRaces.add(Subspecies.SQUIRREL_MORPH);
            availableRaces.add(Subspecies.COW_MORPH);
            availableRaces.add(Subspecies.WOLF_MORPH);
            species = availableRaces.get(Util.random.nextInt(availableRaces.size()));
        }
        if (preferredGender.isFeminine()) {
            switch(Main.getProperties().subspeciesFeminineFurryPreferencesMap.get(species)) {
                case HUMAN:
                    stage = RaceStage.HUMAN;
                    break;
                case MAXIMUM:
                    stage = RaceStage.GREATER;
                    break;
                case MINIMUM:
                    stage = RaceStage.PARTIAL_FULL;
                    break;
                case NORMAL:
                    stage = RaceStage.GREATER;
                    break;
                case REDUCED:
                    stage = RaceStage.LESSER;
                    break;
            }
        } else {
            switch(Main.getProperties().subspeciesMasculineFurryPreferencesMap.get(species)) {
                case HUMAN:
                    stage = RaceStage.HUMAN;
                    break;
                case MAXIMUM:
                    stage = RaceStage.GREATER;
                    break;
                case MINIMUM:
                    stage = RaceStage.PARTIAL_FULL;
                    break;
                case NORMAL:
                    stage = RaceStage.GREATER;
                    break;
                case REDUCED:
                    stage = RaceStage.LESSER;
                    break;
            }
        }
    }
    Body body = CharacterUtils.generateBody(preferredGender, species, stage);
    // Apply fetish modifiers:
    GameCharacter genericOwner = Main.game.getGenericAndrogynousNPC();
    // Ass:
    if (hasFetish(Fetish.FETISH_ANAL_GIVING)) {
        if (this.getAttributeValue(Attribute.MAJOR_CORRUPTION) >= CorruptionLevel.THREE_DIRTY.getMinimumValue()) {
            body.getAss().getAnus().getOrificeAnus().addOrificeModifier(genericOwner, OrificeModifier.RIBBED);
            body.getAss().getAnus().getOrificeAnus().addOrificeModifier(genericOwner, OrificeModifier.MUSCLE_CONTROL);
            body.getAss().getAnus().getOrificeAnus().addOrificeModifier(genericOwner, OrificeModifier.PUFFY);
        }
        if (this.getAttributeValue(Attribute.MAJOR_CORRUPTION) >= CorruptionLevel.FOUR_LUSTFUL.getMinimumValue()) {
            body.getAss().getAnus().getOrificeAnus().addOrificeModifier(genericOwner, OrificeModifier.TENTACLED);
        }
        body.getAss().setAssSize(genericOwner, AssSize.FIVE_HUGE.getValue());
        body.getAss().setAssSize(genericOwner, HipSize.FIVE_VERY_WIDE.getValue());
    }
    // Body:
    if (preferredGender.isFeminine()) {
        // Want feminine bodies to be smaller than them:
        body.setHeight(getHeightValue() - Util.random.nextInt(25));
    } else {
        // Want masculine bodies to be taller than them:
        body.setHeight(getHeightValue() + Util.random.nextInt(25));
    }
    // Breasts:
    if (Main.getProperties().multiBreasts == 0) {
        body.getBreast().setRows(genericOwner, 1);
    } else if (Main.getProperties().multiBreasts == 1) {
        if (stage != RaceStage.GREATER) {
            body.getBreast().setRows(genericOwner, 1);
        }
    }
    if (hasFetish(Fetish.FETISH_BREASTS_OTHERS) && preferredGender.isFeminine()) {
        body.getBreast().setSize(genericOwner, CupSize.DD.getMeasurement() + (Util.random.nextInt(5)));
    }
    // Face:
    if (hasFetish(Fetish.FETISH_ORAL_RECEIVING)) {
        body.getFace().getMouth().getOrificeMouth().addOrificeModifier(genericOwner, OrificeModifier.PUFFY);
        body.getFace().getMouth().setLipSize(genericOwner, LipSize.FOUR_HUGE.getValue());
        if (this.getAttributeValue(Attribute.MAJOR_CORRUPTION) >= CorruptionLevel.THREE_DIRTY.getMinimumValue()) {
            body.getFace().getMouth().getOrificeMouth().addOrificeModifier(genericOwner, OrificeModifier.RIBBED);
            body.getFace().getMouth().getOrificeMouth().addOrificeModifier(genericOwner, OrificeModifier.MUSCLE_CONTROL);
        }
        if (this.getAttributeValue(Attribute.MAJOR_CORRUPTION) >= CorruptionLevel.FOUR_LUSTFUL.getMinimumValue()) {
            body.getFace().getMouth().getOrificeMouth().addOrificeModifier(genericOwner, OrificeModifier.TENTACLED);
        }
    }
    // Hair:
    if (preferredGender.isFeminine()) {
        body.getHair().setLength(genericOwner, HairLength.THREE_SHOULDER_LENGTH.getMedianValue() + Util.random.nextInt(HairLength.SEVEN_TO_FLOOR.getMinimumValue() - HairLength.THREE_SHOULDER_LENGTH.getMedianValue()));
    } else {
        body.getHair().setLength(genericOwner, HairLength.ONE_VERY_SHORT.getMedianValue() + Util.random.nextInt(HairLength.THREE_SHOULDER_LENGTH.getMinimumValue() - HairLength.ONE_VERY_SHORT.getMedianValue()));
    }
    // Penis:
    if (body.getPenis().getType() != PenisType.NONE) {
        if (preferredGender == Gender.F_P_TRAP && Math.random() >= 0.1f) {
            // Most traps have a small cock:
            body.getPenis().setPenisSize(genericOwner, PenisSize.ONE_TINY.getMedianValue() + Util.random.nextInt(4));
            body.getPenis().getTesticle().setTesticleSize(genericOwner, TesticleSize.ONE_TINY.getValue());
            body.getPenis().getTesticle().setCumProduction(genericOwner, CumProduction.ONE_TRICKLE.getMedianValue());
        } else {
            body.getPenis().setPenisSize(genericOwner, body.getPenis().getSize().getMinimumValue() + Util.random.nextInt(body.getPenis().getSize().getMaximumValue() - body.getPenis().getSize().getMinimumValue()) + 1);
        }
    }
    // Vagina:
    if (body.getVagina().getType() != VaginaType.NONE) {
        if (this.getAttributeValue(Attribute.MAJOR_CORRUPTION) >= CorruptionLevel.THREE_DIRTY.getMinimumValue()) {
            body.getVagina().getOrificeVagina().addOrificeModifier(genericOwner, OrificeModifier.RIBBED);
            body.getVagina().getOrificeVagina().addOrificeModifier(genericOwner, OrificeModifier.MUSCLE_CONTROL);
        }
        if (this.getAttributeValue(Attribute.MAJOR_CORRUPTION) >= CorruptionLevel.FOUR_LUSTFUL.getMinimumValue()) {
            body.getVagina().getOrificeVagina().addOrificeModifier(genericOwner, OrificeModifier.TENTACLED);
        }
        body.getVagina().getOrificeVagina().setWetness(genericOwner, Wetness.THREE_WET.getValue() + Util.random.nextInt(4));
    }
    return body;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) GameCharacter(com.lilithsthrone.game.character.GameCharacter) RaceStage(com.lilithsthrone.game.character.race.RaceStage) Gender(com.lilithsthrone.game.character.gender.Gender) Body(com.lilithsthrone.game.character.body.Body) RacialBody(com.lilithsthrone.game.character.race.RacialBody) Subspecies(com.lilithsthrone.game.character.race.Subspecies)

Example 5 with RaceStage

use of com.lilithsthrone.game.character.race.RaceStage in project liliths-throne-public by Innoxia.

the class DominionAlleywayAttacker method setBodyFromPreferences.

private void setBodyFromPreferences(int i, Gender gender, Subspecies species) {
    int choice = Util.random.nextInt(i) + 1;
    RaceStage raceStage = RaceStage.PARTIAL;
    if (choice == 1) {
        raceStage = RaceStage.PARTIAL;
    } else if (choice == 2) {
        raceStage = RaceStage.LESSER;
    } else {
        raceStage = RaceStage.GREATER;
    }
    setBody(gender, species, raceStage);
}
Also used : RaceStage(com.lilithsthrone.game.character.race.RaceStage)

Aggregations

RaceStage (com.lilithsthrone.game.character.race.RaceStage)6 Body (com.lilithsthrone.game.character.body.Body)2 RacialBody (com.lilithsthrone.game.character.race.RacialBody)2 Subspecies (com.lilithsthrone.game.character.race.Subspecies)2 ArrayList (java.util.ArrayList)2 GameCharacter (com.lilithsthrone.game.character.GameCharacter)1 BodyPartInterface (com.lilithsthrone.game.character.body.BodyPartInterface)1 Covering (com.lilithsthrone.game.character.body.Covering)1 Eye (com.lilithsthrone.game.character.body.Eye)1 BodyCoveringType (com.lilithsthrone.game.character.body.types.BodyCoveringType)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 Gender (com.lilithsthrone.game.character.gender.Gender)1 NPC (com.lilithsthrone.game.character.npc.NPC)1 HashMap (java.util.HashMap)1