mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[CMR] Implemented Volcanic Torrent
This commit is contained in:
parent
25913e8eee
commit
09bf1e0855
2 changed files with 75 additions and 0 deletions
74
Mage.Sets/src/mage/cards/v/VolcanicTorrent.java
Normal file
74
Mage.Sets/src/mage/cards/v/VolcanicTorrent.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.abilities.keyword.CascadeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.CastSpellLastTurnWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VolcanicTorrent extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterCreatureOrPlaneswalkerPermanent("creature and planeswalker your opponents control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public VolcanicTorrent(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}");
|
||||
|
||||
// Cascade
|
||||
this.addAbility(new CascadeAbility());
|
||||
|
||||
// Volcanic Torrent deals X damage to each creature and planeswalker your opponents control, where X is the number of spells you've cast this turn.
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(VolcanicTorrentValue.instance, filter));
|
||||
}
|
||||
|
||||
private VolcanicTorrent(final VolcanicTorrent card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VolcanicTorrent copy() {
|
||||
return new VolcanicTorrent(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum VolcanicTorrentValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class);
|
||||
return watcher == null ? 0 : watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(sourceAbility.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public VolcanicTorrentValue copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "the number of spells you've cast this turn";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
}
|
|
@ -496,6 +496,7 @@ public final class CommanderLegends extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Vivid Grove", 501, Rarity.UNCOMMON, mage.cards.v.VividGrove.class));
|
||||
cards.add(new SetCardInfo("Volcanic Dragon", 207, Rarity.UNCOMMON, mage.cards.v.VolcanicDragon.class));
|
||||
cards.add(new SetCardInfo("Volcanic Fallout", 418, Rarity.UNCOMMON, mage.cards.v.VolcanicFallout.class));
|
||||
cards.add(new SetCardInfo("Volcanic Torrent", 208, Rarity.UNCOMMON, mage.cards.v.VolcanicTorrent.class));
|
||||
cards.add(new SetCardInfo("Vow of Duty", 54, Rarity.UNCOMMON, mage.cards.v.VowOfDuty.class));
|
||||
cards.add(new SetCardInfo("Vow of Flight", 105, Rarity.UNCOMMON, mage.cards.v.VowOfFlight.class));
|
||||
cards.add(new SetCardInfo("Vow of Lightning", 209, Rarity.UNCOMMON, mage.cards.v.VowOfLightning.class));
|
||||
|
|
Loading…
Reference in a new issue