Examples of AttacksIfAbleTargetEffect


Examples of mage.abilities.effects.common.AttacksIfAbleTargetEffect

    super(ownerId, 145, "Incite", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
    this.expansionSetCode = "M11";
    this.color.setRed(true);
    this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    this.getSpellAbility().addEffect(new InciteEffect());
    this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect());
  }
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

        this.toughness = new MageInt(3);

        this.addAbility(DefenderAbility.getInstance());
        this.addAbility(FlyingAbility.getInstance());
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new AttacksIfAbleTargetEffect(Duration.EndOfTurn),
                new ManaCostsImpl("{1}{R}"));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

                effect = new GainAbilityTargetEffect(BlocksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, "");
                effect.setTargetPointer(new FixedTarget(creature1.getId()));
                game.addEffect(effect, source);
            } else {
                // Attacks
                ContinuousEffectImpl effect = new AttacksIfAbleTargetEffect(Duration.EndOfTurn);
                effect.setTargetPointer(new FixedTarget(creature1.getId()));
                game.addEffect(effect, source);
                effect = new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, "");
                effect.setTargetPointer(new FixedTarget(creature1.getId()));
                game.addEffect(effect, source);

            }
        }
        Permanent creature2 = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (creature2 != null) {
            if (game.getOpponents(creature2.getControllerId()).contains(game.getActivePlayerId())) {
                // Blocks
                ContinuousEffectImpl effect = new CantBlockTargetEffect(Duration.EndOfTurn);
                effect.setTargetPointer(new FixedTarget(creature2.getId()));
                game.addEffect(effect, source);
            } else {
                // Attacks
                ContinuousEffectImpl effect = new CantAttackTargetEffect(Duration.EndOfTurn);
                effect.setTargetPointer(new FixedTarget(creature2.getId()));
                game.addEffect(effect, source);
            }
        }
        return true;
    }
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

        // Players can't cast spells during combat.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BasandraBattleSeraphEffect()));

        // {R}: Target creature attacks this turn if able.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{R}"));
        ability.addEffect(new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, null));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);

    }
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

        this.expansionSetCode = "M10";
        this.color.setBlue(true);
        this.subtype.add("Siren");
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // {2}{R}: Target creature attacks this turn if able.
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new AttacksIfAbleTargetEffect(Duration.EndOfTurn),
                new ManaCostsImpl("{2}{R}"));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

        this.color.setBlue(true);
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);

        // {tap}: Target creature attacks this turn if able.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost());
        ability.addEffect(new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, null));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);

        // {tap}: Target creature blocks this turn if able.
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

        this.color.setRed(true);

        // Target creature becomes red until end of turn and attacks this turn if able.
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new SetCardColorTargetEffect(ObjectColor.RED, Duration.EndOfTurn, "Target creature becomes red until end of turn"));
        this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn));
    }
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

        this.toughness = new MageInt(2);

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // {1}{U}: Target creature an opponent controls attacks this turn if able.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"));
        Target target = new TargetCreaturePermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
        // {1}{B}, {T}: Attacking creatures get -1/-1 until end of turn.
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1,-1, Duration.EndOfTurn, filterAttacking, false), new ManaCostsImpl("{1}{B}"));
View Full Code Here

Examples of mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect

        this.color.setRed(true);

        // Target creature you don't control gets -2/-0 until end of turn and attacks this turn if able.
        this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
        this.getSpellAbility().addEffect(new BoostTargetEffect(-2,0, Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn));

        // Overload {3}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
        OverloadAbility ability = new OverloadAbility(this, new BoostAllEffect(-2,0, Duration.EndOfTurn,filter,false), new ManaCostsImpl("{3}{U}{R}"));
        ability.addEffect(new ChemistersTrickEffect(filter));
        this.addAbility(ability);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.