Ejemplo n.º 1
0
        public void TestWithValues(float modifier, int damage, int expected, bool roundDown = false)
        {
            var game = new GameField();

            var player = new Player()
            {
                Id = NetworkId.Generate()
            };
            var opponent = new Player()
            {
                Id = NetworkId.Generate()
            };

            game.AddPlayer(player);
            game.AddPlayer(opponent);

            opponent.ActivePokemonCard = new PokemonCard()
            {
                Owner = opponent
            };

            game.ActivePlayerIndex = 0;

            var pokemon = new PokemonCard()
            {
                Owner = player
            };

            var effect = new AttachmentEffect()
            {
                Ability = new DamageTakenModifier()
                {
                    Modifer   = modifier,
                    RoundDown = roundDown
                },
                TargetingMode = TargetingMode.YourActive
            };

            player.ActivePokemonCard = pokemon;

            effect.Process(game, player, opponent, player.ActivePokemonCard);

            pokemon.DealDamage(damage, game, opponent.ActivePokemonCard, true);

            Assert.Equal(expected, pokemon.DamageCounters);
        }
Ejemplo n.º 2
0
 public void OnAttachedTo(PokemonCard attachedTo, bool fromHand, GameField game)
 {
     attachedTo.DealDamage(Amount, game, attachedTo, false);
 }