mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
[C15] Oreskos Explorer, Bastion Protector and Dawnbreak Reclaimer.
This commit is contained in:
parent
d3751af0db
commit
160f14eed1
5 changed files with 390 additions and 27 deletions
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.filter.predicate.permanent;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CommanderPredicate implements Predicate<Permanent> {
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
Player owner = game.getPlayer(input.getOwnerId());
|
||||
return input.getCardType().contains(CardType.CREATURE)
|
||||
&& owner != null
|
||||
&& input.getId().equals(owner.getCommanderId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Commander creature";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue