mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Mayael's Aria - Fixed that triggered ability did not work.
This commit is contained in:
parent
8a65ef6766
commit
816c4bf652
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
// put a +1/+1 counter on each creature you control if you control a creature with power 5 or greater.
|
||||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
|
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)) {
|
for (Permanent creature : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||||
creature.addCounters(CounterType.P1P1.createInstance(), 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.
|
// Then you gain 10 life if you control a creature with power 10 or greater.
|
||||||
filter = new FilterCreaturePermanent();
|
filter = new FilterCreaturePermanent();
|
||||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 9));
|
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);
|
controller.gainLife(10, game);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Then you win the game if you control a creature with power 20 or greater.
|
// Then you win the game if you control a creature with power 20 or greater.
|
||||||
filter = new FilterCreaturePermanent();
|
filter = new FilterCreaturePermanent();
|
||||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 19));
|
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);
|
controller.won(game);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue