forked from External/mage
[NCC] Implemented Body Count
This commit is contained in:
parent
c9ca5f8b12
commit
8c7d54e928
2 changed files with 74 additions and 0 deletions
73
Mage.Sets/src/mage/cards/b/BodyCount.java
Normal file
73
Mage.Sets/src/mage/cards/b/BodyCount.java
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.SpectacleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.CreaturesDiedWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BodyCount extends CardImpl {
|
||||
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Creatures that died under your control this turn", BodyCountValue.instance
|
||||
);
|
||||
|
||||
public BodyCount(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
||||
|
||||
// Spectacle {B}
|
||||
this.addAbility(new SpectacleAbility(this, new ManaCostsImpl<>("{B}")));
|
||||
|
||||
// Draw a card for each creature that died under your control this turn.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(BodyCountValue.instance));
|
||||
this.getSpellAbility().addHint(hint);
|
||||
}
|
||||
|
||||
private BodyCount(final BodyCount card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BodyCount copy() {
|
||||
return new BodyCount(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum BodyCountValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return game.getState()
|
||||
.getWatcher(CreaturesDiedWatcher.class)
|
||||
.getAmountOfCreaturesDiedThisTurnByController(sourceAbility.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BodyCountValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "creature that died under your control this turn";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
|
@ -26,6 +26,7 @@ public final class NewCapennaCommander extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Angelic Sleuth", 113, Rarity.RARE, mage.cards.a.AngelicSleuth.class));
|
||||
cards.add(new SetCardInfo("Bennie Bracks, Zoologist", 86, Rarity.MYTHIC, mage.cards.b.BennieBracksZoologist.class));
|
||||
cards.add(new SetCardInfo("Body Count", 34, Rarity.RARE, mage.cards.b.BodyCount.class));
|
||||
cards.add(new SetCardInfo("Damning Verdict", 15, Rarity.RARE, mage.cards.d.DamningVerdict.class));
|
||||
cards.add(new SetCardInfo("Extravagant Replication", 25, Rarity.RARE, mage.cards.e.ExtravagantReplication.class));
|
||||
cards.add(new SetCardInfo("Kitt Kanto, Mayhem Diva", 4, Rarity.MYTHIC, mage.cards.k.KittKantoMayhemDiva.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue