mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
- Added Serra's Hymn and Venomous Fangs.
This commit is contained in:
parent
a3206785ab
commit
61fb31bea0
4 changed files with 119 additions and 5 deletions
55
Mage.Sets/src/mage/cards/s/SerrasHymn.java
Normal file
55
Mage.Sets/src/mage/cards/s/SerrasHymn.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.PreventDamageToTargetMultiAmountEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetAnyTargetAmount;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class SerrasHymn extends CardImpl {
|
||||
|
||||
private static final String rule = "Prevent the next X damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose, where X is the number of verse counters on {this}.";
|
||||
|
||||
public SerrasHymn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
|
||||
|
||||
// At the beginning of your upkeep, you may put a verse counter on Serra's Hymn.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true));
|
||||
|
||||
// Sacrifice Serra's Hymn: Prevent the next X damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose, where X is the number of verse counters on Serra's Hymn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new PreventDamageToTargetMultiAmountEffect(
|
||||
Duration.EndOfTurn,
|
||||
1, false, true, // the integer 1 is ignored due to the dynamic number being set
|
||||
new CountersSourceCount(CounterType.VERSE)).setText(rule),
|
||||
new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetAnyTargetAmount(new CountersSourceCount(CounterType.VERSE)));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public SerrasHymn(final SerrasHymn card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SerrasHymn copy() {
|
||||
return new SerrasHymn(this);
|
||||
}
|
||||
}
|
48
Mage.Sets/src/mage/cards/v/VenomousFangs.java
Normal file
48
Mage.Sets/src/mage/cards/v/VenomousFangs.java
Normal file
|
@ -0,0 +1,48 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsDamageToACreatureAttachedTriggeredAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class VenomousFangs extends CardImpl {
|
||||
|
||||
public VenomousFangs(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever enchanted creature deals damage to a creature, destroy the other creature.
|
||||
this.addAbility(new DealsDamageToACreatureAttachedTriggeredAbility(new DestroyTargetEffect(), false, "enchanted creature", false, true));
|
||||
|
||||
}
|
||||
|
||||
public VenomousFangs(final VenomousFangs card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VenomousFangs copy() {
|
||||
return new VenomousFangs(this);
|
||||
}
|
||||
}
|
|
@ -275,9 +275,11 @@ public final class UrzasSaga extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Seasoned Marshal", 44, Rarity.UNCOMMON, mage.cards.s.SeasonedMarshal.class));
|
||||
cards.add(new SetCardInfo("Serra Avatar", 45, Rarity.RARE, mage.cards.s.SerraAvatar.class));
|
||||
cards.add(new SetCardInfo("Serra's Embrace", 47, Rarity.UNCOMMON, mage.cards.s.SerrasEmbrace.class));
|
||||
cards.add(new SetCardInfo("Serra's Hymn", 48, Rarity.UNCOMMON, mage.cards.s.SerrasHymn.class));
|
||||
cards.add(new SetCardInfo("Serra's Liturgy", 49, Rarity.RARE, mage.cards.s.SerrasLiturgy.class));
|
||||
cards.add(new SetCardInfo("Serra's Sanctum", 325, Rarity.RARE, mage.cards.s.SerrasSanctum.class));
|
||||
cards.add(new SetCardInfo("Serra Zealot", 46, Rarity.COMMON, mage.cards.s.SerraZealot.class));
|
||||
cards.add(new SetCardInfo("Serra's Hymn", 48, Rarity.UNCOMMON, mage.cards.s.SerrasHymn.class));
|
||||
cards.add(new SetCardInfo("Shimmering Barrier", 50, Rarity.UNCOMMON, mage.cards.s.ShimmeringBarrier.class));
|
||||
cards.add(new SetCardInfo("Shivan Gorge", 326, Rarity.RARE, mage.cards.s.ShivanGorge.class));
|
||||
cards.add(new SetCardInfo("Shivan Hellkite", 214, Rarity.RARE, mage.cards.s.ShivanHellkite.class));
|
||||
|
@ -332,6 +334,7 @@ public final class UrzasSaga extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Urza's Armor", 313, Rarity.UNCOMMON, mage.cards.u.UrzasArmor.class));
|
||||
cards.add(new SetCardInfo("Vampiric Embrace", 164, Rarity.UNCOMMON, mage.cards.v.VampiricEmbrace.class));
|
||||
cards.add(new SetCardInfo("Vebulid", 165, Rarity.RARE, mage.cards.v.Vebulid.class));
|
||||
cards.add(new SetCardInfo("Venomous Fangs", 280, Rarity.COMMON, mage.cards.v.VenomousFangs.class));
|
||||
cards.add(new SetCardInfo("Vernal Bloom", 281, Rarity.RARE, mage.cards.v.VernalBloom.class));
|
||||
cards.add(new SetCardInfo("Viashino Outrider", 223, Rarity.COMMON, mage.cards.v.ViashinoOutrider.class));
|
||||
cards.add(new SetCardInfo("Viashino Runner", 224, Rarity.COMMON, mage.cards.v.ViashinoRunner.class));
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.UUID;
|
|||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.game.Game;
|
||||
|
@ -27,6 +28,10 @@ public class PreventDamageToTargetMultiAmountEffect extends PreventionEffectImpl
|
|||
super(duration, amount, false);
|
||||
}
|
||||
|
||||
public PreventDamageToTargetMultiAmountEffect(Duration duration, int amount, boolean onlyCombat, boolean consumable, DynamicValue dynamicValue) {
|
||||
super(duration, amount, onlyCombat, consumable, dynamicValue);
|
||||
}
|
||||
|
||||
public PreventDamageToTargetMultiAmountEffect(final PreventDamageToTargetMultiAmountEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
@ -100,12 +105,15 @@ public class PreventDamageToTargetMultiAmountEffect extends PreventionEffectImpl
|
|||
@Override
|
||||
public String getText(Mode mode) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt ");
|
||||
if (duration == Duration.EndOfTurn) {
|
||||
sb.append("this turn ");
|
||||
if (staticText.isEmpty()) {
|
||||
sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt ");
|
||||
if (duration == Duration.EndOfTurn) {
|
||||
sb.append("this turn ");
|
||||
}
|
||||
sb.append("to any number of targets, divided as you choose");
|
||||
return sb.toString();
|
||||
}
|
||||
sb.append("to any number of targets, divided as you choose");
|
||||
return sb.toString();
|
||||
return staticText;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue