forked from External/mage
Stop permanents getting counters when phased out (#9194)
This commit is contained in:
parent
97fd9b6b6e
commit
b52576fcf9
2 changed files with 61 additions and 49 deletions
|
|
@ -699,6 +699,12 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
}
|
||||
|
||||
public boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game, List<UUID> appliedEffects, boolean isEffect, int maxCounters) {
|
||||
if (this instanceof Permanent) {
|
||||
if (!((Permanent) this).isPhasedIn()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
boolean returnCode = true;
|
||||
GameEvent addingAllEvent = GameEvent.getEvent(GameEvent.EventType.ADD_COUNTERS, objectId, source, playerAddingCounters, counter.getName(), counter.getCount());
|
||||
addingAllEvent.setAppliedEffects(appliedEffects);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue