Beispiel #1
0
 protected TakeCashScenario(TakeCashScenario scenario)
     : base (scenario)
 {
     mName = scenario.mName;
     mMinimum = scenario.mMinimum;
     mMaximum = scenario.mMaximum;
     mAllowDebt = scenario.mAllowDebt;
     mAccountingKey = scenario.mAccountingKey;
     mFight = scenario.mFight;
     mFail = scenario.mFail;
     mInvestigate = scenario.mInvestigate;
 }
Beispiel #2
0
 protected TorchScenario(TorchScenario scenario)
     : base (scenario)
 {
     mName = scenario.mName;
     mAllowInjury = scenario.mAllowInjury;
     mSuccess = scenario.mSuccess;
     mFailure = scenario.mFailure;
     mSneakinessScoring = scenario.mSneakinessScoring;
     mAllowGoToJail = scenario.mAllowGoToJail;
     mBail = scenario.mBail;
     mInvestigate = scenario.mInvestigate;
 }
Beispiel #3
0
 protected BurgleScenario(BurgleScenario scenario)
     : base (scenario)
 {
     mName = scenario.mName;
     mMinimum = scenario.mMinimum;
     mMaximum = scenario.mMaximum;
     mKeepObject = scenario.mKeepObject;
     mSuccess = scenario.mSuccess;
     mFailure = scenario.mFailure;
     mSneakinessScoring = scenario.mSneakinessScoring;
     mAllowGoToJail = scenario.mAllowGoToJail;
     mBail = scenario.mBail;
     mInvestigate = scenario.mInvestigate;
 }
Beispiel #4
0
        public override bool Parse(XmlDbRow row, ref string error)
        {
            mName = new WeightOption.NameOption(row);

            mAllowDebt = row.GetBool("AllowDebt");

            if (row.Exists("AccountingKey"))
            {
                mAccountingKey = row.GetString("AccountingKey");
            }
            else
            {
                error = "AccountingKey missing";
                return false;
            }

            mFight = new FightScenarioHelper(Origin.FromTheft, SimDescription.DeathType.OldAge);
            if (!mFight.Parse(row, Manager, this, ref error))
            {
                return false;
            }

            mInvestigate = new InvestigationHelper();
            if (!mInvestigate.Parse(row, Manager, this, ref error))
            {
                return false;
            }

            mMinimum = new IntegerOption.OptionValue();
            if (!mMinimum.Parse(row, "Minimum", Manager, this, ref error))
            {
                return false;
            }

            mMaximum = new IntegerOption.OptionValue();
            if (!mMaximum.Parse(row, "Maximum", Manager, this, ref error))
            {
                return false;
            }

            return base.Parse(row, ref error);
        }
Beispiel #5
0
        public override bool Parse(XmlDbRow row, ref string error)
        {
            mName = new WeightOption.NameOption(row);

            if (!row.Exists("AllowGoToJail"))
            {
                error = "AllowGoToJail missing";
                return false;
            }

            mAllowGoToJail = row.GetBool("AllowGoToJail");

            mBail = new IntegerOption.OptionValue(-1);
            if (row.Exists("Bail"))
            {
                if (!mBail.Parse(row, "Bail", Manager, this, ref error))
                {
                    return false;
                }
            }

            if (!row.Exists("AllowInjury"))
            {
                error = "AllowInjury missing";
                return false;
            }

            mAllowInjury = row.GetBool("AllowInjury");

            mSneakinessScoring = row.GetString("SneakinessScoring");

            mInvestigate = new InvestigationHelper();
            if (!mInvestigate.Parse(row, Manager, this, ref error))
            {
                return false;
            }

            mSuccess = new WeightScenarioHelper(Origin.FromFire);
            if (!mSuccess.Parse(row, Manager, this, "Success", ref error))
            {
                return false;
            }

            mFailure = new WeightScenarioHelper(Origin.FromFire);
            if (!mFailure.Parse(row, Manager, this, "Failure", ref error))
            {
                return false;
            }

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