mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
[CLB] Implemented Cone of Cold
This commit is contained in:
parent
b17ba8b0df
commit
4ab12f55c4
2 changed files with 88 additions and 0 deletions
87
Mage.Sets/src/mage/cards/c/ConeOfCold.java
Normal file
87
Mage.Sets/src/mage/cards/c/ConeOfCold.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepTargetEffect;
|
||||
import mage.abilities.effects.common.PermanentsEnterBattlefieldTappedEffect;
|
||||
import mage.abilities.effects.common.RollDieWithResultTableEffect;
|
||||
import mage.abilities.effects.common.TapAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ConeOfCold extends CardImpl {
|
||||
|
||||
public ConeOfCold(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
||||
|
||||
// Roll a d20.
|
||||
RollDieWithResultTableEffect effect = new RollDieWithResultTableEffect(20);
|
||||
|
||||
// 1-9 | Tap all creatures your opponents control.
|
||||
effect.addTableEntry(1, 9, new TapAllEffect(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES));
|
||||
|
||||
// 10-19 | Tap all creatures your opponents control. Those creatures don't untap during their controllers' next untap steps.
|
||||
effect.addTableEntry(
|
||||
10, 19,
|
||||
new TapAllEffect(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES), new ConeOfColdEffect()
|
||||
);
|
||||
|
||||
// 20 | Tap all creatures your opponents control. Those creatures don't untap during their controllers' next untap steps. Until your next turn, creatures your opponents control enter the battlefield tapped.
|
||||
effect.addTableEntry(
|
||||
20, 20,
|
||||
new TapAllEffect(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES), new ConeOfColdEffect(),
|
||||
new PermanentsEnterBattlefieldTappedEffect(
|
||||
StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES, Duration.EndOfTurn
|
||||
).setText("Until your next turn, creatures your opponents control enter the battlefield tapped")
|
||||
);
|
||||
}
|
||||
|
||||
private ConeOfCold(final ConeOfCold card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConeOfCold copy() {
|
||||
return new ConeOfCold(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ConeOfColdEffect extends OneShotEffect {
|
||||
|
||||
ConeOfColdEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Those creatures don't untap during their controllers' next untap steps";
|
||||
}
|
||||
|
||||
private ConeOfColdEffect(final ConeOfColdEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConeOfColdEffect copy() {
|
||||
return new ConeOfColdEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
game.addEffect(new DontUntapInControllersUntapStepTargetEffect(Duration.EndOfTurn)
|
||||
.setTargetPointer(new FixedTargets(
|
||||
game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES,
|
||||
source.getControllerId(), source, game
|
||||
), game
|
||||
)), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -44,6 +44,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Charcoal Diamond", 305, Rarity.COMMON, mage.cards.c.CharcoalDiamond.class));
|
||||
cards.add(new SetCardInfo("Cloakwood Hermit", 221, Rarity.UNCOMMON, mage.cards.c.CloakwoodHermit.class));
|
||||
cards.add(new SetCardInfo("Command Tower", 351, Rarity.COMMON, mage.cards.c.CommandTower.class));
|
||||
cards.add(new SetCardInfo("Cone of Cold", 61, Rarity.UNCOMMON, mage.cards.c.ConeOfCold.class));
|
||||
cards.add(new SetCardInfo("Criminal Past", 122, Rarity.UNCOMMON, mage.cards.c.CriminalPast.class));
|
||||
cards.add(new SetCardInfo("Cultist of the Absolute", 123, Rarity.RARE, mage.cards.c.CultistOfTheAbsolute.class));
|
||||
cards.add(new SetCardInfo("Displacer Kitten", 63, Rarity.RARE, mage.cards.d.DisplacerKitten.class));
|
||||
|
|
Loading…
Reference in a new issue