forked from External/mage
[AVR] Second Guest + tests. Refactored filters.
This commit is contained in:
parent
3fac42fc3c
commit
32e29392d2
184 changed files with 823 additions and 562 deletions
|
|
@ -28,11 +28,7 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
|
@ -41,6 +37,10 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -76,7 +76,7 @@ public class SacrificeAllEffect extends OneShotEffect<SacrificeAllEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
List<UUID> perms = new ArrayList<UUID>();
|
||||
for (Player player: game.getPlayers().values()) {
|
||||
int numTargets = Math.min(amount, game.getBattlefield().countAll(filter, player.getId()));
|
||||
int numTargets = Math.min(amount, game.getBattlefield().countAll(filter, player.getId(), game));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(numTargets, numTargets, filter, false);
|
||||
if (target.canChoose(player.getId(), game)) {
|
||||
while (!target.isChosen()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue