mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
[BLC] Implement Murmuration
This commit is contained in:
parent
5f1fca1ff7
commit
e322e130f2
2 changed files with 98 additions and 0 deletions
97
Mage.Sets/src/mage/cards/m/Murmuration.java
Normal file
97
Mage.Sets/src/mage/cards/m/Murmuration.java
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.token.StormCrowToken;
|
||||||
|
import mage.watchers.common.CastSpellLastTurnWatcher;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class Murmuration extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.BIRD, "Birds");
|
||||||
|
private static final FilterPermanent filter2 = new FilterPermanent(SubType.BIRD, "");
|
||||||
|
|
||||||
|
public Murmuration(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}");
|
||||||
|
|
||||||
|
// Birds you control get +1/+1 and have vigilance.
|
||||||
|
Ability ability = new SimpleStaticAbility(new BoostControlledEffect(
|
||||||
|
1, 1, Duration.WhileOnBattlefield, filter
|
||||||
|
));
|
||||||
|
ability.addEffect(new GainAbilityControlledEffect(
|
||||||
|
VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter2
|
||||||
|
).setText("and have vigilance"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// At the beginning of your end step, for each spell you've cast this turn, create a 1/2 blue Bird creature token with flying named Storm Crow.
|
||||||
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
|
new CreateTokenEffect(new StormCrowToken(), MurmurationDynamicValue.instance)
|
||||||
|
.setText("for each spell you've cast this turn, create a " +
|
||||||
|
"1/2 blue Bird creature token with flying named Storm Crow"),
|
||||||
|
TargetController.YOU, false
|
||||||
|
).addHint(MurmurationDynamicValue.getHint()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private Murmuration(final Murmuration card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Murmuration copy() {
|
||||||
|
return new Murmuration(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum MurmurationDynamicValue implements DynamicValue {
|
||||||
|
instance;
|
||||||
|
private static final Hint hint = new ValueHint("Spells you've cast this turn", instance);
|
||||||
|
|
||||||
|
public static Hint getHint() {
|
||||||
|
return hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||||
|
return game
|
||||||
|
.getState()
|
||||||
|
.getWatcher(CastSpellLastTurnWatcher.class)
|
||||||
|
.getAmountOfSpellsPlayerCastOnCurrentTurn(sourceAbility.getControllerId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MurmurationDynamicValue copy() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return "spell you've cast this turn";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -175,6 +175,7 @@ public final class BloomburrowCommander extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Morbid Opportunist", 183, Rarity.UNCOMMON, mage.cards.m.MorbidOpportunist.class));
|
cards.add(new SetCardInfo("Morbid Opportunist", 183, Rarity.UNCOMMON, mage.cards.m.MorbidOpportunist.class));
|
||||||
cards.add(new SetCardInfo("Mossfire Valley", 316, Rarity.RARE, mage.cards.m.MossfireValley.class));
|
cards.add(new SetCardInfo("Mossfire Valley", 316, Rarity.RARE, mage.cards.m.MossfireValley.class));
|
||||||
cards.add(new SetCardInfo("Mosswort Bridge", 317, Rarity.RARE, mage.cards.m.MosswortBridge.class));
|
cards.add(new SetCardInfo("Mosswort Bridge", 317, Rarity.RARE, mage.cards.m.MosswortBridge.class));
|
||||||
|
cards.add(new SetCardInfo("Murmuration", 10, Rarity.RARE, mage.cards.m.Murmuration.class));
|
||||||
cards.add(new SetCardInfo("Mystic Monastery", 318, Rarity.UNCOMMON, mage.cards.m.MysticMonastery.class));
|
cards.add(new SetCardInfo("Mystic Monastery", 318, Rarity.UNCOMMON, mage.cards.m.MysticMonastery.class));
|
||||||
cards.add(new SetCardInfo("Nadier's Nightblade", 184, Rarity.UNCOMMON, mage.cards.n.NadiersNightblade.class));
|
cards.add(new SetCardInfo("Nadier's Nightblade", 184, Rarity.UNCOMMON, mage.cards.n.NadiersNightblade.class));
|
||||||
cards.add(new SetCardInfo("Narset, Parter of Veils", 76, Rarity.RARE, mage.cards.n.NarsetParterOfVeils.class));
|
cards.add(new SetCardInfo("Narset, Parter of Veils", 76, Rarity.RARE, mage.cards.n.NarsetParterOfVeils.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue