Exemplo n.º 1
0
        public void TestManipulationWithTouchDoesntChangeDurability()
        {
            Manipulation manipulation = new Manipulation();
            BasicTouch   touch        = new BasicTouch();

            State state = Utility.CreateDefaultState();

            state.Durability = 20;
            State s2 = manipulation.Activate(state, true);

            Assert.AreEqual <uint>(20, s2.Durability);
            Assert.AreEqual(SynthesisStatus.IN_PROGRESS, s2.Status);

            s2 = touch.Activate(s2, true);
            Assert.AreEqual <uint>(20, s2.Durability);
            Assert.AreEqual(SynthesisStatus.IN_PROGRESS, s2.Status);
        }
Exemplo n.º 2
0
        public void TestManipulationWithTenDurabilityBusts()
        {
            Manipulation   manipulation = new Manipulation();
            BasicSynthesis basic        = new BasicSynthesis();

            State state = Utility.CreateDefaultState();

            state.Durability = 10;
            State s2 = manipulation.Activate(state, true);

            Assert.AreEqual <uint>(10, s2.Durability);
            Assert.AreEqual(SynthesisStatus.IN_PROGRESS, s2.Status);

            s2 = basic.Activate(s2, true);
            Assert.AreEqual <uint>(0, s2.Durability);
            Assert.AreEqual(SynthesisStatus.BUSTED, s2.Status);
        }
Exemplo n.º 3
0
        public void TestSubsequentAbilitiesStillTickAfterOneWearsOff()
        {
            Manipulation manipulation = new Manipulation();
            GreatStrides strides      = new GreatStrides();
            BasicTouch   touch        = new BasicTouch();

            State state = Utility.CreateDefaultState();

            state.Durability = 20;
            State s2 = strides.Activate(state, true);

            s2 = manipulation.Activate(s2, true);

            GreatStrides.SetTurnsRemaining(s2, 1);

            s2 = touch.Activate(s2, true);
            // Make sure Manipulation still ticked even though great strides wore off.
            Assert.AreEqual <uint>(20, s2.Durability);
        }
Exemplo n.º 4
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));
        }