forked from External/mage
* Monohybrid mana cost improves:
* fixed wrong manually pay by mana pool (it pays generic cost instead colored part of monohybrid); * fixed not working cost reduction effects (now monohybrid cost will be reduced correctly with some limitation, see #6130);
This commit is contained in:
parent
13ad86cb21
commit
b5acf64772
9 changed files with 589 additions and 78 deletions
|
|
@ -456,4 +456,23 @@ public class ManaPool implements Serializable {
|
|||
manaItems.addAll(itemsCopy);
|
||||
}
|
||||
}
|
||||
|
||||
public int getColoredAmount(ManaType manaType) {
|
||||
switch (manaType) {
|
||||
case BLACK:
|
||||
return getBlack();
|
||||
case BLUE:
|
||||
return getBlue();
|
||||
case GREEN:
|
||||
return getGreen();
|
||||
case RED:
|
||||
return getRed();
|
||||
case WHITE:
|
||||
return getWhite();
|
||||
case GENERIC:
|
||||
case COLORLESS:
|
||||
default:
|
||||
throw new IllegalArgumentException("Wrong mana type " + manaType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue