1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-01-24 19:10:15 +00:00

[ODY] two small changes to Flame Burst and Muscle Burst

This commit is contained in:
Evan Kranzler 2022-02-04 09:50:03 -05:00
parent 6c9fc1679d
commit f707dfe94f
2 changed files with 32 additions and 65 deletions
Mage.Sets/src/mage/cards

View file

@ -1,11 +1,12 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount; import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount;
import mage.abilities.effects.Effect; import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.InfoEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -16,11 +17,11 @@ import mage.filter.FilterCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.mageobject.NamePredicate;
import mage.game.Game;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/** /**
*
* @author LoneFox * @author LoneFox
*/ */
public final class FlameBurst extends CardImpl { public final class FlameBurst extends CardImpl {
@ -28,17 +29,21 @@ public final class FlameBurst extends CardImpl {
private static final FilterCard filter = new FilterCard(); private static final FilterCard filter = new FilterCard();
static { static {
filter.add(Predicates.or(new NamePredicate("Flame Burst"), filter.add(Predicates.or(
new AbilityPredicate(CountAsFlameBurstAbility.class))); new NamePredicate("Flame Burst"),
new AbilityPredicate(CountAsFlameBurstAbility.class)
));
} }
private static final DynamicValue xValue = new AdditiveDynamicValue(
new CardsInAllGraveyardsCount(filter), StaticValue.get(2)
);
public FlameBurst(UUID ownerId, CardSetInfo setInfo) { public FlameBurst(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Flame Burst deals X damage to any target, where X is 2 plus the number of cards named Flame Burst in all graveyards. // Flame Burst deals X damage to any target, where X is 2 plus the number of cards named Flame Burst in all graveyards.
Effect effect = new DamageTargetEffect(new FlameBurstCount(filter)); this.getSpellAbility().addEffect(new DamageTargetEffect(xValue).setText("{this} deals X damage to any target, where X is 2 plus the number of cards named Flame Burst in all graveyards."));
effect.setText("{this} deals X damage to any target, where X is 2 plus the number of cards named Flame Burst in all graveyards.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addTarget(new TargetAnyTarget());
} }
@ -56,28 +61,6 @@ public final class FlameBurst extends CardImpl {
} }
} }
class FlameBurstCount extends CardsInAllGraveyardsCount {
public FlameBurstCount(FilterCard filter) {
super(filter);
}
public FlameBurstCount(FlameBurstCount value) {
super(value);
}
@Override
public FlameBurstCount copy() {
return new FlameBurstCount(this);
}
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return super.calculate(game, sourceAbility, effect) + 2;
}
}
class CountAsFlameBurstAbility extends SimpleStaticAbility { class CountAsFlameBurstAbility extends SimpleStaticAbility {
public CountAsFlameBurstAbility() { public CountAsFlameBurstAbility() {

View file

@ -1,11 +1,12 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount; import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount;
import mage.abilities.effects.Effect; import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -17,11 +18,11 @@ import mage.filter.FilterCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.mageobject.NamePredicate;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LoneFox * @author LoneFox
*/ */
public final class MuscleBurst extends CardImpl { public final class MuscleBurst extends CardImpl {
@ -29,18 +30,23 @@ public final class MuscleBurst extends CardImpl {
private static final FilterCard filter = new FilterCard(); private static final FilterCard filter = new FilterCard();
static { static {
filter.add(Predicates.or(new NamePredicate("Muscle Burst"), filter.add(Predicates.or(
new AbilityPredicate(CountAsMuscleBurstAbility.class))); new NamePredicate("Muscle Burst"),
new AbilityPredicate(CountAsMuscleBurstAbility.class)
));
} }
private static final DynamicValue xValue = new AdditiveDynamicValue(
new CardsInAllGraveyardsCount(filter), StaticValue.get(3)
);
public MuscleBurst(UUID ownerId, CardSetInfo setInfo) { public MuscleBurst(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Target creature gets +X/+X until end of turn, where X is 3 plus the number of cards named Muscle Burst in all graveyards. // Target creature gets +X/+X until end of turn, where X is 3 plus the number of cards named Muscle Burst in all graveyards.
MuscleBurstCount count = new MuscleBurstCount(filter); this.getSpellAbility().addEffect(new BoostTargetEffect(
Effect effect = new BoostTargetEffect(count, count, Duration.EndOfTurn, true); xValue, xValue, Duration.EndOfTurn, true
effect.setText("Target creature gets +X/+X until end of turn, where X is 3 plus the number of cards named Muscle Burst in all graveyards."); ).setText("Target creature gets +X/+X until end of turn, where X is 3 plus the number of cards named Muscle Burst in all graveyards."));
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
} }
@ -58,28 +64,6 @@ public final class MuscleBurst extends CardImpl {
} }
} }
class MuscleBurstCount extends CardsInAllGraveyardsCount {
public MuscleBurstCount(FilterCard filter) {
super(filter);
}
private MuscleBurstCount(MuscleBurstCount value) {
super(value);
}
@Override
public MuscleBurstCount copy() {
return new MuscleBurstCount(this);
}
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return super.calculate(game, sourceAbility, effect) + 3;
}
}
class CountAsMuscleBurstAbility extends SimpleStaticAbility { class CountAsMuscleBurstAbility extends SimpleStaticAbility {
public CountAsMuscleBurstAbility() { public CountAsMuscleBurstAbility() {