mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed Livewire Lash (NPE).
This commit is contained in:
parent
bc8d8b4c2f
commit
fb56e315fa
2 changed files with 3 additions and 4 deletions
|
@ -44,6 +44,7 @@ import mage.cards.CardImpl;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
@ -92,8 +93,7 @@ class LivewireLashAbility extends TriggeredAbilityImpl<LivewireLashAbility> {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.TARGETED && event.getTargetId().equals(sourceId)) {
|
||||
if (game.getCard(event.getSourceId()).getCardType().contains(CardType.SORCERY) ||
|
||||
game.getCard(event.getSourceId()).getCardType().contains(CardType.INSTANT)) {
|
||||
if (game.getObject(event.getSourceId()) instanceof Spell) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -104,4 +104,4 @@ class LivewireLashAbility extends TriggeredAbilityImpl<LivewireLashAbility> {
|
|||
public String getRule() {
|
||||
return "Whenever this creature becomes the target of a spell, this creature deals 2 damage to target creature or player.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ package mage.filter;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.MageObject;
|
||||
import mage.ObjectColor;
|
||||
|
|
Loading…
Reference in a new issue