mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
Implemented Extinction Event
This commit is contained in:
parent
10ec7035fd
commit
affbb93b3e
3 changed files with 109 additions and 0 deletions
|
|
@ -0,0 +1,27 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum ConvertedManaCostParityPredicate implements Predicate<MageObject> {
|
||||
EVEN(0),
|
||||
ODD(1);
|
||||
private final int parity;
|
||||
|
||||
ConvertedManaCostParityPredicate(int parity) {
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
return input.getConvertedManaCost() % 2 == parity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ConvertedManaCostParity" + super.toString();
|
||||
}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue