mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Archetype cards - Fixed layer to interact correctly with ability adding/removing continuous effects.
This commit is contained in:
parent
2abeb43449
commit
fcf27e55d6
2 changed files with 95 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ package mage.abilities.effects.common.continuous;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.constants.DependencyType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -18,14 +19,15 @@ import mage.players.Player;
|
|||
*/
|
||||
public class CreaturesCantGetOrHaveAbilityEffect extends ContinuousEffectImpl {
|
||||
|
||||
private Ability ability;
|
||||
private FilterCreaturePermanent filter;
|
||||
private final Ability ability;
|
||||
private final FilterCreaturePermanent filter;
|
||||
|
||||
public CreaturesCantGetOrHaveAbilityEffect(Ability ability, Duration duration, FilterCreaturePermanent filter) {
|
||||
super(duration, Outcome.Detriment);
|
||||
this.ability = ability;
|
||||
this.filter = filter;
|
||||
setText();
|
||||
addDependedToType(DependencyType.AddingAbility);
|
||||
}
|
||||
|
||||
public CreaturesCantGetOrHaveAbilityEffect(final CreaturesCantGetOrHaveAbilityEffect effect) {
|
||||
|
|
@ -61,7 +63,7 @@ public class CreaturesCantGetOrHaveAbilityEffect extends ContinuousEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean hasLayer(Layer layer) {
|
||||
return layer == Layer.RulesEffects;
|
||||
return layer == Layer.AbilityAddingRemovingEffects_6;
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue