Search in sources :

Example 1 with Litter

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

the class PhoneDialogue method pregnancyDetails.

private static String pregnancyDetails() {
    StringBuilder contentSB = new StringBuilder();
    // Mothered children:
    boolean noPregnancies = true;
    contentSB.append("<div class='subTitle'>Mothered children</div>");
    if (Main.game.getPlayer().hasStatusEffect(StatusEffect.PREGNANT_0) || Main.game.getPlayer().hasStatusEffect(StatusEffect.PREGNANT_1) || Main.game.getPlayer().hasStatusEffect(StatusEffect.PREGNANT_2) || Main.game.getPlayer().hasStatusEffect(StatusEffect.PREGNANT_3)) {
        contentSB.append("<div class='container-full-width' style='text-align:center;'>" + "[style.boldBad(Ongoing pregnancy)]" + "</br>" + "[style.bold(Possible partners:)]");
        for (PregnancyPossibility pp : Main.game.getPlayer().getPotentialPartnersAsMother()) {
            if (pp.getFather() != null) {
                contentSB.append(UtilText.parse(pp.getFather(), "</br><b>[npc.Name(A)] (</b>" + (!pp.getFather().getRaceStage().getName().isEmpty() ? "<b style='color:" + pp.getFather().getRaceStage().getColour().toWebHexString() + ";'>" + Util.capitaliseSentence(pp.getFather().getRaceStage().getName()) + "</b> " : "") + "<b style='color:" + pp.getFather().getRace().getColour().toWebHexString() + ";'>" + (pp.getFather().getGender().isFeminine() ? Util.capitaliseSentence(pp.getFather().getSubspecies().getSingularFemaleName()) : Util.capitaliseSentence(pp.getFather().getSubspecies().getSingularMaleName())) + "</b><b>) Probability: "));
                if (pp.getProbability() <= 0) {
                    contentSB.append("None");
                } else if (pp.getProbability() <= 0.15f) {
                    contentSB.append("Low");
                } else if (pp.getProbability() <= 0.3f) {
                    contentSB.append("Average");
                } else if (pp.getProbability() < 1) {
                    contentSB.append("High");
                } else {
                    contentSB.append("Certainty");
                }
                contentSB.append("</b>");
            }
        }
        contentSB.append("</div>");
        noPregnancies = false;
    }
    if (!Main.game.getPlayer().getLittersBirthed().isEmpty()) {
        for (Litter litter : Main.game.getPlayer().getLittersBirthed()) {
            if (litter.getFather() != null) {
                contentSB.append(UtilText.parse(litter.getFather(), "<div class='container-full-width' style='text-align:center;'>" + "[style.boldGood(Resolved Pregnancy)]" + "</br>" + "Conceived with [npc.name(a)] on day " + litter.getDayOfConception() + ", delivered on day " + litter.getDayOfBirth() + "." + "</br>" + "You gave birth to " + litter.getBirthedDescriptionList() + "." + "</div>"));
            } else {
                contentSB.append("<div class='container-full-width' style='text-align:center;'>" + "[style.boldGood(Resolved Pregnancy)]" + "</br>" + "Conceived with someone you can't remember on day " + litter.getDayOfConception() + ", delivered on day " + litter.getDayOfBirth() + "." + "</br>" + "You gave birth to " + litter.getBirthedDescriptionList() + "." + "</div>");
            }
        }
        noPregnancies = false;
    }
    if (noPregnancies) {
        contentSB.append("<div class='subTitle'>" + "<span style='color:" + Colour.TEXT_GREY.toWebHexString() + ";'>You have never been pregnant!</span>" + "</div>");
    }
    // Fathered children:
    noPregnancies = true;
    contentSB.append("<span style='height:16px;width:100%;float:left;'></span>" + "<div class='subTitle'>Fathered children</div>");
    for (PregnancyPossibility pp : Main.game.getPlayer().getPotentialPartnersAsFather()) {
        if (pp.getMother() != null) {
            contentSB.append(UtilText.parse(pp.getMother(), "<div class='container-full-width' style='text-align:center;'>" + "[style.boldBad(Ongoing pregnancy)]" + "</br>" + "<b>[npc.Name(A)] (</b>" + (!pp.getMother().getRaceStage().getName().isEmpty() ? "<b style='color:" + pp.getMother().getRaceStage().getColour().toWebHexString() + ";'>" + Util.capitaliseSentence(pp.getMother().getRaceStage().getName()) + "</b> " : "") + "<b style='color:" + pp.getMother().getRace().getColour().toWebHexString() + ";'>" + (pp.getMother().getGender().isFeminine() ? Util.capitaliseSentence(pp.getMother().getSubspecies().getSingularFemaleName()) : Util.capitaliseSentence(pp.getMother().getSubspecies().getSingularMaleName())) + "</b><b>)</b>"));
            if (pp.getMother().hasStatusEffect(StatusEffect.PREGNANT_0)) {
                contentSB.append("</br>Probability of impregnation: ");
                if (pp.getProbability() <= 0) {
                    contentSB.append("None");
                } else if (pp.getProbability() <= 0.15f) {
                    contentSB.append("Low");
                } else if (pp.getProbability() <= 0.3f) {
                    contentSB.append("Average");
                } else if (pp.getProbability() < 1) {
                    contentSB.append("High");
                } else {
                    contentSB.append("Certainty");
                }
            } else {
                if (pp.getMother().hasStatusEffect(StatusEffect.PREGNANT_1)) {
                    contentSB.append("</br>Pregnancy stage: [style.boldSex(" + Util.capitaliseSentence(StatusEffect.PREGNANT_1.getName(pp.getMother())) + ")]");
                } else if (pp.getMother().hasStatusEffect(StatusEffect.PREGNANT_2)) {
                    contentSB.append("</br>Pregnancy stage: [style.boldSex(" + Util.capitaliseSentence(StatusEffect.PREGNANT_2.getName(pp.getMother())) + ")]");
                } else {
                    contentSB.append("</br>Pregnancy stage: [style.boldSex(" + Util.capitaliseSentence(StatusEffect.PREGNANT_3.getName(pp.getMother())) + ")]");
                }
            }
            contentSB.append("</b></br>");
            contentSB.append("</div>");
        }
        noPregnancies = false;
    }
    if (!Main.game.getPlayer().getLittersFathered().isEmpty()) {
        for (Litter litter : Main.game.getPlayer().getLittersFathered()) {
            if (litter.getMother() != null) {
                contentSB.append(UtilText.parse(litter.getMother(), "<div class='container-full-width' style='text-align:center;'>" + "[style.boldGood(Resolved Pregnancy)]" + "</br>" + "Conceived with [npc.name(a)] on day " + litter.getDayOfConception() + ", delivered on day " + litter.getDayOfBirth() + "." + "</br>" + "[npc.She] gave birth to " + litter.getBirthedDescriptionList() + "." + "</div>"));
            } else {
                contentSB.append("<div class='container-full-width' style='text-align:center;'>" + "[style.boldGood(Resolved Pregnancy)]" + "</br>" + "Conceived with someone you can't remember on day " + litter.getDayOfConception() + ", delivered on day " + litter.getDayOfBirth() + "." + "</br>" + "[npc.She] gave birth to " + litter.getBirthedDescriptionList() + "." + "</div>");
            }
        }
        noPregnancies = false;
    }
    if (noPregnancies) {
        contentSB.append("<div class='subTitle'>" + "<span style='color:" + Colour.TEXT_GREY.toWebHexString() + ";'>You have never got anyone pregnant!</span>" + "</div>");
    }
    return contentSB.toString();
}
Also used : Litter(com.lilithsthrone.game.character.Litter) PregnancyPossibility(com.lilithsthrone.game.character.PregnancyPossibility)

Example 2 with Litter

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

the class Body method getPregnancyDetails.

public String getPregnancyDetails(GameCharacter owner) {
    descriptionSB = new StringBuilder();
    if (owner.isVisiblyPregnant()) {
        GameCharacter father = owner.getPregnantLitter().getFather();
        if (father.isPlayer()) {
            descriptionSB.append("<p><span style='color:" + Colour.GENERIC_ARCANE.toWebHexString() + ";'>From one of your sexual encounters, you've ended up impregnating [npc.name].</span>");
        } else {
            descriptionSB.append("<p><span style='color:" + Colour.GENERIC_ARCANE.toWebHexString() + ";'>From one of [npc.her] sexual encounters, [npc.name] has ended up getting impregnated by " + father.getName() + ".</span>");
        }
        if (owner.hasStatusEffect(StatusEffect.PREGNANT_1)) {
            descriptionSB.append(" [npc.Her] belly is only a little swollen, as [npc.she]'s only in the first stage of pregnancy.");
        } else if (owner.hasStatusEffect(StatusEffect.PREGNANT_2)) {
            descriptionSB.append(" [npc.Her] belly is noticeably swollen, as [npc.she]'s well into [npc.her] pregnancy.");
        } else {
            descriptionSB.append(" [npc.Her] belly is massively swollen, and although [npc.she]'s clearly ready for it, [npc.she] hasn't decided to give birth just yet.");
        }
        descriptionSB.append("</p>");
    }
    if (!owner.getLittersBirthed().isEmpty()) {
        descriptionSB.append("<p>" + "<span style='color:" + Colour.GENERIC_ARCANE.toWebHexString() + ";'>" + "[npc.Name] has given birth " + Util.intToString(owner.getLittersBirthed().size()) + " " + (owner.getLittersBirthed().size() == 1 ? "time" : "times") + ".</span>");
        for (Litter litter : owner.getLittersBirthed()) {
            int daysSpentPregnant = litter.getDayOfBirth() - litter.getDayOfConception();
            if (litter.getFather().isPlayer()) {
                descriptionSB.append("</br>On day " + litter.getDayOfConception() + ", you impregnated [npc.herHim], and " + Util.intToString(daysSpentPregnant) + " day" + (daysSpentPregnant != 1 ? "s" : "") + " later, [npc.she] gave birth to ");
            } else {
                descriptionSB.append("</br>On day " + litter.getDayOfConception() + ", " + litter.getFather().getName() + " impregnated [npc.her], and " + Util.intToString(daysSpentPregnant) + " day" + (daysSpentPregnant != 1 ? "s" : "") + " later, [npc.she] gave birth to ");
            }
            descriptionSB.append(litter.getBirthedDescriptionList());
            descriptionSB.append(".");
        }
        descriptionSB.append("</p>");
    }
    if (Main.game.getPlayer().isVisiblyPregnant()) {
        for (PregnancyPossibility pp : Main.game.getPlayer().getPotentialPartnersAsMother()) {
            if (pp.getFather() == owner) {
                descriptionSB.append("<p>" + "<span style='color:" + Colour.GENERIC_ARCANE.toWebHexString() + ";'>From one of your sexual encounters, you've been impregnated, and it's possible that [npc.name] is the father.</span>" + "</p>");
                break;
            }
        }
    }
    if (!Main.game.getPlayer().getLittersBirthed().isEmpty()) {
        int fatheredLitters = 0;
        for (Litter litter : Main.game.getPlayer().getLittersBirthed()) {
            if (litter.getFather() == owner) {
                fatheredLitters++;
            }
        }
        if (fatheredLitters != 0) {
            descriptionSB.append("<p>" + "<span style='color:" + Colour.GENERIC_ARCANE.toWebHexString() + ";'>" + "[npc.Name] is the father of some of your children, and has, in total, impregnated you " + Util.intToString(fatheredLitters) + " " + (fatheredLitters == 1 ? "time" : "times") + ".</span>");
            for (Litter litter : Main.game.getPlayer().getLittersBirthed()) {
                int daysSpentPregnant = litter.getDayOfBirth() - litter.getDayOfConception();
                if (litter.getFather() == owner) {
                    descriptionSB.append("</br>On day " + litter.getDayOfConception() + ", [npc.she] impregnated you, and " + Util.intToString(daysSpentPregnant) + " day" + (daysSpentPregnant > 1 ? "s" : "") + " later, you gave birth to " + litter.getBirthedDescriptionList() + ".");
                }
            }
            descriptionSB.append("</p>");
        }
    }
    return UtilText.parse(owner, descriptionSB.toString());
}
Also used : Litter(com.lilithsthrone.game.character.Litter) PregnancyPossibility(com.lilithsthrone.game.character.PregnancyPossibility) GameCharacter(com.lilithsthrone.game.character.GameCharacter)

Aggregations

Litter (com.lilithsthrone.game.character.Litter)2 PregnancyPossibility (com.lilithsthrone.game.character.PregnancyPossibility)2 GameCharacter (com.lilithsthrone.game.character.GameCharacter)1