* Fixed a bug that continuous effects created by copied cards (e.g. by Isochronic Scepter using Silence) were not applied correctly.

This commit is contained in:
LevelX2 2015-05-29 18:43:21 +02:00
parent 9d55dd45f5
commit 5a428f10ab
5 changed files with 117 additions and 6 deletions

View file

@ -390,7 +390,16 @@ public class ContinuousEffects implements Serializable {
}
private boolean checkAbilityStillExists(Ability ability, ContinuousEffect effect, GameEvent event, Game game) {
if (effect.getDuration().equals(Duration.OneUse) || effect.getDuration().equals(Duration.Custom) || ability.getSourceId() == null) { // needed for some special replacment effects (e.g. Undying) or commander replacement effect
switch(effect.getDuration()) { // effects with fixed duration don't need an object with the source ability (e.g. a silence cast with isochronic Scepter has no more a card object
case EndOfCombat:
case EndOfGame:
case EndOfStep:
case EndOfTurn:
case OneUse:
case Custom: // custom duration means the effect ends itself if needed
return true;
}
if (ability.getSourceId() == null) { // commander replacement effect
return true;
}
MageObject object;

View file

@ -840,6 +840,7 @@ public class GameState implements Serializable, Copyable<GameState> {
values.clear();
zones.clear();
simultaneousEvents.clear();
copiedCards.clear();
permanentOrderNumber = 0;
}