mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
[BLC] Implement Sword of the Squeak
This commit is contained in:
parent
52330046f8
commit
4bbd5db74b
2 changed files with 74 additions and 0 deletions
73
Mage.Sets/src/mage/cards/s/SwordOfTheSqueak.java
Normal file
73
Mage.Sets/src/mage/cards/s/SwordOfTheSqueak.java
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.BasePowerPredicate;
|
||||
import mage.filter.predicate.mageobject.BaseToughnessPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SwordOfTheSqueak extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("creature you control with base power or toughness 1");
|
||||
private static final FilterPermanent filter2
|
||||
= new FilterControlledPermanent("a Hamster, Mouse, Rat, or Squirrel you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new BasePowerPredicate(ComparisonType.EQUAL_TO, 1),
|
||||
new BaseToughnessPredicate(ComparisonType.EQUAL_TO, 1)
|
||||
));
|
||||
filter2.add(Predicates.or(
|
||||
SubType.HAMSTER.getPredicate(),
|
||||
SubType.MOUSE.getPredicate(),
|
||||
SubType.RAT.getPredicate(),
|
||||
SubType.SQUIRREL.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, 1);
|
||||
|
||||
public SwordOfTheSqueak(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature gets +1/+1 for each creature you control with base power or toughness 1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(xValue, xValue)));
|
||||
|
||||
// Whenever a Hamster, Mouse, Rat, or Squirrel you control enters, you may attach Sword of the Squeak to that creature.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new AttachEffect(Outcome.BoostCreature, "attach {this} to that creature"),
|
||||
filter2, true, SetTargetPointer.PERMANENT
|
||||
));
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(2));
|
||||
}
|
||||
|
||||
private SwordOfTheSqueak(final SwordOfTheSqueak card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwordOfTheSqueak copy() {
|
||||
return new SwordOfTheSqueak(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -280,6 +280,7 @@ public final class BloomburrowCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Swarmyard", 133, Rarity.RARE, mage.cards.s.Swarmyard.class));
|
||||
cards.add(new SetCardInfo("Swarmyard Massacre", 20, Rarity.RARE, mage.cards.s.SwarmyardMassacre.class));
|
||||
cards.add(new SetCardInfo("Swiftfoot Boots", 286, Rarity.UNCOMMON, mage.cards.s.SwiftfootBoots.class));
|
||||
cards.add(new SetCardInfo("Sword of the Squeak", 40, Rarity.RARE, mage.cards.s.SwordOfTheSqueak.class));
|
||||
cards.add(new SetCardInfo("Swords to Plowshares", 109, Rarity.UNCOMMON, mage.cards.s.SwordsToPlowshares.class));
|
||||
cards.add(new SetCardInfo("Tainted Wood", 337, Rarity.UNCOMMON, mage.cards.t.TaintedWood.class));
|
||||
cards.add(new SetCardInfo("Talisman of Impulse", 287, Rarity.UNCOMMON, mage.cards.t.TalismanOfImpulse.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue