mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge pull request #3947 from spjspj/master
Add Sanguine Sacrament, Siren Stormtamer (XLN)
This commit is contained in:
commit
3a18f09d48
4 changed files with 267 additions and 1 deletions
81
Mage.Sets/src/mage/cards/s/SanguineSacrament.java
Normal file
81
Mage.Sets/src/mage/cards/s/SanguineSacrament.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.ReturnToLibrarySpellEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class SanguineSacrament extends CardImpl {
|
||||
|
||||
public SanguineSacrament(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}{W}");
|
||||
|
||||
// You gain twice X life. Put Sanguine Sacrament on the bottom of its owner's library.
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(new SanguineSacramentValue()));
|
||||
this.getSpellAbility().addEffect(new ReturnToLibrarySpellEffect(false));
|
||||
}
|
||||
|
||||
public SanguineSacrament(final SanguineSacrament card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SanguineSacrament copy() {
|
||||
return new SanguineSacrament(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SanguineSacramentValue extends ManacostVariableValue {
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return super.calculate(game, sourceAbility, effect) * 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SanguineSacramentValue copy() {
|
||||
return new SanguineSacramentValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "twice X";
|
||||
}
|
||||
}
|
183
Mage.Sets/src/mage/cards/s/SirenStormtamer.java
Normal file
183
Mage.Sets/src/mage/cards/s/SirenStormtamer.java
Normal file
|
@ -0,0 +1,183 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackAbility;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetObject;
|
||||
import mage.target.Targets;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class SirenStormtamer extends CardImpl {
|
||||
|
||||
public SirenStormtamer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
|
||||
this.subtype.add("Siren");
|
||||
this.subtype.add("Pirate");
|
||||
this.subtype.add("Wizard");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {U}, Sacrifice Siren Stormtamer: Counter target spell or ability that targets you or a creature you control.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{U}"));
|
||||
ability.addTarget(new SirenStormtamerTargetObject());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public SirenStormtamer(final SirenStormtamer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SirenStormtamer copy() {
|
||||
return new SirenStormtamer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SirenStormtamerTargetObject extends TargetObject {
|
||||
|
||||
public SirenStormtamerTargetObject() {
|
||||
this.minNumberOfTargets = 1;
|
||||
this.maxNumberOfTargets = 1;
|
||||
this.zone = Zone.STACK;
|
||||
this.targetName = "spell or ability that targets you or a creature you control";
|
||||
}
|
||||
|
||||
public SirenStormtamerTargetObject(final SirenStormtamerTargetObject target) {
|
||||
super(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTarget(UUID id, Ability source, Game game) {
|
||||
StackObject stackObject = game.getStack().getStackObject(id);
|
||||
return (stackObject instanceof Spell) || (stackObject instanceof StackAbility);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) {
|
||||
return canChoose(sourceControllerId, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canChoose(UUID sourceControllerId, Game game) {
|
||||
for (StackObject stackObject : game.getStack()) {
|
||||
if ((stackObject instanceof Spell) || (stackObject instanceof StackAbility)) {
|
||||
Targets objectTargets = stackObject.getStackAbility().getTargets();
|
||||
if (!objectTargets.isEmpty()) {
|
||||
for (Target target : objectTargets) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent targetedPermanent = game.getPermanentOrLKIBattlefield(targetId);
|
||||
if (targetedPermanent != null
|
||||
&& targetedPermanent.getControllerId().equals(sourceControllerId)
|
||||
&& targetedPermanent.isCreature()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sourceControllerId.equals(targetId)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId,
|
||||
Game game) {
|
||||
return possibleTargets(sourceControllerId, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<UUID> possibleTargets(UUID sourceControllerId, Game game) {
|
||||
Set<UUID> possibleTargets = new HashSet<>();
|
||||
for (StackObject stackObject : game.getStack()) {
|
||||
if ((stackObject instanceof Spell) || (stackObject instanceof StackAbility)) {
|
||||
Targets objectTargets = stackObject.getStackAbility().getTargets();
|
||||
if (!objectTargets.isEmpty()) {
|
||||
for (Target target : objectTargets) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent targetedPermanent = game.getPermanentOrLKIBattlefield(targetId);
|
||||
if (targetedPermanent != null
|
||||
&& targetedPermanent.getControllerId().equals(sourceControllerId)
|
||||
&& targetedPermanent.isCreature()) {
|
||||
possibleTargets.add(stackObject.getId());
|
||||
}
|
||||
|
||||
if (sourceControllerId.equals(targetId)) {
|
||||
possibleTargets.add(stackObject.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return possibleTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SirenStormtamerTargetObject copy() {
|
||||
return new SirenStormtamerTargetObject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filter getFilter() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
}
|
|
@ -101,11 +101,13 @@ public class Ixalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rowdy Crew", 159, Rarity.MYTHIC, mage.cards.r.RowdyCrew.class));
|
||||
cards.add(new SetCardInfo("Ruin Raider", 118, Rarity.RARE, mage.cards.r.RuinRaider.class));
|
||||
cards.add(new SetCardInfo("Sanctum Seeker", 120, Rarity.RARE, mage.cards.s.SanctumSeeker.class));
|
||||
cards.add(new SetCardInfo("Sanguine Sacrament", 33, Rarity.RARE, mage.cards.s.SanguineSacrament.class));
|
||||
cards.add(new SetCardInfo("Savage Stomp", 205, Rarity.UNCOMMON, mage.cards.s.SavageStomp.class));
|
||||
cards.add(new SetCardInfo("Sentinel Totem", 245, Rarity.UNCOMMON, mage.cards.s.SentinelTotem.class));
|
||||
cards.add(new SetCardInfo("Settle the Wreckage", 34, Rarity.RARE, mage.cards.s.SettleTheWreckage.class));
|
||||
cards.add(new SetCardInfo("Shapers of Nature", 228, Rarity.UNCOMMON, mage.cards.s.ShapersOfNature.class));
|
||||
cards.add(new SetCardInfo("Shapers' Sanctuary", 206, Rarity.RARE, mage.cards.s.ShapersSanctuary.class));
|
||||
cards.add(new SetCardInfo("Siren Stormtamer", 79, Rarity.UNCOMMON, mage.cards.s.SirenStormtamer.class));
|
||||
cards.add(new SetCardInfo("Sleek Schooner", 247, Rarity.UNCOMMON, mage.cards.s.SleekSchooner.class));
|
||||
cards.add(new SetCardInfo("Slice in Twain", 207, Rarity.UNCOMMON, mage.cards.s.SliceinTwain.class));
|
||||
cards.add(new SetCardInfo("Sorcerous Spyglass", 248, Rarity.RARE, mage.cards.s.SorcerousSpyglass.class));
|
||||
|
|
|
@ -32356,7 +32356,7 @@ Overflowing Insight|Ixalan|64|M|{4}{U}{U}{U}|Sorcery|||Target player draws seven
|
|||
Opt|Ixalan|65|C|{U}|Instant|||Scry 1.$Draw a card.|
|
||||
Prosperous Pirates|Ixalan|69|C|{4}{U}|Creature - Human Pirate|3|4|When Prosperous Pirates enters the battlefield, create two colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."|
|
||||
River's Rebuke|Ixalan|71|R|{4}{U}{U}|Sorcery|||Return all nonland permanents target player controls to their owner's hand.|
|
||||
Siren Stormtamer|Ixalan|79|U|{U}|Creature - Siren Pirate Wizard|Flying${U}, Sacrifice Siren Stormtamer: Counter target spell or ability that targets you or a creature you control.|
|
||||
Siren Stormtamer|Ixalan|79|U|{U}|Creature - Siren Pirate Wizard|1|1|Flying${U}, Sacrifice Siren Stormtamer: Counter target spell or ability that targets you or a creature you control.|
|
||||
Bloodcrazed Paladin|Ixalan|93|R|{1}{B}|Creature - Vampire Knight|1|1|Flash$Bloodcrazed Paladin enters the battlefield with a +1/+1 counter on it for each creature that died this turn.|
|
||||
Boneyard Parley|Ixalan|94|M|{5}{B}{B}|Sorcery|||Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards.|
|
||||
Deadeye Tormentor|Ixalan|98|C|{2}{B}|Creature - Human Pirate|2|2|<i>Raid</i> — When Deadeye Tormentor enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.|
|
||||
|
|
Loading…
Reference in a new issue