Implemented Momentum Rumbler

This commit is contained in:
Evan Kranzler 2020-04-09 20:54:18 -04:00
parent 6067216650
commit df6d198dd0
3 changed files with 82 additions and 1 deletions

View file

@ -0,0 +1,80 @@
package mage.cards.m;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MomentumRumbler extends CardImpl {
public MomentumRumbler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.DINOSAUR);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Whenever Momentum Rumbler attacks, if it doesn't have first strike, put a first strike counter on it.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new AttacksTriggeredAbility(new AddCountersSourceEffect(
CounterType.FIRST_STRIKE.createInstance()
), false), MomentumRumblerCondition.FALSE, "Whenever {this} attacks, " +
"if it doesn't have first strike, put a first strike counter on it."
));
// Whenever Momentum Rumbler attacks, if it has first strike, it gains double strike until end of turn.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new AttacksTriggeredAbility(new GainAbilitySourceEffect(
DoubleStrikeAbility.getInstance(), Duration.EndOfTurn
), false), MomentumRumblerCondition.TRUE, "Whenever {this} attacks, " +
"if it has first strike, it gains double strike until end of turn."
));
}
private MomentumRumbler(final MomentumRumbler card) {
super(card);
}
@Override
public MomentumRumbler copy() {
return new MomentumRumbler(this);
}
}
enum MomentumRumblerCondition implements Condition {
TRUE(true),
FALSE(false);
private final boolean hasAbility;
MomentumRumblerCondition(boolean hasAbility) {
this.hasAbility = hasAbility;
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (permanent == null) {
return false;
}
return hasAbility == permanent.getAbilities(game).containsKey(FirstStrikeAbility.getInstance().getId());
}
}

View file

@ -131,6 +131,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
cards.add(new SetCardInfo("Majestic Auricorn", 22, Rarity.UNCOMMON, mage.cards.m.MajesticAuricorn.class));
cards.add(new SetCardInfo("Migration Path", 164, Rarity.UNCOMMON, mage.cards.m.MigrationPath.class));
cards.add(new SetCardInfo("Migratory Greathorn", 165, Rarity.COMMON, mage.cards.m.MigratoryGreathorn.class));
cards.add(new SetCardInfo("Momentum Rumbler", 126, Rarity.UNCOMMON, mage.cards.m.MomentumRumbler.class));
cards.add(new SetCardInfo("Mosscoat Goriak", 167, Rarity.COMMON, mage.cards.m.MosscoatGoriak.class));
cards.add(new SetCardInfo("Mysterious Egg", 3, Rarity.COMMON, mage.cards.m.MysteriousEgg.class));
cards.add(new SetCardInfo("Mythos of Nethroi", 97, Rarity.RARE, mage.cards.m.MythosOfNethroi.class));

View file

@ -37128,7 +37128,7 @@ Forbidden Friendship|Ikoria: Lair of Behemoths|119|C|{1}{R}|Sorcery|||Create a 1
Frillscare Mentor|Ikoria: Lair of Behemoths|121|U|{2}{R}|Creature - Human Warrior|||When Frillscare Mentor enters the battlefield, put a menace counter on target non-Human creature you control.${2}{R}, {T}: Put a +1/+1 counter on each creature you control with menace.|
Go for Blood|Ikoria: Lair of Behemoths|122|C|{1}{R}|Sorcery|||Target creature you control fights target creature you don't control.$Cycling {1}|
Lukka, Coppercoat Outcast|Ikoria: Lair of Behemoths|125|M|{3}{R}{R}|Legendary Planeswalker - Lukka|5|+1: Exile the top three cards of your library. Creature cards exiled this way gain "You may cast this card from exile as long as you control a Lukka planeswalker."$2: Exile target creature you control, then reveal cards from the top of your library until you reveal a creature card with higher converted mana cost. Put that card onto the battlefield and the rest on the bottom of your library in a random order.$7: Each creature you control deals damage equal to its power to each opponent.|
Momenmtum Rumbler|Ikoria: Lair of Behemoths|126|U|{3}{R}|Creature - Dinosaur|3|3|Whenever Momenmtum Rumbler attacks, if it doesn't have first strike, put a first strike counter on it.$Whenever Momenmtum Rumbler attacks, if it has first strike, it gains double strike until end of turn.|
Momentum Rumbler|Ikoria: Lair of Behemoths|126|U|{3}{R}|Creature - Dinosaur|3|3|Whenever Momentum Rumbler attacks, if it doesn't have first strike, put a first strike counter on it.$Whenever Momentum Rumbler attacks, if it has first strike, it gains double strike until end of turn.|
Mythos of Vadrok|Ikoria: Lair of Behemoths|127|R|{2}{R}{R}|Sorcery|||Mythos of Vadrok deals 5 damage divided as you choose among any number of target creatures and/or planeswalkers. If {W}{U} was spent to cast this spell, until your next turn, those permanents can't attack or block and their activated abilities can't be activated.|
Porcuparrot|Ikoria: Lair of Behemoths|128|U|{3}{R}|Creature - Bird Beast|3|4|Mutate {2}{R}${T}: This creature deals X damage to any target, where X is the number of times this creature mutated.|
Reptillian Reflection|Ikoria: Lair of Behemoths|132|U|{2}{R}|Enchantment|||Whenever you cycle a card, Reptillian Reflection becomes a 5/4 Dinosaur creature with trample and haste in addition to its other types until end of turn.|