[BRO] Implement Coastal Bulwark

This commit is contained in:
Evan Kranzler 2022-11-05 09:43:47 -04:00
parent d8703ece1d
commit aa7676ded4
2 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.keyword.DefenderAbility;
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 java.util.UUID;
/**
* @author TheElk801
*/
public final class CoastalBulwark extends CardImpl {
private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(SubType.ISLAND));
private static final Hint hint
= new ConditionHint(condition, "You control and Island");
public CoastalBulwark(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}");
this.subtype.add(SubType.WALL);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// Defender
this.addAbility(DefenderAbility.getInstance());
// Coastal Bulwark gets +2/+0 as long as you control an Island.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield),
condition, "{this} gets +2/+0 as long as you control an Island"
)).addHint(hint));
// {2}, {T}: Surveil 1.
Ability ability = new SimpleActivatedAbility(new SurveilEffect(1), new GenericManaCost(2));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
private CoastalBulwark(final CoastalBulwark card) {
super(card);
}
@Override
public CoastalBulwark copy() {
return new CoastalBulwark(this);
}
}

View file

@ -68,6 +68,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Citanul Stalwart", 175, Rarity.COMMON, mage.cards.c.CitanulStalwart.class));
cards.add(new SetCardInfo("Clay Champion", 230, Rarity.MYTHIC, mage.cards.c.ClayChampion.class));
cards.add(new SetCardInfo("Clay Revenant", 118, Rarity.COMMON, mage.cards.c.ClayRevenant.class));
cards.add(new SetCardInfo("Coastal Bulwark", 76, Rarity.COMMON, mage.cards.c.CoastalBulwark.class));
cards.add(new SetCardInfo("Combat Courier", 77, Rarity.COMMON, mage.cards.c.CombatCourier.class));
cards.add(new SetCardInfo("Combat Thresher", 35, Rarity.UNCOMMON, mage.cards.c.CombatThresher.class));
cards.add(new SetCardInfo("Conscripted Infantry", 129, Rarity.COMMON, mage.cards.c.ConscriptedInfantry.class));