public ActionEventArgs(Person doer, Person target, Prop prop, object data = null) { this.Doer = doer; this.Target = target; this.Prop = prop; this.Data = data; this.Stage = ActionStages.Passive; }
public Person GeneratePerson(Sexes sex) { Person newPerson = new Person(); newPerson.FirstName = this.GenerateFirstName(sex); newPerson.LastName = this.GenerateLastName(); newPerson.Physique.Sex = sex; newPerson.Physique.Age = MiscUtilities.Rand.Next(18, 70); newPerson.Physique.EyeColor = MiscUtilities.GetRandomEnum<EyeColors>(); newPerson.Physique.HairColor = MiscUtilities.GetRandomEnum<HairColors>(); newPerson.Physique.HairLength = MiscUtilities.GetRandomEnum<HairLengths>(); newPerson.Image = newPerson.Physique.Sex.ToString() + @"\" + newPerson.Physique.Sex.ToString() + "_0.png"; newPerson.HeadImage = Game.Instance.ResourceController.BuildPath(@"\Assets\Images\Characters\BodyParts\" + (newPerson.Physique.Sex == Sexes.Futanari ? "Female" : newPerson.Physique.Sex.ToString()) + @"Heads_Cropped\" + newPerson.Physique.Sex.ToString()[0] + "_Head" + MiscUtilities.Rand.Next(100) + ".png"); return newPerson; }
public void Cum(Prepositions preposition, Person target) { string pronoun = this.GetPossessivePronoun(); string capPronoun = StringUtilities.CaptializeWords(pronoun); if ((double)this.Stats.GetValue("EjaculationsToday") < this.Stats.GetValue<double>("Stamina") / 25.0) { if ((double)this.Stats.GetValue("CumVolume") <= 0) { Game.Instance.Output("Not even a drop of cum is left to escape " + pronoun + " c**k."); } else if ((double)this.Stats.GetValue("CumVolume") < 0.5) { Game.Instance.Output("A dribble of cum escapes from the tip of " + pronoun + " c**k."); } else if ((double)this.Stats.GetValue("CumVolume") <= 1) { Game.Instance.Output("A few weak spurts of cum leak from the tip of " + pronoun + " c**k."); } else if ((double)this.Stats.GetValue("CumVolume") <= 5) { Game.Instance.Output("A few strong jets of cum erupt from " + pronoun + " c**k."); } else if ((double)this.Stats.GetValue("CumVolume") <= 10) { Game.Instance.Output(capPronoun + " body tenses as several large jets of thick cum fire from " + pronoun + " c**k."); } else if ((double)this.Stats.GetValue("CumVolume") <= 20) { Game.Instance.Output(capPronoun + " c**k throbs hard as it keeps ejecting numerous thick ropes of cum."); } else if ((double)this.Stats.GetValue("CumVolume") <= 50) { Game.Instance.Output(capPronoun + " aching c**k sends hot streams of cum flying for what feels like ages."); } else { Game.Instance.Output(capPronoun + " c**k erupts over and over, sending a torrent of hot cum from " + pronoun + " throbing shaft."); } this.Stats.SetValue("CumVolume", Math.Floor((double)this.Stats.GetValue("CumVolume") / 2)); this.Stats.SetValue("EjaculationsToday", (double)this.Stats.GetValue("EjaculationsToday") + 1); } }
protected void UpdateStatus(Person myPerson) { int count = 0; foreach (Stat item in myPerson.Stats.StatEntries.Where(e => e.Type == "status")) { if (item.ControlType == typeof(ProgressBar)) { ProgressBar value = (ProgressBar)LogicalTreeHelper.FindLogicalNode(this.tab_Status, "pgb_" + item.Name); if(item.Maximum != null) { if (item.Maximum.Split('.').Count() > 1) { value.Maximum = (double)ReflectionUtilities.GetPropertyValue(myPerson, item.Maximum); } else { value.Maximum = myPerson.Stats.GetValue<double>(item.Maximum); } } try { value.Value = Math.Max(Math.Min((double)item.Value, value.Maximum), value.Minimum); } catch(InvalidCastException) { value.Value = Math.Max(Math.Min((int)item.Value, value.Maximum), value.Minimum); } ((ToolTip)value.ToolTip).Content = value.Value; } else if (item.ControlType == typeof(CheckBox)) { CheckBox value = (CheckBox)LogicalTreeHelper.FindLogicalNode(this.tab_Status, "chk_" + item.Name); value.IsChecked = (bool)item.Value; } count++; } }
protected void UpdateAttributes(Person myPerson) { int count = 0; foreach (Stat item in myPerson.Stats.StatEntries.Where(e => e.Type == "attribute")) { if (item.ControlType == typeof(ProgressBar)) { ProgressBar value = (ProgressBar)LogicalTreeHelper.FindLogicalNode(this.tab_Attributes, "pgb_" + item.Name); value.Value = Math.Max(Math.Min((int)(double)item.Value, value.Maximum), value.Minimum); } else if (item.ControlType == typeof(CheckBox)) { CheckBox value = (CheckBox)LogicalTreeHelper.FindLogicalNode(this.tab_Attributes, "chk_" + item.Name); value.IsChecked = (bool)item.Value; } count++; } }
/// <summary> /// Apply this effect to the given Person. /// </summary> /// <param name="subject">Person to whom this effect should be applied.</param> /// <returns>True if the effect was applied successfully. False if the stat couldn't be found.</returns> public bool Apply(Person subject) { // If we have a Person... if (subject != null) { // If the effect isn't multiplicative... if (!this.RelativeOperationIsMultiplication) { // Let the Stat logic handle everything. return subject.Stats.SetValue(this.ItemName, this.Value, this.ValueIsRelative); } else { // Set the stat to a manually multiplied value. return subject.Stats.SetValue(this.ItemName, subject.Stats.GetValue<double>(this.ItemName) * this.Value, false); } } // Report failure. return false; }
public Relationship(Person subject) : this() { this.Subject = subject; }