mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
fixed random mystery booster test failures
This commit is contained in:
parent
827ffb5fb2
commit
3f4698434b
2 changed files with 41 additions and 12 deletions
|
|
@ -85,6 +85,30 @@ public class FilterMana implements Serializable {
|
|||
this.colorless = colorless;
|
||||
}
|
||||
|
||||
public boolean isMulticolored() {
|
||||
return getColorCount() > 1;
|
||||
}
|
||||
|
||||
public int getColorCount() {
|
||||
int colorCount = 0;
|
||||
if (this.white) {
|
||||
colorCount += 1;
|
||||
}
|
||||
if (this.blue) {
|
||||
colorCount += 1;
|
||||
}
|
||||
if (this.black) {
|
||||
colorCount += 1;
|
||||
}
|
||||
if (this.red) {
|
||||
colorCount += 1;
|
||||
}
|
||||
if (this.green) {
|
||||
colorCount += 1;
|
||||
}
|
||||
return colorCount;
|
||||
}
|
||||
|
||||
public FilterMana copy() {
|
||||
return new FilterMana(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue