mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[CLB] Implemented Nemesis Phoenix
This commit is contained in:
parent
fdfd5c9c23
commit
9ffc8ed11a
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/n/NemesisPhoenix.java
Normal file
83
Mage.Sets/src/mage/cards/n/NemesisPhoenix.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class NemesisPhoenix extends CardImpl {
|
||||
|
||||
public NemesisPhoenix(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
|
||||
|
||||
this.subtype.add(SubType.PHOENIX);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {2}{R}: Return Nemesis Phoenix from your graveyard to the battlefield tapped and attacking. Activate only during the declare attackers step and only if you're attacking two or more opponents.
|
||||
this.addAbility(new ActivateIfConditionActivatedAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnToBattlefieldUnderOwnerControlSourceEffect(true, true, -1),
|
||||
new ManaCostsImpl<>("{2}{R}"), NemesisPhoenixCondition.instance
|
||||
));
|
||||
}
|
||||
|
||||
private NemesisPhoenix(final NemesisPhoenix card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NemesisPhoenix copy() {
|
||||
return new NemesisPhoenix(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum NemesisPhoenixCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (game.getStep().getType() != PhaseStep.DECLARE_ATTACKERS) {
|
||||
return false;
|
||||
}
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
return game
|
||||
.getCombat()
|
||||
.getGroups()
|
||||
.stream()
|
||||
.filter(combatGroup -> combatGroup
|
||||
.getAttackers()
|
||||
.stream()
|
||||
.map(game::getControllerId)
|
||||
.anyMatch(source::isControlledBy))
|
||||
.map(CombatGroup::getDefenderId)
|
||||
.distinct()
|
||||
.filter(opponents::contains)
|
||||
.count() >= 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "during the declare attackers step and only if you're attacking two or more opponents";
|
||||
}
|
||||
}
|
|
@ -81,6 +81,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Moss Diamond", 327, Rarity.COMMON, mage.cards.m.MossDiamond.class));
|
||||
cards.add(new SetCardInfo("Mountain", 463, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Nalia de'Arnise", 649, Rarity.MYTHIC, mage.cards.n.NaliaDeArnise.class));
|
||||
cards.add(new SetCardInfo("Nemesis Phoenix", 189, Rarity.UNCOMMON, mage.cards.n.NemesisPhoenix.class));
|
||||
cards.add(new SetCardInfo("Noble's Purse", 331, Rarity.UNCOMMON, mage.cards.n.NoblesPurse.class));
|
||||
cards.add(new SetCardInfo("Oji, the Exquisite Blade", 290, Rarity.UNCOMMON, mage.cards.o.OjiTheExquisiteBlade.class));
|
||||
cards.add(new SetCardInfo("Passageway Seer", 141, Rarity.UNCOMMON, mage.cards.p.PassagewaySeer.class));
|
||||
|
|
Loading…
Reference in a new issue