[BRO] Implemented Sardian Cliffstomper

This commit is contained in:
Daniel Bomar 2022-11-03 18:10:44 -05:00
parent 64b453b4b2
commit 3ee1a0e53c
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,70 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.game.Game;
/**
*
* @author weirddan455
*/
public final class SardianCliffstomper extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.MOUNTAIN);
private static final PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter);
private static final SardianCliffstomperCondition condition = new SardianCliffstomperCondition(filter);
public SardianCliffstomper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add(SubType.MINOTAUR);
this.subtype.add(SubType.BARBARIAN);
this.power = new MageInt(0);
this.toughness = new MageInt(4);
// As long as it's your turn and you control four or more Mountains, Sardian Cliffstomper gets +X/+0, where X is the number of Mountains you control.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(count, StaticValue.get(0), Duration.WhileOnBattlefield),
condition,
"As long as it's your turn and you control four or more Mountains, {this} gets +X/+0, where X is the number of Mountains you control."
)));
}
private SardianCliffstomper(final SardianCliffstomper card) {
super(card);
}
@Override
public SardianCliffstomper copy() {
return new SardianCliffstomper(this);
}
}
class SardianCliffstomperCondition implements Condition {
private final FilterPermanent filter;
public SardianCliffstomperCondition(FilterPermanent filter) {
this.filter = filter;
}
@Override
public boolean apply(Game game, Ability source) {
return game.isActivePlayer(source.getControllerId()) &&
game.getBattlefield().count(filter, source.getControllerId(), source, game) >= 4;
}
}

View file

@ -126,6 +126,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Reconstructed Thopter", 242, Rarity.UNCOMMON, mage.cards.r.ReconstructedThopter.class));
cards.add(new SetCardInfo("Recruitment Officer", 23, Rarity.UNCOMMON, mage.cards.r.RecruitmentOfficer.class));
cards.add(new SetCardInfo("Rust Goliath", 204, Rarity.COMMON, mage.cards.r.RustGoliath.class));
cards.add(new SetCardInfo("Sardian Cliffstomper", 151, Rarity.UNCOMMON, mage.cards.s.SardianCliffstomper.class));
cards.add(new SetCardInfo("Scrapwork Cohort", 37, Rarity.COMMON, mage.cards.s.ScrapworkCohort.class));
cards.add(new SetCardInfo("Sibling Rivalry", 152, Rarity.COMMON, mage.cards.s.SiblingRivalry.class));
cards.add(new SetCardInfo("Siege Veteran", 25, Rarity.RARE, mage.cards.s.SiegeVeteran.class));