Exemplo n.º 1
0
        protected override bool TargetAllow(SimDescription target)
        {
            if ((!IsFriendly) && (Sim.ToddlerOrBelow))
            {
                IncStat("Too Young");
                return(false);
            }
            else if ((IsRomantic) && (Sim.TeenOrAbove != target.TeenOrAbove))
            {
                IncStat("Wrong Age");
                return(false);
            }
            else if ((IsFriendly) && (TestRelationship) && (ManagerSim.GetLTR(Sim, Target) >= 100))
            {
                IncStat("Max Liking");
                return(false);
            }
            else if (Delta < 0)
            {
                if (target.ToddlerOrBelow)
                {
                    IncStat("Too Young");
                    return(false);
                }
                else if ((TestRelationship) && (ManagerSim.GetLTR(Sim, Target) <= -100))
                {
                    IncStat("Min Liking");
                    return(false);
                }
                else if (!Friends.AllowEnemy(this, Sim, Target, Managers.Manager.AllowCheck.None))
                {
                    return(false);
                }
                else if ((!GetValue <AllowEnemyFamilyOption, bool>()) &&
                         ((Sim.Partner == Target) || (Relationships.IsCloselyRelated(Sim, Target, false))))
                {
                    IncStat("Closely Related Denied");
                    return(false);
                }
            }
            else if (Delta > 0)
            {
                if ((TestRelationship) && (target.CreatedSim != null) && (SnubManager.IsSnubbing(target.CreatedSim, target)))
                {
                    IncStat("Snubbing");
                    return(false);
                }
                else if (!Friends.AllowFriend(this, Sim, Target, Managers.Manager.AllowCheck.None))
                {
                    return(false);
                }
                else if ((IsRomantic) && (!Flirts.Allow(this, Sim, Target)))
                {
                    return(false);
                }
            }

            return(base.TargetAllow(target));
        }