forked from External/mage
refactored PlayerPredicate
This commit is contained in:
parent
8e29454916
commit
13d76bfc06
11 changed files with 23 additions and 96 deletions
|
|
@ -14,7 +14,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPlayer;
|
||||
import mage.filter.predicate.other.PlayerCanGainLifePredicate;
|
||||
import mage.filter.predicate.other.PlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
|
@ -28,7 +27,7 @@ public class GainLifeOpponentCost extends CostImpl {
|
|||
private static final FilterPlayer filter = new FilterPlayer("opponent that can gain life");
|
||||
|
||||
static {
|
||||
filter.add(new PlayerPredicate(TargetController.OPPONENT));
|
||||
filter.add(TargetController.OPPONENT.getPlayerPredicate());
|
||||
filter.add(new PlayerCanGainLifePredicate()); // you can't pay the costs by letting a player gain life that can't get life by rule changing effect
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import mage.abilities.costs.mana.ManaCost;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPlayer;
|
||||
import mage.filter.predicate.other.PlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.ManaPool;
|
||||
import mage.players.Player;
|
||||
|
|
@ -26,7 +25,7 @@ public class AssistAbility extends SimpleStaticAbility implements AlternateManaP
|
|||
private static final FilterPlayer filter = new FilterPlayer("another player");
|
||||
|
||||
static {
|
||||
filter.add(new PlayerPredicate(TargetController.NOT_YOU));
|
||||
filter.add(TargetController.NOT_YOU.getPlayerPredicate());
|
||||
}
|
||||
|
||||
public AssistAbility() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue