From 9c10d701216207dde010ff5c78c705ae41344c3c Mon Sep 17 00:00:00 2001 From: North Date: Wed, 18 May 2011 23:43:09 +0300 Subject: [PATCH] Added cards Added BlocksOrBecomesBlockedTriggeredAbility --- .../sets/mirrodinbesieged/CopperCarapace.java | 68 ++++++++++++ .../BeastbreakerOfBalaGed.java | 76 +++++++++++++ .../sets/riseoftheeldrazi/CaravanEscort.java | 76 +++++++++++++ .../sets/riseoftheeldrazi/EscapedNull.java | 68 ++++++++++++ .../sets/riseoftheeldrazi/HadaSpyPatrol.java | 80 ++++++++++++++ .../riseoftheeldrazi/HalimarWavewatch.java | 76 +++++++++++++ .../riseoftheeldrazi/KnightOfCliffhaven.java | 80 ++++++++++++++ .../riseoftheeldrazi/MorticianBeetle.java | 100 ++++++++++++++++++ .../sets/riseoftheeldrazi/OgresCleaver.java | 66 ++++++++++++ .../riseoftheeldrazi/SkywatcherAdept.java | 78 ++++++++++++++ .../riseoftheeldrazi/TranscendentMaster.java | 81 ++++++++++++++ .../scarsofmirrodin/InfiltrationLens.java | 67 ++++++++++++ .../BecomesBlockedTriggeredAbility.java | 7 +- ...locksOrBecomesBlockedTriggeredAbility.java | 54 ++++++++++ .../common/BlocksTriggeredAbility.java | 5 +- 15 files changed, 975 insertions(+), 7 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/mirrodinbesieged/CopperCarapace.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/BeastbreakerOfBalaGed.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/CaravanEscort.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/EscapedNull.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/HadaSpyPatrol.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/HalimarWavewatch.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/KnightOfCliffhaven.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/MorticianBeetle.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/OgresCleaver.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/SkywatcherAdept.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/TranscendentMaster.java create mode 100644 Mage.Sets/src/mage/sets/scarsofmirrodin/InfiltrationLens.java create mode 100644 Mage/src/mage/abilities/common/BlocksOrBecomesBlockedTriggeredAbility.java diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/CopperCarapace.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/CopperCarapace.java new file mode 100644 index 00000000000..9f029dbdab4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/CopperCarapace.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.sets.mirrodinbesieged; + +import java.util.UUID; +import mage.Constants.AttachmentType; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continious.BoostEquippedEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; + +/** + * + * @author North + */ +public class CopperCarapace extends CardImpl { + + public CopperCarapace(UUID ownerId) { + super(ownerId, 102, "Copper Carapace", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "MBS"; + this.subtype.add("Equipment"); + + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(CantBlockAbility.getInstance(), AttachmentType.EQUIPMENT))); + } + + public CopperCarapace(final CopperCarapace card) { + super(card); + } + + @Override + public CopperCarapace copy() { + return new CopperCarapace(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/BeastbreakerOfBalaGed.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BeastbreakerOfBalaGed.java new file mode 100644 index 00000000000..ec5fa625eee --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BeastbreakerOfBalaGed.java @@ -0,0 +1,76 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Abilities; +import mage.abilities.AbilitiesImpl; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.LevelAbility; +import mage.abilities.keyword.LevelUpAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.LevelerCard; + +/** + * + * @author North + */ +public class BeastbreakerOfBalaGed extends LevelerCard { + + public BeastbreakerOfBalaGed(UUID ownerId) { + super(ownerId, 178, "Beastbreaker of Bala Ged", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(new LevelUpAbility(new ManaCostsImpl("{2}{G}"))); + + this.getLevels().add(new LevelAbility(1, 3, new AbilitiesImpl(), 4, 4)); + + Abilities levelAbilities = new AbilitiesImpl(); + levelAbilities.add(TrampleAbility.getInstance()); + this.getLevels().add(new LevelAbility(4, -1, levelAbilities, 6, 6)); + } + + public BeastbreakerOfBalaGed(final BeastbreakerOfBalaGed card) { + super(card); + } + + @Override + public BeastbreakerOfBalaGed copy() { + return new BeastbreakerOfBalaGed(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/CaravanEscort.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CaravanEscort.java new file mode 100644 index 00000000000..9d04a305ab8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CaravanEscort.java @@ -0,0 +1,76 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Abilities; +import mage.abilities.AbilitiesImpl; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.LevelAbility; +import mage.abilities.keyword.LevelUpAbility; +import mage.cards.LevelerCard; + +/** + * + * @author North + */ +public class CaravanEscort extends LevelerCard { + + public CaravanEscort(UUID ownerId) { + super(ownerId, 15, "Caravan Escort", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(new LevelUpAbility(new ManaCostsImpl("{2}"))); + + this.getLevels().add(new LevelAbility(1, 4, new AbilitiesImpl(), 2, 2)); + + Abilities levelAbilities = new AbilitiesImpl(); + levelAbilities.add(FirstStrikeAbility.getInstance()); + this.getLevels().add(new LevelAbility(7, -1, levelAbilities, 5, 5)); + } + + public CaravanEscort(final CaravanEscort card) { + super(card); + } + + @Override + public CaravanEscort copy() { + return new CaravanEscort(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EscapedNull.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EscapedNull.java new file mode 100644 index 00000000000..41057650e57 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EscapedNull.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.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.BlocksOrBecomesBlockedTriggeredAbility; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; + +/** + * + * @author North + */ +public class EscapedNull extends CardImpl { + + public EscapedNull(UUID ownerId) { + super(ownerId, 109, "Escaped Null", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Zombie"); + this.subtype.add("Berserker"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + this.addAbility(LifelinkAbility.getInstance()); + this.addAbility(new BlocksOrBecomesBlockedTriggeredAbility(new BoostSourceEffect(5, 0, Duration.EndOfTurn), false)); + } + + public EscapedNull(final EscapedNull card) { + super(card); + } + + @Override + public EscapedNull copy() { + return new EscapedNull(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/HadaSpyPatrol.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/HadaSpyPatrol.java new file mode 100644 index 00000000000..bb742aeb586 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/HadaSpyPatrol.java @@ -0,0 +1,80 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Abilities; +import mage.abilities.AbilitiesImpl; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.LevelAbility; +import mage.abilities.keyword.LevelUpAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.abilities.keyword.UnblockableAbility; +import mage.cards.LevelerCard; + +/** + * + * @author North + */ +public class HadaSpyPatrol extends LevelerCard { + + public HadaSpyPatrol(UUID ownerId) { + super(ownerId, 71, "Hada Spy Patrol", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(new LevelUpAbility(new ManaCostsImpl("{2}{U}"))); + + Abilities abilities1 = new AbilitiesImpl(); + abilities1.add(UnblockableAbility.getInstance()); + this.getLevels().add(new LevelAbility(1, 2, abilities1, 2, 2)); + + Abilities abilities2 = new AbilitiesImpl(); + abilities2.add(UnblockableAbility.getInstance()); + abilities2.add(ShroudAbility.getInstance()); + this.getLevels().add(new LevelAbility(3, -1, abilities2, 3, 3)); + } + + public HadaSpyPatrol(final HadaSpyPatrol card) { + super(card); + } + + @Override + public HadaSpyPatrol copy() { + return new HadaSpyPatrol(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/HalimarWavewatch.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/HalimarWavewatch.java new file mode 100644 index 00000000000..3e4e77a110d --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/HalimarWavewatch.java @@ -0,0 +1,76 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Abilities; +import mage.abilities.AbilitiesImpl; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.IslandwalkAbility; +import mage.abilities.keyword.LevelAbility; +import mage.abilities.keyword.LevelUpAbility; +import mage.cards.LevelerCard; + +/** + * + * @author North + */ +public class HalimarWavewatch extends LevelerCard { + + public HalimarWavewatch(UUID ownerId) { + super(ownerId, 72, "Halimar Wavewatch", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Merfolk"); + this.subtype.add("Soldier"); + + this.color.setBlue(true); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + this.addAbility(new LevelUpAbility(new ManaCostsImpl("{2}"))); + + this.getLevels().add(new LevelAbility(1, 4, new AbilitiesImpl(), 0, 6)); + + Abilities levelAbilities = new AbilitiesImpl(); + levelAbilities.add(new IslandwalkAbility()); + this.getLevels().add(new LevelAbility(5, -1, levelAbilities, 6, 6)); + } + + public HalimarWavewatch(final HalimarWavewatch card) { + super(card); + } + + @Override + public HalimarWavewatch copy() { + return new HalimarWavewatch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/KnightOfCliffhaven.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KnightOfCliffhaven.java new file mode 100644 index 00000000000..9ff68a5a9c6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KnightOfCliffhaven.java @@ -0,0 +1,80 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Abilities; +import mage.abilities.AbilitiesImpl; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.LevelAbility; +import mage.abilities.keyword.LevelUpAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.LevelerCard; + +/** + * + * @author North + */ +public class KnightOfCliffhaven extends LevelerCard { + + public KnightOfCliffhaven(UUID ownerId) { + super(ownerId, 29, "Knight of Cliffhaven", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Kor"); + this.subtype.add("Knight"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(new LevelUpAbility(new ManaCostsImpl("{3}"))); + + Abilities abilities1 = new AbilitiesImpl(); + abilities1.add(FlyingAbility.getInstance()); + this.getLevels().add(new LevelAbility(1, 3, abilities1, 2, 3)); + + Abilities abilities2 = new AbilitiesImpl(); + abilities2.add(FlyingAbility.getInstance()); + abilities2.add(VigilanceAbility.getInstance()); + this.getLevels().add(new LevelAbility(4, -1, abilities2, 4, 4)); + } + + public KnightOfCliffhaven(final KnightOfCliffhaven card) { + super(card); + } + + @Override + public KnightOfCliffhaven copy() { + return new KnightOfCliffhaven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/MorticianBeetle.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/MorticianBeetle.java new file mode 100644 index 00000000000..72fd635bb7f --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/MorticianBeetle.java @@ -0,0 +1,100 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author North + */ +public class MorticianBeetle extends CardImpl { + + public MorticianBeetle(UUID ownerId) { + super(ownerId, 117, "Mortician Beetle", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Insect"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(new PlayerSacrificesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true)); + } + + public MorticianBeetle(final MorticianBeetle card) { + super(card); + } + + @Override + public MorticianBeetle copy() { + return new MorticianBeetle(this); + } +} + +class PlayerSacrificesCreatureTriggeredAbility extends TriggeredAbilityImpl { + + public PlayerSacrificesCreatureTriggeredAbility(Effect effect, boolean optional) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public PlayerSacrificesCreatureTriggeredAbility(final PlayerSacrificesCreatureTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.SACRIFICE_PERMANENT + && game.getPermanent(event.getTargetId()).getCardType().contains(CardType.CREATURE)) { + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player sacrifices a creature, " + super.getRule(); + } + + @Override + public PlayerSacrificesCreatureTriggeredAbility copy() { + return new PlayerSacrificesCreatureTriggeredAbility(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/OgresCleaver.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/OgresCleaver.java new file mode 100644 index 00000000000..dcc8a0c9bb4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/OgresCleaver.java @@ -0,0 +1,66 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continious.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; + +/** + * + * @author North + */ +public class OgresCleaver extends CardImpl { + + public OgresCleaver (UUID ownerId) { + super(ownerId, 220, "Ogre's Cleaver", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Equipment"); + + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(5))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(5, 0))); + } + + public OgresCleaver (final OgresCleaver card) { + super(card); + } + + @Override + public OgresCleaver copy() { + return new OgresCleaver(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SkywatcherAdept.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SkywatcherAdept.java new file mode 100644 index 00000000000..d098401433f --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SkywatcherAdept.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.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Abilities; +import mage.abilities.AbilitiesImpl; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.LevelAbility; +import mage.abilities.keyword.LevelUpAbility; +import mage.cards.LevelerCard; + +/** + * + * @author North + */ +public class SkywatcherAdept extends LevelerCard { + + public SkywatcherAdept(UUID ownerId) { + super(ownerId, 88, "Skywatcher Adept", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(new LevelUpAbility(new ManaCostsImpl("{3}"))); + + Abilities abilities1 = new AbilitiesImpl(); + abilities1.add(FlyingAbility.getInstance()); + this.getLevels().add(new LevelAbility(1, 2, abilities1, 2, 2)); + + Abilities abilities2 = new AbilitiesImpl(); + abilities2.add(FlyingAbility.getInstance()); + this.getLevels().add(new LevelAbility(3, -1, abilities2, 4, 2)); + } + + public SkywatcherAdept(final SkywatcherAdept card) { + super(card); + } + + @Override + public SkywatcherAdept copy() { + return new SkywatcherAdept(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/TranscendentMaster.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/TranscendentMaster.java new file mode 100644 index 00000000000..0dd28141fc5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/TranscendentMaster.java @@ -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.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Abilities; +import mage.abilities.AbilitiesImpl; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.keyword.LevelAbility; +import mage.abilities.keyword.LevelUpAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.LevelerCard; + +/** + * + * @author North + */ +public class TranscendentMaster extends LevelerCard { + + public TranscendentMaster(UUID ownerId) { + super(ownerId, 51, "Transcendent Master", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.subtype.add("Avatar"); + + this.color.setWhite(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + this.addAbility(new LevelUpAbility(new ManaCostsImpl("{1}"))); + + Abilities abilities1 = new AbilitiesImpl(); + abilities1.add(LifelinkAbility.getInstance()); + this.getLevels().add(new LevelAbility(6, 11, abilities1, 6, 6)); + + Abilities abilities2 = new AbilitiesImpl(); + abilities2.add(LifelinkAbility.getInstance()); + abilities2.add(IndestructibleAbility.getInstance()); + this.getLevels().add(new LevelAbility(12, -1, abilities2, 9, 9)); + } + + public TranscendentMaster(final TranscendentMaster card) { + super(card); + } + + @Override + public TranscendentMaster copy() { + return new TranscendentMaster(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/InfiltrationLens.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/InfiltrationLens.java new file mode 100644 index 00000000000..13b070542c2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/InfiltrationLens.java @@ -0,0 +1,67 @@ +/* + * 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.scarsofmirrodin; + +import java.util.UUID; +import mage.Constants.AttachmentType; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; + +/** + * + * @author North + */ +public class InfiltrationLens extends CardImpl { + + public InfiltrationLens(UUID ownerId) { + super(ownerId, 167, "Infiltration Lens", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "SOM"; + this.subtype.add("Equipment"); + + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new BecomesBlockedTriggeredAbility(new DrawCardControllerEffect(2), true), AttachmentType.EQUIPMENT))); + } + + public InfiltrationLens(final InfiltrationLens card) { + super(card); + } + + @Override + public InfiltrationLens copy() { + return new InfiltrationLens(this); + } +} diff --git a/Mage/src/mage/abilities/common/BecomesBlockedTriggeredAbility.java b/Mage/src/mage/abilities/common/BecomesBlockedTriggeredAbility.java index 9c95d7a0573..0bacbc92832 100644 --- a/Mage/src/mage/abilities/common/BecomesBlockedTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/BecomesBlockedTriggeredAbility.java @@ -39,10 +39,11 @@ import mage.target.common.TargetCreaturePermanent; * * @author North */ -public class BecomesBlockedTriggeredAbility extends TriggeredAbilityImpl { +public class BecomesBlockedTriggeredAbility extends TriggeredAbilityImpl { public BecomesBlockedTriggeredAbility(Effect effect, boolean optional) { super(Zone.BATTLEFIELD, effect, optional); + this.addTarget(new TargetCreaturePermanent()); } public BecomesBlockedTriggeredAbility(final BecomesBlockedTriggeredAbility ability) { @@ -52,9 +53,7 @@ public class BecomesBlockedTriggeredAbility extends TriggeredAbilityImpl { + + public BlocksOrBecomesBlockedTriggeredAbility(Effect effect, boolean optional) { + super(Zone.BATTLEFIELD, effect, optional); + this.addTarget(new TargetCreaturePermanent()); + } + + public BlocksOrBecomesBlockedTriggeredAbility(final BlocksOrBecomesBlockedTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.BLOCKER_DECLARED) { + if (event.getSourceId().equals(this.getSourceId())) { + this.getTargets().get(0).add(event.getTargetId(), game); + return true; + } + if (event.getTargetId().equals(this.getSourceId())) { + this.getTargets().get(0).add(event.getSourceId(), game); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} blocks or becomes blocked, " + super.getRule(); + } + + @Override + public BlocksOrBecomesBlockedTriggeredAbility copy() { + return new BlocksOrBecomesBlockedTriggeredAbility(this); + } +} diff --git a/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java b/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java index 76f734e3acc..cd0d7feed6e 100644 --- a/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java @@ -43,6 +43,7 @@ public class BlocksTriggeredAbility extends TriggeredAbilityImpl