mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
Implement AdventurePredicate.
This adds support for Edgewall Innkeeper (and similar cards) and Memory Theft.
This commit is contained in:
parent
6160bc25ef
commit
af5ccf6914
4 changed files with 152 additions and 52 deletions
|
|
@ -7,6 +7,7 @@ package mage.cards;
|
|||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SpellAbilityType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
||||
|
|
@ -23,6 +24,7 @@ public class AdventureCardSpellImpl extends CardImpl implements AdventureCardSpe
|
|||
|
||||
public AdventureCardSpellImpl(UUID ownerId, CardSetInfo setInfo, CardType[] cardTypes, String costs, AdventureCard adventureCardParent) {
|
||||
super(ownerId, setInfo, cardTypes, costs, SpellAbilityType.ADVENTURE_SPELL);
|
||||
this.subtype.add(SubType.ADVENTURE);
|
||||
this.adventureCardParent = adventureCardParent;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,27 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.Card;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
* TODO: make this actually work
|
||||
*/
|
||||
public enum AdventurePredicate implements Predicate<MageObject> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
return false;
|
||||
if (input instanceof Spell) {
|
||||
return ((Spell) input).getCard() instanceof AdventureCard;
|
||||
} else if (input instanceof Card) {
|
||||
return input instanceof AdventureCard;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue