Refactor & Fix Devotion
Fix Devotion Count example you have Mogis, God of Slaughter(2 B R), Ashenmoor Liege(1 B/R B/R B/R), and Rakdos Cackler (B/R) - will be 6 Devotion to Red and Black, since you count the symbol, B/R (hybrid mana) should return as 1.
This commit is contained in:
@@ -642,7 +642,7 @@ unsigned int MTGGameZone::countTotalManaSymbols(TargetChooser * tc, int color)
|
||||
return result;
|
||||
}
|
||||
|
||||
unsigned int MTGGameZone::countDevotion(TargetChooser * tc, int color)
|
||||
unsigned int MTGGameZone::countDevotion(TargetChooser * tc, int color1, int color2)
|
||||
{
|
||||
if (!tc) {
|
||||
return 0;
|
||||
@@ -654,8 +654,13 @@ unsigned int MTGGameZone::countDevotion(TargetChooser * tc, int color)
|
||||
{
|
||||
if (tc->canTarget(cards[i], withoutProtections))
|
||||
{
|
||||
result += cards[i]->getManaCost()->getManaSymbolsHybridMerged(color);
|
||||
result += cards[i]->getManaCost()->getManaSymbolsHybridMerged(color1);
|
||||
}
|
||||
if (tc->canTarget(cards[i], withoutProtections))
|
||||
{
|
||||
result += cards[i]->getManaCost()->getManaSymbolsHybridMerged(color2);
|
||||
}
|
||||
result -= cards[i]->getManaCost()->countHybridsNoPhyrexian();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user