Exemple #1
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            base.PrivateUpdate(frame);

            List <AthleticGameObject> objs = new List <AthleticGameObject>();

            InteractionInstance interaction = Target.CreatedSim.InteractionQueue.GetCurrentInteraction();

            if ((interaction != null) && (interaction.Target is AthleticGameObject))
            {
                IncStat("Trainee Ready");

                objs.Add(interaction.Target as AthleticGameObject);
            }
            else
            {
                foreach (Lot lot in ManagerLot.GetOwnedLots(Sim))
                {
                    objs.AddRange(lot.GetObjects <AthleticGameObject>(TestObject));
                }

                if (objs.Count == 0)
                {
                    foreach (Lot lot in ManagerLot.GetOwnedLots(Target))
                    {
                        objs.AddRange(lot.GetObjects <AthleticGameObject>(TestObject));
                    }
                    if (objs.Count == 0)
                    {
                        foreach (AthleticGameObject obj in Sims3.Gameplay.Queries.GetObjects <AthleticGameObject>())
                        {
                            if (!TestObject(obj))
                            {
                                continue;
                            }

                            if (!obj.LotCurrent.IsCommunityLot)
                            {
                                continue;
                            }

                            objs.Add(obj);
                        }

                        if (objs.Count == 0)
                        {
                            IncStat("No Training Object");
                            return(false);
                        }
                    }
                }
            }

            return(Situations.PushMeetUp(this, Sim, Target, RandomUtil.GetRandomObjectFromList(objs).LotCurrent, FirstAction));
        }
Exemple #2
0
 protected override bool Push()
 {
     if ((Sim.Occupation != null) && (Sim.Occupation.Boss != null))
     {
         return(Situations.PushMeetUp(this, Sim, Sim.Occupation.Boss, ManagerSituation.MeetUpType.Either, ManagerFriendship.FriendlyFirstAction));
     }
     else
     {
         return(false);
     }
 }
Exemple #3
0
        protected override bool Push()
        {
            if (mNewCoworkers.Count > 0)
            {
                SimDescription coworker = RandomUtil.GetRandomObjectFromList(mNewCoworkers);

                mNewCoworkers.Clear();
                mNewCoworkers.Add(coworker);

                return(Situations.PushMeetUp(this, Sim, coworker, ManagerSituation.MeetUpType.Commercial, ManagerFriendship.FriendlyFirstAction));
            }
            else
            {
                return(false);
            }
        }
Exemple #4
0
        protected override bool Push()
        {
            GoToLotSituation.FirstActionDelegate firstAction = ManagerFriendship.FriendlyFirstAction;
            switch (mOccult)
            {
            case OccultTypes.Vampire:
                firstAction = DrinkFirstAction;
                break;

            case OccultTypes.Werewolf:
                firstAction = BiteFirstAction;
                break;
            }

            return(Situations.PushMeetUp(this, Sim, Target, ManagerSituation.MeetUpType.Either, firstAction));
        }
Exemple #5
0
        protected override bool Push()
        {
            if (!mFail)
            {
                SimDescription leader = Personalities.GetClanLeader(Manager);
                if (leader != null)
                {
                    int score = mFight.SuccessDelta.Score(new DualSimScoringParameters(Sim, leader));
                    if (score != 0)
                    {
                        return(Situations.PushMeetUp(this, Sim, leader, ManagerSituation.MeetUpType.Commercial, DetermineFirstAction(score, IsRomantic)));
                    }
                }
            }

            return(Situations.PushMeetUp(this, Sim, Target, ManagerSituation.MeetUpType.Commercial, FirstAction));
        }
Exemple #6
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            base.PrivateUpdate(frame);

            List <ChessTable> tables = new List <ChessTable>();

            foreach (Lot lot in ManagerLot.GetOwnedLots(Sim))
            {
                tables.AddRange(lot.GetObjects <ChessTable>(TestTable));
            }

            if (tables.Count == 0)
            {
                foreach (Lot lot in ManagerLot.GetOwnedLots(Target))
                {
                    tables.AddRange(lot.GetObjects <ChessTable>(TestTable));
                }

                if (tables.Count == 0)
                {
                    foreach (ChessTable table in Sims3.Gameplay.Queries.GetObjects <ChessTable>())
                    {
                        if (!TestTable(table))
                        {
                            continue;
                        }

                        if (!table.LotCurrent.IsCommunityLot)
                        {
                            continue;
                        }

                        tables.Add(table);
                    }

                    if (tables.Count == 0)
                    {
                        IncStat("No Table");
                        return(false);
                    }
                }
            }

            return(Situations.PushMeetUp(this, Sim, Target, RandomUtil.GetRandomObjectFromList(tables).LotCurrent, FirstAction));
        }
Exemple #7
0
 protected override bool Push()
 {
     if (Sim.ChildOrAbove)
     {
         if (Target.ChildOrAbove)
         {
             return(Situations.PushMeetUp(this, Sim, Target, ManagerSituation.MeetUpType.Commercial, FirstAction));
         }
         else
         {
             return(Situations.PushVisit(this, Sim, Target.LotHome));
         }
     }
     else if (Target.ChildOrAbove)
     {
         return(Situations.PushVisit(this, Target, Sim.LotHome));
     }
     else
     {
         return(false);
     }
 }
Exemple #8
0
 protected override bool Push()
 {
     return(Situations.PushMeetUp(this, Sim, Target, ManagerSituation.MeetUpType.Either, FirstAction));
 }
Exemple #9
0
 protected override bool Push()
 {
     return(Situations.PushMeetUp(this, Sim, Target, ManagerSituation.MeetUpType.Commercial, ManagerFriendship.FriendlyFirstAction));
 }
Exemple #10
0
 protected override bool Push()
 {
     return(Situations.PushMeetUp(this, Sim, Target, ManagerSituation.MeetUpType.Residential, ManagerFlirt.FirstAction));
 }
Exemple #11
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            base.PrivateUpdate(frame);

            if (CanCompete(Sim))
            {
                if (!Situations.PushMeetUp(this, Sim, Target, ManagerSituation.MeetUpType.Either, CompeteFirstAction))
                {
                    IncStat("Compete Push Fail");
                }
                else
                {
                    mReport = false;
                    return(true);
                }
            }

            List <TrainingDummy> dummies = new List <TrainingDummy>();

            foreach (Lot lot in ManagerLot.GetOwnedLots(Sim))
            {
                dummies.AddRange(lot.GetObjects <TrainingDummy>(TestDummy));
            }

            if (dummies.Count == 0)
            {
                foreach (Lot lot in ManagerLot.GetOwnedLots(Target))
                {
                    dummies.AddRange(lot.GetObjects <TrainingDummy>(TestDummy));
                }

                if (dummies.Count == 0)
                {
                    foreach (TrainingDummy dummy in Sims3.Gameplay.Queries.GetObjects <TrainingDummy>())
                    {
                        if (!TestDummy(dummy))
                        {
                            continue;
                        }

                        if (dummy.LotCurrent == null)
                        {
                            continue;
                        }

                        if (!dummy.LotCurrent.IsCommunityLot)
                        {
                            continue;
                        }

                        dummies.Add(dummy);
                    }

                    if (dummies.Count == 0)
                    {
                        IncStat("No Dummies");
                        return(false);
                    }
                }
            }

            return(Situations.PushMeetUp(this, Sim, Target, RandomUtil.GetRandomObjectFromList(dummies).LotCurrent, TrainFirstAction));
        }