From 0237f9da8a50112d97a278dd0e58c0967e0d1882 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 3 Aug 2019 13:27:50 -0400 Subject: [PATCH] fixed Death Baron incorrectly boosting Changelings (fixes #5924) --- Mage.Sets/src/mage/cards/d/DeathBaron.java | 39 +++++++++++++--------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DeathBaron.java b/Mage.Sets/src/mage/cards/d/DeathBaron.java index 0674695658..ce8bd5019c 100644 --- a/Mage.Sets/src/mage/cards/d/DeathBaron.java +++ b/Mage.Sets/src/mage/cards/d/DeathBaron.java @@ -1,7 +1,5 @@ - package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -13,42 +11,51 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** - * * @author Loki */ public final class DeathBaron extends CardImpl { - private static final FilterCreaturePermanent filterSkeletons = new FilterCreaturePermanent("Skeleton creatures"); - private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent("Zombie creatures"); + private static final FilterCreaturePermanent filterSkeletons = new FilterCreaturePermanent(); + private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent(); static { filterSkeletons.add(new SubtypePredicate(SubType.SKELETON)); filterZombie.add(new SubtypePredicate(SubType.ZOMBIE)); + filterZombie.add(Predicates.not(new SubtypePredicate(SubType.SKELETON))); } public DeathBaron(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); - - // Skeleton creatures you control and other Zombie creatures you control get +1/+1 and have deathtouch. - Ability firstPart = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterSkeletons, false)); - firstPart.addEffect(new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, filterSkeletons, false)); - this.addAbility(firstPart); - Ability secondPart = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterZombie, true)); - secondPart.addEffect(new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, filterZombie, true)); - this.addAbility(secondPart); + + // Skeletons you control and other Zombies you control get +1/+1 and have deathtouch. + Ability ability = new SimpleStaticAbility(new BoostControlledEffect( + 1, 1, Duration.WhileOnBattlefield, filterSkeletons, false + ).setText("Skeletons you control")); + ability.addEffect(new GainAbilityControlledEffect( + DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, filterSkeletons, false + ).setText("and other Zombues you control")); + ability.addEffect(new BoostControlledEffect( + 1, 1, Duration.WhileOnBattlefield, filterZombie, true + ).setText("get +1/+1")); + ability.addEffect(new GainAbilityControlledEffect( + DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, filterZombie, true + ).setText("and have deathtouch")); + this.addAbility(ability); } - public DeathBaron(final DeathBaron card) { + private DeathBaron(final DeathBaron card) { super(card); }