mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[CLU] Implement Furious Spinesplitter
This commit is contained in:
parent
aecef7262f
commit
2871987323
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/f/FuriousSpinesplitter.java
Normal file
82
Mage.Sets/src/mage/cards/f/FuriousSpinesplitter.java
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
package mage.cards.f;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.watchers.common.AmountOfDamageAPlayerReceivedThisTurnWatcher;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class FuriousSpinesplitter extends CardImpl {
|
||||||
|
|
||||||
|
public FuriousSpinesplitter(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R/G}{R/G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.OGRE);
|
||||||
|
this.subtype.add(SubType.WARRIOR);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Trample
|
||||||
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
|
// At the beginning of your end step, put a +1/+1 counter on Furious Spinesplitter for each opponent that was dealt damage this turn.
|
||||||
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(new AddCountersSourceEffect(
|
||||||
|
CounterType.P1P1.createInstance(), FuriousSpinesplitterValue.instance
|
||||||
|
)), new AmountOfDamageAPlayerReceivedThisTurnWatcher());
|
||||||
|
}
|
||||||
|
|
||||||
|
private FuriousSpinesplitter(final FuriousSpinesplitter card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FuriousSpinesplitter copy() {
|
||||||
|
return new FuriousSpinesplitter(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum FuriousSpinesplitterValue implements DynamicValue {
|
||||||
|
instance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||||
|
return game
|
||||||
|
.getOpponents(sourceAbility.getControllerId())
|
||||||
|
.stream()
|
||||||
|
.map(game
|
||||||
|
.getState()
|
||||||
|
.getWatcher(AmountOfDamageAPlayerReceivedThisTurnWatcher.class)
|
||||||
|
::getAmountOfDamageReceivedThisTurn)
|
||||||
|
.mapToInt(x -> Math.min(x, 1))
|
||||||
|
.sum();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FuriousSpinesplitterValue copy() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return "opponent that was dealt damage this turn";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -108,6 +108,7 @@ public final class RavnicaClueEdition extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Frostburn Weird", 193, Rarity.COMMON, mage.cards.f.FrostburnWeird.class));
|
cards.add(new SetCardInfo("Frostburn Weird", 193, Rarity.COMMON, mage.cards.f.FrostburnWeird.class));
|
||||||
cards.add(new SetCardInfo("Fungal Rebirth", 163, Rarity.UNCOMMON, mage.cards.f.FungalRebirth.class));
|
cards.add(new SetCardInfo("Fungal Rebirth", 163, Rarity.UNCOMMON, mage.cards.f.FungalRebirth.class));
|
||||||
//cards.add(new SetCardInfo("Furious Spinesplitter", 33, Rarity.UNCOMMON, mage.cards.f.FuriousSpinesplitter.class));
|
//cards.add(new SetCardInfo("Furious Spinesplitter", 33, Rarity.UNCOMMON, mage.cards.f.FuriousSpinesplitter.class));
|
||||||
|
cards.add(new SetCardInfo("Furious Spinesplitter", 33, Rarity.UNCOMMON, mage.cards.f.FuriousSpinesplitter.class));
|
||||||
cards.add(new SetCardInfo("Giant Adephage", 164, Rarity.MYTHIC, mage.cards.g.GiantAdephage.class));
|
cards.add(new SetCardInfo("Giant Adephage", 164, Rarity.MYTHIC, mage.cards.g.GiantAdephage.class));
|
||||||
cards.add(new SetCardInfo("Gift of Strength", 165, Rarity.COMMON, mage.cards.g.GiftOfStrength.class));
|
cards.add(new SetCardInfo("Gift of Strength", 165, Rarity.COMMON, mage.cards.g.GiftOfStrength.class));
|
||||||
cards.add(new SetCardInfo("Glorifier of Dusk", 62, Rarity.UNCOMMON, mage.cards.g.GlorifierOfDusk.class));
|
cards.add(new SetCardInfo("Glorifier of Dusk", 62, Rarity.UNCOMMON, mage.cards.g.GlorifierOfDusk.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue