diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java index 0f5f41ee13d..28d7dbf6f3f 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java @@ -2454,6 +2454,9 @@ public class ScryfallImageSupportTokens { put("BLB/Treasure", "https://api.scryfall.com/cards/tblb/29/en?format=image"); put("BLB/Wall", "https://api.scryfall.com/cards/tblb/4/en?format=image"); + // BLC + put("BLC/Raccoon", "https://api.scryfall.com/cards/tblc/29/en?format=image"); + // generate supported sets supportedSets.clear(); for (String cardName : this.keySet()) { diff --git a/Mage.Sets/src/mage/cards/g/GourmandsTalent.java b/Mage.Sets/src/mage/cards/g/GourmandsTalent.java new file mode 100644 index 00000000000..de5d2daa165 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GourmandsTalent.java @@ -0,0 +1,116 @@ +package mage.cards.g; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.GainLifeFirstTimeTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainClassAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.ClassLevelAbility; +import mage.abilities.keyword.ClassReminderAbility; +import mage.abilities.token.FoodAbility; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.RaccoonToken; + +/** + * + * @author Grath + */ +public final class GourmandsTalent extends CardImpl { + + public GourmandsTalent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + + this.subtype.add(SubType.CLASS); + + // (Gain the next level as a sorcery to add its ability.) + this.addAbility(new ClassReminderAbility()); + + // During your turn, artifacts you control are Foods in addition to their other types and have "{2}, {T}, Sacrifice this artifact: You gain 3 life." + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new GourmandsTalentEffect(), MyTurnCondition.instance, "During your turn, artifacts you control " + + "are Foods in addition to their other types and have \"{2}, {T}, Sacrifice this artifact: You gain 3 " + + "life.\"" + ))); + + // {2}{G}: Level 2 + this.addAbility(new ClassLevelAbility(2, "{2}{G}")); + // Whenever you gain life for the first time each turn, create a 3/3 green Raccoon creature token. + this.addAbility(new SimpleStaticAbility(new GainClassAbilitySourceEffect( + new GainLifeFirstTimeTriggeredAbility(new CreateTokenEffect(new RaccoonToken())), 2))); + + // {3}{G}: Level 3 + this.addAbility(new ClassLevelAbility(3, "{3}{G}")); + + // Whenever you gain life for the first time each turn, put a +1/+1 counter on each creature you control. + this.addAbility(new SimpleStaticAbility(new GainClassAbilitySourceEffect( + new GainLifeFirstTimeTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE)), 3))); + } + + private GourmandsTalent(final GourmandsTalent card) { + super(card); + } + + @Override + public GourmandsTalent copy() { + return new GourmandsTalent(this); + } +} + +class GourmandsTalentEffect extends ContinuousEffectImpl { + + GourmandsTalentEffect() { + super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.AddAbility); + staticText = "Other creatures are Food artifacts in addition to their other types " + + "and have \"{2}, {T}, Sacrifice this permanent: You gain 3 life.\""; + this.dependencyTypes.add(DependencyType.AddingAbility); + } + + private GourmandsTalentEffect(final GourmandsTalentEffect effect) { + super(effect); + } + + @Override + public GourmandsTalentEffect copy() { + return new GourmandsTalentEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_ARTIFACT, source.getControllerId(), source, game)) { + if (permanent.getId().equals(source.getSourceId())) { + continue; + } + switch (layer) { + case TypeChangingEffects_4: + permanent.addSubType(game, SubType.FOOD); + break; + case AbilityAddingRemovingEffects_6: + permanent.addAbility(new FoodAbility(true), source.getSourceId(), game); + break; + } + } + return true; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.TypeChangingEffects_4 || layer == Layer.AbilityAddingRemovingEffects_6; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/BloomburrowCommander.java b/Mage.Sets/src/mage/sets/BloomburrowCommander.java index 75de07e68fe..a18386e107e 100644 --- a/Mage.Sets/src/mage/sets/BloomburrowCommander.java +++ b/Mage.Sets/src/mage/sets/BloomburrowCommander.java @@ -122,6 +122,7 @@ public final class BloomburrowCommander extends ExpansionSet { cards.add(new SetCardInfo("Golgari Rot Farm", 308, Rarity.UNCOMMON, mage.cards.g.GolgariRotFarm.class)); cards.add(new SetCardInfo("Golgari Signet", 272, Rarity.UNCOMMON, mage.cards.g.GolgariSignet.class)); cards.add(new SetCardInfo("Goreclaw, Terror of Qal Sisma", 222, Rarity.RARE, mage.cards.g.GoreclawTerrorOfQalSisma.class)); + cards.add(new SetCardInfo("Gourmand's Talent", 31, Rarity.RARE, mage.cards.g.GourmandsTalent.class)); cards.add(new SetCardInfo("Gratuitous Violence", 197, Rarity.RARE, mage.cards.g.GratuitousViolence.class)); cards.add(new SetCardInfo("Greater Good", 223, Rarity.RARE, mage.cards.g.GreaterGood.class)); cards.add(new SetCardInfo("Grim Backwoods", 309, Rarity.RARE, mage.cards.g.GrimBackwoods.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/RaccoonToken.java b/Mage/src/main/java/mage/game/permanent/token/RaccoonToken.java new file mode 100644 index 00000000000..95b5761e8ac --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/RaccoonToken.java @@ -0,0 +1,29 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author BetaSteward_at_googlemail.com + */ +public final class RaccoonToken extends TokenImpl { + + public RaccoonToken() { + super("Raccoon Token", "3/3 green Raccoon creature token"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.RACCOON); + power = new MageInt(3); + toughness = new MageInt(3); + } + + private RaccoonToken(final RaccoonToken token) { + super(token); + } + + @Override + public RaccoonToken copy() { + return new RaccoonToken(this); + } +} diff --git a/Mage/src/main/resources/tokens-database.txt b/Mage/src/main/resources/tokens-database.txt index f1257b16c0d..6fde7efd7db 100644 --- a/Mage/src/main/resources/tokens-database.txt +++ b/Mage/src/main/resources/tokens-database.txt @@ -2389,3 +2389,6 @@ |Generate|TOK:BLB|Sword|||SwordToken| |Generate|TOK:BLB|Treasure|||TreasureToken| |Generate|TOK:BLB|Wall|||WallWhiteToken| + +# BLC +|Generate|TOK:BLC|Racoon|||RaccoonToken|