mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
* Add the Foriysian Totem
* Add the SourceIsCreatureCondition
This commit is contained in:
parent
0ddc11f4dc
commit
7432e4c082
2 changed files with 117 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author klayhamn
|
||||
*/
|
||||
public class SourceIsCreatureCondition implements Condition {
|
||||
|
||||
private static final SourceIsCreatureCondition fInstance = new SourceIsCreatureCondition();
|
||||
|
||||
public static Condition getInstance() {
|
||||
return fInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
MageObject object = game.getObject(source.getSourceId());
|
||||
return object != null && object.getCardType().contains(CardType.CREATURE);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue