Пример #1
0
            public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (a == target)
                {
                    return(false);
                }

                MagicControl control = MagicControl.GetBestControl(a, this);

                if (control == null)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("No Control");
                    return(false);
                }

                if (target.BuffManager.HasAnyElement(new BuffNames[] { BuffNames.Singed, BuffNames.SingedElectricity }))
                {
                    return(false);
                }

                /*
                 * if (target.SimDescription.IsPregnant)
                 * {
                 *  greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(target.IsFemale, "Gameplay/Actors/Sim:PregnantFailure", new object[0x0]));
                 *  return false;
                 * }
                 */
                return(CastSpellEx.CommonSpellTests(a, target, isAutonomous, ref greyedOutTooltipCallback));
            }
Пример #2
0
            public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (a == target)
                {
                    return(false);
                }

                return(CastSpellEx.CommonSpellTests(a, target, isAutonomous, ref greyedOutTooltipCallback));
            }
Пример #3
0
            public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                MagicControl control = MagicControl.GetBestControl(a, this);

                if (control == null)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("No Control");
                    return(false);
                }

                return(CastSpellEx.CommonSpellTests(a, target, isAutonomous, ref greyedOutTooltipCallback));
            }
Пример #4
0
            public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                MagicControl control = MagicControl.GetBestControl(a, this);

                if (control == null)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("No Control");
                    return(false);
                }

                if (a == target)
                {
                    return(false);
                }

                if (!CastSpellEx.CommonSpellTests(a, target, isAutonomous, ref greyedOutTooltipCallback))
                {
                    return(false);
                }

                if (target.BuffManager.HasElement(BuffNames.ToadSim))
                {
                    return(false);
                }

                if (((target.OccultManager != null) && target.OccultManager.HasAnyOccultType()) || target.SimDescription.IsGhost)
                {
                    greyedOutTooltipCallback = delegate
                    {
                        return(MagicWand.LocalizeString(a.IsFemale, "ImmuneToSpell", new object[0x0]));
                    };
                    return(false);
                }

                if (target.SimDescription.IsVisuallyPregnant)
                {
                    greyedOutTooltipCallback = delegate { return(MagicWand.LocalizeString(a.IsFemale, "ImmuneToSpell", new object[0x0])); };
                    return(false);
                }

                if (target.Service is GrimReaper)
                {
                    greyedOutTooltipCallback = delegate { return(MagicWand.LocalizeString(a.IsFemale, "ImmuneToSpell", new object[0x0])); };
                    return(false);
                }

                return(true);
            }
Пример #5
0
            public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if ((isAutonomous) && (a == target))
                {
                    if (OccultTypeHelper.HasType(a, OccultTypes.Vampire))
                    {
                        return(false);
                    }
                }

                MagicControl control = MagicControl.GetBestControl(a, this);

                if (control == null)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("No Control");
                    return(false);
                }

                return(CastSpellEx.CommonSpellTests(a, target, isAutonomous, ref greyedOutTooltipCallback));
            }
Пример #6
0
            public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (a == target)
                {
                    return(false);
                }

                MagicControl control = MagicControl.GetBestControl(a, this);

                if (control == null)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("No Control");
                    return(false);
                }

                if (target.BuffManager.HasElement(BuffNames.SickAndTired))
                {
                    return(false);
                }

                return(CastSpellEx.CommonSpellTests(a, target, isAutonomous, ref greyedOutTooltipCallback));
            }