From 0d8325bc79be5fc116105553879cce29c8a8a1db Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 22 May 2014 16:25:22 +0200 Subject: [PATCH] Fixed that if a creature get attached to an object (e.g. because equipment becomes a creature), it gets unattached. --- Mage/src/mage/game/GameImpl.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index c40029046bf..bf4968710d9 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -1423,13 +1423,17 @@ public abstract class GameImpl> implements Game, Serializa } } } - //20091005 - 704.5q - if (perm.getAttachments().size() > 0) { - for (UUID attachmentId: perm.getAttachments()) { + //20091005 - 704.5q If a creature is attached to an object or player, it becomes unattached and remains on the battlefield. + // Similarly, if a permanent thatÂ’s neither an Aura, an Equipment, nor a Fortification is attached to an object or player, + // it becomes unattached and remains on the battlefield. + if (perm.getAttachments().size() > 0) { + for (UUID attachmentId : perm.getAttachments()) { Permanent attachment = getPermanent(attachmentId); - if (attachment != null && !(attachment.getSubtype().contains("Aura") || - attachment.getSubtype().contains("Equipment") || - attachment.getSubtype().contains("Fortification"))) { + if (attachment != null && + (attachment.getCardType().contains(CardType.CREATURE) || + !(attachment.getSubtype().contains("Aura") + || attachment.getSubtype().contains("Equipment") + || attachment.getSubtype().contains("Fortification")))) { if (perm.removeAttachment(attachment.getId(), this)) { somethingHappened = true; break;