[BRO] Implement Fog of War (#9725)

* [BRO] Implement Fog of War

* Fix text for "Fog of War" and "Blunt the Assault"

* Correct Blunt the Assault filter text.
This commit is contained in:
PurpleCrowbar 2022-11-03 21:54:54 +00:00 committed by GitHub
parent 71c3a817f6
commit 99d0bf5089
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 1 deletions

View file

@ -23,7 +23,8 @@ public final class BluntTheAssault extends CardImpl {
public BluntTheAssault (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}");
this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)));
this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter))
.setText("You gain 1 life for each creature on the battlefield."));
this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
}

View file

@ -0,0 +1,46 @@
package mage.cards.f;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import java.util.UUID;
/**
* @author PurpleCrowbar
*/
public final class FogOfWar extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 3 or less");
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature on the battlefield");
static {
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 4));
}
public FogOfWar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// You gain 1 life for each creature on the battlefield.
// Prevent all combat damage that would be dealt this turn by creatures with power 3 or less.
this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter2))
.setText("You gain 1 life for each creature on the battlefield."));
this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, true));
}
private FogOfWar(final FogOfWar card) {
super(card);
}
@Override
public FogOfWar copy() {
return new FogOfWar(this);
}
}

View file

@ -64,6 +64,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Fauna Shaman", 179, Rarity.RARE, mage.cards.f.FaunaShaman.class));
cards.add(new SetCardInfo("Feldon, Ronom Excavator", 135, Rarity.RARE, mage.cards.f.FeldonRonomExcavator.class));
cards.add(new SetCardInfo("Flow of Knowledge", 49, Rarity.UNCOMMON, mage.cards.f.FlowOfKnowledge.class));
cards.add(new SetCardInfo("Fog of War", 180, Rarity.COMMON, mage.cards.f.FogOfWar.class));
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forging the Anchor", 50, Rarity.UNCOMMON, mage.cards.f.ForgingTheAnchor.class));
cards.add(new SetCardInfo("Gaea's Courser", 181, Rarity.UNCOMMON, mage.cards.g.GaeasCourser.class));