mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Remove another unused, duplicate Ability class
This commit is contained in:
parent
59ce47b6ec
commit
840058b246
1 changed files with 0 additions and 52 deletions
|
@ -1,52 +0,0 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public class EnchantedCreatureBlockedTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public EnchantedCreatureBlockedTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
public EnchantedCreatureBlockedTriggeredAbility(final EnchantedCreatureBlockedTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CREATURE_BLOCKED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent equipment = game.getPermanent(sourceId);
|
||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
||||
Permanent equipped = game.getPermanent(equipment.getAttachedTo());
|
||||
if (equipped.getId().equals(event.getTargetId())) {
|
||||
getEffects().get(1).setTargetPointer(new FixedTarget(equipped, game));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTriggerPhrase() {
|
||||
return "Whenever enchanted creature becomes blocked, " ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnchantedCreatureBlockedTriggeredAbility copy() {
|
||||
return new EnchantedCreatureBlockedTriggeredAbility(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue