mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[KHM] Implemented Axgard Armory
This commit is contained in:
parent
9165cab00a
commit
5107c4a623
3 changed files with 107 additions and 6 deletions
100
Mage.Sets/src/mage/cards/a/AxgardArmory.java
Normal file
100
Mage.Sets/src/mage/cards/a/AxgardArmory.java
Normal file
|
@ -0,0 +1,100 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.SubTypeAssignment;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AxgardArmory extends CardImpl {
|
||||
|
||||
public AxgardArmory(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
|
||||
// Axgard Armory enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// {T}: Add {W}.
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
||||
// {1}{R}{R}{W}, {T}: Sacrifice Axgard Armory: Search your library for an Aura card and/or Equipment card, reveal them, put them into your hand, then shuffle your library.
|
||||
Ability ability = new SimpleActivatedAbility(new SearchLibraryPutInHandEffect(
|
||||
new AxgardArmoryTarget()), new ManaCostsImpl("{1}{R}{R}{W}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private AxgardArmory(final AxgardArmory card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxgardArmory copy() {
|
||||
return new AxgardArmory(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AxgardArmoryTarget extends TargetCardInLibrary {
|
||||
|
||||
private static final FilterCard filter
|
||||
= new FilterCard("an Aura card and/or an Equipment card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
SubType.AURA.getPredicate(),
|
||||
SubType.EQUIPMENT.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
private static final SubTypeAssignment subTypeAssigner
|
||||
= new SubTypeAssignment(SubType.AURA, SubType.EQUIPMENT);
|
||||
|
||||
AxgardArmoryTarget() {
|
||||
super(0, 2, filter);
|
||||
}
|
||||
|
||||
private AxgardArmoryTarget(final AxgardArmoryTarget target) {
|
||||
super(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxgardArmoryTarget copy() {
|
||||
return new AxgardArmoryTarget(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTarget(UUID playerId, UUID id, Ability source, Game game) {
|
||||
if (!super.canTarget(playerId, id, source, game)) {
|
||||
return false;
|
||||
}
|
||||
Card card = game.getCard(id);
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
if (this.getTargets().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
Cards cards = new CardsImpl(this.getTargets());
|
||||
cards.add(card);
|
||||
return subTypeAssigner.getRoleCount(cards, game) >= cards.size();
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ public final class CorpseHarvester extends CardImpl {
|
|||
|
||||
// {1}{B}, {tap}, Sacrifice a creature: Search your library for a Zombie card and a Swamp card, reveal them, and put them into your hand. Then shuffle your library.
|
||||
Ability ability = new SimpleActivatedAbility(new SearchLibraryPutInHandEffect(
|
||||
new KrosanVergeTarget(), true
|
||||
new CorpseHarvesterTarget(), true
|
||||
), new ManaCostsImpl("{1}{B}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
|
@ -53,7 +53,7 @@ public final class CorpseHarvester extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class KrosanVergeTarget extends TargetCardInLibrary {
|
||||
class CorpseHarvesterTarget extends TargetCardInLibrary {
|
||||
|
||||
private static final FilterCard filter
|
||||
= new FilterCard("a Zombie card and a Swamp card");
|
||||
|
@ -68,17 +68,17 @@ class KrosanVergeTarget extends TargetCardInLibrary {
|
|||
private static final SubTypeAssignment subTypeAssigner
|
||||
= new SubTypeAssignment(SubType.ZOMBIE, SubType.SWAMP);
|
||||
|
||||
KrosanVergeTarget() {
|
||||
CorpseHarvesterTarget() {
|
||||
super(0, 2, filter);
|
||||
}
|
||||
|
||||
private KrosanVergeTarget(final KrosanVergeTarget target) {
|
||||
private CorpseHarvesterTarget(final CorpseHarvesterTarget target) {
|
||||
super(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KrosanVergeTarget copy() {
|
||||
return new KrosanVergeTarget(this);
|
||||
public CorpseHarvesterTarget copy() {
|
||||
return new CorpseHarvesterTarget(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -67,6 +67,7 @@ public final class Kaldheim extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Arctic Treeline", 249, Rarity.COMMON, mage.cards.a.ArcticTreeline.class));
|
||||
cards.add(new SetCardInfo("Armed and Armored", 379, Rarity.UNCOMMON, mage.cards.a.ArmedAndArmored.class));
|
||||
cards.add(new SetCardInfo("Augury Raven", 44, Rarity.COMMON, mage.cards.a.AuguryRaven.class));
|
||||
cards.add(new SetCardInfo("Axgard Armory", 250, Rarity.UNCOMMON, mage.cards.a.AxgardArmory.class));
|
||||
cards.add(new SetCardInfo("Axgard Braggart", 1, Rarity.COMMON, mage.cards.a.AxgardBraggart.class));
|
||||
cards.add(new SetCardInfo("Axgard Cavalry", 121, Rarity.COMMON, mage.cards.a.AxgardCavalry.class));
|
||||
cards.add(new SetCardInfo("Barkchannel Pathway", 251, Rarity.RARE, mage.cards.b.BarkchannelPathway.class));
|
||||
|
|
Loading…
Reference in a new issue