forked from External/mage
Fixed Issue#67: Evernight Shade doesn't loose +1/+1 effects
This commit is contained in:
parent
88f990ec67
commit
3b3d02b3f8
7 changed files with 60 additions and 11 deletions
|
|
@ -159,7 +159,7 @@ public class ContinuousEffects implements Serializable {
|
|||
case WhileOnStack:
|
||||
case WhileInGraveyard:
|
||||
Ability ability = layeredEffects.getAbility(effect.getId());
|
||||
if (ability.isInUseableZone(game, false))
|
||||
if (ability.isInUseableZone(game, null, false))
|
||||
layerEffects.add(effect);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -203,7 +203,7 @@ public class ContinuousEffects implements Serializable {
|
|||
List<RequirementEffect> effects = new ArrayList<RequirementEffect>();
|
||||
for (RequirementEffect effect: requirementEffects) {
|
||||
Ability ability = requirementEffects.getAbility(effect.getId());
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, false)) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, null, false)) {
|
||||
if (effect.applies(permanent, ability, game))
|
||||
effects.add(effect);
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ public class ContinuousEffects implements Serializable {
|
|||
List<RestrictionEffect> effects = new ArrayList<RestrictionEffect>();
|
||||
for (RestrictionEffect effect: restrictionEffects) {
|
||||
Ability ability = restrictionEffects.getAbility(effect.getId());
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, false)) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, permanent, false)) {
|
||||
if (effect.applies(permanent, ability, game))
|
||||
effects.add(effect);
|
||||
}
|
||||
|
|
@ -238,7 +238,7 @@ public class ContinuousEffects implements Serializable {
|
|||
//get all applicable transient Replacement effects
|
||||
for (ReplacementEffect effect: replacementEffects) {
|
||||
Ability ability = replacementEffects.getAbility(effect.getId());
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, false)) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, null, false)) {
|
||||
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
|
||||
if (effect.applies(event, ability, game)) {
|
||||
replaceEffects.add(effect);
|
||||
|
|
@ -248,7 +248,7 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
for (PreventionEffect effect: preventionEffects) {
|
||||
Ability ability = preventionEffects.getAbility(effect.getId());
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, false)) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, null, false)) {
|
||||
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
|
||||
if (effect.applies(event, ability, game)) {
|
||||
replaceEffects.add(effect);
|
||||
|
|
@ -270,7 +270,7 @@ public class ContinuousEffects implements Serializable {
|
|||
|
||||
for (CostModificationEffect effect: costModificationEffects) {
|
||||
Ability ability = costModificationEffects.getAbility(effect.getId());
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, false)) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, null, false)) {
|
||||
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
|
||||
costEffects.add(effect);
|
||||
}
|
||||
|
|
@ -304,7 +304,7 @@ public class ContinuousEffects implements Serializable {
|
|||
|
||||
for (AsThoughEffect effect: asThoughEffects) {
|
||||
Ability ability = asThoughEffects.getAbility(effect.getId());
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, false)) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, null, false)) {
|
||||
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
|
||||
asThoughEffectsList.add(effect);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue