From 4571ab8dce06a22f90d051e28b63795db7ce7a0c Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 21:34:15 +0100 Subject: [PATCH] [RIX] Added 5 cards. --- .../src/mage/cards/s/SiegehornCeratops.java | 68 ++++++++ Mage.Sets/src/mage/cards/s/SirenReaver.java | 77 +++++++++ .../src/mage/cards/s/SlaughterTheStrong.java | 158 ++++++++++++++++++ .../src/mage/cards/s/SlipperyScoundrel.java | 88 ++++++++++ .../src/mage/cards/s/SnubhornSentry.java | 78 +++++++++ .../mage/cards/s/StormFleetSwashbuckler.java | 20 ++- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 5 + .../cost/SpellCostReductionSourceEffect.java | 5 +- 8 files changed, 494 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/s/SiegehornCeratops.java create mode 100644 Mage.Sets/src/mage/cards/s/SirenReaver.java create mode 100644 Mage.Sets/src/mage/cards/s/SlaughterTheStrong.java create mode 100644 Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java create mode 100644 Mage.Sets/src/mage/cards/s/SnubhornSentry.java diff --git a/Mage.Sets/src/mage/cards/s/SiegehornCeratops.java b/Mage.Sets/src/mage/cards/s/SiegehornCeratops.java new file mode 100644 index 00000000000..ce24a136317 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SiegehornCeratops.java @@ -0,0 +1,68 @@ +/* + * 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.MageInt; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class SiegehornCeratops extends CardImpl { + + public SiegehornCeratops(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Enrage — Whenever Siegehorn Ceratops is dealt damage, put two +1/+1 counters on it. + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)) + .setText("put two +1/+1 counter on it"), false, true)); + } + + public SiegehornCeratops(final SiegehornCeratops card) { + super(card); + } + + @Override + public SiegehornCeratops copy() { + return new SiegehornCeratops(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SirenReaver.java b/Mage.Sets/src/mage/cards/s/SirenReaver.java new file mode 100644 index 00000000000..f8df0f59e3d --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SirenReaver.java @@ -0,0 +1,77 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SirenReaver extends CardImpl { + + public SirenReaver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.SIREN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Raid — Siren Reaver costs {1} less to cast if you attacked with a creature this turn. + Ability ability = new SimpleStaticAbility(Zone.STACK, new SpellCostReductionSourceEffect(1, RaidCondition.instance)); + ability.setAbilityWord(AbilityWord.RAID); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + } + + public SirenReaver(final SirenReaver card) { + super(card); + } + + @Override + public SirenReaver copy() { + return new SirenReaver(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SlaughterTheStrong.java b/Mage.Sets/src/mage/cards/s/SlaughterTheStrong.java new file mode 100644 index 00000000000..98bde8bf210 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlaughterTheStrong.java @@ -0,0 +1,158 @@ +/* + * 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.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class SlaughterTheStrong extends CardImpl { + + public SlaughterTheStrong(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}{W}"); + + // Each player chooses any number of creatures he or she controls with total power 4 or less, then sacrifices all other creatures he or she controls. + this.getSpellAbility().addEffect(new SlaughterTheStrongEffect()); + } + + public SlaughterTheStrong(final SlaughterTheStrong card) { + super(card); + } + + @Override + public SlaughterTheStrong copy() { + return new SlaughterTheStrong(this); + } +} + +class SlaughterTheStrongEffect extends OneShotEffect { + + public SlaughterTheStrongEffect() { + super(Outcome.Benefit); + this.staticText = "Each player chooses any number of creatures he or she controls with total power 4 or less, then sacrifices all other creatures he or she controls"; + } + + public SlaughterTheStrongEffect(final SlaughterTheStrongEffect effect) { + super(effect); + } + + @Override + public SlaughterTheStrongEffect copy() { + return new SlaughterTheStrongEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + boolean selectionDone = false; + Set selectedCreatures = new HashSet<>(); + while (selectionDone == false && player.isInGame()) { + int powerSum = 0; + for (UUID creatureId : selectedCreatures) { + Permanent creature = game.getPermanent(creatureId); + if (creature != null) { + powerSum += creature.getPower().getValue(); + } + } + FilterControlledCreaturePermanent currentFilter + = new FilterControlledCreaturePermanent("any number of creatures you control with total power 4 or less (already selected total power " + powerSum + ")"); + Set alreadySelectedCreatures = new HashSet<>(); + if (!selectedCreatures.isEmpty()) { + for (UUID creatureId : selectedCreatures) { + alreadySelectedCreatures.add(new PermanentIdPredicate(creatureId)); + } + currentFilter.add(Predicates.or(new PowerPredicate(ComparisonType.FEWER_THAN, 5 - powerSum), + Predicates.or(alreadySelectedCreatures))); + } else { + currentFilter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 5 - powerSum)); + } + Target target = new TargetPermanent(0, 1, currentFilter, true); + controller.chooseTarget(Outcome.BoostCreature, target, source, game); + if (target.getFirstTarget() != null) { + if (selectedCreatures.contains(target.getFirstTarget())) { + selectedCreatures.remove(target.getFirstTarget()); + } else { + selectedCreatures.add(target.getFirstTarget()); + } + } else { + if (player.isHuman()) { + String selected = "Selected: "; + for (UUID creatureId : selectedCreatures) { + Permanent creature = game.getPermanent(creatureId); + if (creature != null) { + selected += creature.getLogName() + " "; + } + } + selectionDone = player.chooseUse(Outcome.Detriment, + "Creature selection", + selected, + "End the selection", + "Continue the selection", source, game); + } else { + selectionDone = true; + } + } + } + for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, playerId, game)) { + if (!selectedCreatures.contains(creature.getId())) { + creature.sacrifice(source.getSourceId(), game); + } + } + } + } + return true; + } + + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java b/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java new file mode 100644 index 00000000000..1497c45a7b3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java @@ -0,0 +1,88 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalRestrictionEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.AscendAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SlipperyScoundrel extends CardImpl { + + public SlipperyScoundrel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Ascend + this.addAbility(new AscendAbility()); + + // As long as you have the city's blessing Slippery Scoundrel has Hexproof and can't be blocked. + ContinuousEffect boostSource = new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance, + "As long as you have the city's blessing {this} has Hexproof"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + RestrictionEffect restrictionEffect = new CantBeBlockedSourceEffect(Duration.WhileOnBattlefield); + Effect effect2 = new ConditionalRestrictionEffect(restrictionEffect, CitysBlessingCondition.instance) + .setText("and can't be blocked"); + ability.addEffect(effect2); + this.addAbility(ability); + } + + public SlipperyScoundrel(final SlipperyScoundrel card) { + super(card); + } + + @Override + public SlipperyScoundrel copy() { + return new SlipperyScoundrel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SnubhornSentry.java b/Mage.Sets/src/mage/cards/s/SnubhornSentry.java new file mode 100644 index 00000000000..e1ba014e8b6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SnubhornSentry.java @@ -0,0 +1,78 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.AscendAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SnubhornSentry extends CardImpl { + + public SnubhornSentry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) + this.addAbility(new AscendAbility()); + + // Snubhorn Sentry gets +3/+0 as long as you have the city's blessing. + ContinuousEffect boostSource = new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance, + "{this} gets +3/+0 as long as you have the city's blessing"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + this.addAbility(ability); + } + + public SnubhornSentry(final SnubhornSentry card) { + super(card); + } + + @Override + public SnubhornSentry copy() { + return new SnubhornSentry(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java b/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java index 0ca973b15c1..e3772f0616f 100644 --- a/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java +++ b/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java @@ -29,12 +29,20 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.constants.SubType; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.AscendAbility; -import mage.abilities.keyword.StormAbility; +import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; /** * @@ -44,7 +52,7 @@ public class StormFleetSwashbuckler extends CardImpl { public StormFleetSwashbuckler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - + this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.PIRATE); this.power = new MageInt(2); @@ -54,7 +62,11 @@ public class StormFleetSwashbuckler extends CardImpl { this.addAbility(new AscendAbility()); // Storm Fleet Swashbuckler has double strike as long as you have the city's blessing. - this.addAbility(new StormAbility()); + ContinuousEffect boostSource = new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance, + "{this} has double strike as long as you have the city's blessing"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 373d55c26bb..11c1e127f04 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -156,10 +156,15 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Secrets of the Golden City", 52, Rarity.COMMON, mage.cards.s.SecretsOfTheGoldenCity.class)); cards.add(new SetCardInfo("Shake the Foundations", 113, Rarity.UNCOMMON, mage.cards.s.ShakeTheFoundations.class)); cards.add(new SetCardInfo("Shatter", 114, Rarity.COMMON, mage.cards.s.Shatter.class)); + cards.add(new SetCardInfo("Siegehorn Ceratops", 171, Rarity.RARE, mage.cards.s.SiegehornCeratops.class)); cards.add(new SetCardInfo("Silent Gravestone", 182, Rarity.RARE, mage.cards.s.SilentGravestone.class)); cards.add(new SetCardInfo("Silverclad Ferocidons", 115, Rarity.RARE, mage.cards.s.SilvercladFerocidons.class)); cards.add(new SetCardInfo("Silvergill Adept", 53, Rarity.UNCOMMON, mage.cards.s.SilvergillAdept.class)); + cards.add(new SetCardInfo("Siren Reaver", 54, Rarity.UNCOMMON, mage.cards.s.SirenReaver.class)); cards.add(new SetCardInfo("Skymarcher Aspirant", 21, Rarity.UNCOMMON, mage.cards.s.SkymarcherAspirant.class)); + cards.add(new SetCardInfo("Slaughter the Strong", 22, Rarity.RARE, mage.cards.s.SlaughterTheStrong.class)); + cards.add(new SetCardInfo("Slippery Scoundrel", 55, Rarity.UNCOMMON, mage.cards.s.SlipperyScoundrel.class)); + cards.add(new SetCardInfo("Snubhorn Sentry", 23, Rarity.COMMON, mage.cards.s.SnubhornSentry.class)); cards.add(new SetCardInfo("Soul of the Rapids", 56, Rarity.COMMON, mage.cards.s.SoulOfTheRapids.class)); cards.add(new SetCardInfo("Sphinx's Decree", 24, Rarity.RARE, mage.cards.s.SphinxsDecree.class)); cards.add(new SetCardInfo("Spire Winder", 57, Rarity.COMMON, mage.cards.s.SpireWinder.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java index 194475bacb2..8ad8c34717c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java @@ -68,7 +68,10 @@ public class SpellCostReductionSourceEffect extends CostModificationEffectImpl { this.amount = amount; this.condition = condition; StringBuilder sb = new StringBuilder(); - sb.append("{this} costs {").append(amount).append("} less to cast if ").append(this.condition.toString()); + sb.append("{this} costs {") + .append(amount).append("} less to cast ") + .append((this.condition.toString().startsWith("if ") ? "" : "if ")) + .append(this.condition.toString()); this.staticText = sb.toString(); }