* Deflecting Palm - Fixed that damage dealing did not work if the source was a spell.

This commit is contained in:
LevelX2 2014-09-21 09:41:01 +02:00
parent a3505b6dba
commit 08b26ae57a
4 changed files with 123 additions and 3 deletions

View file

@ -40,6 +40,7 @@ import mage.constants.Rarity;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.target.TargetSource;
@ -112,6 +113,8 @@ class DeflectingPalmEffect extends PreventionEffectImpl {
objectControllerId = ((Permanent) damageDealingObject).getControllerId();
} else if (damageDealingObject instanceof Ability) {
objectControllerId = ((Ability) damageDealingObject).getControllerId();
} else if (damageDealingObject instanceof Spell) {
objectControllerId = ((Spell) damageDealingObject).getControllerId();
}
if (objectControllerId != null) {
Player objectController = game.getPlayer(objectControllerId);