fixed Reyhan, Last of the Abzan only triggering for opponents' creatures

This commit is contained in:
Evan Kranzler 2018-06-07 08:54:02 -04:00
parent 5ba0717086
commit 1fde140dd1

View file

@ -1,4 +1,3 @@
package mage.cards.r;
import java.util.UUID;
@ -91,25 +90,25 @@ class ReyhanLastOfTheAbzanTriggeredAbility extends TriggeredAbilityImpl {
if (zcEvent.getToZone() != Zone.GRAVEYARD && zcEvent.getToZone() != Zone.COMMAND) {
return false;
}
// A creature
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
if (permanent == null || !permanent.isCreature()) {
return false;
}
// You control
Player player = game.getPlayer(this.getControllerId());
if (player == null || !player.getId().equals(this.getControllerId())) {
if (player == null || !permanent.getControllerId().equals(player.getId())) {
return false;
}
// If it had one or more +1/+1 counters on it
int countersOn = permanent.getCounters(game).getCount(CounterType.P1P1);
if (countersOn == 0) {
return false;
}
// You may put that may +1/+1 counters on target creature
this.getEffects().clear();
this.addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(countersOn)));