mirror of
https://github.com/magefree/mage.git
synced 2026-01-20 18:29:56 -08:00
* Fixed that the new early way to add counters to permanents entering the battlefield (e.g. used for Undying) checked effects while the permanents was not already set to Zone battlefield. That caused e.g. the ability of Tatterkite not to work at that time.
This commit is contained in:
parent
0368c5287a
commit
eb3aef7ee5
4 changed files with 64 additions and 38 deletions
|
|
@ -32,7 +32,6 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.ruleModifying.CantRegenerateTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -59,10 +58,10 @@ public class Tatterkite extends CardImpl {
|
|||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
|
||||
// Tatterkite can't have counters placed on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantHaveCountersSourceEffect(Duration.WhileOnBattlefield, "it")));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantHaveCountersSourceEffect(Duration.WhileOnBattlefield)));
|
||||
|
||||
}
|
||||
|
||||
public Tatterkite(final Tatterkite card) {
|
||||
|
|
@ -77,7 +76,7 @@ public class Tatterkite extends CardImpl {
|
|||
|
||||
class CantHaveCountersSourceEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public CantHaveCountersSourceEffect(Duration duration, String objectText) {
|
||||
public CantHaveCountersSourceEffect(Duration duration) {
|
||||
super(duration, Outcome.Detriment);
|
||||
staticText = "{this} can't have counters placed on it";
|
||||
}
|
||||
|
|
@ -91,14 +90,9 @@ class CantHaveCountersSourceEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
return new CantHaveCountersSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ADD_COUNTER;
|
||||
return event.getType() == EventType.ADD_COUNTERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -109,4 +103,4 @@ class CantHaveCountersSourceEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue