protected override bool PrivateUpdate(ScenarioFrame frame) { if (!base.PrivateUpdate(frame)) { return(false); } Romances.AddWoohooerNotches(Sim, Target, false, true); Add(frame, new ExpectedMarriageScenario(Sim, Target), ScenarioResult.Start); Add(frame, new SuccessScenario(), ScenarioResult.Start); mNumberOfKidsBetween = NumberOfKidsBetween(Sim, Target); AddStat("Preferred Baby Count", (ScoringLookup.GetScore("PreferredBabyCount", Sim) + ScoringLookup.GetScore("PreferredBabyCount", Target)) / 2); return(true); }
protected override bool PrivateUpdate(ScenarioFrame frame) { int scoreA = 0; int scoreB = 0; if (mChance == -1) { scoreA = AddScoring("UnexpectedPregnancy", GetValue <ChanceOfUnexpectedPregnancyOption, int>(Sim), ScoringLookup.OptionType.Chance, Sim); scoreB = AddScoring("UnexpectedPregnancy", GetValue <ChanceOfUnexpectedPregnancyOption, int>(Target), ScoringLookup.OptionType.Chance, Target); } else { scoreA = AddScoring("UnexpectedPregnancy", mChance, ScoringLookup.OptionType.Chance, Sim); scoreB = AddScoring("UnexpectedPregnancy", mChance, ScoringLookup.OptionType.Chance, Target); } if ((scoreA <= 0) && (scoreB <= 0)) { Romances.AddWoohooerNotches(Sim, Target, false, false); IncStat("Scoring Fail"); return(false); } if ((Sim.LotHome == null) || (Target.LotHome == null)) { // Required to get mother off streets before pregnancy Add(frame, new SettleDownScenario(Sim, Target), ScenarioResult.Start); } mPhaseTwoComplete = false; Romances.AddWoohooerNotches(Sim, Target, true, false); Add(frame, new HaveBabyScenario(Sim, Target), ScenarioResult.Start); Add(frame, new PhaseTwoScenario(Sim, Target, this), ScenarioResult.Success); Add(frame, new HaveBabyScenario(Target, Sim), ScenarioResult.Failure); Add(frame, new PhaseTwoScenario(Sim, Target, this), ScenarioResult.Success); return(false); }
protected override bool PrivateUpdate(ScenarioFrame frame) { Relationship relationship = ManagerSim.GetRelationship(Sim, Target); if (relationship == null) { return(false); } LongTermRelationship LTR = relationship.LTR; if (LTR == null) { return(false); } if (Sim.TraitManager.HasElement(TraitNames.GreatKisser) || Target.TraitManager.HasElement(TraitNames.GreatKisser)) { if (Sim.CreatedSim != null) { ManagerSim.AddBuff(this, Sim, BuffNames.GreatKisser, Origin.FromSocialization); } if (Target.CreatedSim != null) { ManagerSim.AddBuff(this, Target, BuffNames.GreatKisser, Origin.FromSocialization); } } if (SimID.Matches(Flirts.PreviousLoveLoss, Sim)) { Flirts.PreviousLoveLoss = null; } if (LTR.Liking > Sims3.Gameplay.Actors.Sim.kWooHooUseLikingGate) { if (!Sim.HadFirstWooHoo) { Sim.SetFirstWooHoo(); if ((Sim.CreatedSim != null) && (Target.CreatedSim != null)) { EventTracker.SendEvent(EventTypeId.kHadFirstWoohoo, Sim.CreatedSim, Target.CreatedSim); } } if (!Target.HadFirstWooHoo) { Target.SetFirstWooHoo(); if ((Sim.CreatedSim != null) && (Target.CreatedSim != null)) { EventTracker.SendEvent(EventTypeId.kHadFirstWoohoo, Target.CreatedSim, Sim.CreatedSim); } } LTR.AddInteractionBit(LongTermRelationship.InteractionBits.Kissed); LTR.AddInteractionBit(LongTermRelationship.InteractionBits.WooHoo); if (Sim.IsHuman) { Sim.SetFirstKiss(Target); Target.SetFirstKiss(Sim); } else { if ((Sim.CreatedSim != null) && (Target.CreatedSim != null)) { EventTracker.SendEvent(EventTypeId.kPetWooHooed, Sim.CreatedSim, Target.CreatedSim); EventTracker.SendEvent(EventTypeId.kPetWooHooed, Target.CreatedSim, Sim.CreatedSim); } } if (mPregnancyChance != 0) { Add(frame, new UnexpectedPregnancyScenario(Sim, Target, mPregnancyChance), ScenarioResult.Start); } else { Romances.AddWoohooerNotches(Sim, Target, false, false); } } if (OnRomanceAffairScenario != null) { OnRomanceAffairScenario(this, frame); } return(false); }