MCPcopy Create free account
hub / github.com/Card-Forge/forge / hasETBReplacement

Method hasETBReplacement

forge-game/src/main/java/forge/game/card/Card.java:7233–7250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7231 }
7232
7233 public boolean hasETBReplacement() {
7234 for (final ReplacementEffect re : getReplacementEffects()) {
7235 final Map<String, String> params = re.getMapParams();
7236 if (!(re instanceof ReplaceMoved)) {
7237 continue;
7238 }
7239
7240 if (!ZoneType.Battlefield.toString().equals(params.get("Destination"))) {
7241 continue;
7242 }
7243
7244 if (params.containsKey("ValidCard") && !params.get("ValidCard").contains("Self")) {
7245 continue;
7246 }
7247 return true;
7248 }
7249 return false;
7250 }
7251
7252 public int getCMC() {
7253 return getCMC(SplitCMCMode.CurrentSideCMC);

Callers 3

checkApiLogicMethod · 0.95
shouldApplyMethod · 0.80
shouldApplyMethod · 0.80

Calls 7

getReplacementEffectsMethod · 0.95
containsKeyMethod · 0.80
getMethod · 0.65
containsMethod · 0.65
getMapParamsMethod · 0.45
equalsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected