[OTJ] Implement Gold Rush

This commit is contained in:
Susucre 2024-03-29 21:45:14 +01:00
parent 621ddc41a9
commit 954b9dd4ba
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,54 @@
package mage.cards.g;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.MultipliedValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.TreasureToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author Susucr
*/
public final class GoldRush extends CardImpl {
private static final DynamicValue value = new PermanentsOnBattlefieldCount(
new FilterControlledPermanent(SubType.TREASURE, "Treasure you control")
);
private static final DynamicValue xValue = new MultipliedValue(value, 2);
private static final Hint hint = new ValueHint("Treasure you control", value);
public GoldRush(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Create a Treasure token. Until end of turn, up to one target creature gets +2/+2 for each Treasure you control.
this.getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken()));
this.getSpellAbility().addEffect(
new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn)
.setText("Until end of turn, up to one target creature gets +2/+2 for each Treasure you control.")
);
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1));
this.getSpellAbility().addHint(hint);
}
private GoldRush(final GoldRush card) {
super(card);
}
@Override
public GoldRush copy() {
return new GoldRush(this);
}
}

View file

@ -64,6 +64,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet {
cards.add(new SetCardInfo("Freestrider Lookout", 163, Rarity.RARE, mage.cards.f.FreestriderLookout.class));
cards.add(new SetCardInfo("Frontier Seeker", 13, Rarity.UNCOMMON, mage.cards.f.FrontierSeeker.class));
cards.add(new SetCardInfo("Gold Pan", 242, Rarity.COMMON, mage.cards.g.GoldPan.class));
cards.add(new SetCardInfo("Gold Rush", 166, Rarity.UNCOMMON, mage.cards.g.GoldRush.class));
cards.add(new SetCardInfo("Hardbristle Bandit", 168, Rarity.COMMON, mage.cards.h.HardbristleBandit.class));
cards.add(new SetCardInfo("Hell to Pay", 126, Rarity.RARE, mage.cards.h.HellToPay.class));
cards.add(new SetCardInfo("Hellspur Brute", 127, Rarity.UNCOMMON, mage.cards.h.HellspurBrute.class));