[VOW] Dorothea's Retribution - fixed wrong token

This commit is contained in:
Oleg Agafonov 2022-02-05 14:26:28 +04:00
parent 424fc919a7
commit dd72e078b5
2 changed files with 47 additions and 2 deletions

View file

@ -18,7 +18,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.token.AngelToken;
import mage.game.permanent.token.DorotheasRetributionSpiritToken;
import mage.game.permanent.token.Token;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -86,7 +86,7 @@ class DorotheasRetributionEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Token token = new AngelToken();
Token token = new DorotheasRetributionSpiritToken();
token.putOntoBattlefield(1, game, source, source.getControllerId(), true, true);
game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(
new SacrificeTargetEffect()

View file

@ -0,0 +1,45 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author JayDi85
*/
public final class DorotheasRetributionSpiritToken extends TokenImpl {
public DorotheasRetributionSpiritToken() {
super("Spirit", "4/4 white Spirit creature token with flying");
cardType.add(CardType.CREATURE);
subtype.add(SubType.SPIRIT);
color.setWhite(true);
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("VOW");
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("VOW")) {
setTokenType(2);
}
}
public DorotheasRetributionSpiritToken(final DorotheasRetributionSpiritToken token) {
super(token);
}
@Override
public DorotheasRetributionSpiritToken copy() {
return new DorotheasRetributionSpiritToken(this);
}
}