mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Purphuros, Bronze-Blooded
This commit is contained in:
parent
ec73311ac9
commit
122da0e733
3 changed files with 164 additions and 33 deletions
131
Mage.Sets/src/mage/cards/p/PurphurosBronzeBlooded.java
Normal file
131
Mage.Sets/src/mage/cards/p/PurphurosBronzeBlooded.java
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||||
|
import mage.abilities.keyword.HasteAbility;
|
||||||
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCardInHand;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PurphurosBronzeBlooded extends CardImpl {
|
||||||
|
|
||||||
|
public PurphurosBronzeBlooded(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{4}{R}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.GOD);
|
||||||
|
this.power = new MageInt(7);
|
||||||
|
this.toughness = new MageInt(6);
|
||||||
|
|
||||||
|
// Indestructible
|
||||||
|
this.addAbility(IndestructibleAbility.getInstance());
|
||||||
|
|
||||||
|
// As long as your devotion to red is less than five, Purphuros isn't a creature.
|
||||||
|
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.R, 5))
|
||||||
|
.addHint(DevotionCount.R.getHint()));
|
||||||
|
|
||||||
|
// Other creatures you control have haste.
|
||||||
|
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||||
|
HasteAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||||
|
StaticFilters.FILTER_PERMANENT_CREATURES, true
|
||||||
|
)));
|
||||||
|
|
||||||
|
// {2}{R}: You may put a red creature card or an artifact creature card from your hand onto the battlefield. Sacrifice it at the beginning of the next end step.
|
||||||
|
this.addAbility(new SimpleActivatedAbility(new PurphurosBronzeBloodedEffect(), new ManaCostsImpl("{2}{R}")));
|
||||||
|
}
|
||||||
|
|
||||||
|
private PurphurosBronzeBlooded(final PurphurosBronzeBlooded card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PurphurosBronzeBlooded copy() {
|
||||||
|
return new PurphurosBronzeBlooded(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PurphurosBronzeBloodedEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private static final String choiceText
|
||||||
|
= "Put a red creature card or an artifact creature card from your hand onto the battlefield?";
|
||||||
|
private static final FilterCard filter
|
||||||
|
= new FilterCreatureCard("a red creature card or an artifact creature card");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.or(
|
||||||
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
|
new ColorPredicate(ObjectColor.RED)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
PurphurosBronzeBloodedEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "You may put a red creature card or an artifact creature card " +
|
||||||
|
"from your hand onto the battlefield. Sacrifice it at the beginning of the next end step";
|
||||||
|
}
|
||||||
|
|
||||||
|
private PurphurosBronzeBloodedEffect(final PurphurosBronzeBloodedEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PurphurosBronzeBloodedEffect copy() {
|
||||||
|
return new PurphurosBronzeBloodedEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller == null || !controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
TargetCardInHand target = new TargetCardInHand(filter);
|
||||||
|
if (!controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
if (card == null || !controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permanent permanent = game.getPermanent(card.getId());
|
||||||
|
if (permanent == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
||||||
|
new SacrificeTargetEffect(
|
||||||
|
"sacrifice " + card.getName(),
|
||||||
|
source.getControllerId()
|
||||||
|
).setTargetPointer(new FixedTarget(permanent, game))
|
||||||
|
), source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,8 +1,6 @@
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.DelayedTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
@ -25,8 +23,9 @@ import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class SneakAttack extends CardImpl {
|
public final class SneakAttack extends CardImpl {
|
||||||
|
@ -35,10 +34,10 @@ public final class SneakAttack extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
|
||||||
|
|
||||||
// {R}: You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice the creature at the beginning of the next end step.
|
// {R}: You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice the creature at the beginning of the next end step.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SneakAttackEffect(), new ManaCostsImpl("{R}")));
|
this.addAbility(new SimpleActivatedAbility(new SneakAttackEffect(), new ManaCostsImpl("{R}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SneakAttack(final SneakAttack card) {
|
private SneakAttack(final SneakAttack card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,12 +51,13 @@ class SneakAttackEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final String choiceText = "Put a creature card from your hand onto the battlefield?";
|
private static final String choiceText = "Put a creature card from your hand onto the battlefield?";
|
||||||
|
|
||||||
public SneakAttackEffect() {
|
SneakAttackEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice the creature at the beginning of the next end step";
|
this.staticText = "You may put a creature card from your hand onto the battlefield. " +
|
||||||
|
"That creature gains haste. Sacrifice the creature at the beginning of the next end step";
|
||||||
}
|
}
|
||||||
|
|
||||||
public SneakAttackEffect(final SneakAttackEffect effect) {
|
private SneakAttackEffect(final SneakAttackEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,32 +69,31 @@ class SneakAttackEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller == null || !controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) {
|
||||||
if (controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) {
|
|
||||||
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
|
|
||||||
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
|
||||||
if (card != null) {
|
|
||||||
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
|
||||||
Permanent permanent = game.getPermanent(card.getId());
|
|
||||||
if (permanent != null) {
|
|
||||||
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
|
|
||||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
|
||||||
game.addEffect(effect, source);
|
|
||||||
|
|
||||||
SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName(), source.getControllerId());
|
|
||||||
sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game));
|
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
|
||||||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
|
if (!controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
if (card == null || !controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permanent permanent = game.getPermanent(card.getId());
|
||||||
|
if (permanent == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
|
||||||
|
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||||
|
game.addEffect(effect, source);
|
||||||
|
|
||||||
|
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
||||||
|
new SacrificeTargetEffect(
|
||||||
|
"sacrifice " + card.getName(),
|
||||||
|
source.getControllerId()
|
||||||
|
).setTargetPointer(new FixedTarget(permanent, game))
|
||||||
|
), source);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Nyxborn Colossus", 191, Rarity.COMMON, mage.cards.n.NyxbornColossus.class));
|
cards.add(new SetCardInfo("Nyxborn Colossus", 191, Rarity.COMMON, mage.cards.n.NyxbornColossus.class));
|
||||||
cards.add(new SetCardInfo("Nyxborn Courser", 29, Rarity.COMMON, mage.cards.n.NyxbornCourser.class));
|
cards.add(new SetCardInfo("Nyxborn Courser", 29, Rarity.COMMON, mage.cards.n.NyxbornCourser.class));
|
||||||
cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Purphuros, Bronze-Blooded", 150, Rarity.MYTHIC, mage.cards.p.PurphurosBronzeBlooded.class));
|
||||||
cards.add(new SetCardInfo("Revoke Existence", 34, Rarity.COMMON, mage.cards.r.RevokeExistence.class));
|
cards.add(new SetCardInfo("Revoke Existence", 34, Rarity.COMMON, mage.cards.r.RevokeExistence.class));
|
||||||
cards.add(new SetCardInfo("Serpent of Yawning Depths", 291, Rarity.RARE, mage.cards.s.SerpentOfYawningDepths.class));
|
cards.add(new SetCardInfo("Serpent of Yawning Depths", 291, Rarity.RARE, mage.cards.s.SerpentOfYawningDepths.class));
|
||||||
cards.add(new SetCardInfo("Setessan Champion", 198, Rarity.RARE, mage.cards.s.SetessanChampion.class));
|
cards.add(new SetCardInfo("Setessan Champion", 198, Rarity.RARE, mage.cards.s.SetessanChampion.class));
|
||||||
|
|
Loading…
Reference in a new issue