mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[CLB] Implemented Sharpshooter Elf
This commit is contained in:
parent
9c50b2331c
commit
1991bc9e80
2 changed files with 73 additions and 0 deletions
72
Mage.Sets/src/mage/cards/s/SharpshooterElf.java
Normal file
72
Mage.Sets/src/mage/cards/s/SharpshooterElf.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterOpponentsCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SharpshooterElf extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterOpponentsCreaturePermanent("creature with flying an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
}
|
||||
|
||||
private static final DynamicValue xValue = new SourcePermanentPowerCount(false);
|
||||
|
||||
public SharpshooterElf(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.RANGER);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// Sharpshooter Elf's power is equal to the number of creatures you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SetPowerSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame)
|
||||
));
|
||||
|
||||
// When Sharpshooter Elf enters the battlefield, it deals damage equal to its power to target creature with flying an opponent controls.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new DamageTargetEffect(xValue, "it"), true
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
private SharpshooterElf(final SharpshooterElf card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SharpshooterElf copy() {
|
||||
return new SharpshooterElf(this);
|
||||
}
|
||||
}
|
|
@ -145,6 +145,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sea of Clouds", 360, Rarity.RARE, mage.cards.s.SeaOfClouds.class));
|
||||
cards.add(new SetCardInfo("Shadowheart, Dark Justiciar", 146, Rarity.RARE, mage.cards.s.ShadowheartDarkJusticiar.class));
|
||||
cards.add(new SetCardInfo("Shameless Charlatan", 96, Rarity.RARE, mage.cards.s.ShamelessCharlatan.class));
|
||||
cards.add(new SetCardInfo("Sharpshooter Elf", 253, Rarity.UNCOMMON, mage.cards.s.SharpshooterElf.class));
|
||||
cards.add(new SetCardInfo("Silvanus's Invoker", 254, Rarity.COMMON, mage.cards.s.SilvanussInvoker.class));
|
||||
cards.add(new SetCardInfo("Skanos Dragonheart", 255, Rarity.UNCOMMON, mage.cards.s.SkanosDragonheart.class));
|
||||
cards.add(new SetCardInfo("Skullwinder", 256, Rarity.UNCOMMON, mage.cards.s.Skullwinder.class));
|
||||
|
|
Loading…
Reference in a new issue