Beispiel #1
0
        public bool Allow(IScoringGenerator stats, SimDescription actor, SimDescription target, AllowCheck check)
        {
            if ((check & AllowCheck.UserDirected) == AllowCheck.None)
            {
                if (Personalities.IsOpposing(stats, actor, target, true))
                {
                    stats.IncStat("Opposing Clan");
                    return(false);
                }
            }

            SimData actorData  = GetData(actor);
            SimData targetData = GetData(target);

            if (!actorData.Allowed <AllowCasteMoveOption>(targetData, true))
            {
                stats.IncStat("Caste Denied");
                return(false);
            }
            else if (actorData.Disallowed <DisallowCasteMoveOption>(targetData, true))
            {
                stats.IncStat("Caste Denied");
                return(false);
            }
            else if (!DualAllow(stats, actorData, targetData, check))
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        protected override bool TargetAllow(SimDescription sim)
        {
            if (Personalities.IsOpposing(this, Sim, sim, false))
            {
                IncStat("Opposing Clan");
                return(false);
            }

            return(base.TargetAllow(sim));
        }
Beispiel #3
0
        public bool Allow(IScoringGenerator stats, SimDescription actor, SimDescription target, AllowCheck check)
        {
            if (Personalities.IsOpposing(stats, actor, target, true))
            {
                stats.IncStat("Opposing Clan");
                return(false);
            }
            else if (!Flirts.CanHaveAutonomousRomance(stats, actor, target, ((check & AllowCheck.Active) == AllowCheck.Active)))
            {
                return(false);
            }

            return(AllowPartner(stats, actor, target, check));
        }
Beispiel #4
0
        protected virtual bool TargetAllow(SimDescription target)
        {
            if (SimTypes.IsPassporter(target))
            {
                IncStat("Simport");
                return(false);
            }
            else if (Sim == target)
            {
                IncStat("Is Actor");
                return(false);
            }
            else if (target == mNotTarget)
            {
                IncStat("Not Target");
                return(false);
            }
            else if (!AllowSpecies(Sim, target))
            {
                IncStat("Species Match Denied");
                return(false);
            }

            if (TestOpposing)
            {
                if (Personalities.IsOpposing(this, Sim, target, false))
                {
                    IncStat("Opposing");
                    return(false);
                }
            }

            if (!TargetAllowActive)
            {
                if (SimTypes.IsSelectable(target))
                {
                    IncStat("Active");
                    return(false);
                }
            }

            if ((!mTargetGatheringFailure) && (TargetCheckBusy))
            {
                if (Situations.IsBusy(this, target, true))
                {
                    IncStat("Busy");
                    return(false);
                }
            }

            if (!CommonAllow(target))
            {
                return(false);
            }

            if ((!Sim.IsHuman) || (!target.IsHuman))
            {
                IncStat("Species Match " + Sim.Species + " - " + target.Species);
            }
            return(true);
        }
Beispiel #5
0
        public bool AllowFriend(Common.IStatGenerator stats, SimDescription actor, SimDescription target, AllowCheck check)
        {
            if ((check & AllowCheck.UserDirected) == AllowCheck.None)
            {
                if (Personalities.IsOpposing(stats, actor, target, true))
                {
                    stats.IncStat("Opposing Clan");
                    return(false);
                }

                if (actor.IsEP11Bot)
                {
                    if (!HasFriendChips(actor))
                    {
                        stats.IncStat("Allow: Robot");
                        return(false);
                    }
                    else if (actor.HasTrait(TraitNames.FearOfHumansChip))
                    {
                        if (!target.IsRobot)
                        {
                            stats.IncStat("Allow: FearOfHumans");
                            return(false);
                        }
                    }
                }

                if (target.IsEP11Bot)
                {
                    if (!HasFriendChips(target))
                    {
                        stats.IncStat("Allow: Robot");
                        return(false);
                    }
                    else if (target.HasTrait(TraitNames.FearOfHumansChip))
                    {
                        if (!actor.IsRobot)
                        {
                            stats.IncStat("Allow: FearOfHumans");
                            return(false);
                        }
                    }
                }
            }

            SimData actorData  = GetData(actor);
            SimData targetData = GetData(target);

            if (!actorData.Allowed <AllowCasteFriendOption>(targetData, true))
            {
                stats.IncStat("Caste Friend Denied");
                return(false);
            }
            else if (actorData.Disallowed <DisallowCasteFriendOption>(targetData, true))
            {
                stats.IncStat("Caste Friend Denied");
                return(false);
            }

            return(true);
        }