mirror of
https://github.com/correl/mage.git
synced 2024-11-14 11:09:31 +00:00
[LTC] Implement Galadhrim Ambush
This commit is contained in:
parent
ad0e0bf06b
commit
ae94db9644
2 changed files with 52 additions and 0 deletions
51
Mage.Sets/src/mage/cards/g/GaladhrimAmbush.java
Normal file
51
Mage.Sets/src/mage/cards/g/GaladhrimAmbush.java
Normal file
|
@ -0,0 +1,51 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.AttackingCreatureCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.permanent.token.ElfWarriorToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GaladhrimAmbush extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new AttackingCreatureCount();
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("non-Elf creaetures");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(SubType.ELF.getPredicate()));
|
||||
}
|
||||
|
||||
public GaladhrimAmbush(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
|
||||
|
||||
// Create X 1/1 green Elf Warrior creature tokens, where X is the number of attacking creatures.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfWarriorToken(), xValue));
|
||||
|
||||
// Prevent all combat damage that would be dealt this turn by non-Elf creatures.
|
||||
this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(
|
||||
filter, Duration.EndOfTurn, true
|
||||
));
|
||||
}
|
||||
|
||||
private GaladhrimAmbush(final GaladhrimAmbush card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GaladhrimAmbush copy() {
|
||||
return new GaladhrimAmbush(this);
|
||||
}
|
||||
}
|
|
@ -104,6 +104,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Frostboil Snarl", 312, Rarity.RARE, mage.cards.f.FrostboilSnarl.class));
|
||||
cards.add(new SetCardInfo("Fumigate", 170, Rarity.RARE, mage.cards.f.Fumigate.class));
|
||||
cards.add(new SetCardInfo("Furycalm Snarl", 313, Rarity.RARE, mage.cards.f.FurycalmSnarl.class));
|
||||
cards.add(new SetCardInfo("Galadhrim Ambush", 38, Rarity.RARE, mage.cards.g.GaladhrimAmbush.class));
|
||||
cards.add(new SetCardInfo("Gemstone Caverns", 364, Rarity.MYTHIC, mage.cards.g.GemstoneCaverns.class));
|
||||
cards.add(new SetCardInfo("Genesis Wave", 245, Rarity.RARE, mage.cards.g.GenesisWave.class));
|
||||
cards.add(new SetCardInfo("Ghost Quarter", 314, Rarity.UNCOMMON, mage.cards.g.GhostQuarter.class));
|
||||
|
|
Loading…
Reference in a new issue