added MagicHeroicTrigger for heroic mechanic

master
melvin 2013-10-06 09:45:06 +08:00
parent a6bef999bd
commit fd237b5621
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package magic.model.trigger;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.action.MagicSacrificeAction;
import magic.model.event.MagicEvent;
import magic.model.stack.MagicItemOnStack;
public abstract class MagicHeroicTrigger extends MagicWhenTargetedTrigger {
public MagicHeroicTrigger(final int priority) {
super(priority);
}
public MagicHeroicTrigger() {}
@Override
public boolean accept(final MagicPermanent permanent, final MagicItemOnStack item) {
return item.isFriend(permanent) &&
item.isSpell() &&
item.containsInChoiceResults(permanent);
}
}