Exemplo n.º 1
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            GameObject target = Event.TargetObject as GameObject;

            Friends.AccumulateCelebrity(Sim, (int)target.Value / 5);
            return(true);
        }
Exemplo n.º 2
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            Sim simA = Event.Actor as Sim;
            Sim simB = Event.TargetObject as Sim;

            Relationship relation = Relationship.Get(simA, simB, false);

            if (relation == null)
            {
                return(false);
            }

            if ((simA != null) && (simB != null))
            {
                if ((!simA.IsSelectable) && (simB.SimDescription.CelebrityLevel > simA.SimDescription.CelebrityLevel))
                {
                    Friends.AccumulateCelebrity(simA.SimDescription, GetValue <RelationshipScenario.HobnobCelebrityPointsOption, int>() / 5);
                }

                if ((!simB.IsSelectable) && (simA.SimDescription.CelebrityLevel > simB.SimDescription.CelebrityLevel))
                {
                    Friends.AccumulateCelebrity(simB.SimDescription, GetValue <RelationshipScenario.HobnobCelebrityPointsOption, int>() / 5);
                }
            }

            return(false);
        }
Exemplo n.º 3
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            int points = sDataSet.GetDataForLevel(Sim);

            AddStat("Points", points);

            Friends.AccumulateCelebrity(Sim, points);
            return(true);
        }
Exemplo n.º 4
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            ImageObject painting = Event.TargetObject as ImageObject;

            if (painting == null)
            {
                return(false);
            }

            Friends.AccumulateCelebrity(Sim, painting.mOriginalValue / 5);
            return(true);
        }
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            List <int> levels = GetValue <ByLevelOption, List <int> >();

            int level = (int)Sim.CelebrityLevel;

            if (level >= levels.Count)
            {
                return(false);
            }

            int points = -levels[level];

            if (SimTypes.IsSelectable(Sim))
            {
                points *= GetValue <ActiveAccelerationOption, int>();
            }

            Friends.AccumulateCelebrity(Sim, points);

            return(true);
        }
Exemplo n.º 6
0
 protected override bool PrivateUpdate(ScenarioFrame frame)
 {
     Friends.AccumulateCelebrity(Sim, GetValue <Option, int>());
     return(true);
 }
Exemplo n.º 7
0
        protected bool AlterRelationship()
        {
            Relationship relation = ManagerSim.GetRelationship(Sim, Target);

            if (relation == null)
            {
                IncStat("No Relation");
                return(false);
            }

            int delta = Delta;

            if (delta == 0)
            {
                IncStat("No Delta");
                return(false);
            }

            if ((delta > 0) && (delta < 10))
            {
                delta = 10;
            }
            else if ((delta > -10) && (delta < 0))
            {
                delta = -10;
            }

            AddScoring("Delta", delta);

            try
            {
                int celebrity = GetValue <HobnobCelebrityPointsOption, int>();

                if (delta > 0)
                {
                    ManagerSim.AddBuff(Manager, Sim, BuffNames.Delighted, Origin.FromSocialization);
                    ManagerSim.AddBuff(Manager, Target, BuffNames.Delighted, Origin.FromSocialization);

                    delta = RandomUtil.GetInt(delta);

                    float value = 125;
                    if (delta > 75)
                    {
                        value = 1000;

                        celebrity *= 3;
                    }
                    else if (delta > 50)
                    {
                        value = 500;

                        celebrity *= 2;
                    }
                    else if (delta > 25)
                    {
                        value = 250;
                    }

                    if (IsRomantic)
                    {
                        relation.STC.Update(Sim, Target, CommodityTypes.Amorous, value);
                    }

                    relation.LTR.AddInteractionBit(LongTermRelationship.InteractionBits.CelebrityImpressed);

                    relation.LTR.UpdateLiking(delta);
                }
                else
                {
                    if (GetValue <ExtremeHatredOption, bool>())
                    {
                        delta *= 2;
                    }

                    ManagerSim.AddBuff(Manager, Sim, BuffNames.Upset, Origin.FromSocialization);
                    ManagerSim.AddBuff(Manager, Target, BuffNames.Upset, Origin.FromSocialization);

                    delta = -RandomUtil.GetInt(-delta);

                    float value = 125;
                    if (delta < -75)
                    {
                        value = 1000;

                        celebrity *= 3;
                    }
                    else if (delta < -50)
                    {
                        value = 500;

                        celebrity *= 2;
                    }
                    else if (delta < -25)
                    {
                        value = 250;
                    }

                    relation.STC.Update(Sim, Target, CommodityTypes.Insulting, value);

                    relation.LTR.UpdateLiking(delta);
                }

                if (Sim.CelebrityLevel > Target.CelebrityLevel)
                {
                    Friends.AccumulateCelebrity(Target, celebrity);
                }
                else if (Sim.CelebrityLevel < Target.CelebrityLevel)
                {
                    Friends.AccumulateCelebrity(Sim, celebrity);
                }
            }
            catch (Exception e)
            {
                Common.DebugException(Sim, Target, e);
            }

            AddStat("Liking", relation.LTR.Liking);
            return(true);
        }
Exemplo n.º 8
0
 protected override bool PrivateUpdate(ScenarioFrame frame)
 {
     Friends.AccumulateCelebrity(Sim, (int)Event.Increment / 10);
     return(true);
 }