* Garruk, Apex Predator - Fixed the triggered ability of the Emblem given to opponent.

This commit is contained in:
LevelX2 2015-07-25 11:33:58 +02:00
parent 4a0d118b7f
commit 7eab956657
2 changed files with 38 additions and 37 deletions

View file

@ -81,7 +81,6 @@ public class GarrukApexPredator extends CardImpl {
this.expansionSetCode = "M15"; this.expansionSetCode = "M15";
this.subtype.add("Garruk"); this.subtype.add("Garruk");
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false)); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false));
// +1: Destroy another target planeswalker. // +1: Destroy another target planeswalker.
@ -100,7 +99,9 @@ public class GarrukApexPredator extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// -8: Target opponent gets an emblem with "Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn." // -8: Target opponent gets an emblem with "Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn."
ability = new LoyaltyAbility(new GetEmblemTargetPlayerEffect(new GarrukApexPredatorEmblem()), -8); Effect effect = new GetEmblemTargetPlayerEffect(new GarrukApexPredatorEmblem());
effect.setText("Target opponent gets an emblem with \"Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn.\"");
ability = new LoyaltyAbility(effect, -8);
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);
} }
@ -162,7 +163,8 @@ class GarrukApexPredatorBeastToken extends Token {
} }
/** /**
* Emblem with "Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn." * Emblem with "Whenever a creature attacks you, it gets +5/+5 and gains trample
* until end of turn."
*/ */
class GarrukApexPredatorEmblem extends Emblem { class GarrukApexPredatorEmblem extends Emblem {

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.abilities.common; package mage.abilities.common;
import java.util.UUID; import java.util.UUID;
@ -63,7 +62,7 @@ public class AttackedByCreatureTriggeredAbility extends TriggeredAbilityImpl {
this.setTargetPointer = setTargetPointer; this.setTargetPointer = setTargetPointer;
} }
public AttackedByCreatureTriggeredAbility(AttackedByCreatureTriggeredAbility ability) { public AttackedByCreatureTriggeredAbility(final AttackedByCreatureTriggeredAbility ability) {
super(ability); super(ability);
this.setTargetPointer = ability.setTargetPointer; this.setTargetPointer = ability.setTargetPointer;
} }
@ -82,7 +81,7 @@ public class AttackedByCreatureTriggeredAbility extends TriggeredAbilityImpl {
for (Effect effect : this.getEffects()) { for (Effect effect : this.getEffects()) {
switch (setTargetPointer) { switch (setTargetPointer) {
case PERMANENT: case PERMANENT:
effect.setTargetPointer(new FixedTarget(event.getTargetId())); effect.setTargetPointer(new FixedTarget(attackingCreature.getId()));
break; break;
case PLAYER: case PLAYER:
effect.setTargetPointer(new FixedTarget(attackingCreature.getControllerId())); effect.setTargetPointer(new FixedTarget(attackingCreature.getControllerId()));