mirror of
https://github.com/correl/mage.git
synced 2025-04-02 03:18:09 -09:00
[C21] Implemented Audacious Reshapers
This commit is contained in:
parent
3052d3b74f
commit
f4057e9497
2 changed files with 99 additions and 0 deletions
Mage.Sets/src/mage
98
Mage.Sets/src/mage/cards/a/AudaciousReshapers.java
Normal file
98
Mage.Sets/src/mage/cards/a/AudaciousReshapers.java
Normal file
|
@ -0,0 +1,98 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AudaciousReshapers extends CardImpl {
|
||||
|
||||
public AudaciousReshapers(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ARTIFICER);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}, Sacrifice an artifact: Reveal cards from the top of your library until you reveal an artifact card. Put that card onto the battlefield and the rest on the bottom of your library in a random order. Audacious Reshapers deals damage to you equal to the number of cards revealed this way.
|
||||
Ability ability = new SimpleActivatedAbility(new AudaciousReshapersEffect(), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN
|
||||
)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private AudaciousReshapers(final AudaciousReshapers card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AudaciousReshapers copy() {
|
||||
return new AudaciousReshapers(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AudaciousReshapersEffect extends OneShotEffect {
|
||||
|
||||
AudaciousReshapersEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "reveal cards from the top of your library until you reveal an artifact card. " +
|
||||
"Put that card onto the battlefield and the rest on the bottom of your library in a random order. " +
|
||||
"{this} deals damage to you equal to the number of cards revealed this way";
|
||||
}
|
||||
|
||||
private AudaciousReshapersEffect(final AudaciousReshapersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AudaciousReshapersEffect copy() {
|
||||
return new AudaciousReshapersEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
Card artifact = null;
|
||||
for (Card card : player.getLibrary().getCards(game)) {
|
||||
if (card == null) {
|
||||
continue;
|
||||
}
|
||||
cards.add(card);
|
||||
if (card.isArtifact()) {
|
||||
artifact = card;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int size = cards.size();
|
||||
player.revealCards(source, cards, game);
|
||||
if (artifact != null) {
|
||||
player.moveCards(artifact, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
cards.removeIf(uuid -> game.getState().getZone(uuid) != Zone.LIBRARY);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
player.damage(size, source.getSourceId(), source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -24,6 +24,7 @@ public final class Commander2021Edition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ancient Den", 276, Rarity.SPECIAL, mage.cards.a.AncientDen.class));
|
||||
cards.add(new SetCardInfo("Angel of the Ruins", 11, Rarity.RARE, mage.cards.a.AngelOfTheRuins.class));
|
||||
cards.add(new SetCardInfo("Arcane Signet", 234, Rarity.COMMON, mage.cards.a.ArcaneSignet.class));
|
||||
cards.add(new SetCardInfo("Audacious Reshapers", 47, Rarity.RARE, mage.cards.a.AudaciousReshapers.class));
|
||||
cards.add(new SetCardInfo("Boros Charm", 210, Rarity.UNCOMMON, mage.cards.b.BorosCharm.class));
|
||||
cards.add(new SetCardInfo("Boros Locket", 236, Rarity.COMMON, mage.cards.b.BorosLocket.class));
|
||||
cards.add(new SetCardInfo("Bosh, Iron Golem", 237, Rarity.RARE, mage.cards.b.BoshIronGolem.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue