Exemplo n.º 1
0
        public void TestManipulationTurns()
        {
            State details = new State();

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

            for (int i = 3; i >= 0; --i)
            {
                Manipulation.SetTurnsRemaining(details, (uint)i);
                Assert.AreEqual <uint>((uint)i, Manipulation.GetTurnsRemaining(details));
            }
        }
Exemplo n.º 2
0
        public void TestManipulation()
        {
            Manipulation   manipulation = new Manipulation();
            BasicSynthesis basic        = new BasicSynthesis();
            SteadyHand     steadyHand   = new SteadyHand();

            State state = Utility.CreateDefaultState();

            state.Durability    = 30;
            state.MaxDurability = 60;

            // Verify that Manipulation can be activated successfully.
            State s1 = manipulation.Activate(state, true);

            Assert.AreEqual <uint>(manipulation.Duration, Manipulation.GetTurnsRemaining(s1));

            // Verify that the durability has not changed simply as a result of activating manipulation.
            Assert.AreEqual <uint>(state.Durability, s1.Durability);

            // Verify that Manipulation can't be used if it's already up.
            Assert.IsFalse(manipulation.CanUse(s1));

            // Verify that using Basic Synthesis with Manipulation up doesn't decrease the durability.
            State s2 = basic.Activate(s1, true);

            Assert.AreEqual <uint>(s1.Durability, s2.Durability);
            Assert.AreEqual <uint>(2, Manipulation.GetTurnsRemaining(s2));
            Assert.IsFalse(manipulation.CanUse(s2));

            // Verify that using Steady hand with Manipulation up causes the durability to increase by 10.
            State s3 = steadyHand.Activate(s2, true);

            Assert.AreEqual <uint>(s2.Durability + 10, s3.Durability);
            Assert.AreEqual <uint>(1, Manipulation.GetTurnsRemaining(s3));
            Assert.IsFalse(manipulation.CanUse(s3));

            // Use another Basic Synthesis so we can verify that the buff de-activates.
            State s4 = basic.Activate(s3, true);

            Assert.IsTrue(manipulation.CanUse(s4));
        }
Exemplo n.º 3
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));
        }