mirror of
https://github.com/correl/mage.git
synced 2024-12-24 03:00:14 +00:00
Merge origin/master
This commit is contained in:
commit
223ea551b7
57 changed files with 1379 additions and 329 deletions
|
@ -15,8 +15,8 @@ public class ChampionsOfKamigawa extends ExpansionSet {
|
|||
super("Champions of Kamigawa", "CHK", "mage.sets.championsofkamigawa", new GregorianCalendar(2004, 9, 1).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Kamigawa";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -47,8 +47,8 @@ public class ClassicSixthEdition extends ExpansionSet {
|
|||
private ClassicSixthEdition() {
|
||||
super("Classic Sixth Edition", "6ED", "mage.sets.classicsixthedition", new GregorianCalendar(1999, 3, 28).getTime(), SetType.CORE);
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -15,11 +15,11 @@ public class FifthEdition extends ExpansionSet {
|
|||
private FifthEdition() {
|
||||
super("Fifth Edition", "5ED", "mage.sets.fifthedition", new GregorianCalendar(1997, 3, 1).getTime(), SetType.CORE);
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ public class FourthEdition extends ExpansionSet {
|
|||
private FourthEdition() {
|
||||
super("Fourth Edition", "4ED", "mage.sets.fourthedition", new GregorianCalendar(1995, 3, 1).getTime(), SetType.CORE);
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -49,8 +49,8 @@ public class FutureSight extends ExpansionSet {
|
|||
this.parentSet = TimeSpiral.getInstance();
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -48,8 +48,8 @@ public class IceAge extends ExpansionSet {
|
|||
super("Ice Age", "ICE", "mage.sets.iceage", new GregorianCalendar(1995, 5, 1).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Ice Age";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -46,10 +46,10 @@ public class Invasion extends ExpansionSet {
|
|||
super("Invasion", "INV", "mage.sets.invasion", new GregorianCalendar(2000, 9, 2).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Invasion";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,10 +49,10 @@ public class Judgment extends ExpansionSet {
|
|||
this.parentSet = Odyssey.getInstance();
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ public class Legends extends ExpansionSet {
|
|||
super("Legends", "LEG", "mage.sets.legends", new GregorianCalendar(1994, 5, 1).getTime(), SetType.EXPANSION);
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -20,8 +20,8 @@ public class LimitedEditionAlpha extends ExpansionSet {
|
|||
private LimitedEditionAlpha() {
|
||||
super("Limited Edition Alpha", "LEA", "mage.sets.limitedalpha", new GregorianCalendar(1993, 7, 1).getTime(), SetType.CORE);
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -20,8 +20,8 @@ public class LimitedEditionBeta extends ExpansionSet {
|
|||
private LimitedEditionBeta() {
|
||||
super("Limited Edition Beta", "LEB", "mage.sets.limitedbeta", new GregorianCalendar(1993, 9, 1).getTime(), SetType.CORE);
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -47,8 +47,8 @@ public class Lorwyn extends ExpansionSet {
|
|||
super("Lorwyn", "LRW", "mage.sets.lorwyn", new GregorianCalendar(2007, 9, 12).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Lorwyn";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -48,8 +48,8 @@ public class MercadianMasques extends ExpansionSet {
|
|||
super("Mercadian Masques", "MMQ", "mage.sets.mercadianmasques", new GregorianCalendar(1999, 8, 25).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Masques";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -47,8 +47,8 @@ public class Mirage extends ExpansionSet {
|
|||
super("Mirage", "MIR", "mage.sets.mirage", new GregorianCalendar(1996, 8, 21).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Mirage";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -16,8 +16,8 @@ public class Mirrodin extends ExpansionSet {
|
|||
super("Mirrodin", "MRD", "mage.sets.mirrodin", new GregorianCalendar(2003, 9, 2).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Mirrodin";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -47,8 +47,8 @@ public class Odyssey extends ExpansionSet {
|
|||
super("Odyssey", "ODY", "mage.sets.odyssey", new GregorianCalendar(2001, 9, 22).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Odyssey";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -16,10 +16,10 @@ public class Onslaught extends ExpansionSet {
|
|||
super("Onslaught", "ONS", "mage.sets.onslaught", new GregorianCalendar(2002, 10, 7).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Onslaught";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ public class RavnicaCityOfGuilds extends ExpansionSet {
|
|||
super("Ravnica: City of Guilds", "RAV", "mage.sets.ravnica", new GregorianCalendar(2005, 9, 24).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Ravnica";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -20,8 +20,8 @@ public class RevisedEdition extends ExpansionSet {
|
|||
private RevisedEdition() {
|
||||
super("Revised Edition", "3ED", "mage.sets.revisededition", new GregorianCalendar(1994, 3, 1).getTime(), SetType.CORE);
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -47,8 +47,8 @@ public class Shadowmoor extends ExpansionSet {
|
|||
super("Shadowmoor", "SHM", "mage.sets.shadowmoor", new GregorianCalendar(2008, 4, 2).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Shadowmoor";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -16,8 +16,8 @@ public class Tempest extends ExpansionSet {
|
|||
super("Tempest", "TMP", "mage.sets.tempest", new GregorianCalendar(1997, 9, 1).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Tempest";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
package mage.sets;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.cards.repository.CardCriteria;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SetType;
|
||||
|
||||
public class TimeSpiral extends ExpansionSet {
|
||||
|
||||
|
@ -17,10 +21,19 @@ public class TimeSpiral extends ExpansionSet {
|
|||
super("Time Spiral", "TSP", "mage.sets.timespiral", new GregorianCalendar(2006, 9, 9).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Time Spiral";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Card> createBooster() {
|
||||
List<Card> booster = super.createBooster();
|
||||
CardCriteria criteria = new CardCriteria();
|
||||
criteria.rarities(Rarity.SPECIAL).setCodes("TSB");
|
||||
addToBooster(booster, CardRepository.instance.findCards(criteria));
|
||||
return booster;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,8 +49,8 @@ public class UrzasDestiny extends ExpansionSet {
|
|||
this.parentSet = UrzasSaga.getInstance();
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -51,8 +51,8 @@ public class UrzasLegacy extends ExpansionSet {
|
|||
this.parentSet = UrzasSaga.getInstance();
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -48,8 +48,8 @@ public class UrzasSaga extends ExpansionSet {
|
|||
super("Urza's Saga", "USG", "mage.sets.urzassaga", new GregorianCalendar(1998, 10, 1).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Urza";
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
|
@ -51,8 +51,8 @@ public class Weatherlight extends ExpansionSet {
|
|||
this.parentSet = Mirage.getInstance();
|
||||
this.hasBasicLands = false;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 11;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
|
|
79
Mage.Sets/src/mage/sets/apocalypse/KavuMauler.java
Normal file
79
Mage.Sets/src/mage/sets/apocalypse/KavuMauler.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* 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.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class KavuMauler extends CardImpl {
|
||||
|
||||
private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Kavu");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Kavu"));
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public KavuMauler(UUID ownerId) {
|
||||
super(ownerId, 80, "Kavu Mauler", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
||||
this.expansionSetCode = "APC";
|
||||
this.subtype.add("Kavu");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// Whenever Kavu Mauler attacks, it gets +1/+1 until end of turn for each other attacking Kavu.
|
||||
PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter);
|
||||
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, value, Duration.EndOfTurn, true), false));
|
||||
}
|
||||
|
||||
public KavuMauler(final KavuMauler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KavuMauler copy() {
|
||||
return new KavuMauler(this);
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import mage.constants.*;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbility;
|
||||
|
@ -40,17 +40,22 @@ import mage.abilities.effects.common.ImprintTargetEffect;
|
|||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
|
||||
*
|
||||
*/
|
||||
public class DarkImpostor extends CardImpl {
|
||||
|
||||
|
@ -65,7 +70,7 @@ public class DarkImpostor extends CardImpl {
|
|||
|
||||
// {4}{B}{B}: Exile target creature and put a +1/+1 counter on Dark Impostor.\
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ImprintTargetEffect(), new ManaCostsImpl("{4}{B}{B}"));
|
||||
ability.addEffect(new ExileTargetEffect(null, "Dark Impostor"));
|
||||
ability.addEffect(new ExileTargetEffect(null, this.getIdName()));
|
||||
ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
@ -99,10 +104,10 @@ class DarkImpostorContinuousEffect extends ContinuousEffectImpl {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent perm = game.getPermanent(source.getSourceId());
|
||||
if (perm != null) {
|
||||
for (UUID imprintedId: perm.getImprinted()) {
|
||||
for (UUID imprintedId : perm.getImprinted()) {
|
||||
Card card = game.getCard(imprintedId);
|
||||
if (card != null) {
|
||||
for (Ability ability: card.getAbilities()) {
|
||||
for (Ability ability : card.getAbilities()) {
|
||||
if (ability instanceof ActivatedAbility) {
|
||||
perm.addAbility(ability, source.getSourceId(), game);
|
||||
}
|
||||
|
@ -118,4 +123,4 @@ class DarkImpostorContinuousEffect extends ContinuousEffectImpl {
|
|||
return new DarkImpostorContinuousEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ import mage.util.CardUtil;
|
|||
* @author jeffwadsworth
|
||||
*/
|
||||
public class Silkwrap extends CardImpl {
|
||||
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less an opponent controls");
|
||||
|
||||
static {
|
||||
|
@ -69,8 +69,8 @@ public class Silkwrap extends CardImpl {
|
|||
Ability ability = new EntersBattlefieldTriggeredAbility(new SilkwrapEffect());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(ability);
|
||||
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public Silkwrap(final Silkwrap card) {
|
||||
|
@ -103,8 +103,8 @@ class SilkwrapEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
70
Mage.Sets/src/mage/sets/iceage/KarplusanYeti.java
Normal file
70
Mage.Sets/src/mage/sets/iceage/KarplusanYeti.java
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* 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.iceage;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamageEachOtherEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class KarplusanYeti extends CardImpl {
|
||||
|
||||
public KarplusanYeti(UUID ownerId) {
|
||||
super(ownerId, 197, "Karplusan Yeti", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
|
||||
this.expansionSetCode = "ICE";
|
||||
this.subtype.add("Yeti");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}: Karplusan Yeti deals damage equal to its power to target creature. That creature deals damage equal to its power to Karplusan Yeti.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEachOtherEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public KarplusanYeti(final KarplusanYeti card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KarplusanYeti copy() {
|
||||
return new KarplusanYeti(this);
|
||||
}
|
||||
}
|
82
Mage.Sets/src/mage/sets/invasion/DevouringStrossus.java
Normal file
82
Mage.Sets/src/mage/sets/invasion/DevouringStrossus.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* 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.invasion;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
import mage.abilities.effects.common.SacrificeEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class DevouringStrossus extends CardImpl {
|
||||
|
||||
public DevouringStrossus(UUID ownerId) {
|
||||
super(ownerId, 101, "Devouring Strossus", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}{B}{B}");
|
||||
this.expansionSetCode = "INV";
|
||||
this.subtype.add("Horror");
|
||||
this.power = new MageInt(9);
|
||||
this.toughness = new MageInt(9);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// At the beginning of your upkeep, sacrifice a creature.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeEffect(new FilterControlledCreaturePermanent("creature"), 1, null),
|
||||
TargetController.YOU, false);
|
||||
this.addAbility(ability);
|
||||
// Sacrifice a creature: Regenerate Devouring Strossus.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(),
|
||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true))));
|
||||
}
|
||||
|
||||
public DevouringStrossus(final DevouringStrossus card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DevouringStrossus copy() {
|
||||
return new DevouringStrossus(this);
|
||||
}
|
||||
}
|
85
Mage.Sets/src/mage/sets/invasion/KavuMonarch.java
Normal file
85
Mage.Sets/src/mage/sets/invasion/KavuMonarch.java
Normal file
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* 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.invasion;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class KavuMonarch extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Kavu creatures");
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("another Kavu");
|
||||
|
||||
static {
|
||||
filter1.add(new SubtypePredicate("Kavu"));
|
||||
filter2.add(new SubtypePredicate("Kavu"));
|
||||
filter2.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public KavuMonarch(UUID ownerId) {
|
||||
super(ownerId, 149, "Kavu Monarch", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
||||
this.expansionSetCode = "INV";
|
||||
this.subtype.add("Kavu");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Kavu creatures have trample.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(TrampleAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield, filter1)));
|
||||
|
||||
// Whenever another Kavu enters the battlefield, put a +1/+1 counter on Kavu Monarch.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter2));
|
||||
}
|
||||
|
||||
public KavuMonarch(final KavuMonarch card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KavuMonarch copy() {
|
||||
return new KavuMonarch(this);
|
||||
}
|
||||
}
|
86
Mage.Sets/src/mage/sets/invasion/KavuRunner.java
Normal file
86
Mage.Sets/src/mage/sets/invasion/KavuRunner.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* 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.invasion;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class KavuRunner extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white or blue creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new ColorPredicate(ObjectColor.WHITE), new ColorPredicate(ObjectColor.BLUE)));
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public KavuRunner(UUID ownerId) {
|
||||
super(ownerId, 150, "Kavu Runner", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
this.expansionSetCode = "INV";
|
||||
this.subtype.add("Kavu");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Kavu Runner has haste as long as no opponent controls a white or blue creature.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 0, false)),
|
||||
"{this} has haste as long as no opponent controls a white or blue creature")));
|
||||
}
|
||||
|
||||
public KavuRunner(final KavuRunner card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KavuRunner copy() {
|
||||
return new KavuRunner(this);
|
||||
}
|
||||
}
|
86
Mage.Sets/src/mage/sets/invasion/SkittishKavu.java
Normal file
86
Mage.Sets/src/mage/sets/invasion/SkittishKavu.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* 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.invasion;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class SkittishKavu extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white or blue creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new ColorPredicate(ObjectColor.WHITE), new ColorPredicate(ObjectColor.BLUE)));
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public SkittishKavu(UUID ownerId) {
|
||||
super(ownerId, 168, "Skittish Kavu", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.expansionSetCode = "INV";
|
||||
this.subtype.add("Kavu");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Skittish Kavu gets +1/+1 as long as no opponent controls a white or blue creature.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield),
|
||||
new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 0, false)),
|
||||
"{this} gets +1/+1 as long as no opponent controls a white or blue creature")));
|
||||
}
|
||||
|
||||
public SkittishKavu(final SkittishKavu card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkittishKavu copy() {
|
||||
return new SkittishKavu(this);
|
||||
}
|
||||
}
|
|
@ -53,21 +53,20 @@ import mage.util.CardUtil;
|
|||
public class BanishingLight extends CardImpl {
|
||||
|
||||
private final static FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent an opponent controls");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public BanishingLight(UUID ownerId) {
|
||||
super(ownerId, 5, "Banishing Light", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
this.expansionSetCode = "JOU";
|
||||
|
||||
|
||||
// When Banishing Light enters the battlefield, exile target nonland permanent an opponent controls until Banishing Light leaves the battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BanishingLightExileEffect());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public BanishingLight(final BanishingLight card) {
|
||||
|
@ -102,7 +101,7 @@ class BanishingLightExileEffect extends OneShotEffect {
|
|||
// If Banishing Light leaves the battlefield before its triggered ability resolves,
|
||||
// the target won't be exiled.
|
||||
if (permanent != null) {
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -53,15 +53,15 @@ import mage.util.CardUtil;
|
|||
public class SuspensionField extends CardImpl {
|
||||
|
||||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 3 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new ToughnessPredicate(ComparisonType.GreaterThan, 2));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public SuspensionField(UUID ownerId) {
|
||||
super(ownerId, 25, "Suspension Field", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
|
||||
// When Suspension Field enters the battlefield, you may exile target creature with toughness 3 or greater until Suspension Field leaves the battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new SuspensionFieldExileEffect(), true);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
@ -101,7 +101,7 @@ class SuspensionFieldExileEffect extends OneShotEffect {
|
|||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
// If Suspension Field leaves the battlefield before its triggered ability resolves, the target won't be exiled.
|
||||
if (sourcePermanent != null) {
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), sourcePermanent.getName()).apply(game, source);
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), sourcePermanent.getIdName()).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* 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
|
||||
|
@ -20,7 +20,7 @@
|
|||
* 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.
|
||||
|
@ -30,7 +30,7 @@ package mage.sets.magic2010;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DestroySourceEffect;
|
||||
|
@ -41,10 +41,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -71,7 +67,7 @@ public class IceCage extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect()));
|
||||
|
||||
// When enchanted creature becomes the target of a spell or ability, destroy Ice Cage.
|
||||
this.addAbility(new IceCageAbility());
|
||||
this.addAbility(new BecomesTargetAttachedTriggeredAbility(new DestroySourceEffect()));
|
||||
}
|
||||
|
||||
public IceCage(final IceCage card) {
|
||||
|
@ -83,41 +79,3 @@ public class IceCage extends CardImpl {
|
|||
return new IceCage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class IceCageAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public IceCageAbility() {
|
||||
super(Zone.BATTLEFIELD, new DestroySourceEffect());
|
||||
}
|
||||
|
||||
public IceCageAbility(final IceCageAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IceCageAbility copy() {
|
||||
return new IceCageAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.TARGETED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanent(sourceId);
|
||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
if (event.getTargetId().equals(enchantment.getAttachedTo())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When enchanted creature becomes the target of a spell or ability, destroy {this}.";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ import mage.util.CardUtil;
|
|||
public class BanisherPriest extends CardImpl {
|
||||
|
||||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
@ -106,7 +107,7 @@ class BanisherPriestExileEffect extends OneShotEffect {
|
|||
// If Banisher Priest leaves the battlefield before its triggered ability resolves,
|
||||
// the target creature won't be exiled.
|
||||
if (permanent != null) {
|
||||
return new ExileTargetEffect(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), permanent.getName()).apply(game, source);
|
||||
return new ExileTargetEffect(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), permanent.getIdName()).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ class ColossalWhaleExileEffect extends OneShotEffect {
|
|||
// If Whale leaves the battlefield before its triggered ability resolves,
|
||||
// the target creature won't be exiled.
|
||||
if (permanent != null) {
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
package mage.sets.magic2014;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DestroySourceEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -40,10 +40,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -67,7 +63,7 @@ public class IllusionaryArmor extends CardImpl {
|
|||
// Enchanted creature gets +4/+4.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(4, 4, Duration.WhileOnBattlefield)));
|
||||
// When enchanted creature becomes the target of a spell or ability, sacrifice Illusionary Armor.
|
||||
this.addAbility(new IllusionaryArmorAbility());
|
||||
this.addAbility(new BecomesTargetAttachedTriggeredAbility(new SacrificeSourceEffect()));
|
||||
}
|
||||
|
||||
public IllusionaryArmor(final IllusionaryArmor card) {
|
||||
|
@ -79,42 +75,3 @@ public class IllusionaryArmor extends CardImpl {
|
|||
return new IllusionaryArmor(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class IllusionaryArmorAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public IllusionaryArmorAbility() {
|
||||
super(Zone.BATTLEFIELD, new DestroySourceEffect());
|
||||
}
|
||||
|
||||
public IllusionaryArmorAbility(final IllusionaryArmorAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IllusionaryArmorAbility copy() {
|
||||
return new IllusionaryArmorAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.TARGETED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanent(sourceId);
|
||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
if (event.getTargetId().equals(enchantment.getAttachedTo())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When enchanted creature becomes the target of a spell or ability, destroy {this}.";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -64,7 +64,6 @@ public class ConstrictingSliver extends CardImpl {
|
|||
filterTarget.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
|
||||
public ConstrictingSliver(UUID ownerId) {
|
||||
super(ownerId, 7, "Constricting Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||
this.expansionSetCode = "M15";
|
||||
|
@ -73,15 +72,15 @@ public class ConstrictingSliver extends CardImpl {
|
|||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Sliver creatures you control have "When this creature enters the battlefield, you may exile target creature an opponent controls
|
||||
// Sliver creatures you control have "When this creature enters the battlefield, you may exile target creature an opponent controls
|
||||
// until this creature leaves the battlefield."
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ConstrictingSliverExileEffect(), true);
|
||||
ability.addTarget(new TargetCreaturePermanent(filterTarget));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability,
|
||||
Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Sliver","Sliver creatures"),
|
||||
"Sliver creatures you control have \"When this creature enters the battlefield, you may exile target creature an opponent controls until this creature leaves the battlefield.\"")));
|
||||
Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Sliver", "Sliver creatures"),
|
||||
"Sliver creatures you control have \"When this creature enters the battlefield, you may exile target creature an opponent controls until this creature leaves the battlefield.\"")));
|
||||
|
||||
}
|
||||
|
||||
|
@ -117,7 +116,7 @@ class ConstrictingSliverExileEffect extends OneShotEffect {
|
|||
// If the creature leaves the battlefield before its triggered ability resolves,
|
||||
// the target creature won't be exiled.
|
||||
if (permanent != null) {
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
71
Mage.Sets/src/mage/sets/masterseditioniii/Tracker.java
Normal file
71
Mage.Sets/src/mage/sets/masterseditioniii/Tracker.java
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* 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.masterseditioniii;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamageEachOtherEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class Tracker extends CardImpl {
|
||||
|
||||
public Tracker(UUID ownerId) {
|
||||
super(ownerId, 136, "Tracker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "ME3";
|
||||
this.subtype.add("Human");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {G}{G}, {tap}: Tracker deals damage equal to its power to target creature. That creature deals damage equal to its power to Tracker.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEachOtherEffect(), new ManaCostsImpl("{G}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public Tracker(final Tracker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tracker copy() {
|
||||
return new Tracker(this);
|
||||
}
|
||||
}
|
|
@ -75,12 +75,12 @@ public class KarnLiberated extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(6)), false));
|
||||
|
||||
// +4: Target player exiles a card from his or her hand.
|
||||
LoyaltyAbility ability1 = new LoyaltyAbility(new ExileFromZoneTargetEffect(Zone.HAND, exileId, "Karn Liberated", new FilterCard()), 4);
|
||||
LoyaltyAbility ability1 = new LoyaltyAbility(new ExileFromZoneTargetEffect(Zone.HAND, exileId, this.getIdName(), new FilterCard()), 4);
|
||||
ability1.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability1);
|
||||
|
||||
// -3: Exile target permanent.
|
||||
LoyaltyAbility ability2 = new LoyaltyAbility(new ExileTargetEffect(exileId, "Karn Liberated"), -3);
|
||||
LoyaltyAbility ability2 = new LoyaltyAbility(new ExileTargetEffect(exileId, this.getIdName()), -3);
|
||||
ability2.addTarget(new TargetPermanent());
|
||||
this.addAbility(ability2);
|
||||
|
||||
|
@ -120,9 +120,9 @@ class KarnLiberatedEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
List<Card> cards = new ArrayList<>();
|
||||
for (ExileZone zone: game.getExile().getExileZones()) {
|
||||
for (ExileZone zone : game.getExile().getExileZones()) {
|
||||
if (zone.getId().equals(exileId)) {
|
||||
for (Card card: zone.getCards(game)) {
|
||||
for (Card card : zone.getCards(game)) {
|
||||
if (!card.getSubtype().contains("Aura") && CardUtil.isPermanentCard(card)) {
|
||||
cards.add(card);
|
||||
}
|
||||
|
@ -130,15 +130,15 @@ class KarnLiberatedEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
game.getState().clear();
|
||||
for (Card card: game.getCards()) {
|
||||
for (Card card : game.getCards()) {
|
||||
game.getState().addCard(card);
|
||||
}
|
||||
for (Player player: game.getPlayers().values()) {
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
player.getGraveyard().clear();
|
||||
player.getHand().clear();
|
||||
player.getLibrary().clear();
|
||||
for (Card card: game.getCards()) {
|
||||
if (card.getOwnerId().equals(player.getId()) && !card.isCopy() // no copies
|
||||
for (Card card : game.getCards()) {
|
||||
if (card.getOwnerId().equals(player.getId()) && !card.isCopy() // no copies
|
||||
&& !player.getSideboard().contains(card.getId())
|
||||
&& !cards.contains(card)) { // not the exiled cards
|
||||
player.getLibrary().putOnTop(card, game);
|
||||
|
@ -146,8 +146,8 @@ class KarnLiberatedEffect extends OneShotEffect {
|
|||
}
|
||||
player.init(game);
|
||||
}
|
||||
for (Card card: cards) {
|
||||
if ( CardUtil.isPermanentCard(card) && !card.getSubtype().contains("Aura") ) {
|
||||
for (Card card : cards) {
|
||||
if (CardUtil.isPermanentCard(card) && !card.getSubtype().contains("Aura")) {
|
||||
game.getExile().add(exileId, sourceObject.getIdName(), card);
|
||||
}
|
||||
}
|
||||
|
@ -215,10 +215,10 @@ class KarnLiberatedDelayedEffect extends OneShotEffect {
|
|||
if (exile != null) {
|
||||
Cards cards = new CardsImpl(); // needed because putOntoTheBattlefield removes from exile
|
||||
cards.addAll(exile);
|
||||
for (Card card: cards.getCards(game)) {
|
||||
for (Card card : cards.getCards(game)) {
|
||||
card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
((PermanentImpl)permanent).removeSummoningSickness();
|
||||
((PermanentImpl) permanent).removeSummoningSickness();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
52
Mage.Sets/src/mage/sets/ninthedition/KarplusanYeti.java
Normal file
52
Mage.Sets/src/mage/sets/ninthedition/KarplusanYeti.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.ninthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class KarplusanYeti extends mage.sets.iceage.KarplusanYeti {
|
||||
|
||||
public KarplusanYeti(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 198;
|
||||
this.expansionSetCode = "9ED";
|
||||
}
|
||||
|
||||
public KarplusanYeti(final KarplusanYeti card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KarplusanYeti copy() {
|
||||
return new KarplusanYeti(this);
|
||||
}
|
||||
}
|
110
Mage.Sets/src/mage/sets/planeshift/SamiteElder.java
Normal file
110
Mage.Sets/src/mage/sets/planeshift/SamiteElder.java
Normal file
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* 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.planeshift;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class SamiteElder extends CardImpl {
|
||||
|
||||
public SamiteElder(UUID ownerId) {
|
||||
super(ownerId, 14, "Samite Elder", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.expansionSetCode = "PLS";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {T}: Creatures you control gain protection from the colors of target permanent you control until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SamiteElderEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public SamiteElder(final SamiteElder card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SamiteElder copy() {
|
||||
return new SamiteElder(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SamiteElderEffect extends OneShotEffect {
|
||||
|
||||
public SamiteElderEffect() {
|
||||
super(Outcome.Protect);
|
||||
staticText = "Creatures you control gain protection from the colors of target permanent you control until end of turn";
|
||||
}
|
||||
|
||||
public SamiteElderEffect(final SamiteElderEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
public SamiteElderEffect copy() {
|
||||
return new SamiteElderEffect(this);
|
||||
}
|
||||
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
if(target != null) {
|
||||
for(ObjectColor color : target.getColor(game).getColors()) {
|
||||
FilterCard filter = new FilterCard(color.getDescription());
|
||||
filter.add(new ColorPredicate(color));
|
||||
game.addEffect(new GainAbilityControlledEffect(new ProtectionAbility(filter),
|
||||
Duration.EndOfTurn, new FilterControlledCreaturePermanent()), source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
84
Mage.Sets/src/mage/sets/planeshift/SleepingPotion.java
Normal file
84
Mage.Sets/src/mage/sets/planeshift/SleepingPotion.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* 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.planeshift;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.TapEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class SleepingPotion extends CardImpl {
|
||||
|
||||
public SleepingPotion(UUID ownerId) {
|
||||
super(ownerId, 34, "Sleeping Potion", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
this.expansionSetCode = "PLS";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
// When Sleeping Potion enters the battlefield, tap enchanted creature.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()));
|
||||
// Enchanted creature doesn't untap during its controller's untap step.
|
||||
Effect effect = new DontUntapInControllersUntapStepEnchantedEffect();
|
||||
effect.setText("Enchanted creature doesn't untap during its controller's untap step");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// When enchanted creature becomes the target of a spell or ability, sacrifice Sleeping Potion.
|
||||
this.addAbility(new BecomesTargetAttachedTriggeredAbility(new SacrificeSourceEffect()));
|
||||
}
|
||||
|
||||
public SleepingPotion(final SleepingPotion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SleepingPotion copy() {
|
||||
return new SleepingPotion(this);
|
||||
}
|
||||
}
|
76
Mage.Sets/src/mage/sets/planeshift/TahngarthTalruumHero.java
Normal file
76
Mage.Sets/src/mage/sets/planeshift/TahngarthTalruumHero.java
Normal file
|
@ -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.planeshift;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamageEachOtherEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class TahngarthTalruumHero extends CardImpl {
|
||||
|
||||
public TahngarthTalruumHero(UUID ownerId) {
|
||||
super(ownerId, 74, "Tahngarth, Talruum Hero", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
|
||||
this.expansionSetCode = "PLS";
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Minotaur");
|
||||
this.subtype.add("Warrior");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
// {1}{R}, {tap}: Tahngarth, Talruum Hero deals damage equal to its power to target creature. That creature deals damage equal to its power to Tahngarth.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEachOtherEffect(), new ManaCostsImpl("{1}{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public TahngarthTalruumHero(final TahngarthTalruumHero card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TahngarthTalruumHero copy() {
|
||||
return new TahngarthTalruumHero(this);
|
||||
}
|
||||
}
|
83
Mage.Sets/src/mage/sets/planeshift/WaterspoutElemental.java
Normal file
83
Mage.Sets/src/mage/sets/planeshift/WaterspoutElemental.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* 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.planeshift;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
|
||||
import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class WaterspoutElemental extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creatures");
|
||||
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public WaterspoutElemental(UUID ownerId) {
|
||||
super(ownerId, 38, "Waterspout Elemental", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||
this.expansionSetCode = "PLS";
|
||||
this.subtype.add("Elemental");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Kicker {U}
|
||||
this.addAbility(new KickerAbility("{U}"));
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Waterspout Elemental enters the battlefield, if it was kicked, return all other creatures to their owners' hands and you skip your next turn.
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter));
|
||||
ability.addEffect(new SkipNextTurnSourceEffect());
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.getInstance(),
|
||||
"When {this} enters the battlefield, if it was kicked, return all other creatures to their owners' hands and you skip your next turn"));
|
||||
}
|
||||
|
||||
public WaterspoutElemental(final WaterspoutElemental card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaterspoutElemental copy() {
|
||||
return new WaterspoutElemental(this);
|
||||
}
|
||||
}
|
|
@ -59,16 +59,14 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SistersOfStoneDeath extends CardImpl {
|
||||
|
||||
|
||||
private UUID exileId = UUID.randomUUID();
|
||||
|
||||
|
||||
public SistersOfStoneDeath(UUID ownerId) {
|
||||
super(ownerId, 231, "Sisters of Stone Death", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}{G}{G}");
|
||||
this.expansionSetCode = "RAV";
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Gorgon");
|
||||
|
||||
|
||||
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(5);
|
||||
|
@ -79,7 +77,7 @@ public class SistersOfStoneDeath extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// {B}{G}: Exile target creature blocking or blocked by Sisters of Stone Death.
|
||||
Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(exileId, "Sisters Of Stone Death"), new ManaCostsImpl("{B}{G}"));
|
||||
Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(exileId, this.getIdName()), new ManaCostsImpl("{B}{G}"));
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking or blocked by Sisters of Stone Death");
|
||||
filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()),
|
||||
new BlockingAttackerIdPredicate(this.getId())));
|
||||
|
@ -88,13 +86,13 @@ public class SistersOfStoneDeath extends CardImpl {
|
|||
|
||||
// {2}{B}: Put a creature card exiled with Sisters of Stone Death onto the battlefield under your control.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SistersOfStoneDeathEffect(exileId), new ManaCostsImpl("{2}{B}")));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public SistersOfStoneDeath(final SistersOfStoneDeath card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SistersOfStoneDeath copy() {
|
||||
return new SistersOfStoneDeath(this);
|
||||
|
@ -102,20 +100,20 @@ public class SistersOfStoneDeath extends CardImpl {
|
|||
}
|
||||
|
||||
class SistersOfStoneDeathEffect extends OneShotEffect {
|
||||
|
||||
|
||||
private UUID exileId;
|
||||
|
||||
|
||||
public SistersOfStoneDeathEffect(UUID exileId) {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.exileId = exileId;
|
||||
staticText = "Put a creature card exiled with {this} onto the battlefield under your control";
|
||||
}
|
||||
|
||||
|
||||
public SistersOfStoneDeathEffect(final SistersOfStoneDeathEffect effect) {
|
||||
super(effect);
|
||||
this.exileId = effect.exileId;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
CardsImpl cardsInExile = new CardsImpl();
|
||||
|
@ -137,7 +135,7 @@ class SistersOfStoneDeathEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SistersOfStoneDeathEffect copy() {
|
||||
return new SistersOfStoneDeathEffect(this);
|
||||
|
|
|
@ -29,24 +29,20 @@ package mage.sets.shardsofalara;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamageEachOtherEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -66,7 +62,7 @@ public class VeinDrinker extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {R}, {tap}: Vein Drinker deals damage equal to its power to target creature. That creature deals damage equal to its power to Vein Drinker.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new VeinDrinkerEffect(), new ManaCostsImpl("{R}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEachOtherEffect(), new ManaCostsImpl("{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
@ -83,39 +79,3 @@ public class VeinDrinker extends CardImpl {
|
|||
return new VeinDrinker(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VeinDrinkerEffect extends OneShotEffect {
|
||||
|
||||
public VeinDrinkerEffect() {
|
||||
super(Outcome.Damage);
|
||||
}
|
||||
|
||||
public VeinDrinkerEffect(final VeinDrinkerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourceCreature = game.getPermanent(source.getSourceId());
|
||||
Permanent targetCreature = game.getPermanent(source.getTargets().get(0).getFirstTarget());
|
||||
if (sourceCreature != null && targetCreature != null) {
|
||||
if (sourceCreature.getCardType().contains(CardType.CREATURE) && targetCreature.getCardType().contains(CardType.CREATURE)) {
|
||||
sourceCreature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true);
|
||||
targetCreature.damage(sourceCreature.getPower().getValue(), sourceCreature.getId(), game, false, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VeinDrinkerEffect copy() {
|
||||
return new VeinDrinkerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "{this} deals damage equal to its power to target creature. That creature deals damage equal to its power to {this}";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
54
Mage.Sets/src/mage/sets/thedark/Tracker.java
Normal file
54
Mage.Sets/src/mage/sets/thedark/Tracker.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* 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.thedark;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class Tracker extends mage.sets.masterseditioniii.Tracker {
|
||||
|
||||
public Tracker(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 52;
|
||||
this.expansionSetCode = "DRK";
|
||||
this.rarity = Rarity.RARE;
|
||||
}
|
||||
|
||||
public Tracker(final Tracker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tracker copy() {
|
||||
return new Tracker(this);
|
||||
}
|
||||
}
|
|
@ -52,33 +52,37 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* If the land Chained to the Rocks is enchanting stops being a Mountain or another player
|
||||
* gains control of it, Chained to the Rocks will be put into its owner's graveyard when
|
||||
* state-based actions are performed.
|
||||
* If the land Chained to the Rocks is enchanting stops being a Mountain or
|
||||
* another player gains control of it, Chained to the Rocks will be put into its
|
||||
* owner's graveyard when state-based actions are performed.
|
||||
*
|
||||
* Chained to the Rocks's ability causes a zone change with a duration, a style of ability
|
||||
* introduced in Magic 2014 that's somewhat reminiscent of older cards like Oblivion Ring.
|
||||
* However, unlike Oblivion Ring, cards like Chained to the Rocks have a single ability
|
||||
* that creates two one-shot effects: one that exiles the creature when the ability resolves,
|
||||
* and another that returns the exiled card to the battlefield immediately after Chained to
|
||||
* the Rocks leaves the battlefield.
|
||||
* Chained to the Rocks's ability causes a zone change with a duration, a style
|
||||
* of ability introduced in Magic 2014 that's somewhat reminiscent of older
|
||||
* cards like Oblivion Ring. However, unlike Oblivion Ring, cards like Chained
|
||||
* to the Rocks have a single ability that creates two one-shot effects: one
|
||||
* that exiles the creature when the ability resolves, and another that returns
|
||||
* the exiled card to the battlefield immediately after Chained to the Rocks
|
||||
* leaves the battlefield.
|
||||
*
|
||||
* If Chained to the Rocks leaves the battlefield before its triggered ability resolves,
|
||||
* the target creature won't be exiled.
|
||||
* If Chained to the Rocks leaves the battlefield before its triggered ability
|
||||
* resolves, the target creature won't be exiled.
|
||||
*
|
||||
* Auras attached to the exiled creature will be put into their owners' graveyards (unless
|
||||
* they have bestow). Equipment attached to the exiled creature will become unattached and
|
||||
* remain on the battlefield. Any counters on the exiled creature will cease to exist.
|
||||
* Auras attached to the exiled creature will be put into their owners'
|
||||
* graveyards (unless they have bestow). Equipment attached to the exiled
|
||||
* creature will become unattached and remain on the battlefield. Any counters
|
||||
* on the exiled creature will cease to exist.
|
||||
*
|
||||
* If a creature token is exiled, it ceases to exist. It won't be returned to the battlefield.
|
||||
* If a creature token is exiled, it ceases to exist. It won't be returned to
|
||||
* the battlefield.
|
||||
*
|
||||
* The exiled card returns to the battlefield immediately after Chained to the Rocks leaves
|
||||
* the battlefield. Nothing happens between the two events, including state-based actions.
|
||||
* The exiled card returns to the battlefield immediately after Chained to the
|
||||
* Rocks leaves the battlefield. Nothing happens between the two events,
|
||||
* including state-based actions.
|
||||
*
|
||||
* In a multiplayer game, if Chained to the Rocks's owner leaves the game, the exiled card
|
||||
* will return to the battlefield. Because the one-shot effect that returns the card isn't
|
||||
* an ability that goes on the stack, it won't cease to exist along with the leaving player's
|
||||
* spells and abilities on the stack.
|
||||
* In a multiplayer game, if Chained to the Rocks's owner leaves the game, the
|
||||
* exiled card will return to the battlefield. Because the one-shot effect that
|
||||
* returns the card isn't an ability that goes on the stack, it won't cease to
|
||||
* exist along with the leaving player's spells and abilities on the stack.
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
@ -86,6 +90,7 @@ public class ChainedToTheRocks extends CardImpl {
|
|||
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Mountain you control");
|
||||
private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
filterTarget.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
|
@ -96,7 +101,6 @@ public class ChainedToTheRocks extends CardImpl {
|
|||
this.expansionSetCode = "THS";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
|
||||
// Enchant Mountain you control
|
||||
TargetPermanent auraTarget = new TargetPermanent(filter);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
|
@ -144,7 +148,7 @@ class ChainedToTheRocksEffect extends OneShotEffect {
|
|||
// If Chained to the Rocks leaves the battlefield before its triggered ability resolves,
|
||||
// the target creature won't be exiled.
|
||||
if (permanent != null) {
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,22 +28,21 @@
|
|||
package mage.sets.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DamageEachOtherEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -67,9 +66,11 @@ public class PredatoryUrge extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
// Enchanted creature has "{tap}: This creature deals damage equal to its power to target creature.
|
||||
// That creature deals damage equal to its power to this creature."
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PredatoryUrgeEffect(), new TapSourceCost());
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEachOtherEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA)));
|
||||
Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA);
|
||||
effect.setText("Enchanted creature has \"{T}: This creature deals damage equal to its power to target creature. That creature deals damage equal to its power to this creature.\"");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public PredatoryUrge(final PredatoryUrge card) {
|
||||
|
@ -81,42 +82,3 @@ public class PredatoryUrge extends CardImpl {
|
|||
return new PredatoryUrge(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PredatoryUrgeEffect extends OneShotEffect {
|
||||
|
||||
public PredatoryUrgeEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "This creature deals damage equal to its power to target creature. That creature deals damage equal to its power to this creature.";
|
||||
}
|
||||
|
||||
public PredatoryUrgeEffect(final PredatoryUrgeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PredatoryUrgeEffect copy() {
|
||||
return new PredatoryUrgeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
boolean sourceOnBattlefield = true;
|
||||
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
|
||||
Permanent sourceCreature = game.getPermanent(source.getSourceId());
|
||||
if (sourceCreature == null) {
|
||||
sourceCreature = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||
sourceOnBattlefield = false;
|
||||
}
|
||||
|
||||
if (sourceCreature != null && targetCreature != null
|
||||
&& sourceCreature.getCardType().contains(CardType.CREATURE)
|
||||
&& targetCreature.getCardType().contains(CardType.CREATURE)) {
|
||||
targetCreature.damage(sourceCreature.getPower().getValue(), sourceCreature.getId(), game, false, true);
|
||||
if (sourceOnBattlefield) {
|
||||
sourceCreature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.abilities.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class BecomesTargetAttachedTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private final String enchantType;
|
||||
|
||||
public BecomesTargetAttachedTriggeredAbility(Effect effect) {
|
||||
this(effect, "creature");
|
||||
}
|
||||
|
||||
public BecomesTargetAttachedTriggeredAbility(Effect effect, String enchantType) {
|
||||
super(Zone.BATTLEFIELD, effect);
|
||||
this.enchantType = enchantType;
|
||||
}
|
||||
|
||||
public BecomesTargetAttachedTriggeredAbility(final BecomesTargetAttachedTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.enchantType = ability.enchantType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BecomesTargetAttachedTriggeredAbility copy() {
|
||||
return new BecomesTargetAttachedTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.TARGETED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanent(sourceId);
|
||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
if (event.getTargetId().equals(enchantment.getAttachedTo())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When enchanted " + enchantType + " becomes the target of a spell or ability, " + super.getRule();
|
||||
}
|
||||
}
|
|
@ -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.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class DamageEachOtherEffect extends OneShotEffect {
|
||||
|
||||
public DamageEachOtherEffect() {
|
||||
super(Outcome.Damage);
|
||||
}
|
||||
|
||||
public DamageEachOtherEffect(final DamageEachOtherEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DamageEachOtherEffect copy() {
|
||||
return new DamageEachOtherEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
boolean sourceOnBattlefield = true;
|
||||
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
|
||||
Permanent sourceCreature = game.getPermanent(source.getSourceId());
|
||||
if (sourceCreature == null) {
|
||||
sourceCreature = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||
sourceOnBattlefield = false;
|
||||
}
|
||||
|
||||
if (sourceCreature != null && targetCreature != null
|
||||
&& sourceCreature.getCardType().contains(CardType.CREATURE)
|
||||
&& targetCreature.getCardType().contains(CardType.CREATURE)) {
|
||||
targetCreature.damage(sourceCreature.getPower().getValue(), sourceCreature.getId(), game, false, true);
|
||||
if (sourceOnBattlefield) {
|
||||
sourceCreature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if(staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return "{this} deals damage equal to its power to target creature. That creature deals damage equal to its power to {this}";
|
||||
}
|
||||
|
||||
}
|
|
@ -77,6 +77,7 @@ public class RecoverAbility extends TriggeredAbilityImpl {
|
|||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getFromZone().equals(Zone.BATTLEFIELD) && zEvent.getToZone().equals(Zone.GRAVEYARD)) {
|
||||
if (zEvent.getTarget().getOwnerId().equals(getControllerId())
|
||||
&& zEvent.getTarget().getCardType().contains(CardType.CREATURE)
|
||||
&& !zEvent.getTarget().getId().equals(getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ public abstract class ExpansionSet implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
private void addToBooster(List<Card> booster, List<CardInfo> cards) {
|
||||
protected void addToBooster(List<Card> booster, List<CardInfo> cards) {
|
||||
if (!cards.isEmpty()) {
|
||||
CardInfo cardInfo = cards.remove(rnd.nextInt(cards.size()));
|
||||
if (cardInfo != null) {
|
||||
|
|
Loading…
Reference in a new issue