* Devotion - Fixed that face down permanents counted for devotion with their regular casting costs (workaround).

This commit is contained in:
LevelX2 2015-01-23 15:12:29 +01:00
parent d7411b8b5a
commit 54e0068053
2 changed files with 121 additions and 0 deletions

View file

@ -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)) {