mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
Implemented Bonder's Ornament
This commit is contained in:
parent
3e6c1d4483
commit
357d1873db
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/b/BondersOrnament.java
Normal file
80
Mage.Sets/src/mage/cards/b/BondersOrnament.java
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
package mage.cards.b;
|
||||||
|
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.mana.AnyColorManaAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class BondersOrnament extends CardImpl {
|
||||||
|
|
||||||
|
public BondersOrnament(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
|
// {T}: Add one mana of any color.
|
||||||
|
this.addAbility(new AnyColorManaAbility());
|
||||||
|
|
||||||
|
// {4}, {T}: Each player who controls a permanent named Bonder's Ornament draws a card.
|
||||||
|
Ability ability = new SimpleActivatedAbility(new BondersOrnamentEffect(), new GenericManaCost(4));
|
||||||
|
ability.addCost(new TapSourceCost());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BondersOrnament(final BondersOrnament card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BondersOrnament copy() {
|
||||||
|
return new BondersOrnament(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BondersOrnamentEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
BondersOrnamentEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "Each player who controls a permanent named Bonder's Ornament draws a card.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private BondersOrnamentEffect(final BondersOrnamentEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BondersOrnamentEffect copy() {
|
||||||
|
return new BondersOrnamentEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (game.getBattlefield()
|
||||||
|
.getAllActivePermanents(playerId)
|
||||||
|
.stream()
|
||||||
|
.map(MageObject::getName)
|
||||||
|
.noneMatch("Bonder's Ornament"::equals)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
player.drawCards(1, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -62,6 +62,7 @@ public final class Commander2020Edition extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Arcane Signet", 237, Rarity.COMMON, mage.cards.a.ArcaneSignet.class));
|
cards.add(new SetCardInfo("Arcane Signet", 237, Rarity.COMMON, mage.cards.a.ArcaneSignet.class));
|
||||||
cards.add(new SetCardInfo("Astral Drift", 76, Rarity.RARE, mage.cards.a.AstralDrift.class));
|
cards.add(new SetCardInfo("Astral Drift", 76, Rarity.RARE, mage.cards.a.AstralDrift.class));
|
||||||
cards.add(new SetCardInfo("Avenging Huntbonder", 22, Rarity.RARE, mage.cards.a.AvengingHuntbonder.class));
|
cards.add(new SetCardInfo("Avenging Huntbonder", 22, Rarity.RARE, mage.cards.a.AvengingHuntbonder.class));
|
||||||
|
cards.add(new SetCardInfo("Bonder's Ornament", 67, Rarity.COMMON, mage.cards.b.BondersOrnament.class));
|
||||||
cards.add(new SetCardInfo("Boneyard Mycodrax", 40, Rarity.RARE, mage.cards.b.BoneyardMycodrax.class));
|
cards.add(new SetCardInfo("Boneyard Mycodrax", 40, Rarity.RARE, mage.cards.b.BoneyardMycodrax.class));
|
||||||
cards.add(new SetCardInfo("Brallin, Skyshark Rider", 4, Rarity.MYTHIC, mage.cards.b.BrallinSkysharkRider.class));
|
cards.add(new SetCardInfo("Brallin, Skyshark Rider", 4, Rarity.MYTHIC, mage.cards.b.BrallinSkysharkRider.class));
|
||||||
cards.add(new SetCardInfo("Call the Coppercoats", 23, Rarity.RARE, mage.cards.c.CallTheCoppercoats.class));
|
cards.add(new SetCardInfo("Call the Coppercoats", 23, Rarity.RARE, mage.cards.c.CallTheCoppercoats.class));
|
||||||
|
|
Loading…
Reference in a new issue