Ejemplo n.º 1
0
        public override bool Run()
        {
            List <SimDescription> aliens = AlienUtilsEx.GetAliens();

            if (aliens == null)
            {
                Logger.Append("Debug - Trigger Alien Abduction: No Aliens");
                return(false);
            }

            List <Sim> abductees = AlienUtilsEx.GetAbductees(Target);

            if (abductees == null)
            {
                Logger.Append("Debug - Trigger Alien Abduction: No Abductees");
                return(false);
            }

            Sim            abductee = RandomUtil.GetRandomObjectFromList <Sim>(abductees);
            SimDescription alien    = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);

            if (!AlienUtilsEx.CanSimBeAbducted(abductee))
            {
                Logger.Append("Debug - Trigger Alien Abduction: Can't Abduct Sim");
                return(false);
            }

            AlienAbductionSituationEx.Create(alien, abductee, Target);

            return(true);
        }
Ejemplo n.º 2
0
        public override void OnAddition(BuffManager bm, BuffInstance bi, bool travelReaddition)
        {
            BuffInstanceAbductedEx instance = bi as BuffInstanceAbductedEx;

            List <SimDescription> aliens = AlienUtilsEx.GetAliens(true);

            if (aliens == null)
            {
                return;
            }

            instance.Abductee     = bm.Actor;
            instance.Alien        = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);
            instance.IsAutonomous = false;

            if (CommonPregnancy.IsSuccess(instance.Abductee, instance.Alien))
            {
                Pregnancy pregnancy = CommonPregnancy.CreatePregnancy(instance.Abductee, instance.Alien, !CommonPregnancy.AllowPlantSimPregnancy());

                if (pregnancy != null)
                {
                    instance.IsAlienPregnancy = true;
                    instance.Abductee.SimDescription.Pregnancy = pregnancy;
                    EventTracker.SendEvent(EventTypeId.kGotPregnant, instance.Abductee);
                }
            }
        }
Ejemplo n.º 3
0
            public override bool Test(Sim actor, Lot target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (!Abductor.Settings.mDebugging)
                {
                    return(false);
                }

                if (Household.AlienHousehold == null || Household.AlienHousehold.NumMembers == 0)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Alien Household Null or Empty");
                    return(false);
                }

                if (AlienUtilsEx.GetAliens() == null)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("No Valid Aliens");
                    return(false);
                }

                if (AlienUtils.IsHouseboatAndNotDocked(target))
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Houseboat Not Docked");
                    return(false);
                }

                if (AlienUtilsEx.GetAbductees(target) == null)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("No Valid Abductees");
                    return(false);
                }

                return(true);
            }
Ejemplo n.º 4
0
        public override bool Run()
        {
            if (Target == null)
            {
                return(false);
            }

            List <SimDescription> aliens    = AlienUtilsEx.GetAliens();
            List <Sim>            abductees = AlienUtilsEx.GetAbductees(Target);

            SimDescription alien    = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);
            Sim            abductee = RandomUtil.GetRandomObjectFromList <Sim>(abductees);

            AlienAbductionSituationEx.Create(alien, abductee, Target);

            return(true);
        }
Ejemplo n.º 5
0
        public override bool Run()
        {
            List <SimDescription> aliens = AlienUtilsEx.GetAliens(false);

            if (aliens == null)
            {
                Logger.Append("Debug - Induce Alien Pregnancy: No Aliens");
                return(false);
            }

            SimDescription alien = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);

            Target.SimDescription.Pregnancy = new Pregnancy(Target, alien);
            Target.BuffManager.AddElement(BuffNames.Abducted, Origin.FromPregnancy);

            return(true);
        }
Ejemplo n.º 6
0
        public override bool Run()
        {
            List <SimDescription> aliens = AlienUtilsEx.GetAliens();

            if (aliens == null)
            {
                Logger.Append("Debug - Trigger Alien Visit: No Aliens");
                return(false);
            }

            SimDescription alien = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);

            Lot farthestLot = LotManager.GetFarthestLot(Target);
            Sim visitor     = alien.InstantiateOffScreen(farthestLot);

            AlienSituation.Create(visitor, Target);

            return(true);
        }