[CMR] Implemented Toggo, Goblin Weaponsmith

This commit is contained in:
Evan Kranzler 2020-11-05 09:03:48 -05:00
parent edca0c5089
commit c994b82ce3
5 changed files with 88 additions and 2 deletions

View file

@ -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()
)));

View file

@ -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);
}
}

View file

@ -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));

View file

@ -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;
}

View file

@ -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);
}
}