protected override bool TargetAllow(SimDescription target) { if (!Romances.Allow(this, Sim, target)) { return(false); } if (MarriageBaseScenario.TestForChildBlock(Sim, target)) { IncStat("Child Are Married"); return(false); } else { SimData targetData = GetData(target); if (targetData.HasAnyValue <ArrangedMarriageCasteOption, CasteOptions>()) { if (!targetData.Contains <ArrangedMarriageCasteOption>(GetData(Sim).Castes)) { IncStat("Target Caste Fail"); return(false); } } } return(base.TargetAllow(target)); }
protected override bool CommonAllow(SimDescription sim) { if (!Romances.Allow(this, sim)) { return(false); } return(base.CommonAllow(sim)); }
protected override bool TargetAllow(SimDescription sim) { if ((TestPartnered) && (sim.Partner != Sim)) { IncStat("Not Partner"); return(false); } else if (!Romances.Allow(this, Sim, sim)) { return(false); } return(base.TargetAllow(sim)); }
public List <SimDescription> FindPartneredFor(SimDescription sim) { if ((sim == null) || (sim.Household == null)) { IncStat("Taken: Invalid Sim"); return(null); } List <SimDescription> choices = new List <SimDescription>(); foreach (SimDescription potential in Sims.All) { if (sim == potential) { //IncStat("Taken: Myself"); } else if (!Romances.Allow(this, sim, potential)) { IncStat("Taken: User Denied"); } else if (Situations.IsBusy(this, potential, true)) { IncStat("Taken: Busy"); } else if (!potential.Marryable) { IncStat("Taken: Not Marryable"); } else if (potential.Partner == null) { IncStat("Taken: No Partner"); } else if (sim.Teen != potential.Teen) { IncStat("Taken: Wrong Age"); } else if (potential.Household == null) { IncStat("Taken: Invalid Sim"); } else { choices.Add(potential); } Main.Sleep("ManagerRomance:FindPartneredFor"); } return(choices); }
protected override bool CommonAllow(SimDescription sim) { if (!Romances.Allow(this, sim)) { IncStat("User Denied"); return(false); } else if (SimTypes.IsDead(sim)) { IncStat("Dead"); return(false); } return(base.CommonAllow(sim)); }
protected override bool PrivateUpdate(ScenarioFrame frame) { bool breakup = false; Relationship relation = ManagerSim.GetRelationship(Sim, Target); if ((relation != null) && (relation.CurrentLTRLiking <= GetValue <MaximumForceBreakupOption, int>())) { breakup = true; } else { int scoreA = AddScoring("Breakup", Target, Sim); int scoreB = AddScoring("Breakup", Sim, Target); if ((scoreA > 0) && (scoreB > 0)) { breakup = true; } else if ((scoreA > 0) || (scoreB > 0)) { if ((GetValue <SplitOpposingClanOption, bool>()) && (!Romances.Allow(this, Sim, Target))) { breakup = true; mOpposingClan = true; } else { int chance = (scoreA + scoreB); if ((chance > 0) && (RandomUtil.RandomChance(AddScoring("Chance", chance)))) { breakup = true; } else { Add(frame, new ExistingEnemyManualScenario(Sim, Target, -25, 0), ScenarioResult.Start); } } } } if (breakup) { return(base.PrivateUpdate(frame)); } return(false); }
protected override void PrivateUpdate(bool fullUpdate, bool initialPass) { if ((ProgressionEnabled) && (fullUpdate)) { mPartneredSims.Clear(); foreach (SimDescription sim in Sims.All) { if (!sim.TeenOrAbove) { continue; } if (SimTypes.IsDead(sim)) { continue; } if (!Romances.Allow(this, sim)) { continue; } if (!sim.Marryable) { continue; } if (sim.Household == null) { continue; } if (sim.Partner == null) { continue; } mPartneredSims.Add(sim); } } base.PrivateUpdate(fullUpdate, initialPass); }
protected override bool CommonAllow(SimDescription sim) { if (!Romances.Allow(this, sim)) { IncStat("User Denied"); return(false); } else if (!Romances.AllowBreakup(this, sim, Managers.Manager.AllowCheck.None)) { IncStat("User Denied"); return(false); } else if (AddScoring("Breakup Cooldown", GetElapsedTime <DayOfLastRomanceOption>(sim) - MinTimeFromRomanceToBreakup) < 0) { AddStat("Too Early", GetElapsedTime <DayOfLastRomanceOption>(sim)); return(false); } return(base.CommonAllow(sim)); }
protected override bool TargetAllow(SimDescription target) { if (!Score()) { IncStat("Scoring Failure"); return(false); } else if (TestForChildBlock(Sim, target)) { IncStat("Child Are Married"); return(false); } else if (!Romances.Allow(this, Sim, target)) { //IncStat("Mixed Age Denied"); return(false); } return(base.TargetAllow(target)); }
protected override bool TargetAllow(SimDescription sim) { Relationship relation = ManagerSim.GetRelationship(Sim, Target); if (relation == null) { return(false); } if ((!mForce) && (relation.LTR.Liking <= Sims3.Gameplay.Actors.Sim.kRomanceUseLikingGate)) { IncStat("Under Gate"); return(false); } else if ((!AllowAffair) && (ManagerRomance.IsAffair(Sim, Target))) { IncStat("Affair"); return(false); } if (Sim.Partner == Target) { IncStat("Already Partner"); return(false); } else if (!Romances.Allow(this, Sim, Target)) { return(false); } if (!mForce) { if (relation.LTR.Liking < GetValue <PartnerLikingGateOption, int>()) { AddStat("No Like", relation.LTR.Liking); return(false); } else if (!relation.AreRomantic()) { IncStat("Not Romantic"); return(false); } else if (GetElapsedTime <DayOfLastPartnerOption>(Sim) < GetValue <MinTimeFromBreakupToPartnerOption, int>()) { AddStat("Too Early", GetElapsedTime <DayOfLastPartnerOption>(Sim)); return(false); } else if (GetElapsedTime <DayOfLastPartnerOption>(Target) < GetValue <MinTimeFromBreakupToPartnerOption, int>()) { AddStat("Too Early", GetElapsedTime <DayOfLastPartnerOption>(Target)); return(false); } else if ((AddScoring("SettleDown", Target, Sim) <= 0) && (AddScoring("SettleDown", Sim, Target) <= 0)) { IncStat("Score Fail"); return(false); } } return(base.TargetAllow(sim)); }