mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[ODY] fixed Skyshooter not sacrificing itself to activate (fixes #7738)
This commit is contained in:
parent
edec5b32fb
commit
62008ea6b7
1 changed files with 13 additions and 11 deletions
|
@ -1,10 +1,9 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -13,25 +12,27 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterAttackingOrBlockingCreature;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.common.TargetAttackingOrBlockingCreature;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class Skyshooter extends CardImpl {
|
||||
|
||||
private static final FilterAttackingOrBlockingCreature filter = new FilterAttackingOrBlockingCreature("attacking or blocking creature with flying");
|
||||
private static final FilterPermanent filter
|
||||
= new FilterAttackingOrBlockingCreature("attacking or blocking creature with flying");
|
||||
|
||||
static {
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
}
|
||||
|
||||
public Skyshooter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add(SubType.CENTAUR);
|
||||
this.subtype.add(SubType.ARCHER);
|
||||
|
||||
|
@ -40,11 +41,12 @@ public final class Skyshooter extends CardImpl {
|
|||
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
// {tap}, Sacrifice Skyshooter: Destroy target attacking or blocking creature with flying.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetAttackingOrBlockingCreature(1,1, filter, false));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {tap}, Sacrifice Skyshooter: Destroy target attacking or blocking creature with flying.
|
||||
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private Skyshooter(final Skyshooter card) {
|
||||
|
|
Loading…
Reference in a new issue