Fix decayed zombie token, as described in #10139

This commit is contained in:
PurpleCrowbar 2023-03-22 20:42:12 +00:00
parent 77209073e9
commit 7b69628da2
2 changed files with 11 additions and 5 deletions

View file

@ -18,7 +18,7 @@ public class DecayedAbility extends StaticAbility {
super(Zone.BATTLEFIELD, new CantBlockSourceEffect(Duration.WhileOnBattlefield));
this.addSubAbility(new AttacksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect())
)));
).setText("sacrifice it at end of combat")).setTriggerPhrase("When {this} attacks, "));
}
private DecayedAbility(final DecayedAbility ability) {

View file

@ -4,9 +4,6 @@ import mage.MageInt;
import mage.abilities.keyword.DecayedAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.util.RandomUtil;
import java.util.Arrays;
/**
* @author TheElk801
@ -22,7 +19,16 @@ public final class ZombieDecayedToken extends TokenImpl {
toughness = new MageInt(2);
this.addAbility(new DecayedAbility());
availableImageSetCodes.addAll(Arrays.asList("MID"));
this.setExpansionSetCodeForImage("MID");
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("MID")) {
this.setTokenType(1);
}
}
public ZombieDecayedToken(final ZombieDecayedToken token) {