forked from External/mage
* Some minor changes to logging and return code handling.
This commit is contained in:
parent
94be7cb4da
commit
4c33359fe2
22 changed files with 862 additions and 888 deletions
|
|
@ -27,8 +27,13 @@
|
|||
*/
|
||||
package mage.abilities.effects;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.*;
|
||||
import mage.abilities.effects.common.continuous.CommanderReplacementEffect;
|
||||
import mage.abilities.keyword.SpliceOntoArcaneAbility;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
|
|
@ -49,11 +54,6 @@ import mage.players.Player;
|
|||
import mage.target.common.TargetCardInHand;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
@ -85,7 +85,6 @@ public class ContinuousEffects implements Serializable {
|
|||
// note all effect/abilities that were only added temporary
|
||||
private final Map<ContinuousEffect, Set<Ability>> temporaryEffects = new HashMap<>();
|
||||
|
||||
|
||||
public ContinuousEffects() {
|
||||
applyCounters = new ApplyCountersEffect();
|
||||
planeswalkerRedirectionEffect = new PlaneswalkerRedirectionEffect();
|
||||
|
|
@ -241,7 +240,7 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
|
||||
private List<ContinuousEffect> filterLayeredEffects(List<ContinuousEffect> effects, Layer layer) {
|
||||
return effects.stream().filter(effect->effect.hasLayer(layer)).collect(Collectors.toList());
|
||||
return effects.stream().filter(effect -> effect.hasLayer(layer)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public Map<RequirementEffect, Set<Ability>> getApplicableRequirementEffects(Permanent permanent, Game game) {
|
||||
|
|
@ -1254,7 +1253,9 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
logger.warn("Ability without sourceId:" + ability.getRule());
|
||||
if (!(effect instanceof CommanderReplacementEffect)) {
|
||||
logger.warn("Ability without sourceId:" + ability.getRule());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue