mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Optimize logic for no cost cards
This commit is contained in:
@@ -158,7 +158,7 @@ public final class CardRules implements ICardCharacteristics {
|
||||
private boolean canCastFace(ICardFace face, byte colorCode) {
|
||||
if (face.getManaCost().isNoCost()) {
|
||||
//if card face has no cost, assume castable only by mana of its defined color
|
||||
return face.getColor().isColorless() || face.getColor().hasAnyColor(colorCode);
|
||||
return face.getColor().hasNoColorsExcept(colorCode);
|
||||
}
|
||||
return face.getManaCost().canBePaidWithAvaliable(colorCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user