mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Fix #3481 - Swans of Bryn Argoll didn't realize an emblem can deal damage to it, so it couldn't find the source of the damage when Chandra, Torch of Defiance's emblem deals damage.
This commit is contained in:
parent
df35f03d2d
commit
9247d34d8a
1 changed files with 7 additions and 0 deletions
|
@ -42,6 +42,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.CommandObject;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -100,6 +101,7 @@ class SwansOfBrynArgollEffect extends PreventionEffectImpl {
|
|||
if (sourceOfDamage != null) {
|
||||
Spell spell = game.getStack().getSpell(sourceOfDamage.getId());
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(sourceOfDamage.getId());
|
||||
CommandObject emblem = (CommandObject)game.getEmblem(sourceOfDamage.getId());
|
||||
if (spell != null) {
|
||||
Player controllerOfSpell = game.getPlayer(spell.getControllerId());
|
||||
controllerOfSpell.drawCards(preventionEffectData.getPreventedDamage(), game);
|
||||
|
@ -110,6 +112,11 @@ class SwansOfBrynArgollEffect extends PreventionEffectImpl {
|
|||
controllerOfPermanent.drawCards(preventionEffectData.getPreventedDamage(), game);
|
||||
passed = true;
|
||||
}
|
||||
if (emblem != null) {
|
||||
Player controllerOfEmblem = game.getPlayer(emblem.getControllerId());
|
||||
controllerOfEmblem.drawCards(preventionEffectData.getPreventedDamage(), game);
|
||||
passed = true;
|
||||
}
|
||||
if (!passed) {
|
||||
// Needed for cards that do damage from hand e.g. Gempalm Incinerator
|
||||
Card cardSource = game.getCard(event.getSourceId());
|
||||
|
|
Loading…
Reference in a new issue