Inheritance: IUpdateManagerOption
Example #1
0
 protected SimScenario(SimScenario scenario)
     : base(scenario)
 {
     mSim    = scenario.Sim;
     mNotSim = scenario.mNotSim;
     mFilter = scenario.mFilter;
 }
Example #2
0
 protected SimScenario(SimScenario scenario)
     : base (scenario)
 {
     mSim = scenario.Sim;
     mNotSim = scenario.mNotSim;
     mFilter = scenario.mFilter;
 }
Example #3
0
        public bool Parse(XmlDbRow row, StoryProgressionObject manager, IUpdateManager updater, string prefix, ref string error)
        {
            if ((!string.IsNullOrEmpty(prefix)) && (!Parse(row, manager, updater, null, ref error)))
            {
                return false;
            }

            if (row.Exists(prefix + "RecruitAllowSteal"))
            {
                mAllowSteal = row.GetBool(prefix + "RecruitAllowSteal");
            }

            if (mActorRecruit == null)
            {
                mActorRecruit = new SimScenarioFilter();
            }

            if (!mActorRecruit.Parse(row, manager, updater, prefix + "RecruitActor", false, ref error))
            {
                return false;
            }

            if (mTargetRecruit == null)
            {
                mTargetRecruit = new SimScenarioFilter();
            }

            if (!mTargetRecruit.Parse(row, manager, updater, prefix + "RecruitTarget", false, ref error))
            {
                return false;
            }

            return true;
        }
Example #4
0
        public override bool Parse(XmlDbRow row, ref string error)
        {
            mFilter = new SimScenarioFilter();

            if (!mFilter.Parse(row, Manager, this, "Actor", true, ref error))
            {
                return(false);
            }

            return(base.Parse(row, ref error));
        }
Example #5
0
 protected DualSimScenario(DualSimScenario scenario)
     : base (scenario)
 {
     mTarget = scenario.Target;
     mNotTarget = scenario.NotTarget;
     mTargetFilter = scenario.mTargetFilter;
     mMutualFilter = scenario.mMutualFilter;
     mTargetContinueChance = scenario.mTargetContinueChance;
     mTargetMaximumCount = scenario.mTargetMaximumCount;
     mMutualSelection = scenario.mMutualSelection;
     //mTargetGatheringFailure = scenario.mTargetGatheringFailure;
 }
Example #6
0
 protected DualSimScenario(DualSimScenario scenario)
     : base(scenario)
 {
     mTarget               = scenario.Target;
     mNotTarget            = scenario.NotTarget;
     mTargetFilter         = scenario.mTargetFilter;
     mMutualFilter         = scenario.mMutualFilter;
     mTargetContinueChance = scenario.mTargetContinueChance;
     mTargetMaximumCount   = scenario.mTargetMaximumCount;
     mMutualSelection      = scenario.mMutualSelection;
     //mTargetGatheringFailure = scenario.mTargetGatheringFailure;
 }
Example #7
0
        public static bool OnTestForVampires(SimScenarioFilter.Parameters personality, SimDescription actor, SimDescription potential)
        {
            foreach (SimDescription sim in SimListing.GetResidents(false).Values)
            {
                if (SimTypes.IsOccult(sim, OccultTypes.Vampire))
                {
                    return true;
                }
            }

            return false;
        }
Example #8
0
        public override bool Parse(XmlDbRow row, ref string error)
        {
            mTargetContinueChance = row.GetInt("TargetContinueChance", mTargetContinueChance);

            mTargetMaximumCount = row.GetInt("TargetMaximumCount", mTargetMaximumCount);

            mMutualFilter = new SimScenarioFilter();
            if (!mMutualFilter.Parse(row, Manager, this, "Mutual", false, ref error))
            {
                return(false);
            }

            mTargetFilter = new SimScenarioFilter();
            if (!mTargetFilter.Parse(row, Manager, this, "Target", true, ref error))
            {
                return(false);
            }

            return(base.Parse(row, ref error));
        }
Example #9
0
            protected override bool Allow(SimDescription me, SimScenarioFilter scoring)
            {
                mScenario.Scenarios.Track(me.FullName);

                if (!base.Allow(me, scoring))
                {
                    return(false);
                }

                if (scoring != null)
                {
                    if (!scoring.Test(new SimScenarioFilter.Parameters(mScenario), "SimSelection", null, me))
                    {
                        return(false);
                    }
                }

                mScenario.Sim = me;

                return(mScenario.Test(me));
            }
Example #10
0
        public override bool Parse(XmlDbRow row, ref string error)
        {
            mTargetContinueChance = row.GetInt("TargetContinueChance", mTargetContinueChance);

            mTargetMaximumCount = row.GetInt("TargetMaximumCount", mTargetMaximumCount);

            mMutualFilter = new SimScenarioFilter();
            if (!mMutualFilter.Parse(row, Manager, this, "Mutual", false, ref error))
            {
                return false;
            }

            mTargetFilter = new SimScenarioFilter();
            if (!mTargetFilter.Parse(row, Manager, this, "Target", true, ref error))
            {
                return false;
            }

            return base.Parse(row, ref error);
        }
Example #11
0
            protected override bool Allow(SimDescription me, SimScenarioFilter scoring)
            {
                mScenario.Scenarios.Track(me.FullName);

                if (!base.Allow(me, scoring)) return false;

                if (scoring != null)
                {
                    if (!scoring.Test(new SimScenarioFilter.Parameters(mScenario), "SimSelection", null, me)) return false;
                }

                mScenario.Sim = me;

                return mScenario.Test(me);
            }
Example #12
0
        public override bool Parse(XmlDbRow row, ref string error)
        {
            mFilter = new SimScenarioFilter();

            if (!mFilter.Parse(row, Manager, this, "Actor", true, ref error))
            {
                return false;
            }

            return base.Parse(row, ref error);
        }