mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Descendant of Kiyomaro - Saved a casting exception of triggered ability.
This commit is contained in:
parent
d21f173e76
commit
bbf34f90da
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedCreatureEvent;
|
||||
import mage.game.events.DamagedEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
|
@ -67,7 +67,7 @@ public class DealsCombatDamageTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER || event.getType() == GameEvent.EventType.DAMAGED_PLAYER) {
|
||||
if (event.getSourceId().equals(this.sourceId)
|
||||
&& ((DamagedCreatureEvent) event).isCombatDamage()) {
|
||||
&& ((DamagedEvent) event).isCombatDamage()) {
|
||||
if (setTargetPointer) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
|
|
Loading…
Reference in a new issue