mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Implemented Curious Herd
This commit is contained in:
parent
ade58099dc
commit
5fc1f96bab
2 changed files with 69 additions and 0 deletions
68
Mage.Sets/src/mage/cards/c/CuriousHerd.java
Normal file
68
Mage.Sets/src/mage/cards/c/CuriousHerd.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CuriousHerd extends CardImpl {
|
||||
|
||||
public CuriousHerd(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
|
||||
|
||||
// Choose target opponent. You create X 3/3 green Beast creature tokens, where X is the number of artifacts that player controls.
|
||||
this.getSpellAbility().addEffect(new CuriousHerdEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
private CuriousHerd(final CuriousHerd card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuriousHerd copy() {
|
||||
return new CuriousHerd(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CuriousHerdEffect extends OneShotEffect {
|
||||
|
||||
private static final Token token = new BeastToken();
|
||||
|
||||
CuriousHerdEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Choose target opponent. You create X 3/3 green Beast creature tokens, " +
|
||||
"where X is the number of artifacts that player controls.";
|
||||
}
|
||||
|
||||
private CuriousHerdEffect(final CuriousHerdEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuriousHerdEffect copy() {
|
||||
return new CuriousHerdEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int artifactCount = game.getBattlefield().countAll(
|
||||
StaticFilters.FILTER_PERMANENT_ARTIFACT, source.getFirstTarget(), game
|
||||
);
|
||||
if (artifactCount > 0) {
|
||||
token.putOntoBattlefield(artifactCount, game, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@ public final class Commander2020Edition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Alesha, Who Smiles at Death", 143, Rarity.RARE, mage.cards.a.AleshaWhoSmilesAtDeath.class));
|
||||
cards.add(new SetCardInfo("Arcane Signet", 237, Rarity.COMMON, mage.cards.a.ArcaneSignet.class));
|
||||
cards.add(new SetCardInfo("Crop Rotation", 169, Rarity.COMMON, mage.cards.c.CropRotation.class));
|
||||
cards.add(new SetCardInfo("Curious Herd", 59, Rarity.RARE, mage.cards.c.CuriousHerd.class));
|
||||
cards.add(new SetCardInfo("Lifecrafter's Bestiary", 244, Rarity.RARE, mage.cards.l.LifecraftersBestiary.class));
|
||||
cards.add(new SetCardInfo("Rashmi, Eternities Crafter", 229, Rarity.RARE, mage.cards.r.RashmiEternitiesCrafter.class));
|
||||
cards.add(new SetCardInfo("Shared Animosity", 158, Rarity.RARE, mage.cards.s.SharedAnimosity.class));
|
||||
|
|
Loading…
Reference in a new issue