Fix noncreature permanents having P/T (#1259)

Co-authored-by: TRT <>
This commit is contained in:
tool4ever
2022-08-02 18:40:41 +02:00
committed by GitHub
parent 78b6062a15
commit 688dd57e33

View File

@@ -4052,6 +4052,10 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
}
public final StatBreakdown getUnswitchedPowerBreakdown() {
// 208.3 A noncreature permanent has no power or toughness
if (isInPlay() && !isCreature()) {
return new StatBreakdown();
}
return new StatBreakdown(getCurrentPower(), getTempPowerBoost(), getPowerBonusFromCounters());
}
public final int getUnswitchedPower() {
@@ -4111,6 +4115,10 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
}
public final StatBreakdown getUnswitchedToughnessBreakdown() {
// 208.3 A noncreature permanent has no power or toughness
if (isInPlay() && !isCreature()) {
return new StatBreakdown();
}
return new StatBreakdown(getCurrentToughness(), getTempToughnessBoost(), getToughnessBonusFromCounters());
}
public final int getUnswitchedToughness() {