mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[ONC] Implement Phyresis Outbreak
This commit is contained in:
parent
bcb51802e1
commit
18fe2edc8a
2 changed files with 78 additions and 0 deletions
76
Mage.Sets/src/mage/cards/p/PhyresisOutbreak.java
Normal file
76
Mage.Sets/src/mage/cards/p/PhyresisOutbreak.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersPlayersEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author PurpleCrowbar
|
||||
*/
|
||||
public final class PhyresisOutbreak extends CardImpl {
|
||||
|
||||
public PhyresisOutbreak(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
|
||||
|
||||
// Each opponent gets a poison counter. Then each creature your opponents control
|
||||
// gets -1/-1 until end of turn for each poison counter its controller has.
|
||||
this.getSpellAbility().addEffect(new AddCountersPlayersEffect(
|
||||
CounterType.POISON.createInstance(), TargetController.OPPONENT
|
||||
));
|
||||
this.getSpellAbility().addEffect(new PhyresisOutbreakEffect().concatBy("Then"));
|
||||
}
|
||||
|
||||
private PhyresisOutbreak(final PhyresisOutbreak card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhyresisOutbreak copy() {
|
||||
return new PhyresisOutbreak(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PhyresisOutbreakEffect extends OneShotEffect {
|
||||
|
||||
PhyresisOutbreakEffect() {
|
||||
super(Outcome.UnboostCreature);
|
||||
staticText = "each creature your opponents control gets -1/-1 until " +
|
||||
"end of turn for each poison counter its controller has";
|
||||
}
|
||||
|
||||
private PhyresisOutbreakEffect(final PhyresisOutbreakEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhyresisOutbreakEffect copy() {
|
||||
return new PhyresisOutbreakEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (UUID opponentId : game.getOpponents(source.getControllerId(), true)) {
|
||||
int totalPoison = game.getPlayer(opponentId).getCounters().getCount(CounterType.POISON);
|
||||
BoostTargetEffect effect = new BoostTargetEffect(totalPoison * -1, totalPoison * -1, Duration.EndOfTurn);
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_A_CREATURE, opponentId, game)) {
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -122,6 +122,8 @@ public final class PhyrexiaAllWillBeOneCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Path of Ancestry", 161, Rarity.COMMON, mage.cards.p.PathOfAncestry.class));
|
||||
cards.add(new SetCardInfo("Path to Exile", 84, Rarity.UNCOMMON, mage.cards.p.PathToExile.class));
|
||||
cards.add(new SetCardInfo("Phantom General", 85, Rarity.UNCOMMON, mage.cards.p.PhantomGeneral.class));
|
||||
cards.add(new SetCardInfo("Phyresis Outbreak", 12, Rarity.RARE, mage.cards.p.PhyresisOutbreak.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Phyresis Outbreak", 50, Rarity.RARE, mage.cards.p.PhyresisOutbreak.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Phyrexian Rebirth", 86, Rarity.RARE, mage.cards.p.PhyrexianRebirth.class));
|
||||
cards.add(new SetCardInfo("Phyrexian Swarmlord", 111, Rarity.RARE, mage.cards.p.PhyrexianSwarmlord.class));
|
||||
cards.add(new SetCardInfo("Plague Myr", 139, Rarity.UNCOMMON, mage.cards.p.PlagueMyr.class));
|
||||
|
|
Loading…
Reference in a new issue