Exemple #1
0
        protected override bool Push()
        {
            if (Sim.Occupation is Retired)
            {
                return(true);
            }

            if ((Sim.Occupation != null) && (Sim.Occupation.CareerLoc != null))
            {
                return(Situations.PushToRabbitHole(this, Sim, Sim.Occupation.CareerLoc.Owner, false, false));
            }

            return(true);
        }
Exemple #2
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            try
            {
                if ((Sim.CreatedSim != null) && (Sim.CreatedSim.InteractionQueue != null))
                {
                    Sim.CreatedSim.InteractionQueue.CancelAllInteractions();
                }
            }
            catch (Exception e)
            {
                Common.DebugException(Sim, e);

                IncStat("Exception");
                return(false);
            }

            int defChanceOfDeath = GetValue <PushDeathChanceOption, int>(Sim);

            if ((mChanceOfDeath < 0) || ((mChanceOfDeath > 0) && (mChanceOfDeath < defChanceOfDeath)))
            {
                mChanceOfDeath = defChanceOfDeath;
            }

            AddScoring("Chance of Death", mChanceOfDeath);

            if (RandomUtil.RandomChance(mChanceOfDeath))
            {
                if (mKiller != null)
                {
                    Deaths.AddAlarm(new KillScenario(Sim, mKiller, mDeathType, GetTitlePrefix(PrefixType.Story)));
                    return(false);
                }
            }
            else
            {
                IncStat("Chance Fail");
            }

            if (!Situations.PushToRabbitHole(this, Sim, RabbitHoleType.Hospital, false, false))
            {
                IncStat("Push Fail");
                return(false);
            }

            return(true);
        }
 protected override bool Push()
 {
     return(Situations.PushToRabbitHole(this, Sim, GetRabbitHole(), true, false));
 }
        protected override bool Push()
        {
            SimDescription head = SimTypes.HeadOfFamily(House);

            return(Situations.PushToRabbitHole(this, head, RabbitHoleType.CityHall, false, false));
        }
Exemple #5
0
 protected override bool Push()
 {
     return(Situations.PushToRabbitHole(this, Sim, RabbitHoleType.Grocery, true, false));
 }