[WOE] Implement Pollen-Shield Hare (#10932)

* [WOE] Implement Pollen-Shield Hare

* apply review

---------

Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
Susucre 2023-08-25 03:20:13 +02:00 committed by GitHub
parent a62dcc7472
commit 8e36a178a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.AdventureCard;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author Susucr
*/
public final class PollenShieldHare extends AdventureCard {
public PollenShieldHare(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{1}{W}", "Hare Raising", "{G}");
this.subtype.add(SubType.RABBIT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Creature tokens you control get +1/+1.
this.addAbility(new SimpleStaticAbility(
new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURE_TOKENS, false)
));
// Hare Raising
// Target creature you control gains vigilance and gets +X/+X until end of turn, where X is the number of creatures you control.
this.getSpellCard().getSpellAbility().addEffect(
new GainAbilityTargetEffect(VigilanceAbility.getInstance())
.setText("target creature you control gains vigilance")
);
this.getSpellCard().getSpellAbility().addEffect(
new BoostTargetEffect(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance)
.setText("and gets +X/+X until end of turn, where X is the number of creatures you control")
);
this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellCard().getSpellAbility().addHint(CreaturesYouControlHint.instance);
}
private PollenShieldHare(final PollenShieldHare card) {
super(card);
}
@Override
public PollenShieldHare copy() {
return new PollenShieldHare(this);
}
}

View file

@ -150,6 +150,7 @@ public final class WildsOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Picnic Ruiner", 232, Rarity.UNCOMMON, mage.cards.p.PicnicRuiner.class));
cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plunge into Winter", 22, Rarity.COMMON, mage.cards.p.PlungeIntoWinter.class));
cards.add(new SetCardInfo("Pollen-Shield Hare", 233, Rarity.RARE, mage.cards.p.PollenShieldHare.class));
cards.add(new SetCardInfo("Prophetic Prism", 249, Rarity.COMMON, mage.cards.p.PropheticPrism.class));
cards.add(new SetCardInfo("Protective Parents", 24, Rarity.COMMON, mage.cards.p.ProtectiveParents.class));
cards.add(new SetCardInfo("Provisions Merchant", 321, Rarity.UNCOMMON, mage.cards.p.ProvisionsMerchant.class));

View file

@ -30,6 +30,10 @@ public class BoostTargetEffect extends ContinuousEffectImpl {
this(StaticValue.get(power), StaticValue.get(toughness), duration);
}
public BoostTargetEffect(DynamicValue power, DynamicValue toughness) {
this(power, toughness, Duration.EndOfTurn);
}
/**
* @param power
* @param toughness