Some minor changes.

This commit is contained in:
LevelX2 2016-03-09 18:10:03 +01:00
parent 58a22fc82c
commit c2b68a9b6f
2 changed files with 9 additions and 3 deletions

View file

@ -1078,7 +1078,7 @@ public class ContinuousEffects implements Serializable {
public void addEffect(ContinuousEffect effect, UUID sourceId, Ability source) {
if (!(source instanceof MageSingleton)) { // because MageSingletons may never be removed by removing the temporary effecs they are not added to the temporaryEffects to prevent this
effect.setTemporary(true);
Set abilities = temporaryEffects.get(effect);
Set<Ability> abilities = temporaryEffects.get(effect);
if (abilities == null) {
abilities = new HashSet<>();
temporaryEffects.put(effect, abilities);

View file

@ -136,9 +136,15 @@ public class CopyEffect extends ContinuousEffectImpl {
}
permanent.removeAllAbilities(source.getSourceId(), game);
if (copyFromObject instanceof Permanent) {
for (Ability ability : ((Permanent) copyFromObject).getAbilities(game)) {
permanent.addAbility(ability, getSourceId(), game, false); // no new Id so consumed replacement effects are known while new continuousEffects.apply happen.
}
} else {
for (Ability ability : copyFromObject.getAbilities()) {
permanent.addAbility(ability, getSourceId(), game, false); // no new Id so consumed replacement effects are known while new continuousEffects.apply happen.
}
}
permanent.getPower().setValue(copyFromObject.getPower().getValue());
permanent.getToughness().setValue(copyFromObject.getToughness().getValue());
if (copyFromObject instanceof Permanent) {