forked from External/mage
[KTK] added 8 golden cards.
This commit is contained in:
parent
da64b8757a
commit
a42a03355e
11 changed files with 831 additions and 8 deletions
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -43,11 +43,19 @@ import mage.players.Player;
|
|||
|
||||
public class UntapAllControllerEffect extends OneShotEffect {
|
||||
|
||||
private FilterPermanent filter;
|
||||
private final FilterPermanent filter;
|
||||
|
||||
public UntapAllControllerEffect(FilterPermanent filter) {
|
||||
this(filter, null);
|
||||
}
|
||||
|
||||
public UntapAllControllerEffect(FilterPermanent filter, String rule) {
|
||||
super(Outcome.Untap);
|
||||
staticText = rule;
|
||||
if (rule == null || rule.isEmpty()) {
|
||||
staticText = "untap all " + filter.getMessage() + " you control";
|
||||
} else {
|
||||
staticText = rule;
|
||||
}
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
|
|
@ -60,8 +68,8 @@ public class UntapAllControllerEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
for (Permanent land: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
|
||||
land.untap(game);
|
||||
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
|
||||
permanent.untap(game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -73,4 +81,4 @@ public class UntapAllControllerEffect extends OneShotEffect {
|
|||
return new UntapAllControllerEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue