mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 05:52:06 -08:00
[ZNR] Implemented Coralhelm Chronicler
This commit is contained in:
parent
98ad269d25
commit
579e341944
3 changed files with 101 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum KickedPredicate implements Predicate<MageObject> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
Spell spell = game.getSpell(input.getId());
|
||||
if (spell == null) {
|
||||
return false;
|
||||
}
|
||||
for (Ability ability : spell.getAbilities()) {
|
||||
if (ability instanceof KickerAbility
|
||||
&& ((KickerAbility) ability).getKickedCounter(game, spell.getSpellAbility()) > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Kicked";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue