Exemplo n.º 1
0
        protected override void ResolveEffect()
        {
            var source = DamageSource.IsEffect()
        ? DamageSource.Effect().Source.OwningCard
        : DamageSource.Card();

            var mp = new ModifierParameters
            {
                SourceCard   = Source.OwningCard,
                SourceEffect = this,
                X            = X
            };

            var prevention = new PreventAllDamageFromSourceToTarget(
                source: source,
                creatureOrPlayer: DamageTarget,
                onlyOnce: true);

            var modifier = new AddDamagePrevention(prevention)
            {
                UntilEot = true
            };

            Game.AddModifier(modifier, mp);
        }
        protected override void ResolveEffect()
        {
            var mp = new ModifierParameters
            {
              SourceCard = Source.OwningCard,
              SourceEffect = this,
            };

              var prevention = new Grove.PreventAllCombatDamage();
              var modifier = new AddDamagePrevention(prevention) {UntilEot = true};
              Game.AddModifier(modifier, mp);
        }
        protected override void ResolveEffect()
        {
            var mp = new ModifierParameters
            {
              SourceCard = Source.OwningCard,
              SourceEffect = this,
            };

              foreach (var target in ValidEffectTargets)
              {
            var prevention = new PreventNextDamageToTarget(_amount, target);
            var modifier = new AddDamagePrevention(prevention) {UntilEot = true};
            Game.AddModifier(modifier, mp);
              }
        }
        protected override void ResolveEffect()
        {
            var mp = new ModifierParameters
            {
                SourceCard   = Source.OwningCard,
                SourceEffect = this,
            };

            var prevention = new PreventDamageToTarget(
                target: Source.OwningCard.AttachedTo,
                amount: (creatureOrPlayer, ctx) => _amount((Card)(creatureOrPlayer)));

            var modifier = new AddDamagePrevention(prevention);

            Game.AddModifier(modifier, mp);
        }
Exemplo n.º 5
0
        protected override void ResolveEffect()
        {
            var mp = new ModifierParameters
            {
                SourceCard   = Source.OwningCard,
                SourceEffect = this,
            };

            var prevention = new Grove.PreventCombatDamage(_filter);
            var modifier   = new AddDamagePrevention(prevention)
            {
                UntilEot = true
            };

            Game.AddModifier(modifier, mp);
        }
Exemplo n.º 6
0
        protected override void ResolveEffect()
        {
            var mp = new ModifierParameters
            {
                SourceCard   = Source.OwningCard,
                SourceEffect = this,
            };

            foreach (var target in ValidEffectTargets)
            {
                var prevention = new PreventNextDamageToTarget(_amount, target);
                var modifier   = new AddDamagePrevention(prevention)
                {
                    UntilEot = true
                };
                Game.AddModifier(modifier, mp);
            }
        }
        protected override void ResolveEffect()
        {
            var source = Target.IsEffect()
            ? Target.Effect().Source.OwningCard
            : Target.Card();

              var mp = new ModifierParameters
            {
              SourceCard = Source.OwningCard,
              SourceEffect = this,
              X = X
            };

              var prevention = new PreventAllDamageFromSource(
            source, _preventCombatOnly);

              var modifier = new AddDamagePrevention(prevention) {UntilEot = true};
              Game.AddModifier(modifier, mp);
        }
        public override void ProcessResults(ChosenOptions results)
        {
            var color = ChoiceToColorMap.Single(x => x.Choice.Equals(results.Options[0])).Color;

            var mp = new ModifierParameters
            {
                SourceCard   = Source.OwningCard,
                SourceEffect = this,
            };

            foreach (var target in ValidEffectTargets)
            {
                var prevention = new PreventDamageToTarget(target, sourceSelector: (c, ctx) => c.HasColor(color));
                var modifier   = new AddDamagePrevention(prevention)
                {
                    UntilEot = true
                };
                Game.AddModifier(modifier, mp);
            }
        }
        protected override void ResolveEffect()
        {
            var source = DamageSource.IsEffect()
            ? DamageSource.Effect().Source.OwningCard
            : DamageSource.Card();

              var mp = new ModifierParameters
            {
              SourceCard = Source.OwningCard,
              SourceEffect = this,
              X = X
            };

              var prevention = new PreventAllDamageFromSourceToTarget(
            source: source,
            creatureOrPlayer: DamageTarget,
            onlyOnce: true);

              var modifier = new AddDamagePrevention(prevention) {UntilEot = true};
              Game.AddModifier(modifier, mp);
        }
        protected override void ResolveEffect()
        {
            var source = Target.IsEffect()
        ? Target.Effect().Source.OwningCard
        : Target.Card();

            var mp = new ModifierParameters
            {
                SourceCard   = Source.OwningCard,
                SourceEffect = this,
                X            = X
            };

            var prevention = new Grove.PreventDamageFromSource(
                source, _preventCombatOnly);

            var modifier = new AddDamagePrevention(prevention)
            {
                UntilEot = true
            };

            Game.AddModifier(modifier, mp);
        }
Exemplo n.º 11
0
        protected override void ResolveEffect()
        {
            var source = Target.IsEffect()
        ? Target.Effect().Source.OwningCard
        : Target.Card();

            var prevention = new PreventFirstDamageFromSourceToCreatureOrPlayer(
                source: source,
                creatureOrPlayer: Controller);

            var modifier = new AddDamagePrevention(prevention)
            {
                UntilEot = true
            };

            var p = new ModifierParameters
            {
                SourceEffect = this,
                SourceCard   = Source.OwningCard,
                X            = X
            };

            Game.AddModifier(modifier, p);
        }