mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[AFR] Implemented Meteor Swarm (#7964)
* [AFR] Implemented Meteor Swarm * [AFR] Adjusted implementation of Meteor Swarm
This commit is contained in:
parent
6a3f2ff420
commit
50c9258263
2 changed files with 57 additions and 0 deletions
56
Mage.Sets/src/mage/cards/m/MeteorSwarm.java
Normal file
56
Mage.Sets/src/mage/cards/m/MeteorSwarm.java
Normal file
|
@ -0,0 +1,56 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.DamageMultiEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalkerAmount;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Raphael-Schulz
|
||||
*/
|
||||
public final class MeteorSwarm extends CardImpl {
|
||||
|
||||
public MeteorSwarm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{R}{R}");
|
||||
|
||||
// Meteor Swarm deals 8 damage divided as you choose among X target creatures and/or planeswalkers.
|
||||
this.getSpellAbility().addEffect(
|
||||
new DamageMultiEffect(8).
|
||||
setText("{this} deals 8 damage divided as you choose among X target creatures and/or planeswalkers.")
|
||||
);
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalkerAmount(8));
|
||||
this.getSpellAbility().setTargetAdjuster(MeteorSwarmAdjuster.instance);
|
||||
}
|
||||
|
||||
private MeteorSwarm(final MeteorSwarm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MeteorSwarm copy() {
|
||||
return new MeteorSwarm(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum MeteorSwarmAdjuster implements TargetAdjuster {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
ability.getTargets().clear();
|
||||
int xManaSpent = ability.getManaCostsToPay().getX();
|
||||
if(xManaSpent != 0) {
|
||||
TargetCreatureOrPlaneswalkerAmount targetCreatureOrPlaneswalkerAmount = new TargetCreatureOrPlaneswalkerAmount(8);
|
||||
targetCreatureOrPlaneswalkerAmount.setMinNumberOfTargets(xManaSpent);
|
||||
targetCreatureOrPlaneswalkerAmount.setMaxNumberOfTargets(xManaSpent);
|
||||
ability.addTarget(targetCreatureOrPlaneswalkerAmount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -98,6 +98,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Lightfoot Rogue", 111, Rarity.UNCOMMON, mage.cards.l.LightfootRogue.class));
|
||||
cards.add(new SetCardInfo("Lolth, Spider Queen", 112, Rarity.MYTHIC, mage.cards.l.LolthSpiderQueen.class));
|
||||
cards.add(new SetCardInfo("Manticore", 113, Rarity.COMMON, mage.cards.m.Manticore.class));
|
||||
cards.add(new SetCardInfo("Meteor Swarm", 155, Rarity.RARE, mage.cards.m.MeteorSwarm.class));
|
||||
cards.add(new SetCardInfo("Mimic", 249, Rarity.COMMON, mage.cards.m.Mimic.class));
|
||||
cards.add(new SetCardInfo("Minion of the Mighty", 156, Rarity.RARE, mage.cards.m.MinionOfTheMighty.class));
|
||||
cards.add(new SetCardInfo("Moon-Blessed Cleric", 26, Rarity.UNCOMMON, mage.cards.m.MoonBlessedCleric.class));
|
||||
|
|
Loading…
Reference in a new issue