mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge pull request #1130 from LoneFox78/master
New cards and cleanup work
This commit is contained in:
commit
b284d6e204
46 changed files with 1294 additions and 251 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);
|
super("Champions of Kamigawa", "CHK", "mage.sets.championsofkamigawa", new GregorianCalendar(2004, 9, 1).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Kamigawa";
|
this.blockName = "Kamigawa";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -47,8 +47,8 @@ public class ClassicSixthEdition extends ExpansionSet {
|
||||||
private ClassicSixthEdition() {
|
private ClassicSixthEdition() {
|
||||||
super("Classic Sixth Edition", "6ED", "mage.sets.classicsixthedition", new GregorianCalendar(1999, 3, 28).getTime(), SetType.CORE);
|
super("Classic Sixth Edition", "6ED", "mage.sets.classicsixthedition", new GregorianCalendar(1999, 3, 28).getTime(), SetType.CORE);
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -15,8 +15,8 @@ public class FifthEdition extends ExpansionSet {
|
||||||
private FifthEdition() {
|
private FifthEdition() {
|
||||||
super("Fifth Edition", "5ED", "mage.sets.fifthedition", new GregorianCalendar(1997, 3, 1).getTime(), SetType.CORE);
|
super("Fifth Edition", "5ED", "mage.sets.fifthedition", new GregorianCalendar(1997, 3, 1).getTime(), SetType.CORE);
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -47,8 +47,8 @@ public class FourthEdition extends ExpansionSet {
|
||||||
private FourthEdition() {
|
private FourthEdition() {
|
||||||
super("Fourth Edition", "4ED", "mage.sets.fourthedition", new GregorianCalendar(1995, 3, 1).getTime(), SetType.CORE);
|
super("Fourth Edition", "4ED", "mage.sets.fourthedition", new GregorianCalendar(1995, 3, 1).getTime(), SetType.CORE);
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -49,8 +49,8 @@ public class FutureSight extends ExpansionSet {
|
||||||
this.parentSet = TimeSpiral.getInstance();
|
this.parentSet = TimeSpiral.getInstance();
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Ice Age", "ICE", "mage.sets.iceage", new GregorianCalendar(1995, 5, 1).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Ice Age";
|
this.blockName = "Ice Age";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -46,8 +46,8 @@ public class Invasion extends ExpansionSet {
|
||||||
super("Invasion", "INV", "mage.sets.invasion", new GregorianCalendar(2000, 9, 2).getTime(), SetType.EXPANSION);
|
super("Invasion", "INV", "mage.sets.invasion", new GregorianCalendar(2000, 9, 2).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Invasion";
|
this.blockName = "Invasion";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -49,8 +49,8 @@ public class Judgment extends ExpansionSet {
|
||||||
this.parentSet = Odyssey.getInstance();
|
this.parentSet = Odyssey.getInstance();
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Legends", "LEG", "mage.sets.legends", new GregorianCalendar(1994, 5, 1).getTime(), SetType.EXPANSION);
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -20,8 +20,8 @@ public class LimitedEditionAlpha extends ExpansionSet {
|
||||||
private LimitedEditionAlpha() {
|
private LimitedEditionAlpha() {
|
||||||
super("Limited Edition Alpha", "LEA", "mage.sets.limitedalpha", new GregorianCalendar(1993, 7, 1).getTime(), SetType.CORE);
|
super("Limited Edition Alpha", "LEA", "mage.sets.limitedalpha", new GregorianCalendar(1993, 7, 1).getTime(), SetType.CORE);
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -20,8 +20,8 @@ public class LimitedEditionBeta extends ExpansionSet {
|
||||||
private LimitedEditionBeta() {
|
private LimitedEditionBeta() {
|
||||||
super("Limited Edition Beta", "LEB", "mage.sets.limitedbeta", new GregorianCalendar(1993, 9, 1).getTime(), SetType.CORE);
|
super("Limited Edition Beta", "LEB", "mage.sets.limitedbeta", new GregorianCalendar(1993, 9, 1).getTime(), SetType.CORE);
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Lorwyn", "LRW", "mage.sets.lorwyn", new GregorianCalendar(2007, 9, 12).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Lorwyn";
|
this.blockName = "Lorwyn";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Mercadian Masques", "MMQ", "mage.sets.mercadianmasques", new GregorianCalendar(1999, 8, 25).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Masques";
|
this.blockName = "Masques";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Mirage", "MIR", "mage.sets.mirage", new GregorianCalendar(1996, 8, 21).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Mirage";
|
this.blockName = "Mirage";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Mirrodin", "MRD", "mage.sets.mirrodin", new GregorianCalendar(2003, 9, 2).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Mirrodin";
|
this.blockName = "Mirrodin";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Odyssey", "ODY", "mage.sets.odyssey", new GregorianCalendar(2001, 9, 22).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Odyssey";
|
this.blockName = "Odyssey";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -16,8 +16,8 @@ public class Onslaught extends ExpansionSet {
|
||||||
super("Onslaught", "ONS", "mage.sets.onslaught", new GregorianCalendar(2002, 10, 7).getTime(), SetType.EXPANSION);
|
super("Onslaught", "ONS", "mage.sets.onslaught", new GregorianCalendar(2002, 10, 7).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Onslaught";
|
this.blockName = "Onslaught";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Ravnica: City of Guilds", "RAV", "mage.sets.ravnica", new GregorianCalendar(2005, 9, 24).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Ravnica";
|
this.blockName = "Ravnica";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -20,8 +20,8 @@ public class RevisedEdition extends ExpansionSet {
|
||||||
private RevisedEdition() {
|
private RevisedEdition() {
|
||||||
super("Revised Edition", "3ED", "mage.sets.revisededition", new GregorianCalendar(1994, 3, 1).getTime(), SetType.CORE);
|
super("Revised Edition", "3ED", "mage.sets.revisededition", new GregorianCalendar(1994, 3, 1).getTime(), SetType.CORE);
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Shadowmoor", "SHM", "mage.sets.shadowmoor", new GregorianCalendar(2008, 4, 2).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Shadowmoor";
|
this.blockName = "Shadowmoor";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Tempest", "TMP", "mage.sets.tempest", new GregorianCalendar(1997, 9, 1).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Tempest";
|
this.blockName = "Tempest";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package mage.sets;
|
package mage.sets;
|
||||||
|
|
||||||
import mage.cards.ExpansionSet;
|
|
||||||
import mage.constants.SetType;
|
|
||||||
|
|
||||||
import java.util.GregorianCalendar;
|
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 {
|
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);
|
super("Time Spiral", "TSP", "mage.sets.timespiral", new GregorianCalendar(2006, 9, 9).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Time Spiral";
|
this.blockName = "Time Spiral";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 11;
|
this.numBoosterCommon = 10;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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.parentSet = UrzasSaga.getInstance();
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -51,8 +51,8 @@ public class UrzasLegacy extends ExpansionSet {
|
||||||
this.parentSet = UrzasSaga.getInstance();
|
this.parentSet = UrzasSaga.getInstance();
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
super("Urza's Saga", "USG", "mage.sets.urzassaga", new GregorianCalendar(1998, 10, 1).getTime(), SetType.EXPANSION);
|
||||||
this.blockName = "Urza";
|
this.blockName = "Urza";
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
|
|
|
@ -51,8 +51,8 @@ public class Weatherlight extends ExpansionSet {
|
||||||
this.parentSet = Mirage.getInstance();
|
this.parentSet = Mirage.getInstance();
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
this.hasBoosters = true;
|
this.hasBoosters = true;
|
||||||
this.numBoosterLands = 1;
|
this.numBoosterLands = 0;
|
||||||
this.numBoosterCommon = 10;
|
this.numBoosterCommon = 11;
|
||||||
this.numBoosterUncommon = 3;
|
this.numBoosterUncommon = 3;
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
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);
|
||||||
|
}
|
||||||
|
}
|
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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,7 +30,7 @@ package mage.sets.magic2010;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
import mage.abilities.effects.common.DestroySourceEffect;
|
import mage.abilities.effects.common.DestroySourceEffect;
|
||||||
|
@ -41,10 +41,6 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
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.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
@ -71,7 +67,7 @@ public class IceCage extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect()));
|
||||||
|
|
||||||
// When enchanted creature becomes the target of a spell or ability, destroy Ice Cage.
|
// 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) {
|
public IceCage(final IceCage card) {
|
||||||
|
@ -83,41 +79,3 @@ public class IceCage extends CardImpl {
|
||||||
return new IceCage(this);
|
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}.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
package mage.sets.magic2014;
|
package mage.sets.magic2014;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
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.effects.common.continuous.BoostEnchantedEffect;
|
||||||
import mage.abilities.keyword.EnchantAbility;
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -40,10 +40,6 @@ import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
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.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
@ -67,7 +63,7 @@ public class IllusionaryArmor extends CardImpl {
|
||||||
// Enchanted creature gets +4/+4.
|
// Enchanted creature gets +4/+4.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(4, 4, Duration.WhileOnBattlefield)));
|
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.
|
// 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) {
|
public IllusionaryArmor(final IllusionaryArmor card) {
|
||||||
|
@ -79,42 +75,3 @@ public class IllusionaryArmor extends CardImpl {
|
||||||
return new IllusionaryArmor(this);
|
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}.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
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);
|
||||||
|
}
|
||||||
|
}
|
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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,24 +29,20 @@ package mage.sets.shardsofalara;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.Mode;
|
|
||||||
import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility;
|
import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DamageEachOtherEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,7 +62,7 @@ public class VeinDrinker extends CardImpl {
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
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.
|
// {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.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
@ -83,39 +79,3 @@ public class VeinDrinker extends CardImpl {
|
||||||
return new VeinDrinker(this);
|
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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -28,22 +28,21 @@
|
||||||
package mage.sets.zendikar;
|
package mage.sets.zendikar;
|
||||||
|
|
||||||
import java.util.UUID;
|
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.AttachmentType;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
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.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
@ -67,9 +66,11 @@ public class PredatoryUrge extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
// Enchanted creature has "{tap}: This creature deals damage equal to its power to target creature.
|
// 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."
|
// 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());
|
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) {
|
public PredatoryUrge(final PredatoryUrge card) {
|
||||||
|
@ -81,42 +82,3 @@ public class PredatoryUrge extends CardImpl {
|
||||||
return new PredatoryUrge(this);
|
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}";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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()) {
|
if (!cards.isEmpty()) {
|
||||||
CardInfo cardInfo = cards.remove(rnd.nextInt(cards.size()));
|
CardInfo cardInfo = cards.remove(rnd.nextInt(cards.size()));
|
||||||
if (cardInfo != null) {
|
if (cardInfo != null) {
|
||||||
|
|
Loading…
Reference in a new issue