mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 19:59:54 -08:00
Refactoring: added mana color check and fix
This commit is contained in:
parent
7edcec0dc1
commit
459ef9af94
4 changed files with 21 additions and 7 deletions
|
|
@ -123,7 +123,7 @@ class HallOfGemstoneEffect extends ReplacementEffectImpl {
|
|||
int genericAmount = mana.getGeneric();
|
||||
int colorlessAmount = mana.getColorless();
|
||||
int coloredAmount = mana.countColored();
|
||||
switch (colorChosen.getColoredManaSymbol()) {
|
||||
switch (colorChosen.getOneColoredManaSymbol()) {
|
||||
case W:
|
||||
mana.setToMana(Mana.WhiteMana(coloredAmount));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class ProtectiveSphereEffect extends PreventionEffectImpl {
|
|||
if (event.getTargetId().equals(source.getControllerId())
|
||||
&& event.getSourceId().equals(target.getFirstTarget())) {
|
||||
colorsOfChosenSource = game.getObject(target.getFirstTarget()).getColor(game).getColors();
|
||||
if (colorsOfChosenSource.stream().anyMatch((c) -> (manaUsed.getColor(c.getColoredManaSymbol()) > 0))) {
|
||||
if (colorsOfChosenSource.stream().anyMatch((c) -> (manaUsed.getColor(c.getOneColoredManaSymbol()) > 0))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue