Exemple #1
0
        public bool AllowPartner(IScoringGenerator stats, SimDescription actor, SimDescription target, AllowCheck check)
        {
            if (!Allow(stats, actor, check))
            {
                return(false);
            }
            if (!Allow(stats, target, check))
            {
                return(false);
            }

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

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

            return(true);
        }
Exemple #2
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);
        }
Exemple #3
0
        public bool Allow(IScoringGenerator stats, SimDescription actor, SimDescription target, AllowCheck check)
        {
            if (!Allow(stats, actor, check))
            {
                return(false);
            }

            if (!Allow(stats, target, check))
            {
                return(false);
            }

            if (!Flirts.CanHaveAutonomousRomance(stats, actor, target, ((check & AllowCheck.Active) == AllowCheck.Active)))
            {
                return(false);
            }

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

            if (!actorData.Allowed <AllowCasteCanBePregnantOption>(targetData, false))
            {
                stats.IncStat("Can Be Caste Denied");
                return(false);
            }
            else if (actorData.Disallowed <DisallowCasteCanBePregnantOption>(targetData, false))
            {
                stats.IncStat("Can Be Caste Denied");
                return(false);
            }
            else if (!actorData.Allowed <AllowCastePregnancyOption>(targetData, true))
            {
                stats.IncStat("Participation Caste Denied");
                return(false);
            }
            else if (actorData.Disallowed <DisallowCastePregnancyOption>(targetData, true))
            {
                stats.IncStat("Participation Caste Denied");
                return(false);
            }
            else if (!DualAllow(stats, actorData, targetData, check))
            {
                return(false);
            }

            return(true);
        }
Exemple #4
0
        public bool AllowEnemy(Common.IStatGenerator stats, SimDescription actor, SimDescription target, AllowCheck check)
        {
            if ((check & AllowCheck.UserDirected) == AllowCheck.None)
            {
                if (actor.IsEP11Bot)
                {
                    if (!HasEnemyChips(actor))
                    {
                        stats.IncStat("Allow: Robot");
                        return(false);
                    }
                }

                if (target.IsEP11Bot)
                {
                    if (!HasEnemyChips(target))
                    {
                        stats.IncStat("Allow: Robot");
                        return(false);
                    }
                }
            }

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

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

            return(true);
        }
Exemple #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);
        }