Fixed Bloom Tender.

This commit is contained in:
LevelX2 2013-10-22 08:12:32 +02:00
parent fa2970910f
commit da099c2da5

View file

@ -92,33 +92,26 @@ class BloomTenderEffect extends ManaEffect<BloomTenderEffect> {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player you = game.getPlayer(source.getControllerId()); Player you = game.getPlayer(source.getControllerId());
Mana mana = new Mana();
if (you != null) { if (you != null) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(you.getId(), game)) { Mana mana = new Mana();
if (permanent.getColor().contains(ObjectColor.BLACK) for (Permanent permanent : game.getBattlefield().getAllActivePermanents(you.getId())) {
&& !mana.contains(Mana.BlackMana)) { if (mana.getBlack() == 0 && permanent.getColor().isBlack()) {
mana = Mana.BlackMana(1); mana.addBlack();
} }
if (permanent.getColor().contains(ObjectColor.BLUE) if (mana.getBlue() == 0 && permanent.getColor().isBlue()) {
&& !mana.contains(Mana.BlueMana)) { mana.addBlue();
mana = Mana.BlueMana(1);
} }
if (permanent.getColor().contains(ObjectColor.RED) if (mana.getRed() == 0 && permanent.getColor().isRed()) {
&& !mana.contains(Mana.RedMana)) { mana.addRed();
mana = Mana.RedMana(1);
} }
if (permanent.getColor().contains(ObjectColor.GREEN) if (mana.getGreen() == 0 && permanent.getColor().isGreen()) {
&& !mana.contains(Mana.GreenMana)) { mana.addGreen();
mana = Mana.GreenMana(1);
} }
if (permanent.getColor().contains(ObjectColor.WHITE) if (mana.getWhite() == 0 && permanent.getColor().isWhite()) {
&& !mana.contains(Mana.WhiteMana)) { mana.addWhite();
mana = Mana.WhiteMana(1);
} }
} }
}
if (you != null && mana != null) {
you.getManaPool().addMana(mana, game, source); you.getManaPool().addMana(mana, game, source);
return true; return true;
} }