mirror of
https://github.com/correl/mage.git
synced 2025-03-17 01:06:26 -09:00
Implemented Steelclaw Lance
This commit is contained in:
parent
3a523804e4
commit
71a917a5d4
5 changed files with 110 additions and 85 deletions
|
@ -5,30 +5,35 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.filter.common.FilterControlledLandPermanent;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
|
||||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
import mage.abilities.keyword.EquipAbility;
|
import mage.abilities.keyword.EquipAbility;
|
||||||
import mage.abilities.keyword.EquipLegendaryAbility;
|
import mage.abilities.keyword.EquipFilterAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.*;
|
||||||
import mage.constants.Outcome;
|
import mage.filter.StaticFilters;
|
||||||
import mage.constants.SubType;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.constants.SuperType;
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
import mage.constants.Zone;
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Rystan
|
* @author Rystan
|
||||||
*/
|
*/
|
||||||
public final class BlackbladeReforged extends CardImpl {
|
public final class BlackbladeReforged extends CardImpl {
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
private static final DynamicValue count
|
||||||
|
= new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND);
|
||||||
|
private static final FilterControlledCreaturePermanent filter
|
||||||
|
= new FilterControlledCreaturePermanent("legendary creature");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new SupertypePredicate(SuperType.LEGENDARY));
|
||||||
|
}
|
||||||
|
|
||||||
public BlackbladeReforged(UUID ownerId, CardSetInfo setInfo) {
|
public BlackbladeReforged(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
@ -36,17 +41,16 @@ public final class BlackbladeReforged extends CardImpl {
|
||||||
this.subtype.add(SubType.EQUIPMENT);
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
|
|
||||||
// Equipped creature gets +1/+1 for each land you control.
|
// Equipped creature gets +1/+1 for each land you control.
|
||||||
PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter);
|
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(count, count)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(count, count)));
|
||||||
|
|
||||||
// Equip legendary creature (3)
|
// Equip legendary creature (3)
|
||||||
this.addAbility(new EquipLegendaryAbility(Outcome.AddAbility, new GenericManaCost(3)));
|
this.addAbility(new EquipFilterAbility(filter, new GenericManaCost(3)));
|
||||||
|
|
||||||
// Equip {7}
|
// Equip {7}
|
||||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(7)));
|
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(7)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlackbladeReforged(final BlackbladeReforged card) {
|
private BlackbladeReforged(final BlackbladeReforged card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
49
Mage.Sets/src/mage/cards/s/SteelclawLance.java
Normal file
49
Mage.Sets/src/mage/cards/s/SteelclawLance.java
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
|
import mage.abilities.keyword.EquipAbility;
|
||||||
|
import mage.abilities.keyword.EquipFilterAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class SteelclawLance extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledCreaturePermanent filter
|
||||||
|
= new FilterControlledCreaturePermanent(SubType.KNIGHT, "Knight");
|
||||||
|
|
||||||
|
public SteelclawLance(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{B}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
|
|
||||||
|
// Equipped creature gets +2/+2.
|
||||||
|
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 2)));
|
||||||
|
|
||||||
|
// Equip Knight {1}
|
||||||
|
this.addAbility(new EquipFilterAbility(filter, new GenericManaCost(1)));
|
||||||
|
|
||||||
|
// Equip {3}
|
||||||
|
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private SteelclawLance(final SteelclawLance card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SteelclawLance copy() {
|
||||||
|
return new SteelclawLance(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -70,6 +70,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class));
|
cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class));
|
||||||
cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.UNCOMMON, mage.cards.s.SlayingFire.class));
|
cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.UNCOMMON, mage.cards.s.SlayingFire.class));
|
||||||
cards.add(new SetCardInfo("Steelbane Hydra", 322, Rarity.RARE, mage.cards.s.SteelbaneHydra.class));
|
cards.add(new SetCardInfo("Steelbane Hydra", 322, Rarity.RARE, mage.cards.s.SteelbaneHydra.class));
|
||||||
|
cards.add(new SetCardInfo("Steelclaw Lance", 202, Rarity.UNCOMMON, mage.cards.s.SteelclawLance.class));
|
||||||
cards.add(new SetCardInfo("Taste of Death", 320, Rarity.RARE, mage.cards.t.TasteOfDeath.class));
|
cards.add(new SetCardInfo("Taste of Death", 320, Rarity.RARE, mage.cards.t.TasteOfDeath.class));
|
||||||
cards.add(new SetCardInfo("The Circle of Loyalty", 9, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class));
|
cards.add(new SetCardInfo("The Circle of Loyalty", 9, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class));
|
||||||
cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class));
|
cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class));
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package mage.abilities.keyword;
|
||||||
|
|
||||||
|
import mage.abilities.ActivatedAbilityImpl;
|
||||||
|
import mage.abilities.costs.Cost;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.TimingRule;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class EquipFilterAbility extends ActivatedAbilityImpl {
|
||||||
|
|
||||||
|
private final FilterControlledCreaturePermanent filter;
|
||||||
|
|
||||||
|
public EquipFilterAbility(FilterControlledCreaturePermanent filter, Cost cost) {
|
||||||
|
super(Zone.BATTLEFIELD, new AttachEffect(Outcome.AddAbility, "Equip"), cost);
|
||||||
|
this.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||||
|
this.filter = filter;
|
||||||
|
this.timing = TimingRule.SORCERY;
|
||||||
|
}
|
||||||
|
|
||||||
|
private EquipFilterAbility(final EquipFilterAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
this.filter = ability.filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EquipFilterAbility copy() {
|
||||||
|
return new EquipFilterAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Equip " + filter.getMessage() + costs.getText() + manaCosts.getText();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,69 +0,0 @@
|
||||||
|
|
||||||
package mage.abilities.keyword;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.ActivatedAbilityImpl;
|
|
||||||
import mage.abilities.costs.Cost;
|
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.constants.TimingRule;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
|
||||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.target.Target;
|
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Rystan
|
|
||||||
*/
|
|
||||||
public class EquipLegendaryAbility extends ActivatedAbilityImpl {
|
|
||||||
|
|
||||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("legendary creature you control");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new SupertypePredicate(SuperType.LEGENDARY));
|
|
||||||
}
|
|
||||||
|
|
||||||
public EquipLegendaryAbility(Outcome outcome, Cost cost) {
|
|
||||||
this(outcome, cost, new TargetControlledCreaturePermanent(filter));
|
|
||||||
}
|
|
||||||
|
|
||||||
public EquipLegendaryAbility(Outcome outcome, Cost cost, Target target) {
|
|
||||||
super(Zone.BATTLEFIELD, new AttachEffect(outcome, "Equip"), cost);
|
|
||||||
this.addTarget(target);
|
|
||||||
this.timing = TimingRule.SORCERY;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ActivationStatus canActivate(UUID playerId, Game game) {
|
|
||||||
ActivationStatus activationStatus = super.canActivate(playerId, game);
|
|
||||||
if (activationStatus.canActivate()) {
|
|
||||||
Permanent permanent = game.getPermanent(sourceId);
|
|
||||||
if (permanent != null && permanent.hasSubtype(SubType.EQUIPMENT, game)) {
|
|
||||||
return activationStatus;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return activationStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EquipLegendaryAbility(final EquipLegendaryAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EquipLegendaryAbility copy() {
|
|
||||||
return new EquipLegendaryAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "Equip legendary creature " + costs.getText()
|
|
||||||
+ manaCosts.getText() + " (" + manaCosts.getText()
|
|
||||||
+ ": <i>Attach to target legendary creature you control. Equip only as a sorcery.)</i>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue