mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Colorless Mana - Added logic to be able to pay colorless mana (not generic mana).
This commit is contained in:
parent
aaa4857e43
commit
e7b3cb66e0
1 changed files with 11 additions and 1 deletions
|
@ -224,7 +224,17 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
||||||
// if auto payment is inactive and no mana type was clicked manually - do nothing
|
// if auto payment is inactive and no mana type was clicked manually - do nothing
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// attempt to pay colorless costs (not generic) mana costs first
|
||||||
|
if (pool.getColorless() > 0) {
|
||||||
|
for (ManaCost cost : this) {
|
||||||
|
if (!cost.isPaid() && cost instanceof ColorlessManaCost) {
|
||||||
|
cost.assignPayment(game, ability, pool);
|
||||||
|
if (pool.count() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//attempt to pay colored costs first
|
//attempt to pay colored costs first
|
||||||
for (ManaCost cost : this) {
|
for (ManaCost cost : this) {
|
||||||
if (!cost.isPaid() && cost instanceof ColoredManaCost) {
|
if (!cost.isPaid() && cost instanceof ColoredManaCost) {
|
||||||
|
|
Loading…
Reference in a new issue