Fixed a problem that tokens that came into play with modified attributes (P/T e.g. from Master of Etherium) were seen for triggered abilities (e.g. Sword of the Meek ) with unmodified attributes.

This commit is contained in:
LevelX2 2016-11-19 12:08:38 +01:00
parent 06f9e3db19
commit 0ccaca4a3b
8 changed files with 106 additions and 14 deletions

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
@ -28,8 +28,6 @@
package mage.cards.m;
import java.util.UUID;
import mage.constants.*;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
@ -37,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
@ -58,13 +57,17 @@ public class MasterOfEtherium extends CardImpl {
}
public MasterOfEtherium(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}");
this.subtype.add("Vedalken");
this.subtype.add("Wizard");
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Master of Etherium's power and toughness are each equal to the number of artifacts you control.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filterCounted), Duration.EndOfGame)));
// Other artifact creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterBoosted, true)));
}

View file

@ -28,8 +28,6 @@
package mage.cards.m;
import java.util.UUID;
import mage.constants.CardType;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
@ -38,6 +36,7 @@ import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterArtifactSpell;
import mage.game.Game;
import mage.game.permanent.token.MyrToken;
@ -47,19 +46,21 @@ import mage.game.permanent.token.MyrToken;
* @author Loki, North
*/
public class Myrsmith extends CardImpl {
public Myrsmith (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
public Myrsmith(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add("Human");
this.subtype.add("Artificer");
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Whenever you cast an artifact spell, you may pay {1}. If you do, put a 1/1 colorless Myr artifact creature token onto the battlefield.
FilterArtifactSpell filter = new FilterArtifactSpell("an artifact spell");
this.addAbility(new SpellCastControllerTriggeredAbility(new MyrsmithEffect(), filter, false));
}
public Myrsmith (final Myrsmith card) {
public Myrsmith(final Myrsmith card) {
super(card);
}
@ -70,6 +71,7 @@ public class Myrsmith extends CardImpl {
}
class MyrsmithEffect extends CreateTokenEffect {
public MyrsmithEffect() {
super(new MyrToken());
staticText = "you may pay {1}. If you do, create a 1/1 colorless Myr artifact creature token";