Fixed counter replacement effects with Doubling Season and Pir, Imaginative Rascal

This commit is contained in:
Evan Kranzler 2018-05-29 12:31:11 -04:00
parent 52243eb75c
commit e1aa40cbf7
6 changed files with 30 additions and 12 deletions

View file

@ -96,6 +96,9 @@ class DoublingSeasonCounterEffect extends ReplacementEffectImpl {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (!event.getFlag()) {
return false;
}
if (permanent == null) {
permanent = game.getPermanentEntering(event.getTargetId());
landPlayed = (permanent != null

View file

@ -110,10 +110,8 @@ class PirImaginativeRascalEffect extends ReplacementEffectImpl {
if (permanent == null) {
permanent = game.getPermanentEntering(event.getTargetId());
}
if (permanent != null && player != null && !player.hasOpponent(permanent.getControllerId(), game)) {
return true;
}
return false;
return permanent != null && player != null
&& !player.hasOpponent(permanent.getControllerId(), game);
}
@Override