Exemplo n.º 1
0
        public void CantAttackPlayerByInactiveCreature()
        {
            var state = CreatePlayerAttackReadyState();

            state.Users[0].TableSet[0].Actions = 0;
            var action = new AttackPlayerAction("1", 0);

            Assert.False(action.CanApply(state));
        }
Exemplo n.º 2
0
        public void CantAttackPlayerWithoutCreature()
        {
            var state  = CreatePlayerAttackReadyState();
            var action = new AttackPlayerAction("1", -1);

            Assert.False(action.CanApply(state));
            action = new AttackPlayerAction("1", 1);
            Assert.False(action.CanApply(state));
        }
Exemplo n.º 3
0
        public void PlayerLostHealth()
        {
            var state  = CreatePlayerAttackReadyState();
            var action = new AttackPlayerAction("1", 0);

            Assert.True(action.CanApply(state));
            action.Apply(state);
            Assert.True(state.Users[1].Health == state.Users[1].MaxHealth - state.Users[0].TableSet[0].Damage);
        }
Exemplo n.º 4
0
        public void PlayerAttackSpentActions()
        {
            var state  = CreatePlayerAttackReadyState();
            var action = new AttackPlayerAction("1", 0);

            Assert.True(action.CanApply(state));
            action.Apply(state);
            var card = state.Users[0].TableSet[0];

            Assert.True(card.Actions < card.MaxActions);
        }