mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
fixed Death Baron incorrectly boosting Changelings (fixes #5924)
This commit is contained in:
parent
9a44873182
commit
0237f9da8a
1 changed files with 23 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue