forked from External/mage
Made TriggeredAbility.checkEventType() abstract. Added missing implementations.
This commit is contained in:
parent
7a4d4265a4
commit
cfd92dc8d5
464 changed files with 5501 additions and 3845 deletions
|
|
@ -28,14 +28,14 @@
|
|||
package mage.sets.magic2012;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -83,10 +83,14 @@ class HuntersInsightTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return new HuntersInsightTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DAMAGED_PLAYER || event.getType() == EventType.DAMAGED_PLANESWALKER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if ((event.getType() == EventType.DAMAGED_PLAYER || event.getType() == EventType.DAMAGED_PLANESWALKER)
|
||||
&& event.getSourceId().equals(this.sourceId) && ((DamagedEvent) event).isCombatDamage()) {
|
||||
if (event.getSourceId().equals(this.sourceId) && ((DamagedEvent) event).isCombatDamage()) {
|
||||
this.getEffects().clear();
|
||||
this.addEffect(new DrawCardSourceControllerEffect(event.getAmount()));
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue