mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
compare with zero in a more delicate way
This commit is contained in:
@@ -78,7 +78,7 @@ public class Cost {
|
||||
* @return a boolean.
|
||||
*/
|
||||
public final boolean hasNoManaCost() {
|
||||
return this.getTotalMana().toString().equals(ManaCost.ZERO.toString());
|
||||
return this.getTotalMana().isZero();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -183,6 +183,10 @@ public final class ManaCost implements Comparable<ManaCost> {
|
||||
return this.shards.isEmpty() && !this.isNoCost();
|
||||
}
|
||||
|
||||
public boolean isZero() {
|
||||
return genericCost == 0 && isPureGeneric();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user