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

Method hasXInAnyCostPart

forge-game/src/main/java/forge/game/cost/Cost.java:1085–1099  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1083 }
1084
1085 public boolean hasXInAnyCostPart() {
1086 boolean xCost = false;
1087 for (CostPart p : this.getCostParts()) {
1088 if (p instanceof CostPartMana) {
1089 if (((CostPartMana) p).getAmountOfX() > 0) {
1090 xCost = true;
1091 break;
1092 }
1093 } else if (p.getAmount().equals("X")) {
1094 xCost = true;
1095 break;
1096 }
1097 }
1098 return xCost;
1099 }
1100
1101 public Integer getMaxForNonManaX(final SpellAbility ability, final Player payer, final boolean effect) {
1102 Integer val = null;

Callers 7

announceValuesLikeXMethod · 0.95
setMaxXValueMethod · 0.95
costHasXMethod · 0.80
abilityTurnFaceUpMethod · 0.80
scoreCardAbilitiesMethod · 0.80
doTriggerNoCostMethod · 0.80
chkDrawbackMethod · 0.80

Calls 4

getCostPartsMethod · 0.95
getAmountOfXMethod · 0.80
getAmountMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected