mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
[MAT] Implement Death-Rattle Oni
This commit is contained in:
parent
e06f01abf4
commit
02bb0f72dd
2 changed files with 69 additions and 0 deletions
68
Mage.Sets/src/mage/cards/d/DeathRattleOni.java
Normal file
68
Mage.Sets/src/mage/cards/d/DeathRattleOni.java
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.CreaturesDiedThisTurnCount;
|
||||||
|
import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
|
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||||
|
import mage.abilities.hint.common.CreaturesDiedThisTurnHint;
|
||||||
|
import mage.abilities.keyword.FlashAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class DeathRattleOni extends CardImpl {
|
||||||
|
|
||||||
|
private static final DynamicValue xValue = new MultipliedValue(CreaturesDiedThisTurnCount.instance, 2);
|
||||||
|
private static final FilterPermanent filter
|
||||||
|
= new FilterCreaturePermanent("other creatures that were dealt damage this turn");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
filter.add(WasDealtDamageThisTurnPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeathRattleOni(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.DEMON);
|
||||||
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
this.power = new MageInt(5);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Flash
|
||||||
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
|
// This spell costs 2 less to cast for each creature that died this turn.
|
||||||
|
this.addAbility(new SimpleStaticAbility(
|
||||||
|
Zone.ALL, new SpellCostReductionSourceEffect(xValue)
|
||||||
|
.setText("this spell costs {2} less to cast for each creature that died this turn")
|
||||||
|
).addHint(CreaturesDiedThisTurnHint.instance).setRuleAtTheTop(true));
|
||||||
|
|
||||||
|
// When Death-Rattle Oni enters the battlefield, destroy all other creatures that were dealt damage this turn.
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(filter)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private DeathRattleOni(final DeathRattleOni card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeathRattleOni copy() {
|
||||||
|
return new DeathRattleOni(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,6 +27,7 @@ public final class MarchOfTheMachineTheAftermath extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Campus Renovation", 27, Rarity.UNCOMMON, mage.cards.c.CampusRenovation.class));
|
cards.add(new SetCardInfo("Campus Renovation", 27, Rarity.UNCOMMON, mage.cards.c.CampusRenovation.class));
|
||||||
cards.add(new SetCardInfo("Coppercoat Vanguard", 1, Rarity.UNCOMMON, mage.cards.c.CoppercoatVanguard.class));
|
cards.add(new SetCardInfo("Coppercoat Vanguard", 1, Rarity.UNCOMMON, mage.cards.c.CoppercoatVanguard.class));
|
||||||
cards.add(new SetCardInfo("Cosmic Rebirth", 28, Rarity.UNCOMMON, mage.cards.c.CosmicRebirth.class));
|
cards.add(new SetCardInfo("Cosmic Rebirth", 28, Rarity.UNCOMMON, mage.cards.c.CosmicRebirth.class));
|
||||||
|
cards.add(new SetCardInfo("Death-Rattle Oni", 13, Rarity.UNCOMMON, mage.cards.d.DeathRattleOni.class));
|
||||||
cards.add(new SetCardInfo("Drannith Ruins", 50, Rarity.RARE, mage.cards.d.DrannithRuins.class));
|
cards.add(new SetCardInfo("Drannith Ruins", 50, Rarity.RARE, mage.cards.d.DrannithRuins.class));
|
||||||
cards.add(new SetCardInfo("Feast of the Victorious Dead", 30, Rarity.UNCOMMON, mage.cards.f.FeastOfTheVictoriousDead.class));
|
cards.add(new SetCardInfo("Feast of the Victorious Dead", 30, Rarity.UNCOMMON, mage.cards.f.FeastOfTheVictoriousDead.class));
|
||||||
cards.add(new SetCardInfo("Filter Out", 7, Rarity.UNCOMMON, mage.cards.f.FilterOut.class));
|
cards.add(new SetCardInfo("Filter Out", 7, Rarity.UNCOMMON, mage.cards.f.FilterOut.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue