mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
[ONE] Implement Phyrexian Atlas
This commit is contained in:
parent
bae1857abe
commit
376da52ec5
2 changed files with 70 additions and 0 deletions
69
Mage.Sets/src/mage/cards/p/PhyrexianAtlas.java
Normal file
69
Mage.Sets/src/mage/cards/p/PhyrexianAtlas.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BecomesTappedSourceTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PhyrexianAtlas extends CardImpl {
|
||||
|
||||
public PhyrexianAtlas(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// {T}: Add one mana of any color.
|
||||
this.addAbility(new AnyColorManaAbility());
|
||||
|
||||
// Corrupted -- Whenever Phyrexian Atlas becomes tapped, each opponent with three or more poison counters loses 1 life.
|
||||
this.addAbility(new BecomesTappedSourceTriggeredAbility(new PhyrexianAtlasEffect()).setAbilityWord(AbilityWord.CORRUPTED));
|
||||
}
|
||||
|
||||
private PhyrexianAtlas(final PhyrexianAtlas card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhyrexianAtlas copy() {
|
||||
return new PhyrexianAtlas(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PhyrexianAtlasEffect extends OneShotEffect {
|
||||
|
||||
PhyrexianAtlasEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each opponent with three or more poison counters loses 1 life";
|
||||
}
|
||||
|
||||
private PhyrexianAtlasEffect(final PhyrexianAtlasEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhyrexianAtlasEffect copy() {
|
||||
return new PhyrexianAtlasEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && player.getCounters().getCount(CounterType.POISON) >= 3) {
|
||||
player.loseLife(1, game, source, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -140,6 +140,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Paladin of Predation", 178, Rarity.UNCOMMON, mage.cards.p.PaladinOfPredation.class));
|
||||
cards.add(new SetCardInfo("Pestilent Syphoner", 103, Rarity.COMMON, mage.cards.p.PestilentSyphoner.class));
|
||||
cards.add(new SetCardInfo("Phyrexian Arena", 104, Rarity.RARE, mage.cards.p.PhyrexianArena.class));
|
||||
cards.add(new SetCardInfo("Phyrexian Atlas", 237, Rarity.COMMON, mage.cards.p.PhyrexianAtlas.class));
|
||||
cards.add(new SetCardInfo("Phyrexian Obliterator", 105, Rarity.MYTHIC, mage.cards.p.PhyrexianObliterator.class));
|
||||
cards.add(new SetCardInfo("Plague Nurse", 179, Rarity.COMMON, mage.cards.p.PlagueNurse.class));
|
||||
cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
Loading…
Reference in a new issue