mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Implemented Pestilent Haze
This commit is contained in:
parent
fc2297181a
commit
c1e37c89b0
2 changed files with 71 additions and 0 deletions
70
Mage.Sets/src/mage/cards/p/PestilentHaze.java
Normal file
70
Mage.Sets/src/mage/cards/p/PestilentHaze.java
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PestilentHaze extends CardImpl {
|
||||
|
||||
public PestilentHaze(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
|
||||
|
||||
// Choose one —
|
||||
// • All creatures get -2/-2 until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Duration.EndOfTurn));
|
||||
|
||||
// • Remove two loyalty counters from each planeswalker.
|
||||
this.getSpellAbility().addMode(new Mode(new PestilentHazeEffect()));
|
||||
}
|
||||
|
||||
private PestilentHaze(final PestilentHaze card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PestilentHaze copy() {
|
||||
return new PestilentHaze(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PestilentHazeEffect extends OneShotEffect {
|
||||
|
||||
PestilentHazeEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "remove two loyalty counters from each planeswalker";
|
||||
}
|
||||
|
||||
private PestilentHazeEffect(final PestilentHazeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PestilentHazeEffect copy() {
|
||||
return new PestilentHazeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
game.getBattlefield()
|
||||
.getActivePermanents(
|
||||
StaticFilters.FILTER_PERMANENT_PLANESWALKER,
|
||||
source.getControllerId(), source.getSourceId(), game
|
||||
).stream()
|
||||
.forEach(permanent -> permanent.removeCounters(CounterType.LOYALTY.createInstance(2), game));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,6 +73,7 @@ public final class CoreSet2021 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Necromentia", 116, Rarity.RARE, mage.cards.n.Necromentia.class));
|
||||
cards.add(new SetCardInfo("Pack Leader", 29, Rarity.RARE, mage.cards.p.PackLeader.class));
|
||||
cards.add(new SetCardInfo("Peer into the Abyss", 117, Rarity.RARE, mage.cards.p.PeerIntoTheAbyss.class));
|
||||
cards.add(new SetCardInfo("Pestilent Haze", 118, Rarity.UNCOMMON, mage.cards.p.PestilentHaze.class));
|
||||
cards.add(new SetCardInfo("Plains", 309, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Predatory Wurm", 338, Rarity.UNCOMMON, mage.cards.p.PredatoryWurm.class));
|
||||
cards.add(new SetCardInfo("Quirion Dryad", 198, Rarity.UNCOMMON, mage.cards.q.QuirionDryad.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue