Merge fix

This commit is contained in:
Oleg Agafonov 2020-02-11 23:02:46 +04:00
parent b5acf64772
commit 5a5c49229e
2 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ public interface ManaCosts<T extends ManaCost> extends List<T>, ManaCost {
} }
/** /**
* @param mana mana in strinct like "{2}{R}" or "{2/W}" * @param mana
* @param extractMonoHybridGenericValue for tests only, extract generic mana value from mono hybrid string * @param extractMonoHybridGenericValue for tests only, extract generic mana value from mono hybrid string
*/ */
void load(String mana, boolean extractMonoHybridGenericValue); void load(String mana, boolean extractMonoHybridGenericValue);

View file

@ -107,7 +107,7 @@ public final class CardUtil {
if (reduceCount > 0) { if (reduceCount > 0) {
int restToReduce = reduceCount; int restToReduce = reduceCount;
// first run - priority single option costs (generic) // first run - priority for single option costs (generic)
for (ManaCost manaCost : manaCosts) { for (ManaCost manaCost : manaCosts) {
if (manaCost instanceof SnowManaCost) { if (manaCost instanceof SnowManaCost) {
adjustedCost.add(manaCost); adjustedCost.add(manaCost);
@ -156,7 +156,7 @@ public final class CardUtil {
} }
if (manaCost instanceof MonoHybridManaCost) { if (manaCost instanceof MonoHybridManaCost) {
// current implemention supports only 1 hybrid cost per object // current implemention supports reduce from left to right hybrid cost without cost parts announce
MonoHybridManaCost mono = (MonoHybridManaCost) manaCost; MonoHybridManaCost mono = (MonoHybridManaCost) manaCost;
int colorless = mono.getOptions().get(1).getGeneric(); int colorless = mono.getOptions().get(1).getGeneric();
if (restToReduce != 0 && colorless > 0) { if (restToReduce != 0 && colorless > 0) {