Implemented Ashiok, Sculptor of Fears

This commit is contained in:
Evan Kranzler 2019-12-15 18:38:31 -05:00
parent 2bb90683a5
commit 9e99b31b0c
2 changed files with 92 additions and 0 deletions

View file

@ -0,0 +1,91 @@
package mage.cards.a;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.continuous.GainControlAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game;
import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class AshiokSculptorOfFears extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("creature card from a graveyard");
public AshiokSculptorOfFears(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ASHIOK);
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
// +2: Draw a card. Each player puts the top two cards of their library into their graveyard.
Ability ability = new LoyaltyAbility(
new DrawCardSourceControllerEffect(1).setText("draw a card."), 2
);
ability.addEffect(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(2, TargetController.ANY));
this.addAbility(ability);
// 5: Put target creature card from a graveyard onto the battlefield under you control.
ability = new LoyaltyAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()
.setText("put target creature card from a graveyard onto the battlefield under you control"), -5);
ability.addTarget(new TargetCardInGraveyard(filter));
this.addAbility(ability);
// 11: Gain control of all creatures target opponent controls.
ability = new LoyaltyAbility(new AshiokSculptorOfFearsEffect(), -11);
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
private AshiokSculptorOfFears(final AshiokSculptorOfFears card) {
super(card);
}
@Override
public AshiokSculptorOfFears copy() {
return new AshiokSculptorOfFears(this);
}
}
class AshiokSculptorOfFearsEffect extends OneShotEffect {
AshiokSculptorOfFearsEffect() {
super(Outcome.Benefit);
staticText = "gain control of all creatures target opponent controls";
}
private AshiokSculptorOfFearsEffect(final AshiokSculptorOfFearsEffect effect) {
super(effect);
}
@Override
public AshiokSculptorOfFearsEffect copy() {
return new AshiokSculptorOfFearsEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
FilterPermanent filter = new FilterCreaturePermanent();
filter.add(new ControllerIdPredicate(source.getFirstTarget()));
game.addEffect(new GainControlAllEffect(Duration.Custom, filter), source);
return true;
}
}

View file

@ -26,6 +26,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
this.ratioBoosterMythic = 8;
this.maxCardNumberInBooster = 254;
cards.add(new SetCardInfo("Ashiok, Sculptor of Fears", 274, Rarity.MYTHIC, mage.cards.a.AshiokSculptorOfFears.class));
cards.add(new SetCardInfo("Commanding Presence", 7, Rarity.UNCOMMON, mage.cards.c.CommandingPresence.class));
cards.add(new SetCardInfo("Daxos, Blessed by the Sun", 9, Rarity.UNCOMMON, mage.cards.d.DaxosBlessedByTheSun.class));
cards.add(new SetCardInfo("Eidolon of Philosophy", 48, Rarity.COMMON, mage.cards.e.EidolonOfPhilosophy.class));