Esempio n. 1
0
        public void CharacterMovesAndAccelerates_VelocityCannotExceedMaxMovementPerPhase()
        {
            FlightManuever.Distance = MovementDistance.HalfDistance;
            FlightManuever.Perform();
            Flight.MoveCharacter(25);

            Assert.AreEqual(100, Character.CharacterMovement.Velocity);
        }
Esempio n. 2
0
        public void CharacterMovesUsingNonCombatMovement_Has0OCVofZero()
        {
            FlightManuever.Distance = MovementDistance.FullDistance;
            FlightManuever.Mode     = MovementMode.NonCombatMovement;
            FlightManuever.Perform();

            Assert.AreEqual(Character.OCV.CurrentValue, 0);
        }
Esempio n. 3
0
        CharacterMovesWithMovementThatRequiresTurnModeAndIsMovingQuicklyAndMakesLargeTurnAndDeceleratesWhileTurning_CanTurnWithMuchLessMovement()
        {
            FlightManuever.InchesMovingThisPhase = 50;
            FlightManuever.Perform();
            Flight.Facing.Pitch = PitchHexFacing.Level;
            Flight.Facing.Yaw   = YawHexFacing.East;
            Flight.RaceForward();

            FlightManuever.InchesMovingThisPhase = 50;
            FlightManuever.Perform();
            Flight.TurnTowards(YawHexFacing.SouthWest, 0, AccelerationDirection.Decelerate);
            Assert.AreEqual(30, Flight.InchesMovingThisPhaseNotYetUsed);
        }
Esempio n. 4
0
        CharacterMovesWithMovementThatRequiresTurnModeAndIsMovingQuicklyAndMakesLargeTurn_CharacterWillTravelTurnModePerTurnIncrementAsPartOfTurn()
        {
            FlightManuever.InchesMovingThisPhase = 50;
            FlightManuever.Perform();
            Flight.Facing.Pitch = PitchHexFacing.Level;
            Flight.Facing.Yaw   = YawHexFacing.East;
            Flight.RaceForward();

            FlightManuever.InchesMovingThisPhase = 50;
            FlightManuever.Perform();
            Flight.TurnTowards(YawHexFacing.SouthWest, 0, AccelerationDirection.Coasting);
            Assert.AreEqual(10, Flight.InchesMovingThisPhaseNotYetUsed);
        }
Esempio n. 5
0
        public void CharacterMoving_MustContinueToUseMovementUntilCharacterIsAbleToFullyDecelerate()
        {
            FlightManuever.Perform();
            Flight.MoveCharacter(100);
            Strike s = Character.Manuevers["Strike"] as Strike;

            ;
            Assert.AreEqual(false, s.CanPerform);
            Assert.AreEqual(1, Character.AllowedManuevers.Count);
            FlightManuever.Perform();

            Flight.StopMovingCharacter();
        }
Esempio n. 6
0
        ChacterMovingWithMovementAffectedByGravityAndAcceleratesWhenDiving_CanOnlyDecelerateAtOriginalFLightSpeed()
        {
            FlightManuever.Perform();
            Flight.Facing.Pitch = PitchHexFacing.Level;
            //Flight.ChracterFacing = PitchHexFacing.Level;
            Flight.Activate(100);

            Flight.TurnTowards(0, PitchHexFacing.StraightDown);

            Flight.RaceForward();

            Flight.StopMovingCharacter();

            Assert.AreEqual(100, Flight.Velocity);
            Assert.AreEqual(FlightManuever, Character.ManueverInProgess);

            Flight.StopMovingCharacter();
            Assert.AreEqual(null, Character.ManueverInProgess);
        }
Esempio n. 7
0
        public void CharacterMovesUsingNonCombatMovement_AcceleratesAtCombatMovmenetToMovesAtCombatMoveTimesNonCombatMultiplier()
        {
            FlightManuever.Distance = MovementDistance.FullDistance;
            FlightManuever.Mode     = MovementMode.NonCombatMovement;
            FlightManuever.Distance = MovementDistance.FullDistance;
            FlightManuever.Perform();
            Flight.RaceForward();

            Assert.AreEqual(100, Flight.InchesOfTravelSinceLastMove);
            FlightManuever.Perform();
            Flight.RaceForward();
            Assert.AreEqual(200, Flight.InchesOfTravelSinceLastMove);

            FlightManuever.Perform();
            Flight.RaceForward();
            Assert.AreEqual(300, Flight.InchesOfTravelSinceLastMove);

            FlightManuever.Perform();
            Flight.RaceForward();
            Assert.AreEqual(400, Flight.InchesOfTravelSinceLastMove);
        }
Esempio n. 8
0
        public void CharacterMovesUsingNonCombatMovement_AndDCVBasedOnVelocity()
        {
            FlightManuever.Distance = MovementDistance.FullDistance;
            FlightManuever.Mode     = MovementMode.NonCombatMovement;

            FlightManuever.Perform();
            Flight.RaceForward();
            Assert.AreEqual(Character.DCV.CurrentValue, 11);

            FlightManuever.Perform();
            Flight.RaceForward();
            Assert.AreEqual(Character.DCV.CurrentValue, 13);


            FlightManuever.Perform();
            Flight.RaceForward();
            Assert.AreEqual(Character.DCV.CurrentValue, 13);

            FlightManuever.Perform();
            Flight.RaceForward();
            Assert.AreEqual(Character.DCV.CurrentValue, 15);
        }