* Mayael's Aria - Fixed that triggered ability did not work.

This commit is contained in:
LevelX2 2015-10-09 11:08:02 +02:00
parent 8a65ef6766
commit 816c4bf652

View file

@ -96,7 +96,7 @@ class MayaelsAriaEffect extends OneShotEffect {
// put a +1/+1 counter on each creature you control if you control a creature with power 5 or greater.
FilterCreaturePermanent filter = new FilterCreaturePermanent();
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
if (game.getState().getBattlefield().countAll(filter, id, game) > 0) {
if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) {
for (Permanent creature : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
creature.addCounters(CounterType.P1P1.createInstance(), game);
}
@ -106,14 +106,14 @@ class MayaelsAriaEffect extends OneShotEffect {
// Then you gain 10 life if you control a creature with power 10 or greater.
filter = new FilterCreaturePermanent();
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 9));
if (game.getState().getBattlefield().countAll(filter, id, game) > 0) {
if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) {
controller.gainLife(10, game);
}
// Then you win the game if you control a creature with power 20 or greater.
filter = new FilterCreaturePermanent();
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 19));
if (game.getState().getBattlefield().countAll(filter, id, game) > 0) {
if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) {
controller.won(game);
}
return true;