mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Champion bug fixes
This commit is contained in:
parent
57a992649e
commit
f2d5462c97
13 changed files with 21 additions and 15 deletions
|
|
@ -39,11 +39,13 @@ import mage.abilities.costs.CostImpl;
|
|||
import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -74,8 +76,8 @@ public class ChampionAbility extends StaticAbility {
|
|||
protected String[] subtypes;
|
||||
protected String objectDescription;
|
||||
|
||||
public ChampionAbility(Card card, String subtype) {
|
||||
this(card, new String[]{subtype});
|
||||
public ChampionAbility(Card card, String subtype, boolean requiresCreature) {
|
||||
this(card, new String[]{subtype}, requiresCreature);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -85,8 +87,9 @@ public class ChampionAbility extends StaticAbility {
|
|||
* @param card
|
||||
* @param subtypes subtypes to champion with, if empty all creatures can be
|
||||
* used
|
||||
* @param requiresCreature for cards that specifically require championing another creature
|
||||
*/
|
||||
public ChampionAbility(Card card, String[] subtypes) {
|
||||
public ChampionAbility(Card card, String[] subtypes, boolean requiresCreature) {
|
||||
super(Zone.BATTLEFIELD, null);
|
||||
|
||||
this.subtypes = subtypes;
|
||||
|
|
@ -111,6 +114,9 @@ public class ChampionAbility extends StaticAbility {
|
|||
if (!subtypesPredicates.isEmpty()) {
|
||||
filter.add(Predicates.or(subtypesPredicates));
|
||||
}
|
||||
if (requiresCreature) {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
filter.add(new AnotherPredicate());
|
||||
|
||||
// When this permanent enters the battlefield, sacrifice it unless you exile another [object] you control.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue