From 35ca4f9d440054a997ef643e6ec54773d0d4ebd4 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 16 Jan 2015 22:41:50 +0100 Subject: [PATCH] [FRF] Added 4 artifacts. --- .../mage/sets/fatereforged/GoblinBoomKeg.java | 72 +++++++++++++++ .../mage/sets/fatereforged/HerosBlade.java | 87 +++++++++++++++++++ .../sets/fatereforged/ScrollOfTheMasters.java | 87 +++++++++++++++++++ .../sets/fatereforged/UginsConstruct.java | 73 ++++++++++++++++ 4 files changed, 319 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fatereforged/GoblinBoomKeg.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/HerosBlade.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/ScrollOfTheMasters.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/UginsConstruct.java diff --git a/Mage.Sets/src/mage/sets/fatereforged/GoblinBoomKeg.java b/Mage.Sets/src/mage/sets/fatereforged/GoblinBoomKeg.java new file mode 100644 index 0000000000..2aa3279ba8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/GoblinBoomKeg.java @@ -0,0 +1,72 @@ +/* + * 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.sets.fatereforged; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class GoblinBoomKeg extends CardImpl { + + public GoblinBoomKeg(UUID ownerId) { + super(ownerId, 159, "Goblin Boom Keg", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "FRF"; + + // At the beginning of your upkeep, sacrifice Goblin Boom Keg. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceEffect(), TargetController.YOU, false)); + + // When Goblin Boom Keg is put into a graveyard from the battlefield, it deals 3 damage to target creature or player. + Effect effect = new DamageTargetEffect(3); + effect.setText("it deals 3 damage to target creature or player"); + Ability ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(effect, false); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public GoblinBoomKeg(final GoblinBoomKeg card) { + super(card); + } + + @Override + public GoblinBoomKeg copy() { + return new GoblinBoomKeg(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/HerosBlade.java b/Mage.Sets/src/mage/sets/fatereforged/HerosBlade.java new file mode 100644 index 0000000000..a886fb95c2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/HerosBlade.java @@ -0,0 +1,87 @@ +/* + * 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.sets.fatereforged; + +import java.util.UUID; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continious.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class HerosBlade extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("a legendary creature"); + + static { + filter.add(new SupertypePredicate("Legendary")); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public HerosBlade(UUID ownerId) { + super(ownerId, 160, "Hero's Blade", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "FRF"; + this.subtype.add("Equipment"); + + // Equipped creature gets +3/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 2))); + + // Whenever a legendary creature enters the battlefield under your control, you may attach Hero's Blade to it. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"), + filter, true, SetTargetPointer.PERMANENT, null, true)); + + // Equip {4} + this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(4))); + } + + public HerosBlade(final HerosBlade card) { + super(card); + } + + @Override + public HerosBlade copy() { + return new HerosBlade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/ScrollOfTheMasters.java b/Mage.Sets/src/mage/sets/fatereforged/ScrollOfTheMasters.java new file mode 100644 index 0000000000..87b72be8d3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/ScrollOfTheMasters.java @@ -0,0 +1,87 @@ +/* + * 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.sets.fatereforged; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ScrollOfTheMasters extends CardImpl { + + private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); + + static { + filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public ScrollOfTheMasters(UUID ownerId) { + super(ownerId, 163, "Scroll of the Masters", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "FRF"; + + // Whenever you cast a noncreature spell, put a lore counter on Scroll of the Masters. + this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.LORE.createInstance()), filterNonCreature, false)); + + // {3}, {T}: Target creature you control gets +1/+1 until end of turn for each lore counter on Scroll of the Masters. + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new CountersCount(CounterType.LORE)), + new ManaCostsImpl("{3}")); + ability.addTarget(new TargetControlledCreaturePermanent()); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public ScrollOfTheMasters(final ScrollOfTheMasters card) { + super(card); + } + + @Override + public ScrollOfTheMasters copy() { + return new ScrollOfTheMasters(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/UginsConstruct.java b/Mage.Sets/src/mage/sets/fatereforged/UginsConstruct.java new file mode 100644 index 0000000000..533e5346c3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/UginsConstruct.java @@ -0,0 +1,73 @@ +/* + * 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.sets.fatereforged; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.SacrificeControllerEffect; +import mage.abilities.effects.common.SacrificeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class UginsConstruct extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("permanent that's one or more colors"); + + static { + filter.add(Predicates.not(new ColorlessPredicate())); + } + + public UginsConstruct(UUID ownerId) { + super(ownerId, 164, "Ugin's Construct", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "FRF"; + this.subtype.add("Construct"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // When Ugin's Construct enters the battlefield, sacrifice a permanent that's one or more colors. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeControllerEffect(filter, 1, null))); + } + + public UginsConstruct(final UginsConstruct card) { + super(card); + } + + @Override + public UginsConstruct copy() { + return new UginsConstruct(this); + } +}