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

Method hasETBTrigger

forge-game/src/main/java/forge/game/card/Card.java:7209–7231  ·  view source on GitHub ↗
(final boolean drawbackOnly)

Source from the content-addressed store, hash-verified

7207 }
7208
7209 public boolean hasETBTrigger(final boolean drawbackOnly) {
7210 for (final Trigger tr : getTriggers()) {
7211 if (tr.getMode() != TriggerType.ChangesZone) {
7212 continue;
7213 }
7214
7215 if (!ZoneType.Battlefield.toString().equals(tr.getParam("Destination"))) {
7216 continue;
7217 }
7218
7219 if (tr.hasParam("ValidCard") && !tr.getParam("ValidCard").contains("Self")) {
7220 continue;
7221 }
7222 if (drawbackOnly) {
7223 SpellAbility sa = tr.ensureAbility();
7224 if (sa == null || sa.isActivatedAbility()) {
7225 continue;
7226 }
7227 }
7228 return true;
7229 }
7230 return false;
7231 }
7232
7233 public boolean hasETBReplacement() {
7234 for (final ReplacementEffect re : getReplacementEffects()) {

Callers 7

checkApiLogicMethod · 0.95
shouldApplyMethod · 0.80
doAdvancedFlashLogicMethod · 0.80
shouldApplyMethod · 0.80
isPreferredTargetMethod · 0.80

Calls 9

getTriggersMethod · 0.95
isActivatedAbilityMethod · 0.95
getModeMethod · 0.65
containsMethod · 0.65
equalsMethod · 0.45
toStringMethod · 0.45
getParamMethod · 0.45
hasParamMethod · 0.45
ensureAbilityMethod · 0.45

Tested by

no test coverage detected