mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Commanders can be other types than a creature.
Commanders do not have to be creatures. They can also be Planeswalkers (Commander 2015, Commander 2018), but also can be other types (e.g. lands when enchanted by Song of the Dryads or Imprisoned in the Moon).
This commit is contained in:
parent
7310b80b78
commit
ec7454d888
1 changed files with 2 additions and 3 deletions
|
@ -19,13 +19,12 @@ public class CommanderPredicate implements Predicate<Permanent> {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Permanent input, Game game) {
|
public boolean apply(Permanent input, Game game) {
|
||||||
Player owner = game.getPlayer(input.getOwnerId());
|
Player owner = game.getPlayer(input.getOwnerId());
|
||||||
return input.isCreature()
|
return owner != null
|
||||||
&& owner != null
|
|
||||||
&& owner.getCommandersIds().contains(input.getId());
|
&& owner.getCommandersIds().contains(input.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Commander creature";
|
return "Commander";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue