forked from External/mage
* removed and renamed SubTypeList * updated subtype test * refactored Changeling to be an ability that actually does something * moved isAllCreatureTypes into SubTypes class * renamed copyTo method to copyFrom * added removeAllCreatureTypes where usable * replaced some subtype methods * replaced some more subtype methods * replaced subtype mass add/remove methods * updated more subtype methods * fixed some errors * made common shared creature type predicate * refactored another card involving subtypes * Added usage of object attribute in subTypes's write operations; * Refactor: use same param styles in subtype methods * Refactor: simplified usage of copy appliers; * Refactor: fixed code usage in CopyApplier Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
26 lines
724 B
Java
26 lines
724 B
Java
package mage.abilities.condition.common;
|
|
|
|
import mage.abilities.Ability;
|
|
import mage.abilities.condition.Condition;
|
|
import mage.cards.Card;
|
|
import mage.game.Game;
|
|
import mage.watchers.common.ProwlWatcher;
|
|
|
|
/**
|
|
* Is it able to activate prowl cost (damage was made)
|
|
*
|
|
* @author JayDi85
|
|
*/
|
|
public enum ProwlCondition implements Condition {
|
|
|
|
instance;
|
|
|
|
@Override
|
|
public boolean apply(Game game, Ability source) {
|
|
ProwlWatcher watcher = game.getState().getWatcher(ProwlWatcher.class);
|
|
Card card = game.getCard(source.getSourceId());
|
|
return watcher != null
|
|
&& card != null
|
|
&& watcher.hasSubtypeMadeCombatDamage(source.getControllerId(), card, game);
|
|
}
|
|
}
|