예제 #1
0
        public MainCell(double x, double y, Creature creature, DNA dna)
        {
            base.Init(null, creature, int.Parse(dna.abstraction.GetElementsByTagName("size")[0].InnerText), x, y);
            this.dna = dna;

            color = dna.abstraction.GetElementsByTagName("color")[0].InnerText;

            foreach (XmlElement xml in dna.abstraction.ChildNodes)
            {
                double dir;
                int    size;
                switch (xml.Name)
                {
                case "MainCell":
                    dir  = double.Parse(xml.GetElementsByTagName("dir")[0].InnerText);
                    size = int.Parse(xml.GetElementsByTagName("size")[0].InnerText);
                    Organs.Add(new MainCell((int)(x + size * Math.Cos(dir)), (int)(y + size * Math.Sin(dir)), new DNA(xml), creature));
                    break;

                case "Fin":
                    dir  = double.Parse(xml.GetElementsByTagName("dir")[0].InnerText);
                    size = int.Parse(xml.GetElementsByTagName("size")[0].InnerText);
                    Organs.Add(new Fin((x + size * Math.Cos(dir)), (y + size * Math.Sin(dir)), new DNA(xml), creature));
                    break;

                default:
                    break;
                }
            }

            brainSpeed   = int.Parse(dna.abstraction.GetElementsByTagName("brainSpeed")[0].InnerText);
            brainChange  = double.Parse(dna.abstraction.GetElementsByTagName("brainChange")[0].InnerText);
            creature.iq += 4;
        }
예제 #2
0
        /// <summary>
        /// Set the sw uptake for today
        /// </summary>
        public override void SetActualNitrogenUptakes(List<ZoneWaterAndN> zones)
        {
            if (Plant.IsEmerged)
            {
                // Calculate the total no3 and nh4 across all zones.
                var nSupply = 0.0;//NOTE: This is in kg, not kg/ha, to arbitrate N demands for spatial simulations.

                NMassFlowSupply = 0.0; //rewporting variables
                NDiffusionSupply = 0.0;
                var supply = 0.0;
                foreach (ZoneWaterAndN Z in zones)
                {
                    supply += MathUtilities.Sum(Z.NO3N);
                    //NMassFlowSupply += MathUtilities.Sum(Z.NH4N);
                    nSupply += supply * Z.Zone.Area;

                    for(int i = 0; i < Z.NH4N.Length; ++i)
                        Z.NH4N[i] = 0;
                }

                //NDiffusionSupply = supply - NMassFlowSupply;

                //Reset actual uptakes to each organ based on uptake allocated by soil arbitrator and the organs proportion of potential uptake
                for (int i = 0; i < Organs.Count; i++)
                    N.UptakeSupply[i] = nSupply / Plant.Zone.Area * N.UptakeSupply[i] / N.TotalUptakeSupply * kgha2gsm;

                //Allocate N that the SoilArbitrator has allocated the plant to each organ
                AllocateUptake(Organs.ToArray(), N, NArbitrator);
                Plant.Root.DoNitrogenUptake(zones);
            }
        }
예제 #3
0
    public override string StartScene(PlayerMain player, BasicChar other)
    {
        Organs   sexualOrgans = other.SexualOrgans;
        Identity identity     = other.Identity;

        return($"{identity.FirstName} lays on their back, chest heaving with exhaustion from the recent fight. You make your way up to {identity.FirstName}'s body and crouch between their legs, spreading them apart. In-between lies their {sexualOrgans.Vaginas[0].Race} pussy, engorged and dripping slightly, their c**t twitching lewdly with each breath of your foe. You lick your lips in anticipation as you lower your head to your prize, spreading their lower lips with your fingers, and start eating them out.");
    }
예제 #4
0
        /// <summary>Removes a given amount of biomass (and N) from the plant.</summary>
        /// <param name="amountToRemove">The amount of biomass to remove (kg/ha)</param>
        public Biomass RemoveBiomass(double amountToRemove)
        {
            var defoliatedBiomass = new Biomass();
            var preRemovalBiomass = AboveGround.Wt * 10;

            foreach (var organ in Organs.Cast <IOrganDamage>())
            {
                // These calculations convert organ live weight from g/m2 to kg/ha
                var amountLiveToRemove      = organ.Live.Wt * 10 / preRemovalBiomass * amountToRemove;
                var amountDeadToRemove      = organ.Dead.Wt * 10 / preRemovalBiomass * amountToRemove;
                var fractionLiveToRemove    = MathUtilities.Divide(amountLiveToRemove, (organ.Live.Wt * 10), 0);
                var fractionDeadToRemove    = MathUtilities.Divide(amountDeadToRemove, (organ.Dead.Wt * 10), 0);
                var defoliatedDigestibility = organ.Live.DMDOfStructural * fractionLiveToRemove
                                              + organ.Dead.DMDOfStructural * fractionDeadToRemove;
                var defoliatedDM = amountLiveToRemove + amountDeadToRemove;
                var defoliatedN  = organ.Live.N * 10 * fractionLiveToRemove + organ.Dead.N * 10 * fractionDeadToRemove;
                if (defoliatedDM > 0)
                {
                    RemoveBiomass(organ.Name, "Graze",
                                  new OrganBiomassRemovalType()
                    {
                        FractionLiveToRemove = fractionLiveToRemove,
                        FractionDeadToRemove = fractionDeadToRemove
                    });

                    defoliatedBiomass += new Biomass()
                    {
                        StructuralWt    = defoliatedDM,
                        StructuralN     = defoliatedN,
                        DMDOfStructural = defoliatedDigestibility
                    };
                }
            }
            return(defoliatedBiomass);
        }
예제 #5
0
    public override string StartScene(PlayerMain player, BasicChar other)
    {
        string returnText = $"{other.Identity.FirstName} forces your beaten body to its hands and knees; you can't even muster the energy to collapse. ";

        Organs sexualOrgans = player.SexualOrgans;

        if (sexualOrgans.HaveVagina())
        {
            returnText += "Your body, however, has other plans, and you feel your pussy start to drip. Even with such a clear signal, though, your enemy positions themselves a little higher. ";
        }
        returnText += "Having gotten into position, your enemy spreads your ass cheeks, and slowly works their dick into your bowels. Unable to respond, you feel your ass getting stretched. ";

        if (player.Gender() == Genders.Herm && sexualOrgans.HaveBalls())
        {
            returnText += "With every thrust, you feel their balls tapping your balls and c**t, sending little bursts of unintended pleasure through your organs.\nIt doesn't take long for you to o****m, your pussy's walls quivering, milking a nonexistent dick. Your balls refuse to be left out, and unload themselves onto your stomach and the ground. ";
        }
        else if (sexualOrgans.HaveVagina())
        {
            returnText += "With every thrust, you feel their balls tapping your c**t, sending little bursts of unintended pleasure through your pussy.\nIt doesn't take long for you to o****m, your pussy's walls quivering, milking a nonexistent dick. ";
        }
        else if (sexualOrgans.HaveBalls())
        {
            returnText += "With every thrust, you feel their balls tapping yours, sending little bursts of unintended pleasure through your dick.\nIt doesn't take long for you to o****m, your balls unloading themselves onto your stomach and the ground. ";
        }
        else
        {
            returnText += "\n\nIt doesn't take long for you to o****m, a pleasurable heat spreading from your ass. ";
        }
        returnText += "Your enemy cums soon after, quickly filling your ass and collapses onto your back, spent. ";
        // TODO anal preg, eggs etc...
        return(returnText);
    }
예제 #6
0
    public static string POGTranslate(Organs organ)
    {
        switch (organ)
        {
        case Organs.heart:
            return("coração");

        case Organs.intestine:
            return("intestino");

        case Organs.kidneys:
            return("rins");

        case Organs.liver:
            return("fígado");

        case Organs.lungs:
            return("pulmões");

        case Organs.pancreas:
            return("pâncreas");

        default:
            return("Deu ruim e caiu e um órgão que ainda não existe na lista");
        }
    }
예제 #7
0
    public void OnSow(SowPlant2Type Sow)
    {
        SowingData = Sow;

        // Go through all our children and find all organs.
        Organs.Clear();
        foreach (object ChildObject in My.ChildrenAsObjects)
        {
            Organ Child = ChildObject as Organ;
            if (Child != null)
            {
                Organs.Add(Child);
            }
        }

        if (NewCrop != null)
        {
            NewCropType Crop = new NewCropType();
            Crop.crop_type = CropType;
            Crop.sender    = Name;
            NewCrop.Invoke(Crop);
        }

        if (Sowing != null)
        {
            Sowing.Invoke();
        }

        // tell all our children about sow
        foreach (Organ Child in Organs)
        {
            Child.OnSow(Sow);
        }
    }
예제 #8
0
        public Eye(double x, double y, DNA dna, Organ parent)
        {
            base.Init(parent, int.Parse(dna.abstraction.GetElementsByTagName("size")[0].InnerText), x, y);
            amount = 3;

            foreach (XmlElement xml in dna.abstraction.GetElementsByTagName("MainCell"))
            {
                double dir;
                int    size;
                switch (xml.Name)
                {
                case "MainCell":
                    dir  = double.Parse(xml.GetElementsByTagName("dir")[0].Value);
                    size = int.Parse(xml.GetElementsByTagName("size")[0].Value);
                    Organs.Add(new MainCell((int)(x + size * Math.Cos(dir)), (int)(y + size * Math.Sin(dir)), creature, new DNA(xml)));
                    break;

                case "Fin":
                    dir  = double.Parse(xml.GetElementsByTagName("dir")[0].Value);
                    size = int.Parse(xml.GetElementsByTagName("size")[0].Value);
                    Organs.Add(new Fin((int)(x + size * Math.Cos(dir)), (int)(y + size * Math.Sin(dir)), this, new DNA(xml)));
                    break;

                default:
                    break;
                }
            }
        }
예제 #9
0
    public override string StartScene(PlayerMain player, BasicChar other)
    {
        string returnText = $"{other.Identity.FirstName} forces your beaten body to its hands and knees; you can't even muster the energy to collapse. Your body, however, has other plans, and you feel your pussy start to drip. Your opponent wastes little time, and quickly gets into position, soon thrusting deeply into you. ";

        Organs PsexualOrgans = player.SexualOrgans;

        if (PsexualOrgans.HaveBalls())
        {
            returnText += "With every thrust, you feel their balls tapping into yours, sending little bursts of unintended pleasure through your dick. ";
        }
        returnText += "\n\nIt doesn't take long for you to cum, your pussy's walls quivering around their dick. ";
        if (PsexualOrgans.HaveBalls() && PsexualOrgans.HaveDick())
        {
            returnText += "Your balls refuse to be left out, and unload themselves onto your stomach and the ground. ";
        }
        returnText += "Your enemy cums soon after, quickly filling your pussy and collapses onto your back, spent. ";
        if (PsexualOrgans.Vaginas.EmptyWomb())
        {
            if (player.Impregnate(other))
            {
                returnText += $" You feel an odd filling sensation in your belly... They couldn't have gotten you pregnant, could they?";
            }
        }
        return(returnText);
    }
예제 #10
0
        /// <summary>Subtract maintenance respiration from daily fixation</summary>
        /// <param name="respiration">The toal maintenance respiration</param>
        public void SubtractMaintenanceRespiration(double respiration)
        {
            double total = DM.TotalFixationSupply;
            // First: from daily fixation
            double respirationFixation = respiration <= total ? respiration : total;
            double ratio = (total - respirationFixation) / total;

            for (int i = 0; i < DM.FixationSupply.Length; i++)
            {
                DM.FixationSupply[i] *= ratio;
            }

            // Second: from live component if there are not enough fixation
            if (respiration > total)
            {
                double remainRespiration = respiration - total;
                for (int i = 0; i < Organs.ToArray().Length; i++)
                {
                    if ((Organs[i].Live.StorageWt + Organs[i].Live.MetabolicWt) > 0)
                    {
                        double organRespiration = remainRespiration * Organs[i].MaintenanceRespiration / respiration;
                        Organs[i].RemoveMaintenanceRespiration(organRespiration);
                    }
                }
            }
        }
예제 #11
0
    public void SetOrganViability(Organs organ, float percentage)
    {
        Text textToUpdate;

        if (organTexts.TryGetValue(organ, out textToUpdate))
        {
            textToUpdate.text = System.Enum.GetName(typeof(Organs), organ) + ": " + percentage.ToString() + "%";
        }
    }
예제 #12
0
    public void DammageOrgan(Organs organ, float dmg = 1)
    {
        Organ organToDammage;

        if (organs.TryGetValue(organ, out organToDammage))
        {
            organToDammage.DammageOrgan(dmg);
        }
        CheckIfDied();
    }
예제 #13
0
    public void CreateOrganText(Organs organ)
    {
        Text organText = Instantiate(organTextPrefab, organTextArea) as Text;

        if (organTexts == null)
        {
            PrepareCanvas();
        }
        organTexts.Add(organ, organText);
    }
예제 #14
0
        /// <summary>
        /// Set the plant leaf area index.
        /// </summary>
        /// <param name="deltaLAI">Delta LAI.</param>
        public void ReduceCanopy(double deltaLAI)
        {
            var leaf = Organs.FirstOrDefault(o => o is ICanopy) as ICanopy;
            var lai  = leaf.LAI;

            if (lai > 0)
            {
                leaf.LAI = lai - deltaLAI;
            }
        }
예제 #15
0
        /// <summary>Accumulate all of the Organ DM Supplies </summary>
        public override void DMSupplies()
        {
            base.DMSupplies();

            double maintenanceRespiration = Organs.Sum(o => o.MaintenanceRespiration);

            if (maintenanceRespiration > 0)
            {
                SubtractMaintenanceRespiration(maintenanceRespiration);
            }
        }
예제 #16
0
 override protected void OnDoActualPlantPartioning(object sender, EventArgs e)
 {
     if (Plant.IsEmerged)
     {
         AllocateFixation(Organs.ToArray(), N, NArbitrator);          //Allocate supply of fixable Nitrogen to each organ
         Retranslocation(Organs.ToArray(), N, NArbitrator);           //Allocate supply of retranslocatable N to each organ
         CalculatedNutrientConstrainedDMAllocation(Organs.ToArray()); //Work out how much DM can be assimilated by each organ based on allocated nutrients
         SetDryMatterAllocations(Organs.ToArray());                   //Tell each organ how DM they are getting folling allocation
         SetNitrogenAllocations(Organs.ToArray());                    //Tell each organ how much nutrient they are getting following allocaition
     }
 }
예제 #17
0
    public float GetPercentageViability(Organs organ)
    {
        Organ organToCheck;

        if (organs.TryGetValue(organ, out organToCheck))
        {
            return(organToCheck.GetViabilityPercentage());
        }
        else
        {
            return(0);
        }
    }
예제 #18
0
    public bool CheckOrganViability(Organs organ, float targetViability = 60)
    {
        Organ organToCheck;

        if (organs.TryGetValue(organ, out organToCheck))
        {
            return(organToCheck.GetViability(targetViability));
        }
        else
        {
            return(false);
        }
    }
예제 #19
0
    public override string StartScene(PlayerMain player, BasicChar other)
    {
        string returnText   = $"Forcing you onto your back, {other.Identity.FirstName} expertly massages your c**k and balls, quickly bringing you erect. ";
        Organs sexualOrgans = player.SexualOrgans;

        if (sexualOrgans.HaveVagina())
        {
            returnText += " They even tease your pussy a bit, all to make you cum quicker.";
        }
        System.Collections.Generic.List <Balls> balls = sexualOrgans.Balls;
        returnText += $"\n\nUnable to put up more than a feeble struggle, you find yourself cumming {Settings.LorGal(balls.Cumming())} down their throat seconds after their lips meet your dick's head.";
        return(returnText);
    }
예제 #20
0
    public override string ContinueScene(PlayerMain player, BasicChar other)
    {
        string toReturn     = $"Your head continues to bob on their length as your tongue plays with their tip, electing soft moans from your opponent. As {other.Identity.FirstName} begins to softly hump into your throat, you meet each thrust by pushing your head down as far as you can.You emphasize their thrusts by sucking hard on their throbbing length.You feel their hand being placed on your head, pushing you deeper into their crotch.";
        Organs sexualOrgans = other.SexualOrgans;

        if (sexualOrgans.HaveBalls(5))
        {
            System.Collections.Generic.List <Dick> dicks = sexualOrgans.Dicks;
            toReturn += $" Your lips meet their crotch as their ${Settings.MorInch(dicks.BiggestSize())} nuts start to bump into your chin with each hump.";
        }
        toReturn += " Their breathing becomes deep and labored as you milk their c**k for all it’s worth.";
        return(toReturn);
    }
예제 #21
0
    public override string StartScene(PlayerMain player, BasicChar other)
    {
        string returnText   = $"{other.Identity.FirstName} forces your head to their crotch, forcing you to start eating them out.";
        Organs sexualOrgans = other.SexualOrgans;

        if (sexualOrgans.HaveBalls())
        {
            System.Collections.Generic.List <Balls> balls = sexualOrgans.Balls;
            returnText += $" {other.HisHer(true)} { Settings.MorInch(balls.BiggestSize())} balls cover your face, forcing their musky scent into your nose. ";
        }
        returnText += " Despite your intentions, your body betrays you and o*****s as they cover your face in girlcum.";
        if (sexualOrgans.HaveBalls() && sexualOrgans.HaveDick())
        {
            returnText += "\nYou feel their balls twitch on your face, shooting cum over your back, eventually dripping into your hair.";
        }
        return(returnText);
    }
예제 #22
0
 void OnLoadScene(Scene scene, LoadSceneMode sceneMode)
 {
     targetOrgan           = GetRandomEnum <Organs> ();
     player                = FindObjectOfType <Player> ();
     mainCamera            = Camera.main;
     canvasManager         = CanvasManager.instance;
     canvasManager.enabled = true;
     canvasManager.SetMainCamera(mainCamera);
     if (SceneManager.GetActiveScene().buildIndex == 0)
     {
         canvasManager.ShowMainMenu();
     }
     else
     {
         canvasManager.ShowLevelInterface();
     }
 }
예제 #23
0
        /// <summary>
        /// Remove biomass from an organ.
        /// </summary>
        /// <param name="organName">Name of organ.</param>
        /// <param name="biomassRemoveType">Name of event that triggered this biomass remove call.</param>
        /// <param name="biomassToRemove">Biomass to remove.</param>
        public void RemoveBiomass(string organName, string biomassRemoveType, OrganBiomassRemovalType biomassToRemove)
        {
            var organ = Organs.FirstOrDefault(o => o.Name.Equals(organName, StringComparison.InvariantCultureIgnoreCase));

            if (organ == null)
            {
                throw new Exception("Cannot find organ to remove biomass from. Organ: " + organName);
            }
            organ.RemoveBiomass(biomassRemoveType, biomassToRemove);

            // Also need to reduce LAI if canopy.
            if (organ is ICanopy)
            {
                var totalFractionToRemove = biomassToRemove.FractionLiveToRemove + biomassToRemove.FractionLiveToResidue;
                var leaf = Organs.FirstOrDefault(o => o is ICanopy) as ICanopy;
                var lai  = leaf.LAI;
                ReduceCanopy(lai * totalFractionToRemove);
            }
        }
예제 #24
0
        override protected void OnDoPotentialPlantPartioning(object sender, EventArgs e)
        {
            if (Plant.IsEmerged)
            {
                DM.Clear();
                N.Clear();

                DMSupplies();
                DMDemands();
                PotentialDMAllocation();

                leaf.UpdateArea();

                NSupplies();
                NDemands();

                Reallocation(Organs.ToArray(), N, NArbitrator);           // Allocate N available from reallocation to each organ
            }
        }
예제 #25
0
    public override string StartScene(PlayerMain player, BasicChar other)
    {
        string returnText = "Forcing you on your back, your enemy fondles your c**t just enough for your body to betray you and your pussy to get wet. ";

        Organs sexualOrgans = player.SexualOrgans;

        returnText += sexualOrgans.HaveBalls()
            ? "Moving your balls to the side, they thrust in to you."
            : "Spreading your lips with one hand, they thrust into you.";

        System.Collections.Generic.List <Balls> Oballs = other.SexualOrgans.Balls;
        returnText += $"\n\nKnowing how to handle someone with as little experience as you, they pin your arms above your head and quickly bring you to o****m, your shuddering walls causing them to cum{Settings.LorGal(Oballs.Cumming())} into you. ";
        if (sexualOrgans.Vaginas.EmptyWomb())
        {
            if (player.Impregnate(other))
            {
                returnText += $" You feel an odd filling sensation in your belly... They couldn't have gotten you pregnant, could they?";
            }
        }
        return(returnText);
    }
    private static void ReGainFluidsTick(this BasicChar basicChar)
    {
        Organs so = basicChar.SexualOrgans;

        if (so.HaveBalls())
        {
            PregnancyBlessings pregnancyBlessings = basicChar.PregnancySystem.PregnancyBlessings;
            if (pregnancyBlessings.HasBlessing(PregnancyBlessingsIds.SpermFactory))
            {
                int blessVal = pregnancyBlessings.GetBlessingValue(PregnancyBlessingsIds.SpermFactory);
                basicChar.Body.Fat.LoseFlat(blessVal / 100); // TODO is this balanced?
                so.Balls.ForEach(b => b.Fluid.ReFill(so.BallsBunusRefillRate.Value + blessVal));
            }
            else
            {
                so.Balls.ForEach(b => b.Fluid.ReFill(so.BallsBunusRefillRate.Value));
            }
        }
        if (so.Lactating)
        {
            so.Boobs.ForEach(b => b.Fluid.ReFill(so.BoobsBonusRefillRate.Value));
        }
    }
예제 #27
0
    private string SexOrgans()
    {
        string toReturn = " ";
        Organs so       = player.SexualOrgans;

        if (so.HaveBoobs())
        {
            toReturn += so.Boobs.Looks() + "\n\n";
        }
        if (so.HaveVagina())
        {
            toReturn += so.Vaginas.Looks() + "\n\n";
        }
        if (so.HaveDick())
        {
            toReturn += so.Dicks.Looks() + "\n\n";
        }
        if (so.HaveBalls())
        {
            toReturn += so.Balls.Looks() + "\n\n";
        }
        return(toReturn);
    }
예제 #28
0
파일: MockForage.cs 프로젝트: hrpasl/ApsimX
 public MockForage(double liveWt)
 {
     Organs.Add(new MockOrgan(liveWt));
 }
예제 #29
0
 public override void PrintOrganInfo() => SetText(Organs.HaveVagina(), Organs.Vaginas.Looks());
예제 #30
0
 public Organ(Organs _organ, string _name, float _maxHealth)
 {
     organ     = _organ;
     name      = _name;
     maxHealth = _maxHealth;
 }