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

Method canPayLife

forge-game/src/main/java/forge/game/player/Player.java:563–568  ·  view source on GitHub ↗
(final int lifePayment, final boolean effect, SpellAbility cause)

Source from the content-addressed store, hash-verified

561 }
562
563 public final boolean canPayLife(final int lifePayment, final boolean effect, SpellAbility cause) {
564 if (lifePayment > 0 && life < lifePayment) {
565 return false;
566 }
567 return lifePayment <= 0 || !StaticAbilityCantGainLosePayLife.anyCantPayLife(this, effect, cause);
568 }
569
570 public final boolean payLife(final int lifePayment, final SpellAbility cause, final boolean effect) {
571 // fast check for pay zero life

Callers 10

payLifeMethod · 0.95
getMaxAmountXMethod · 0.80
canPayMethod · 0.80
getIncrementCardsMethod · 0.80
visitMethod · 0.80
onPlayerSelectedMethod · 0.80
visitMethod · 0.80
payManaCostMethod · 0.80
willPayUnlessCostMethod · 0.80

Calls 1

anyCantPayLifeMethod · 0.95

Tested by

no test coverage detected