Extended super- and subtype copy for Genju land enchantment

This commit is contained in:
LevelX2 2012-09-24 07:58:09 +02:00
parent 1f8470636f
commit afd928c791

View file

@ -74,6 +74,13 @@ public class BecomesCreatureAttachedEffect extends ContinuousEffectImpl<BecomesC
switch (layer) { switch (layer) {
case TypeChangingEffects_4: case TypeChangingEffects_4:
if (sublayer == SubLayer.NA) { if (sublayer == SubLayer.NA) {
if (token.getSupertype().size() > 0) {
for (String t : token.getSupertype()) {
if (!permanent.getSupertype().contains(t)) {
permanent.getSupertype().add(t);
}
}
}
if (token.getCardType().size() > 0) { if (token.getCardType().size() > 0) {
for (Constants.CardType t : token.getCardType()) { for (Constants.CardType t : token.getCardType()) {
if (!permanent.getCardType().contains(t)) { if (!permanent.getCardType().contains(t)) {
@ -81,21 +88,21 @@ public class BecomesCreatureAttachedEffect extends ContinuousEffectImpl<BecomesC
} }
} }
} }
// commented out the removal of the subtypes because for the e.g. "Enchant Plains" enchantments it's needed else the enchantments goes to graveyard.
// Is it needed for anything or can it be completely removed?
// if ("".equals(type) || type == null) {
// permanent.getSubtype().clear();
// }
if (token.getSubtype().size() > 0) { if (token.getSubtype().size() > 0) {
permanent.getSubtype().addAll(token.getSubtype()); for (String t : token.getSubtype()) {
if (!permanent.getSubtype().contains(t)) {
permanent.getSubtype().add(t);
}
}
} }
} }
break; break;
case ColorChangingEffects_5: case ColorChangingEffects_5:
if (sublayer == SubLayer.NA) { if (sublayer == SubLayer.NA) {
if (token.getColor().hasColor()) if (token.getColor().hasColor()) {
permanent.getColor().setColor(token.getColor()); permanent.getColor().setColor(token.getColor());
} }
}
break; break;
case AbilityAddingRemovingEffects_6: case AbilityAddingRemovingEffects_6:
if (sublayer == SubLayer.NA) { if (sublayer == SubLayer.NA) {