コード例 #1
0
        public void TestGreatStridesRemovedImmediatelyOnTouch()
        {
            GreatStrides greatStrides = new GreatStrides();
            BasicTouch   basicTouch   = new BasicTouch();

            State state = Utility.CreateDefaultState();

            state.Quality       = 142;
            state.MaxQuality    = 726;
            state.Progress      = 0;
            state.MaxProgress   = 100;
            state.Durability    = 20;
            state.MaxDurability = 40;
            state.CrafterLevel  = 16;
            state.SynthLevel    = 13;
            state.Craftsmanship = 105;
            state.Control       = 102;
            state.Condition     = Condition.Normal;
            state.CP            = 55;
            state.MaxCP         = 233;

            Assert.IsTrue(greatStrides.CanUse(state));

            state = greatStrides.Activate(state, true);
            Assert.AreEqual <uint>(3U, GreatStrides.GetTurnsRemaining(state));
            state = basicTouch.Activate(state, true);
            Assert.AreEqual <uint>(0U, GreatStrides.GetTurnsRemaining(state));
        }
コード例 #2
0
        public void TestGreatStridesDuration()
        {
            GreatStrides   greatStrides = new GreatStrides();
            BasicSynthesis basicSynth   = new BasicSynthesis();

            State state = Utility.CreateDefaultState();

            state.Quality       = 142;
            state.MaxQuality    = 726;
            state.Progress      = 0;
            state.MaxProgress   = 100;
            state.Durability    = 100;
            state.MaxDurability = 100;
            state.CrafterLevel  = 16;
            state.SynthLevel    = 13;
            state.Craftsmanship = 105;
            state.Control       = 102;
            state.Condition     = Condition.Normal;
            state.CP            = 55;
            state.MaxCP         = 233;

            Assert.IsTrue(greatStrides.CanUse(state));
            state = greatStrides.Activate(state, true);
            for (uint i = greatStrides.Duration; i > 0; --i)
            {
                Assert.AreEqual <uint>(i, GreatStrides.GetTurnsRemaining(state));
                state = basicSynth.Activate(state, true);
            }
            Assert.AreEqual <uint>(0U, GreatStrides.GetTurnsRemaining(state));
        }
コード例 #3
0
        public void TestGreatStridesTurns()
        {
            State details = new State();

            Assert.AreEqual <uint>(0, GreatStrides.GetTurnsRemaining(details));

            for (int i = 3; i >= 0; --i)
            {
                GreatStrides.SetTurnsRemaining(details, (uint)i);
                Assert.AreEqual <uint>((uint)i, GreatStrides.GetTurnsRemaining(details));
            }
        }
コード例 #4
0
        public void TestMultipleStatAssignment2()
        {
            State details = new State();

            details.CrafterLevel = 13U;
            details.SynthLevel   = 40U;
            details.Quality      = 1215U;
            details.MaxQuality   = 923U;
            details.Condition    = Engine.Condition.Excellent;
            Manipulation.SetTurnsRemaining(details, 2);
            GreatStrides.SetTurnsRemaining(details, 3);
            Ingenuity.SetTurnsRemaining(details, 1);
            SteadyHand.SetTurnsRemaining(details, 4);

            Assert.AreEqual <uint>(13, details.CrafterLevel);
            Assert.AreEqual <uint>(40, details.SynthLevel);
            Assert.AreEqual <uint>(1215, details.Quality);
            Assert.AreEqual <uint>(923, details.MaxQuality);
            Assert.AreEqual <Engine.Condition>(Engine.Condition.Excellent, details.Condition);
            Assert.AreEqual <uint>(2, Manipulation.GetTurnsRemaining(details));
            Assert.AreEqual <uint>(3, GreatStrides.GetTurnsRemaining(details));
            Assert.AreEqual <uint>(1, Ingenuity.GetTurnsRemaining(details));
            Assert.AreEqual <uint>(4, SteadyHand.GetTurnsRemaining(details));
        }