mirror of
https://github.com/correl/mage.git
synced 2024-12-28 03:00:10 +00:00
[NCC] Implemented Perrie, the Pulverizer
This commit is contained in:
parent
d114cc5f93
commit
6ea50d8de1
2 changed files with 105 additions and 0 deletions
104
Mage.Sets/src/mage/cards/p/PerrieThePulverizer.java
Normal file
104
Mage.Sets/src/mage/cards/p/PerrieThePulverizer.java
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PerrieThePulverizer extends CardImpl {
|
||||||
|
|
||||||
|
private static final Hint hint = new ValueHint(
|
||||||
|
"Different kinds of counters among permanents you control", PerrieThePulverizerValue.instance
|
||||||
|
);
|
||||||
|
|
||||||
|
public PerrieThePulverizer(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}{W}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.RHINO);
|
||||||
|
this.subtype.add(SubType.SOLDIER);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// When Perrie enters the battlefield, put a shield counter on target creature.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||||
|
new AddCountersTargetEffect(CounterType.SHIELD.createInstance())
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Whenever Perrie attacks, target creature you control gains trample and gets +X/+X, where X is the number of different kinds of counters among permanents you control.
|
||||||
|
ability = new AttacksTriggeredAbility(new GainAbilityTargetEffect(TrampleAbility.getInstance())
|
||||||
|
.setText("target creature you control gains trample"));
|
||||||
|
ability.addEffect(new BoostTargetEffect(
|
||||||
|
PerrieThePulverizerValue.instance, PerrieThePulverizerValue.instance, Duration.EndOfTurn
|
||||||
|
).setText("and gets +X/+X, where X is the number of different kinds of counters among permanents you control"));
|
||||||
|
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private PerrieThePulverizer(final PerrieThePulverizer card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PerrieThePulverizer copy() {
|
||||||
|
return new PerrieThePulverizer(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PerrieThePulverizerValue implements DynamicValue {
|
||||||
|
instance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||||
|
return game
|
||||||
|
.getBattlefield()
|
||||||
|
.getActivePermanents(
|
||||||
|
StaticFilters.FILTER_CONTROLLED_PERMANENT,
|
||||||
|
sourceAbility.getControllerId(), sourceAbility, game
|
||||||
|
).stream()
|
||||||
|
.map(p -> p.getCounters(game))
|
||||||
|
.map(HashMap::keySet)
|
||||||
|
.flatMap(Collection::stream)
|
||||||
|
.distinct()
|
||||||
|
.mapToInt(x -> 1)
|
||||||
|
.sum();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PerrieThePulverizerValue copy() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
|
@ -207,6 +207,7 @@ public final class NewCapennaCommander extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Park Heights Maverick", 63, Rarity.RARE, mage.cards.p.ParkHeightsMaverick.class));
|
cards.add(new SetCardInfo("Park Heights Maverick", 63, Rarity.RARE, mage.cards.p.ParkHeightsMaverick.class));
|
||||||
cards.add(new SetCardInfo("Path of Ancestry", 419, Rarity.COMMON, mage.cards.p.PathOfAncestry.class));
|
cards.add(new SetCardInfo("Path of Ancestry", 419, Rarity.COMMON, mage.cards.p.PathOfAncestry.class));
|
||||||
cards.add(new SetCardInfo("Path to Exile", 208, Rarity.UNCOMMON, mage.cards.p.PathToExile.class));
|
cards.add(new SetCardInfo("Path to Exile", 208, Rarity.UNCOMMON, mage.cards.p.PathToExile.class));
|
||||||
|
cards.add(new SetCardInfo("Perrie, the Pulverizer", 5, Rarity.MYTHIC, mage.cards.p.PerrieThePulverizer.class));
|
||||||
cards.add(new SetCardInfo("Planar Outburst", 209, Rarity.RARE, mage.cards.p.PlanarOutburst.class));
|
cards.add(new SetCardInfo("Planar Outburst", 209, Rarity.RARE, mage.cards.p.PlanarOutburst.class));
|
||||||
cards.add(new SetCardInfo("Ponder", 229, Rarity.COMMON, mage.cards.p.Ponder.class));
|
cards.add(new SetCardInfo("Ponder", 229, Rarity.COMMON, mage.cards.p.Ponder.class));
|
||||||
cards.add(new SetCardInfo("Port Town", 420, Rarity.RARE, mage.cards.p.PortTown.class));
|
cards.add(new SetCardInfo("Port Town", 420, Rarity.RARE, mage.cards.p.PortTown.class));
|
||||||
|
|
Loading…
Reference in a new issue