mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
[EOE] Implement Devastating Onslaught
This commit is contained in:
parent
c357576ac2
commit
ae2ae12dfc
2 changed files with 75 additions and 0 deletions
72
Mage.Sets/src/mage/cards/d/DevastatingOnslaught.java
Normal file
72
Mage.Sets/src/mage/cards/d/DevastatingOnslaught.java
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class DevastatingOnslaught extends CardImpl {
|
||||||
|
|
||||||
|
public DevastatingOnslaught(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}");
|
||||||
|
|
||||||
|
// Create X tokens that are copies of target artifact or creature you control. Those tokens gain haste until end of turn. Sacrifice them at the beginning of the next end step.
|
||||||
|
this.getSpellAbility().addEffect(new DevastatingOnslaughtEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||||
|
}
|
||||||
|
|
||||||
|
private DevastatingOnslaught(final DevastatingOnslaught card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DevastatingOnslaught copy() {
|
||||||
|
return new DevastatingOnslaught(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DevastatingOnslaughtEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
DevastatingOnslaughtEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "create X tokens that are copies of target artifact or creature you control. " +
|
||||||
|
"Those tokens gain haste until end of turn. Sacrifice them at the beginning of the next end step";
|
||||||
|
}
|
||||||
|
|
||||||
|
private DevastatingOnslaughtEffect(final DevastatingOnslaughtEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DevastatingOnslaughtEffect copy() {
|
||||||
|
return new DevastatingOnslaughtEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
|
int xValue = GetXValue.instance.calculate(game, source, this);
|
||||||
|
if (permanent == null || xValue < 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect();
|
||||||
|
effect.setHasHaste(true);
|
||||||
|
effect.setSavedPermanent(permanent);
|
||||||
|
effect.apply(game, source);
|
||||||
|
effect.sacrificeTokensCreatedAtNextEndStep(game, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -74,6 +74,9 @@ public final class EdgeOfEternities extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Debris Field Crusher", 131, Rarity.UNCOMMON, mage.cards.d.DebrisFieldCrusher.class));
|
cards.add(new SetCardInfo("Debris Field Crusher", 131, Rarity.UNCOMMON, mage.cards.d.DebrisFieldCrusher.class));
|
||||||
cards.add(new SetCardInfo("Decode Transmissions", 94, Rarity.COMMON, mage.cards.d.DecodeTransmissions.class));
|
cards.add(new SetCardInfo("Decode Transmissions", 94, Rarity.COMMON, mage.cards.d.DecodeTransmissions.class));
|
||||||
cards.add(new SetCardInfo("Desculpting Blast", 54, Rarity.UNCOMMON, mage.cards.d.DesculptingBlast.class));
|
cards.add(new SetCardInfo("Desculpting Blast", 54, Rarity.UNCOMMON, mage.cards.d.DesculptingBlast.class));
|
||||||
|
cards.add(new SetCardInfo("Devastating Onslaught", 132, Rarity.MYTHIC, mage.cards.d.DevastatingOnslaught.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Devastating Onslaught", 308, Rarity.MYTHIC, mage.cards.d.DevastatingOnslaught.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Devastating Onslaught", 361, Rarity.MYTHIC, mage.cards.d.DevastatingOnslaught.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Drix Fatemaker", 178, Rarity.COMMON, mage.cards.d.DrixFatemaker.class));
|
cards.add(new SetCardInfo("Drix Fatemaker", 178, Rarity.COMMON, mage.cards.d.DrixFatemaker.class));
|
||||||
cards.add(new SetCardInfo("Dubious Delicacy", 96, Rarity.UNCOMMON, mage.cards.d.DubiousDelicacy.class));
|
cards.add(new SetCardInfo("Dubious Delicacy", 96, Rarity.UNCOMMON, mage.cards.d.DubiousDelicacy.class));
|
||||||
cards.add(new SetCardInfo("Dyadrine, Synthesis Amalgam", 216, Rarity.RARE, mage.cards.d.DyadrineSynthesisAmalgam.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Dyadrine, Synthesis Amalgam", 216, Rarity.RARE, mage.cards.d.DyadrineSynthesisAmalgam.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue