protected override bool PrivateUpdate(ScenarioFrame frame) { if (Target == mLoser) { ManagerSim.AddBuff(Manager, Target, BuffNames.Sore, Origin.FromLosingFight); } else { if (Target == Sim) { ManagerSim.AddBuff(Target, BuffNames.Winner, Origin.FromWinningFight); } else { base.PrivateUpdate(frame); } if (ManagerSim.HasTrait(Target, TraitNames.Evil)) { ManagerSim.AddBuff(Target, BuffNames.FiendishlyDelighted, Origin); } } return(true); }
protected override bool Push() { SimDescription injured = Target; SimDescription killer = Sim; if (mFail) { killer = null; if (mParentScenario.AllowGoToJail) { Manager.AddAlarm(new GoToJailScenario(Sim, Bail)); injured = null; } else { injured = Sim; } } if ((mParentScenario.AllowInjury) && (injured != null) && (injured.CreatedSim != null) && (injured.CreatedSim.LotCurrent == mVictim.LotCurrent)) { if (!ManagerSim.HasTrait(injured, TraitNames.ImmuneToFire)) { ManagerSim.AddBuff(Manager, injured, BuffNames.Singed, Origin.FromFire); Manager.AddAlarm(new GoToHospitalScenario(injured, killer, "InjuredArson", SimDescription.DeathType.Burn)); } } return(true); }
protected override bool PrivateUpdate(ScenarioFrame frame) { if ((Origin == Origin.FromFire) && (ManagerSim.HasTrait(Target, TraitNames.Pyromaniac))) { ManagerSim.AddBuff(Target, BuffNames.Fascinated, Origin); } if ((Origin == Origin.FromTheft) && (ManagerSim.HasTrait(Target, TraitNames.Kleptomaniac))) { ManagerSim.AddBuff(Target, BuffNames.Fascinated, Origin); } if (ManagerSim.HasTrait(Target, TraitNames.Coward)) { ManagerSim.AddBuff(Target, BuffNames.Scared, Origin); } if ((ManagerSim.HasTrait(Target, TraitNames.Evil)) || (ManagerSim.HasTrait(Target, TraitNames.MeanSpirited))) { ManagerSim.AddBuff(Target, BuffNames.FiendishlyDelighted, Origin); } else { // Not performed for the main Sim on purpose if (Target != Sim) { base.PrivateUpdate(frame); bool fail = false; Relationship relation = Relationship.Get(mEnemy, Target, false); if (relation != null) { if (relation.LTR.Liking >= mRelationshipGate) { fail = true; } } if (!fail) { int report = 0; if (mEnemy.Partner == Target) { report = ReportChance; } Add(frame, new ExistingEnemyManualScenario(mEnemy, Target, mDelta, report, GetTitlePrefix(PrefixType.Story)), ScenarioResult.Start); } } } return(false); }
protected override bool PrivateUpdate(ScenarioFrame frame) { if (AddScoring("CaresAboutChildren", GetValue <AlimonyChanceOption, int>(Target), ScoringLookup.OptionType.Chance, Target) <= 0) { ManagerSim.AddBuff(Target, BuffNames.Amused, Origin); return(true); } if (ManagerSim.HasTrait(Target, TraitNames.Kleptomaniac)) { ManagerSim.AddBuff(Target, BuffNames.Fascinated, Origin); } return(base.PrivateUpdate(frame)); }
protected override bool PrivateUpdate(ScenarioFrame frame) { if (ManagerSim.HasTrait(Target, TraitNames.Evil)) { Target.CreatedSim.BuffManager.AddElement(BuffNames.FiendishlyDelighted, Origin); } else { float multiple = 0; if (Relationships.IsBloodRelated(Sim.Genealogy, Target.Genealogy, false)) { multiple++; } else if (Relationships.IsCloselyRelated(Sim, Target, false)) { multiple += 0.5f; } int ltr = ManagerSim.GetLTR(Sim, Target); if (ltr > 75) { multiple += 1.5f; } else if (ltr > 50) { multiple++; } else if (ltr > 25) { multiple += 0.5f; } mTimeoutLength = multiple * 24 * 60; base.PrivateUpdate(frame); BuffMourning.BuffInstanceMourning mourning = Target.CreatedSim.BuffManager.GetElement(BuffNames.Mourning) as BuffMourning.BuffInstanceMourning; if (mourning != null) { mourning.MissedSim = Sim; } } return(true); }
protected override bool PrivateUpdate(ScenarioFrame frame) { if ((Origin == Origin.FromFire) && (ManagerSim.HasTrait(Target, TraitNames.Pyromaniac))) { ManagerSim.AddBuff(Target, BuffNames.Fascinated, Origin); } if ((Origin == Origin.FromTheft) && (ManagerSim.HasTrait(Target, TraitNames.Kleptomaniac))) { ManagerSim.AddBuff(Target, BuffNames.Fascinated, Origin); } if ((Origin == Origin.FromWatchingSimSuffer) && (ManagerSim.HasTrait(Target, TraitNames.Evil))) { ManagerSim.AddBuff(Target, BuffNames.FiendishlyDelighted, Origin); } return(base.PrivateUpdate(frame)); }
protected override bool PrivateUpdate(ScenarioFrame frame) { if ((ManagerSim.HasTrait(Target, TraitNames.Evil)) || (ManagerSim.HasTrait(Target, TraitNames.MeanSpirited))) { return(false); } // Not performed for the main Sim on purpose if (Target != Sim) { base.PrivateUpdate(frame); bool fail = false; Relationship relation = Relationship.Get(mFriend, Target, false); if (relation != null) { if (relation.LTR.Liking <= mRelationshipGate) { fail = true; } } if (!fail) { int report = 0; if (mFriend.Partner == Target) { report = ReportChance; } Add(frame, new ExistingFriendManualScenario(mFriend, Target, mDelta, report, GetTitlePrefix(PrefixType.Story)), ScenarioResult.Start); } } return(false); }