forked from External/mage
* Devotion - Fixed that face down permanents counted for devotion with their regular casting costs (workaround).
This commit is contained in:
parent
d7411b8b5a
commit
54e0068053
2 changed files with 121 additions and 0 deletions
|
|
@ -36,6 +36,9 @@ public class DevotionCount implements DynamicValue {
|
|||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
int devotion = 0;
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(sourceAbility.getControllerId())) {
|
||||
if (permanent.isFaceDown()) {
|
||||
continue; // workaround as long as Morph creatures are not cast as separate objects, face down creature does not have a mana cost
|
||||
}
|
||||
for(ManaCost manaCost :permanent.getManaCost()) {
|
||||
for(ColoredManaSymbol coloredManaSymbol: devotionColors) {
|
||||
if (manaCost.containsColor(coloredManaSymbol)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue