mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Implemented Ancient Animus
This commit is contained in:
parent
62869362e2
commit
455e859e97
3 changed files with 114 additions and 0 deletions
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* 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.abilities.condition.common;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class TargetHasSuperTypeCondition implements Condition {
|
||||
|
||||
private final SuperType superType;
|
||||
|
||||
public TargetHasSuperTypeCondition(SuperType superType) {
|
||||
this.superType = superType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (!source.getTargets().isEmpty()) {
|
||||
MageObject mageObject = game.getObject(source.getFirstTarget());
|
||||
if (mageObject != null) {
|
||||
return mageObject.getSuperType().contains(superType);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue