From c6361cfa875abba697ebbc3caddb35cc663ed20c Mon Sep 17 00:00:00 2001 From: "Saga\\Robert" Date: Tue, 1 Aug 2017 14:52:50 +0200 Subject: [PATCH 1/2] - added Sword of Dungeons & Dragons - added HASCON Promo 2017 set - added sword to H17 and UST --- .../cards/s/SwordOfDungeonsAndDragons.java | 171 ++++++++++++++++++ Mage.Sets/src/mage/sets/HasconPromo2017.java | 49 +++++ Mage.Sets/src/mage/sets/Unstable.java | 3 +- 3 files changed, 222 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/s/SwordOfDungeonsAndDragons.java create mode 100644 Mage.Sets/src/mage/sets/HasconPromo2017.java diff --git a/Mage.Sets/src/mage/cards/s/SwordOfDungeonsAndDragons.java b/Mage.Sets/src/mage/cards/s/SwordOfDungeonsAndDragons.java new file mode 100644 index 0000000000..91e15e9001 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SwordOfDungeonsAndDragons.java @@ -0,0 +1,171 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.DragonTokenGold; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author Saga + */ +public class SwordOfDungeonsAndDragons extends CardImpl { + + private static final FilterCard filter = new FilterCard("Rogues and from Clerics"); + static {filter.add(Predicates.or( + new SubtypePredicate(SubType.ROGUE), + new SubtypePredicate(SubType.CLERIC) + )); + } + + public SwordOfDungeonsAndDragons(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + this.subtype.add("Equipment"); + + // Equipped creature gets +2/+2 and has protection from Rogues and from Clerics. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)); + Effect effect = new GainAbilityAttachedEffect(new ProtectionAbility(filter), AttachmentType.EQUIPMENT); + effect.setText("and has protection from Rogues and from Clerics"); + ability.addEffect(effect); + this.addAbility(ability); + + // Whenever equipped creature deals combat damage to a player, you create a 4/4 gold Dragon creature token with flying and roll a d20. If you roll a 20, repeat this process. + this.addAbility(new SwordOfDungeonsAndDragonsAbility()); + + // Equip {2} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + } + + public SwordOfDungeonsAndDragons(final SwordOfDungeonsAndDragons card) { + super(card); + } + + @Override + public SwordOfDungeonsAndDragons copy() { + return new SwordOfDungeonsAndDragons(this); + } +} + +class SwordOfDungeonsAndDragonsAbility extends TriggeredAbilityImpl { + + public SwordOfDungeonsAndDragonsAbility() { + super(Zone.BATTLEFIELD, new SwordOfDungeonsAndDragonsEffect(),false); + } + + public SwordOfDungeonsAndDragonsAbility(final SwordOfDungeonsAndDragonsAbility ability) { + super(ability); + } + + @Override + public SwordOfDungeonsAndDragonsAbility copy() { + return new SwordOfDungeonsAndDragonsAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event; + Permanent p = game.getPermanent(event.getSourceId()); + if (damageEvent.isCombatDamage() && p != null && p.getAttachments().contains(this.getSourceId())) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getPlayerId())); + } + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever equipped creature deals combat damage to a player, you create a 4/4 gold Dragon creature token with flying and roll a d20. If you roll a 20, repeat this process."; + } +} + +class SwordOfDungeonsAndDragonsEffect extends OneShotEffect { + + public SwordOfDungeonsAndDragonsEffect() { + super(Outcome.Benefit); + } + + public SwordOfDungeonsAndDragonsEffect(final SwordOfDungeonsAndDragonsEffect effect) { + super(effect); + } + + @Override + public SwordOfDungeonsAndDragonsEffect copy() { + return new SwordOfDungeonsAndDragonsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int count = 1; + int dice = (int)(Math.random()*20+1); + while (dice == 20) { + count += 1; + dice = (int)(Math.random()*20+1); + } + return new CreateTokenEffect(new DragonTokenGold(), count).apply(game, source); + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/HasconPromo2017.java b/Mage.Sets/src/mage/sets/HasconPromo2017.java new file mode 100644 index 0000000000..7b83761826 --- /dev/null +++ b/Mage.Sets/src/mage/sets/HasconPromo2017.java @@ -0,0 +1,49 @@ +/* +* 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; + +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * + * @author Saga + */ +public class HasconPromo2017 extends ExpansionSet { + private static final HasconPromo2017 instance = new HasconPromo2017(); + + public static HasconPromo2017 getInstance() { + return instance; + } + + private HasconPromo2017() { + super("HASCON Promo 2017", "H17", ExpansionSet.buildDate(2017, 9, 8), SetType.JOKESET); + cards.add(new ExpansionSet.SetCardInfo("Sword of Dungeons & Dragons", 3, Rarity.MYTHIC, mage.cards.s.SwordOfDungeonsAndDragons.class)); + } +} diff --git a/Mage.Sets/src/mage/sets/Unstable.java b/Mage.Sets/src/mage/sets/Unstable.java index 4520e4096e..147fec1ae4 100644 --- a/Mage.Sets/src/mage/sets/Unstable.java +++ b/Mage.Sets/src/mage/sets/Unstable.java @@ -28,6 +28,7 @@ package mage.sets; import mage.cards.ExpansionSet; +import mage.constants.Rarity; import mage.constants.SetType; /** @@ -43,6 +44,6 @@ public class Unstable extends ExpansionSet { private Unstable() { super("Unstable", "UST", ExpansionSet.buildDate(2017, 12, 8), SetType.JOKESET); - + cards.add(new SetCardInfo("Sword of Dungeons and Dragons", 1, Rarity.MYTHIC, mage.cards.s.SwordOfDungeonsAndDragons.class)); } } From 2e1a820040d1083b885be81665d9f058c5243d4b Mon Sep 17 00:00:00 2001 From: "Saga\\Robert" Date: Tue, 1 Aug 2017 14:55:17 +0200 Subject: [PATCH 2/2] - added gold color - added gold Dragon Token - edited new set data (H17) for Sword of Dungeons and Dragons --- .../src/main/resources/card-pictures-tok.txt | 2 + .../src/main/resources/image.url.properties | 4 +- Mage/src/main/java/mage/ObjectColor.java | 92 +++++++++++++++++-- .../mage/constants/ColoredManaSymbol.java | 7 +- .../game/permanent/token/DragonTokenGold.java | 69 ++++++++++++++ Utils/known-sets.txt | 1 + Utils/mtg-cards-data.txt | 1 + Utils/mtg-sets-data.txt | 1 + 8 files changed, 165 insertions(+), 12 deletions(-) create mode 100644 Mage/src/main/java/mage/game/permanent/token/DragonTokenGold.java diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 30001db1f2..c172c971f3 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -587,6 +587,7 @@ |Generate|TOK:GTC|Soldier|2||SoldierTokenWithHaste| |Generate|TOK:GTC|Spirit|||TeysaEnvoyOfGhostsToken| |Generate|TOK:H09|Sliver|||SliversmithToken| +|Generate|TOK:H17|Dragon|||DragonTokenGold| |Generate|TOK:HML|Plant Wall|||KelpToken| |Generate|TOK:HML|Serf|||SerfToken| |Generate|TOK:HML|Skeleton|||SkeletonToken| @@ -1060,6 +1061,7 @@ |Generate|TOK:USG|Goblin|||GoblinToken| |Generate|TOK:USG|Minion|||MinionToken| |Generate|TOK:USG|Saproling|||SaprolingToken| +|Generate|TOK:UST|Dragon|||DragonTokenGold| |Generate|TOK:V10|Wolf|||WolfToken| |Generate|TOK:V11|Faerie Rogue|||OonaQueenFaerieToken| |Generate|TOK:V12|Spirit|||SpiritToken| diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index d4c38898fc..3415b291f2 100644 --- a/Mage.Client/src/main/resources/image.url.properties +++ b/Mage.Client/src/main/resources/image.url.properties @@ -74,6 +74,6 @@ dd3evg=ddaevg dd3gvl=ddagvl dd3jvc=ddajvc # Remove setname as soon as the images can be downloaded -ignore.urls=TOK,DDT,V17,IMA,XLN,RIX,,E02,M19,M25,DOM +ignore.urls=TOK,DDT,V17,IMA,XLN,RIX,,E02,M19,M25,DOM,UST,H17 # sets ordered by release time (newest goes first) -token.lookup.order=M19,M25,DOM,E02,RIX,XLN,IMA,C17,V17,E01,DDT,CMA,HOU,MM3,DDS,AKH,DD3DVD,DD3EVG,DD3GVL,DD3JVC,H09,AER,PCA,C16,V16,MPS,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,DRB,V09,V10,V11,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file +token.lookup.order=M19,M25,DOM,E02,RIX,UST,XLN,IMA,H17,C17,V17,E01,DDT,CMA,HOU,MM3,DDS,AKH,DD3DVD,DD3EVG,DD3GVL,DD3JVC,H09,AER,PCA,C16,V16,MPS,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,DRB,V09,V10,V11,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file diff --git a/Mage/src/main/java/mage/ObjectColor.java b/Mage/src/main/java/mage/ObjectColor.java index c0f019be4a..1401c8f7db 100644 --- a/Mage/src/main/java/mage/ObjectColor.java +++ b/Mage/src/main/java/mage/ObjectColor.java @@ -42,12 +42,16 @@ public class ObjectColor implements Serializable, Copyable, Compara public static final ObjectColor BLACK = new ObjectColor("B"); public static final ObjectColor RED = new ObjectColor("R"); public static final ObjectColor GREEN = new ObjectColor("G"); + + public static final ObjectColor GOLD = new ObjectColor("O"); private boolean white; private boolean blue; private boolean black; private boolean red; private boolean green; + + private boolean gold; public ObjectColor() { } @@ -70,6 +74,10 @@ public class ObjectColor implements Serializable, Copyable, Compara case 'G': green = true; break; + + case 'O': + gold = true; + break; } } } @@ -80,6 +88,8 @@ public class ObjectColor implements Serializable, Copyable, Compara black = color.black; red = color.red; green = color.green; + + gold = color.gold; } /** @@ -96,6 +106,8 @@ public class ObjectColor implements Serializable, Copyable, Compara newColor.black = black || other.black; newColor.red = red || other.red; newColor.green = green || other.green; + + newColor.gold = gold || other.gold; return newColor; } @@ -116,6 +128,10 @@ public class ObjectColor implements Serializable, Copyable, Compara if (red) { count++; } + + if (gold) { + count++; + } return count; } @@ -136,6 +152,10 @@ public class ObjectColor implements Serializable, Copyable, Compara if (this.isGreen()) { colors.add(ObjectColor.GREEN); } + + if (this.isGold()) { + colors.add(ObjectColor.GOLD); + } return colors; } @@ -145,6 +165,8 @@ public class ObjectColor implements Serializable, Copyable, Compara this.setGreen(color.isGreen()); this.setRed(color.isRed()); this.setWhite(color.isWhite()); + + this.setGold(color.isGold()); } public void addColor(ObjectColor color) { @@ -163,6 +185,10 @@ public class ObjectColor implements Serializable, Copyable, Compara if (color.isGreen()) { setGreen(true); } + + if (color.isGold()) { + setGold(true); + } } public boolean isColorless() { @@ -170,23 +196,32 @@ public class ObjectColor implements Serializable, Copyable, Compara } public boolean hasColor() { - return white || blue || black || red || green; + return white || blue || black || red || green + || gold; } public boolean isMulticolored() { if (isColorless()) { return false; } - if (white && (blue || black || red || green)) { + if (white && (blue || black || red || green + || gold)) { return true; } - if (blue && (black || red || green)) { + if (blue && (black || red || green + || gold)) { return true; } - if (black && (red || green)) { + if (black && (red || green + || gold)) { return true; } - return red && green; + if (red && (green + || gold)) { + return true; + } + return green + && gold; } public boolean isWhite() { @@ -228,6 +263,15 @@ public class ObjectColor implements Serializable, Copyable, Compara public void setGreen(boolean green) { this.green = green; } + + + public boolean isGold() { + return gold; + } + + public void setGold(boolean gold) { + this.gold = gold; + } @Override public String toString() { @@ -247,6 +291,10 @@ public class ObjectColor implements Serializable, Copyable, Compara if (green) { sb.append('G'); } + + if (gold) { + sb.append('O'); + } return sb.toString(); } @@ -269,6 +317,10 @@ public class ObjectColor implements Serializable, Copyable, Compara if (green) { return "green"; } + + if (gold) { + return "gold"; + } } return "colorless"; } @@ -294,7 +346,10 @@ public class ObjectColor implements Serializable, Copyable, Compara if (test.red != this.red) { return false; } - return test.green == this.green; + if (test.green != this.green) { + return false; + } + return test.gold == this.gold; } @Override @@ -305,6 +360,8 @@ public class ObjectColor implements Serializable, Copyable, Compara hash = 23 * hash + (this.black ? 1 : 0); hash = 23 * hash + (this.red ? 1 : 0); hash = 23 * hash + (this.green ? 1 : 0); + + hash = 23 * hash + (this.gold ? 1 : 0); return hash; } @@ -327,6 +384,10 @@ public class ObjectColor implements Serializable, Copyable, Compara if (color.green && this.green) { return true; } + + if (color.gold && this.gold) { + return true; + } return false; } @@ -334,7 +395,8 @@ public class ObjectColor implements Serializable, Copyable, Compara // 105.4. [...] “Multicolored” is not a color. Neither is “colorless.” return !color.isColorless() && (color.white && white || color.blue && blue || color.black && black - || color.red && red || color.green && green); + || color.red && red || color.green && green + || color.gold && gold); } @Override @@ -348,7 +410,7 @@ public class ObjectColor implements Serializable, Copyable, Compara int o2 = 0; if (this.isMulticolored()) { - o1 = 6; + o1 = 7; } else if (this.isColorless()) { o1 = 0; } else if (this.isBlack()) { @@ -361,9 +423,12 @@ public class ObjectColor implements Serializable, Copyable, Compara o1 = 4; } else if (this.isWhite()) { o1 = 5; + + } else if (this.isGold()) { + o1 = 6; } if (o.isMulticolored()) { - o2 = 6; + o2 = 7; } else if (o.isColorless()) { o2 = 0; } else if (o.isBlack()) { @@ -376,6 +441,9 @@ public class ObjectColor implements Serializable, Copyable, Compara o2 = 4; } else if (o.isWhite()) { o2 = 5; + + } else if (o.isGold()) { + o2 = 6; } return o1 - o2; } @@ -402,6 +470,10 @@ public class ObjectColor implements Serializable, Copyable, Compara if (isWhite()) { return ColoredManaSymbol.W; } + + if (isGold()) { + return ColoredManaSymbol.O; + } return null; } @@ -412,6 +484,8 @@ public class ObjectColor implements Serializable, Copyable, Compara colors.add(ObjectColor.BLACK); colors.add(ObjectColor.RED); colors.add(ObjectColor.GREEN); + + colors.add(ObjectColor.GOLD); return colors; } diff --git a/Mage/src/main/java/mage/constants/ColoredManaSymbol.java b/Mage/src/main/java/mage/constants/ColoredManaSymbol.java index 09242c62cc..a6d210d938 100644 --- a/Mage/src/main/java/mage/constants/ColoredManaSymbol.java +++ b/Mage/src/main/java/mage/constants/ColoredManaSymbol.java @@ -5,7 +5,9 @@ package mage.constants; * @author North */ public enum ColoredManaSymbol { - W("W","white"), U("U","blue"), B("B","black"), R("R","red"), G("G","green"); + W("W","white"), U("U","blue"), B("B","black"), R("R","red"), G("G","green"), + O("O","gold"); + private final String text; private final String colorName; @@ -38,6 +40,9 @@ public enum ColoredManaSymbol { return B; case 'U': return U; + + case 'O': + return O; } return null; } diff --git a/Mage/src/main/java/mage/game/permanent/token/DragonTokenGold.java b/Mage/src/main/java/mage/game/permanent/token/DragonTokenGold.java new file mode 100644 index 0000000000..7d6ab86563 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/DragonTokenGold.java @@ -0,0 +1,69 @@ +/* +* 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.game.permanent.token; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.CardType; + +/** + * + * @author Saga + */ +public class DragonTokenGold extends Token { + + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("UST","H17")); + } + + public DragonTokenGold() { + this(null, 0); + } + + public DragonTokenGold(String setCode) { + this(setCode, 0); + } + + public DragonTokenGold(String setCode, int tokenType) { + super("Dragon", "4/4 gold Dragon creature token with flying"); + availableImageSetCodes = tokenImageSets; + setOriginalExpansionSetCode(setCode); + cardType.add(CardType.CREATURE); + color.setGold(true); + subtype.add("Dragon"); + power = new MageInt(4); + toughness = new MageInt(4); + addAbility(FlyingAbility.getInstance()); + } +} \ No newline at end of file diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index cf08e875b8..1f20dfa9a9 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -89,6 +89,7 @@ Gatecrash|Gatecrash| Grand Prix|GrandPrix| Guildpact|Guildpact| Guru|Guru| +HASCON Promo 2017|HasconPromo2017| Homelands|Homelands| Hour of Devastation|HourOfDevastation| Ice Age|IceAge| diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 6008fc0f6a..330448036e 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32065,3 +32065,4 @@ Drowned Catacomb|Ixalan|???|R||Land|||Drowned Catacomb enters the battlefield ta Glacial Fortress|Ixalan|???|R||Land|||Glacial Fortress enters the battlefield tapped unless you control a Plains or an Island.${T}: Add {W} or {U} to your mana pool.| Rootbound Crag|Ixalan|???|R||Land|||Rootbound Crag enters the battlefield tapped unless you control a Mountain or a Forest.${T}: Add {R} or {G} to your mana pool.| Sunpetal Grove|Ixalan|???|R||Land|||Sunpetal Grove enters the battlefield tapped unless you control a Forest or a Plains.${T}: Add {G} or {W} to your mana pool.| +Sword of Dungeons and Dragons|Unstable|1|M|{3}|Artifact - Equipment|||Equipped creature gets +2/+2 and has protection from Rogues and from Clerics.$Whenever equipped creature deals combat damage to a player, create a 4/4 gold Dragon creature token with flying and roll a d20. If you roll a 20, repeat this process.$Equip {2}| diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index a1be938d68..b1ce026994 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -180,6 +180,7 @@ Urza's Legacy|ULG| Unhinged|UNH| Urza's Saga|USG| Unstable|UST| +HASCON Promo 2017|H17| From the Vault: Exiled|V09| From the Vault: Relics|V10| From the Vault: Legends|V11|