mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
* Willbender - Fixed that it wrongly could not target also abilities.
This commit is contained in:
parent
81590262f6
commit
f350dd71c9
2 changed files with 5 additions and 5 deletions
|
@ -37,7 +37,7 @@ import mage.abilities.keyword.MorphAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.filter.predicate.mageobject.NumberOfTargetsPredicate;
|
||||
import mage.target.TargetStackObject;
|
||||
|
||||
|
@ -47,10 +47,10 @@ import mage.target.TargetStackObject;
|
|||
*/
|
||||
public class Willbender extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("spell with a single target");
|
||||
private static final FilterStackObject FILTER = new FilterStackObject("spell or ability with a single target");
|
||||
|
||||
static {
|
||||
filter.add(new NumberOfTargetsPredicate(1));
|
||||
FILTER.add(new NumberOfTargetsPredicate(1));
|
||||
}
|
||||
|
||||
public Willbender(UUID ownerId) {
|
||||
|
@ -66,7 +66,7 @@ public class Willbender extends CardImpl {
|
|||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}")));
|
||||
// When Willbender is turned face up, change the target of target spell or ability with a single target.
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new ChooseNewTargetsTargetEffect(true, true));
|
||||
ability.addTarget(new TargetStackObject(filter));
|
||||
ability.addTarget(new TargetStackObject(FILTER));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ import mage.game.stack.StackObject;
|
|||
*/
|
||||
public class FilterStackObject extends FilterObject<StackObject> {
|
||||
|
||||
protected List<ObjectPlayerPredicate<ObjectPlayer<Permanent>>> extraPredicates = new ArrayList<ObjectPlayerPredicate<ObjectPlayer<Permanent>>>();
|
||||
protected List<ObjectPlayerPredicate<ObjectPlayer<Permanent>>> extraPredicates = new ArrayList<>();
|
||||
|
||||
public FilterStackObject() {
|
||||
super("spell or ability");
|
||||
|
|
Loading…
Reference in a new issue