Search in sources :

Example 16 with Covering

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

the class CharacterUtils method randomiseBody.

public static void randomiseBody(GameCharacter character) {
    // All piercings are reliant on having ear piercings first:
    if (Math.random() >= (character.isFeminine() ? 0.1f : 0.9f) || character.hasFetish(Fetish.FETISH_MASOCHIST)) {
        character.setPiercedEar(true);
        if (Math.random() <= 0.33f || character.hasFetish(Fetish.FETISH_MASOCHIST)) {
            character.setPiercedNavel(true);
        }
        if (Math.random() <= 0.19f || character.hasFetish(Fetish.FETISH_MASOCHIST)) {
            character.setPiercedNose(true);
        }
        if (Math.random() <= 0.1f || character.hasFetish(Fetish.FETISH_MASOCHIST)) {
            character.setPiercedTongue(true);
        }
        if (Math.random() <= 0.1f || character.hasFetish(Fetish.FETISH_MASOCHIST)) {
            character.setPiercedNipples(true);
        }
        if (Math.random() <= 0.1f || character.hasFetish(Fetish.FETISH_MASOCHIST)) {
            // It said lip piercings are only in 4% of the pierced population, but that seems too low for the game.
            character.setPiercedLip(true);
        }
        // Genitals:
        if (character.hasPenis() && (Math.random() <= 0.05f || character.hasFetish(Fetish.FETISH_MASOCHIST))) {
            character.setPiercedPenis(true);
        }
        if (character.hasVagina() && (Math.random() <= 0.05f || character.hasFetish(Fetish.FETISH_MASOCHIST))) {
            character.setPiercedVagina(true);
        }
    }
    // Ass:
    if (character.hasFetish(Fetish.FETISH_ANAL_RECEIVING) || character.getHistory() == History.PROSTITUTE) {
        character.setAssVirgin(false);
        character.setAssCapacity(character.getAssRawCapacityValue() * 1.2f, true);
        character.setAssStretchedCapacity(character.getAssRawCapacityValue());
    } else {
        character.setAssVirgin(true);
    }
    // Body:
    character.setHeight(character.getHeightValue() - 15 + Util.random.nextInt(30) + 1);
    // Breasts:
    if (Main.getProperties().multiBreasts == 0) {
        character.setBreastRows(1);
    } else if (Main.getProperties().multiBreasts == 1) {
        if (character.getSkinType() == SkinType.HUMAN) {
            character.setBreastRows(1);
        }
    }
    if (character.hasBreasts()) {
        // Random size between -2 and +2 of base value.
        character.setBreastSize(Math.max(CupSize.AA.getMeasurement(), character.getBreastSize().getMeasurement() - 2 + (Util.random.nextInt(5))));
        if (Math.random() <= 0.015f || character.hasFetish(Fetish.FETISH_LACTATION_SELF)) {
            character.setBreastMilkStorage((int) ((character.getBreastSize().getMeasurement() * 5) * (1 + (Math.random() * 2))));
            if (Math.random() <= 0.025f) {
                character.addMilkModifier(FluidModifier.ADDICTIVE);
            }
            if (Math.random() <= 0.025f) {
                character.addMilkModifier(FluidModifier.HALLUCINOGENIC);
            }
        }
    }
    // Face:
    if (character.hasFetish(Fetish.FETISH_ORAL_GIVING) || character.getHistory() == History.PROSTITUTE) {
        character.setFaceCapacity(Capacity.FIVE_ROOMY.getMedianValue(), true);
        character.setFaceStretchedCapacity(character.getFaceRawCapacityValue());
        character.setFaceVirgin(false);
    } else {
        if (Math.random() > 0.15f) {
            character.setFaceVirgin(true);
        } else {
            character.setFaceVirgin(false);
        }
    }
    // Hair:
    if (Math.random() <= 0.2f && !character.getCovering(character.getHairType().getBodyCoveringType(character)).getType().getDyePatterns().isEmpty()) {
        // 20% chance to have a non-natural hair colour:
        Covering currentCovering = character.getCovering(character.getHairType().getBodyCoveringType(character));
        character.setHairCovering(new Covering(currentCovering.getType(), currentCovering.getType().getDyePatterns().get(Util.random.nextInt(currentCovering.getType().getDyePatterns().size())), currentCovering.getType().getAllPrimaryColours().isEmpty() ? currentCovering.getPrimaryColour() : currentCovering.getType().getAllPrimaryColours().get(Util.random.nextInt(currentCovering.getType().getAllPrimaryColours().size())), Math.random() <= 0.05f, currentCovering.getType().getAllSecondaryColours().isEmpty() ? currentCovering.getSecondaryColour() : currentCovering.getType().getAllSecondaryColours().get(Util.random.nextInt(currentCovering.getType().getAllSecondaryColours().size())), Math.random() <= 0.05f), true);
    }
    if (character.getHairRawLengthValue() != 0) {
        character.setHairLength(character.getHairLength().getMinimumValue() + Util.random.nextInt(character.getHairLength().getMaximumValue() - character.getHairLength().getMinimumValue()) + 1);
    }
    // Penis:
    if (character.hasPenis()) {
        character.setPenisVirgin(false);
        if ((character.getGender() == Gender.F_P_TRAP || character.getGender() == Gender.N_P_TRAP) && Math.random() >= 0.1f) {
            // Most traps have a small cock:
            character.setPenisSize(PenisSize.ONE_TINY.getMinimumValue() + Util.random.nextInt(character.getPenisSize().getMaximumValue() - character.getPenisSize().getMinimumValue()) + 1);
            character.setTesticleSize(TesticleSize.ONE_TINY.getValue());
            character.setCumProduction(CumProduction.ONE_TRICKLE.getMedianValue());
        } else {
            character.setPenisSize(character.getPenisSize().getMinimumValue() + Util.random.nextInt(character.getPenisSize().getMaximumValue() - character.getPenisSize().getMinimumValue()) + 1);
        }
        if (Math.random() <= 0.02f) {
            character.addCumModifier(FluidModifier.ADDICTIVE);
        }
        if (Math.random() <= 0.02f) {
            character.addCumModifier(FluidModifier.HALLUCINOGENIC);
        }
    }
    // Vagina:
    if (character.hasVagina()) {
        if (character.hasFetish(Fetish.FETISH_PURE_VIRGIN) && character.getHistory() != History.PROSTITUTE) {
            character.setVaginaVirgin(true);
            int capacity = Capacity.ZERO_IMPENETRABLE.getMinimumValue() + Util.random.nextInt(Capacity.TWO_TIGHT.getMaximumValue() - Capacity.ZERO_IMPENETRABLE.getMinimumValue());
            character.setVaginaCapacity(capacity, true);
        } else {
            if (Math.random() > 0.25f || character.getHistory() == History.PROSTITUTE) {
                character.setVaginaVirgin(false);
                character.setVaginaCapacity(character.getVaginaRawCapacityValue() * 1.2f, true);
                character.setVaginaStretchedCapacity(character.getVaginaRawCapacityValue());
            } else {
                character.setVaginaVirgin(true);
            }
        }
        // +1 or -1 either way
        character.setVaginaWetness(character.getVaginaWetness().getValue() - 1 + Util.random.nextInt(3));
        if (Math.random() <= 0.02f) {
            character.addGirlcumModifier(FluidModifier.ADDICTIVE);
        }
        if (Math.random() <= 0.02f) {
            character.addGirlcumModifier(FluidModifier.HALLUCINOGENIC);
        }
    }
    character.setAssStretchedCapacity(character.getAssRawCapacityValue());
    character.setNippleStretchedCapacity(character.getNippleRawCapacityValue());
    character.setFaceStretchedCapacity(character.getFaceRawCapacityValue());
    character.setPenisStretchedCapacity(character.getPenisRawCapacityValue());
    character.setVaginaStretchedCapacity(character.getVaginaRawCapacityValue());
}
Also used : Covering(com.lilithsthrone.game.character.body.Covering)

Example 17 with Covering

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

the class CharacterUtils method applyMakeup.

public static void applyMakeup(GameCharacter character, boolean overideExistingMakeup) {
    if ((character.isFeminine() && !character.hasFetish(Fetish.FETISH_CROSS_DRESSER)) || (!character.isFeminine() && character.hasFetish(Fetish.FETISH_CROSS_DRESSER))) {
        List<Colour> colours = Util.newArrayListOfValues(new ListValue<>(Colour.COVERING_NONE), new ListValue<>(Colour.COVERING_CLEAR), new ListValue<>(Colour.COVERING_RED), new ListValue<>(Colour.COVERING_PINK), new ListValue<>(Colour.COVERING_BLUE));
        if (character.getHistory() == History.PROSTITUTE) {
            colours.remove(Colour.COVERING_NONE);
            colours.remove(Colour.COVERING_CLEAR);
        }
        Colour colourForCoordination = colours.get(Util.random.nextInt(colours.size()));
        Colour colourForNails = colours.get(Util.random.nextInt(colours.size()));
        character.setLipstick(new Covering(BodyCoveringType.MAKEUP_LIPSTICK, colourForCoordination));
        character.setEyeLiner(new Covering(BodyCoveringType.MAKEUP_EYE_LINER, Colour.COVERING_BLACK));
        character.setEyeShadow(new Covering(BodyCoveringType.MAKEUP_EYE_SHADOW, colourForCoordination));
        character.setBlusher(new Covering(BodyCoveringType.MAKEUP_BLUSHER, colourForCoordination));
        character.setHandNailPolish(new Covering(BodyCoveringType.MAKEUP_NAIL_POLISH_HANDS, colourForNails));
        character.setFootNailPolish(new Covering(BodyCoveringType.MAKEUP_NAIL_POLISH_FEET, colourForNails));
    } else {
    // Masculine characters
    }
}
Also used : Covering(com.lilithsthrone.game.character.body.Covering) Colour(com.lilithsthrone.utils.Colour)

Aggregations

Covering (com.lilithsthrone.game.character.body.Covering)17 BodyCoveringType (com.lilithsthrone.game.character.body.types.BodyCoveringType)4 ArrayList (java.util.ArrayList)4 BodyPartInterface (com.lilithsthrone.game.character.body.BodyPartInterface)2 Eye (com.lilithsthrone.game.character.body.Eye)2 OrificeModifier (com.lilithsthrone.game.character.body.valueEnums.OrificeModifier)2 PenisModifier (com.lilithsthrone.game.character.body.valueEnums.PenisModifier)2 TongueModifier (com.lilithsthrone.game.character.body.valueEnums.TongueModifier)2 NPC (com.lilithsthrone.game.character.npc.NPC)2 Subspecies (com.lilithsthrone.game.character.race.Subspecies)2 Colour (com.lilithsthrone.utils.Colour)2 List (java.util.List)2 EnchantmentEventListener (com.lilithsthrone.controller.eventListeners.EnchantmentEventListener)1 InventorySelectedItemEventListener (com.lilithsthrone.controller.eventListeners.InventorySelectedItemEventListener)1 InventoryTooltipEventListener (com.lilithsthrone.controller.eventListeners.InventoryTooltipEventListener)1 SetContentEventListener (com.lilithsthrone.controller.eventListeners.SetContentEventListener)1 TooltipHideEventListener (com.lilithsthrone.controller.eventListeners.TooltipHideEventListener)1 TooltipInformationEventListener (com.lilithsthrone.controller.eventListeners.TooltipInformationEventListener)1 TooltipMoveEventListener (com.lilithsthrone.controller.eventListeners.TooltipMoveEventListener)1 TooltipResponseDescriptionEventListener (com.lilithsthrone.controller.eventListeners.TooltipResponseDescriptionEventListener)1