diff --git a/Mage.Sets/src/mage/cards/b/BlazingTorch.java b/Mage.Sets/src/mage/cards/b/BlazingTorch.java index c670d994054..f78a9cd675d 100644 --- a/Mage.Sets/src/mage/cards/b/BlazingTorch.java +++ b/Mage.Sets/src/mage/cards/b/BlazingTorch.java @@ -47,7 +47,7 @@ public final class BlazingTorch extends CardImpl { // Equipped creature has "{tap}, Sacrifice Blazing Torch: Blazing Torch deals 2 damage to any target." this.addAbility(new SimpleStaticAbility(new GainAbilityWithAttachmentEffect( - "equipped creature has \"{tap}, Sacrifice {this}: {this} deals 2 damage to any target.\"", + "equipped creature has \"{T}, Sacrifice {this}: {this} deals 2 damage to any target.\"", new BlazingTorchEffect(), new TargetAnyTarget(), new SacrificeAttachmentCost(), new TapSourceCost() ))); diff --git a/Mage.Sets/src/mage/cards/t/ToggoGoblinWeaponsmith.java b/Mage.Sets/src/mage/cards/t/ToggoGoblinWeaponsmith.java new file mode 100644 index 00000000000..c4bccbfcce7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ToggoGoblinWeaponsmith.java @@ -0,0 +1,48 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.PartnerAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.RockToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ToggoGoblinWeaponsmith extends CardImpl { + + public ToggoGoblinWeaponsmith(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever a land enters the battlefield under your control, create an artifact equipment token named Rock wih "Equipped creature has '{1}, {T}, Sacrifice Rock: This creature deals 2 damage to any target'" and equip {1}. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + new CreateTokenEffect(new RockToken()), StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT + )); + + // Partner + this.addAbility(PartnerAbility.getInstance()); + } + + private ToggoGoblinWeaponsmith(final ToggoGoblinWeaponsmith card) { + super(card); + } + + @Override + public ToggoGoblinWeaponsmith copy() { + return new ToggoGoblinWeaponsmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegends.java b/Mage.Sets/src/mage/sets/CommanderLegends.java index a140fb6e8bb..ee0f679df41 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegends.java +++ b/Mage.Sets/src/mage/sets/CommanderLegends.java @@ -270,6 +270,7 @@ public final class CommanderLegends extends ExpansionSet { cards.add(new SetCardInfo("Thought Vessel", 346, Rarity.UNCOMMON, mage.cards.t.ThoughtVessel.class)); cards.add(new SetCardInfo("Thrasios, Triton Hero", 538, Rarity.MYTHIC, mage.cards.t.ThrasiosTritonHero.class)); cards.add(new SetCardInfo("Three Visits", 261, Rarity.UNCOMMON, mage.cards.t.ThreeVisits.class)); + cards.add(new SetCardInfo("Toggo, Goblin Weaponsmith", 204, Rarity.UNCOMMON, mage.cards.t.ToggoGoblinWeaponsmith.class)); cards.add(new SetCardInfo("Tormod, the Desecrator", 155, Rarity.UNCOMMON, mage.cards.t.TormodTheDesecrator.class)); cards.add(new SetCardInfo("Training Center", 358, Rarity.RARE, mage.cards.t.TrainingCenter.class)); cards.add(new SetCardInfo("Tymna the Weaver", 539, Rarity.MYTHIC, mage.cards.t.TymnaTheWeaver.class)); diff --git a/Mage/src/main/java/mage/abilities/costs/common/SacrificeAttachmentCost.java b/Mage/src/main/java/mage/abilities/costs/common/SacrificeAttachmentCost.java index b8a52ab9003..daa3ac03a28 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/SacrificeAttachmentCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/SacrificeAttachmentCost.java @@ -35,7 +35,9 @@ public class SacrificeAttachmentCost extends UseAttachedCost { continue; } Permanent attachment = game.getPermanent(attachmentId); - paid = attachment != null && attachment.sacrifice(sourceId, game); + paid = attachment != null + && attachment.isControlledBy(controllerId) + && attachment.sacrifice(sourceId, game); if (paid) { break; } diff --git a/Mage/src/main/java/mage/game/permanent/token/RockToken.java b/Mage/src/main/java/mage/game/permanent/token/RockToken.java new file mode 100644 index 00000000000..db464197223 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/RockToken.java @@ -0,0 +1,35 @@ +package mage.game.permanent.token; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeAttachmentCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityWithAttachmentEffect; +import mage.abilities.keyword.EquipAbility; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetAnyTarget; + +public final class RockToken extends TokenImpl { + + public RockToken() { + super("Rock", "artifact equipment token named Rock with \"Equipped creature has '{1}, {T}, Sacrifice Rock: This creature deals 2 damage to any target'\" and equip {1}"); + cardType.add(CardType.ARTIFACT); + subtype.add(SubType.EQUIPMENT); + + this.addAbility(new SimpleStaticAbility(new GainAbilityWithAttachmentEffect( + "equipped creature has \"{1}, {T}, Sacrifice {this}: This creature deals 2 damage to any target.\"", + new DamageTargetEffect(2), new TargetAnyTarget(), new SacrificeAttachmentCost(), new GenericManaCost(1), new TapSourceCost() + ))); + this.addAbility(new EquipAbility(1)); + } + + public RockToken(final RockToken token) { + super(token); + } + + public RockToken copy() { + return new RockToken(this); + } +}