Exemple #1
0
            protected static bool OnAllow(Common.IStatGenerator stats, SimData sim, Managers.Manager.AllowCheck check)
            {
                SimDescription simDesc = sim.SimDescription;

                if (!sim.GetValue <AllowBreakupOption, bool>())
                {
                    stats.IncStat("Allow: Breakup Denied");
                    return(false);
                }
                else if (!StoryProgression.Main.GetValue <AllowBreakupOption, bool>(simDesc.Partner))
                {
                    stats.IncStat("Allow: Breakup Partner Denied");
                    return(false);
                }

                return(true);
            }
Exemple #2
0
        protected override bool TestAffair(SimDescription sim, SimDescription target)
        {
            if (!Filter.AllowAffair)
            {
                return(false);
            }

            if (!TargetFilter.AllowAffair)
            {
                return(false);
            }

            Managers.Manager.AllowCheck check = Managers.Manager.AllowCheck.None;

            if (!Romances.AllowAdultery(this, sim, check))
            {
                return(false);
            }

            if (target.Partner != null)
            {
                if (!Romances.AllowLiaison(this, sim, check))
                {
                    return(false);
                }
            }

            if (!Romances.AllowAdultery(this, target, check))
            {
                return(false);
            }

            if (sim.Partner != null)
            {
                if (!Romances.AllowLiaison(this, target, check))
                {
                    return(false);
                }
            }

            return(true);
        }
Exemple #3
0
            protected static bool OnAllowAffair(IScoringGenerator stats, SimData actorData, SimData targetData, Managers.Manager.AllowCheck check)
            {
                if (!Test(stats, actorData, targetData, check))
                {
                    return(false);
                }

                if (!Test(stats, targetData, actorData, check))
                {
                    return(false);
                }

                return(true);
            }
Exemple #4
0
            protected static bool Test(IScoringGenerator stats, SimData actorData, SimData targetData, Managers.Manager.AllowCheck check)
            {
                SimDescription actor  = actorData.SimDescription;
                SimDescription target = targetData.SimDescription;

                if (actor.Partner != null)
                {
                    int chance = actorData.GetValue <ChanceOfAdulteryOption, int>();
                    if (chance == 0)
                    {
                        stats.IncStat("Adultery Denied");
                        return(false);
                    }
                    else if (stats.AddScoring("FlirtyPartner", chance, ScoringLookup.OptionType.Chance, actor) <= 0)
                    {
                        stats.IncStat("Adultery Scoring Fail");
                        return(false);
                    }

                    chance = targetData.GetValue <ChanceOfLiaisonOption, int>();
                    if (chance == 0)
                    {
                        stats.IncStat("Liaison Denied");
                        return(false);
                    }
                    if (stats.AddScoring("FlirtyPartner", chance, ScoringLookup.OptionType.Chance, target) <= 0)
                    {
                        stats.IncStat("Liaison Scoring Fail");
                        return(false);
                    }
                }

                return(true);
            }
Exemple #5
0
 protected static bool OnAllowLiaison(IScoringGenerator stats, SimData simData, Managers.Manager.AllowCheck check)
 {
     return(simData.GetValue <ChanceOfLiaisonOption, int>() != 0);
 }
Exemple #6
0
        protected static bool OnPrivateAllow(Common.IStatGenerator stats, SimData settings, Managers.Manager.AllowCheck check)
        {
            if (!settings.GetValue <AllowSkillOption, bool>())
            {
                stats.IncStat("Allow: Skills Denied");
                return(false);
            }
            else if (!settings.GetValue <AllowPushSkillOption, bool>())
            {
                stats.IncStat("Allow: Push Denied");
                return(false);
            }

            return(true);
        }
Exemple #7
0
 protected static bool OnAllowRent(Common.IStatGenerator stats, SimData settings, Managers.Manager.AllowCheck check)
 {
     return(settings.GetValue <RentableOption, bool>());
 }
            protected static bool OnDualAllow(Common.IStatGenerator stats, SimData actorData, SimData targetData, Managers.Manager.AllowCheck check)
            {
                ulong id = actorData.GetValue <ArrangedMarriageOption, ulong>();

                if (id != 0)
                {
                    if (targetData.SimDescription.SimDescriptionId != id)
                    {
                        stats.IncStat("Arranged");
                        return(false);
                    }
                }

                id = targetData.GetValue <ArrangedMarriageOption, ulong>();
                if (id != 0)
                {
                    if (actorData.SimDescription.SimDescriptionId != id)
                    {
                        stats.IncStat("Arranged");
                        return(false);
                    }
                }

                return(true);
            }