[AFR] fixed some incorrect implementations of continuous effects

This commit is contained in:
Evan Kranzler 2021-07-07 17:52:31 -04:00
parent 7bc4c42976
commit 8addbb8146
4 changed files with 48 additions and 4 deletions

View file

@ -91,7 +91,7 @@ class EccentricApprenticeEffect extends ContinuousEffectImpl {
permanent.addAbility(FlyingAbility.getInstance(), source.getSourceId(), game); permanent.addAbility(FlyingAbility.getInstance(), source.getSourceId(), game);
return true; return true;
case PTChangingEffects_7: case PTChangingEffects_7:
if (sublayer == SubLayer.ModifyPT_7c) { if (sublayer == SubLayer.SetPT_7b) {
permanent.getPower().setValue(1); permanent.getPower().setValue(1);
permanent.getToughness().setValue(1); permanent.getToughness().setValue(1);
return true; return true;
@ -104,4 +104,15 @@ class EccentricApprenticeEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
return false; return false;
} }
@Override
public boolean hasLayer(Layer layer) {
switch (layer) {
case TypeChangingEffects_4:
case AbilityAddingRemovingEffects_6:
case PTChangingEffects_7:
return true;
}
return false;
}
} }

View file

@ -68,7 +68,7 @@ class MordenkainensPolymorphEffect extends ContinuousEffectImpl {
permanent.addAbility(FlyingAbility.getInstance(), source.getSourceId(), game); permanent.addAbility(FlyingAbility.getInstance(), source.getSourceId(), game);
return true; return true;
case PTChangingEffects_7: case PTChangingEffects_7:
if (sublayer == SubLayer.ModifyPT_7c) { if (sublayer == SubLayer.SetPT_7b) {
permanent.getPower().setValue(4); permanent.getPower().setValue(4);
permanent.getToughness().setValue(4); permanent.getToughness().setValue(4);
return true; return true;
@ -81,4 +81,15 @@ class MordenkainensPolymorphEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
return false; return false;
} }
@Override
public boolean hasLayer(Layer layer) {
switch (layer) {
case TypeChangingEffects_4:
case AbilityAddingRemovingEffects_6:
case PTChangingEffects_7:
return true;
}
return false;
}
} }

View file

@ -77,7 +77,7 @@ class WerewolfPackLeaderEffect extends ContinuousEffectImpl {
permanent.addAbility(TrampleAbility.getInstance(), source.getSourceId(), game); permanent.addAbility(TrampleAbility.getInstance(), source.getSourceId(), game);
return true; return true;
case PTChangingEffects_7: case PTChangingEffects_7:
if (sublayer == SubLayer.ModifyPT_7c) { if (sublayer == SubLayer.SetPT_7b) {
permanent.getPower().setValue(5); permanent.getPower().setValue(5);
permanent.getToughness().setValue(3); permanent.getToughness().setValue(3);
return true; return true;
@ -90,4 +90,15 @@ class WerewolfPackLeaderEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
return false; return false;
} }
@Override
public boolean hasLayer(Layer layer) {
switch (layer) {
case TypeChangingEffects_4:
case AbilityAddingRemovingEffects_6:
case PTChangingEffects_7:
return true;
}
return false;
}
} }

View file

@ -105,7 +105,7 @@ class WildShapeEffect extends ContinuousEffectImpl {
permanent.addAbility(ability, source.getSourceId(), game); permanent.addAbility(ability, source.getSourceId(), game);
return true; return true;
case PTChangingEffects_7: case PTChangingEffects_7:
if (sublayer == SubLayer.ModifyPT_7c) { if (sublayer == SubLayer.SetPT_7b) {
permanent.getPower().setValue(power); permanent.getPower().setValue(power);
permanent.getToughness().setValue(toughness); permanent.getToughness().setValue(toughness);
return true; return true;
@ -118,4 +118,15 @@ class WildShapeEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
return false; return false;
} }
@Override
public boolean hasLayer(Layer layer) {
switch (layer) {
case TypeChangingEffects_4:
case AbilityAddingRemovingEffects_6:
case PTChangingEffects_7:
return true;
}
return false;
}
} }