コード例 #1
0
        public void TestPreciseShotTalentAddedMechanism()
        {
            var preciseShot = new PreciseShotTalent();

            this.playerThing.Behaviors.FindFirst<TalentsBehavior>().AddTalent(preciseShot);

            var behavior = this.playerThing.Behaviors.FindFirst<TalentsBehavior>();

            Verify.IsTrue(behavior.ManagedTalents.Contains(preciseShot));
            Verify.IsNotNull(behavior.FindFirst<PreciseShotTalent>().PlayerThing);

            behavior.RemoveTalent(preciseShot);
        }
コード例 #2
0
        public void TestPreciseShotTalentAutosetRule()
        {
            var preciseShot = new PreciseShotTalent();

            var behavior = this.playerThing.Behaviors.FindFirst <TalentsBehavior>();

            var damageStat     = this.playerThing.FindGameStat("Damage");
            int oldDamaveValue = damageStat.Value;

            behavior.AddTalent(preciseShot);

            Verify.AreNotEqual(oldDamaveValue, damageStat.Value);

            behavior.RemoveTalent(preciseShot);

            Verify.AreEqual(oldDamaveValue, damageStat.Value);
        }
コード例 #3
0
        public void TestPreciseShotTalentAutosetRule()
        {
            var preciseShot = new PreciseShotTalent();

            var behavior = this.playerThing.Behaviors.FindFirst<TalentsBehavior>();

            var damageStat = this.playerThing.FindGameStat("Damage");
            int oldDamaveValue = damageStat.Value;

            behavior.AddTalent(preciseShot);

            Verify.AreNotEqual(oldDamaveValue, damageStat.Value);

            behavior.RemoveTalent(preciseShot);

            Verify.AreEqual(oldDamaveValue, damageStat.Value);
        }