mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
[J22] Implement Rampaging Growth
This commit is contained in:
parent
9ad0195d18
commit
43255abad2
2 changed files with 87 additions and 0 deletions
86
Mage.Sets/src/mage/cards/r/RampagingGrowth.java
Normal file
86
Mage.Sets/src/mage/cards/r/RampagingGrowth.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RampagingGrowth extends CardImpl {
|
||||
|
||||
public RampagingGrowth(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
|
||||
|
||||
// Search your library for a basic land card, put it on the battlefield, then shuffle. Until end of turn, that land becomes a 4/3 Insect creature with reach and haste. It's still a land.
|
||||
this.getSpellAbility().addEffect(new RampagingGrowthEffect());
|
||||
}
|
||||
|
||||
private RampagingGrowth(final RampagingGrowth card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RampagingGrowth copy() {
|
||||
return new RampagingGrowth(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RampagingGrowthEffect extends OneShotEffect {
|
||||
|
||||
RampagingGrowthEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "search your library for a basic land card, put it on the battlefield, then shuffle. " +
|
||||
"Until end of turn, that land becomes a 4/3 Insect creature with reach and haste. It's still a land";
|
||||
}
|
||||
|
||||
private RampagingGrowthEffect(final RampagingGrowthEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RampagingGrowthEffect copy() {
|
||||
return new RampagingGrowthEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A);
|
||||
player.searchLibrary(target, source, game);
|
||||
Card card = player.getLibrary().getCard(target.getTargetController(), game);
|
||||
if (card == null) {
|
||||
player.shuffleLibrary(source, game);
|
||||
return true;
|
||||
}
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null) {
|
||||
game.addEffect(new BecomesCreatureTargetEffect(
|
||||
new CreatureToken(4, 3, "", SubType.INSECT
|
||||
).withAbility(ReachAbility.getInstance()).withAbility(HasteAbility.getInstance()),
|
||||
false, true, Duration.EndOfTurn
|
||||
).setTargetPointer(new FixedTarget(permanent, game)), source);
|
||||
}
|
||||
player.shuffleLibrary(source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -588,6 +588,7 @@ public final class Jumpstart2022 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ram Through", 91, Rarity.COMMON, mage.cards.r.RamThrough.class));
|
||||
cards.add(new SetCardInfo("Rambunctious Mutt", 231, Rarity.COMMON, mage.cards.r.RambunctiousMutt.class));
|
||||
cards.add(new SetCardInfo("Rampaging Baloths", 715, Rarity.RARE, mage.cards.r.RampagingBaloths.class));
|
||||
cards.add(new SetCardInfo("Rampaging Growth", 43, Rarity.UNCOMMON, mage.cards.r.RampagingGrowth.class));
|
||||
cards.add(new SetCardInfo("Rapacious Dragon", 80, Rarity.UNCOMMON, mage.cards.r.RapaciousDragon.class));
|
||||
cards.add(new SetCardInfo("Ravenous Giant", 585, Rarity.UNCOMMON, mage.cards.r.RavenousGiant.class));
|
||||
cards.add(new SetCardInfo("Raze the Effigy", 586, Rarity.COMMON, mage.cards.r.RazeTheEffigy.class));
|
||||
|
|
Loading…
Reference in a new issue