Added the todo.dat from ICE AGE

Added the Tap in the parser (works)
Removed the code from MTGAbility that could be added in the cards.dat and modified cards.dat
Tryed to add the shadow & landshome ability (does not work properly)
Added the maxtoughness in targechooser--> added the card Aegis from ICE AGE
This commit is contained in:
laurent.rabouin
2008-11-08 15:54:59 +00:00
parent cb0b68b76d
commit 4d798fe527
10 changed files with 2470 additions and 202 deletions

View File

@@ -1213,7 +1213,7 @@ subtype=Pyknite
toughness=1
[/card]
[card]
text=Counts as a wall {1}: +1/+0 until end of turn1: +0/+1 until end of turn3: Snow Fortress deals 1 damage to target creature without flying that is attacking you.
text=Counts as a wall {1}: +1/+0 until end of turn {1}: +0/+1 until end of turn3: Snow Fortress deals 1 damage to target creature without flying that is attacking you.
id=2423
abilities=defender
auto={1}:1/0
@@ -1260,8 +1260,7 @@ toughness=3
[card]
text=If at any time you control no islands, bury Skeleton Ship.{T}: Put a -1/-1 counter on target creature.
id=2737
abilities=wither
alias=1214
abilities=wither,islandhome
name=Skeleton Ship
rarity=R
type=Creature
@@ -1292,6 +1291,7 @@ text=Gain 1 life. Draw a card at the beginning of the next turn's upkeep.
id=2667
name=Blessed Wine
auto=draw:1
auto=gainlife:1
rarity=C
type=Instant
mana={1}{W}
@@ -1311,6 +1311,7 @@ name=Touch of Death
target=player
auto=damage:1
auto=draw:1
auto=gainlife:1
rarity=C
type=Sorcery
mana={2}{B}
@@ -1319,6 +1320,7 @@ mana={2}{B}
text=Gorilla Pack cannot attack if defending player controls no forests.Bury Gorilla Pack if you control no forests.
id=2571
name=Gorilla Pack
abilities=foresthome
rarity=C
type=Creature
mana={2}{G}
@@ -1346,6 +1348,7 @@ mana={2}{R}{R}
text={2}{G}{T}: Untap target creature.
id=2566
name=Fyndhorn Brownie
auto={2}{G}{T}:untap target(creature)
rarity=C
type=Creature
mana={2}{G}
@@ -1401,5 +1404,47 @@ power=1
subtype=Knights
toughness=1
[/card]
[card]
text=Lhurgoyf has power equal to the total number of creatures in all graveyards and toughness equal to 1 plus the total number of creatures in all graveyards.
id=2576
name=Lhurgoyf
rarity=R
type=Creature
mana={2}{G}{G}
power=*
subtype=Lhurgoyf
toughness=1
[/card]
[card]
text={T} target artifact, creature, or land. Draw a card at the beginning of the next turn's upkeep.
id=2503
target=artifact,creature,land
auto=tap
auto=draw:1
name=Enervate
rarity=C
type=Instant
mana={1}{U}
[/card]
[card]
text=Target creature may untap one additional time this turn.That creature may attack or use abilities that require {T} as part of the activation cost this turn. Draw a card at the beginning of the next turn's upkeep.
id=2595
target=creature
auto=untap
alias=1252
name=Touch of Vitae
auto=draw:1
rarity=U
type=Instant
mana={2}{G}
[/card]
[card]
text={1}{T}: Target 1/1 creature gets +1/+2 until end of turn.
id=2393
name=Aegis of the Meek
rarity=R
type=Artifact
mana={3}
[/card]
#End of file

File diff suppressed because it is too large Load Diff

View File

@@ -166,7 +166,7 @@ toughness=1
[/card]
[card]
text=First strike, protection from white
abilities=First strike, protection from white
abilities=First strike,protection from white
id=1145
name=Black Knight
rarity=U
@@ -277,6 +277,11 @@ mana={3}{W}
text={2}, {T}: Add one mana of any color to your mana pool.
id=1100
name=Celestial Prism
auto={2}{T}: add {B}
auto={2}{T}: add {U}
auto={2}{T}: add {G}
auto={2}{T}: add {R}
auto={2}{T}: add {W}
rarity=U
type=Artifact
mana={3}
@@ -751,6 +756,7 @@ subtype=Aura
[card]
text={2}, {T}: Target creature gains flying until end of turn.
id=1109
auto={2}{T}:flying target(creature)
name=Flying Carpet
rarity=R
type=Artifact
@@ -1109,6 +1115,7 @@ mana={6}
[card]
text={3}, {T}: Untap target creature.
id=1118
auto={3}{T}:untap target(creature)
name=Jandor's Saddlebags
rarity=R
type=Artifact
@@ -1116,7 +1123,7 @@ mana={2}
[/card]
[card]
text={4}, {T}: Draw a card.
auto={4},{T}:Draw:1
auto={4}{T}:Draw:1
id=1119
name=Jayemdae Tome
rarity=R
@@ -1295,7 +1302,7 @@ toughness=2
[/card]
[card]
text=Flying, trample (This creature can't be blocked except by creatures with flying or reach. If this creature would deal enough combat damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player.) At the beginning of your upkeep, sacrifice a creature other than Lord of the Pit. If you can't, Lord of the Pit deals 7 damage to you.
abilities=Flying, trample
abilities=flying,trample
id=1166
name=Lord of the Pit
rarity=R
@@ -1522,6 +1529,8 @@ toughness=3
text=Pirate Ship can't attack unless defending player controls an Island. {T}: Pirate Ship deals 1 damage to target creature or player. When you control no Islands, sacrifice Pirate Ship.
id=1214
name=Pirate Ship
abilities=islandhome
auto={T}:damage target(creature,player)
rarity=R
type=Creature
mana={4}{U}
@@ -1601,6 +1610,7 @@ mana={R}{R}
text={T}: Prodigal Sorcerer deals 1 damage to target creature or player.
id=1217
name=Prodigal Sorcerer
auto={T}:damage:1 target(creature,player)
rarity=C
type=Creature
mana={2}{U}
@@ -1639,6 +1649,7 @@ mana={B}
text=Return target artifact card from your graveyard to your hand.
target=artifact|myGraveyard
id=1219
alias=1174
name=Reconstruction
rarity=C
type=Sorcery
@@ -1724,6 +1735,7 @@ toughness=3
text={3}, {T}: Rod of Ruin deals 1 damage to target creature or player.
id=1134
name=Rod of Ruin
auto={3}{T}:damage:1 target(creature,player)
rarity=U
type=Artifact
mana={4}
@@ -1838,7 +1850,7 @@ toughness=4
[/card]
[card]
text=Flying, vigilance (This creature can't be blocked except by creatures with flying or reach, and attacking doesn't cause this creature to tap.)
abilities=Flying, vigilance
abilities=flying,vigilance
id=1366
name=Serra Angel
rarity=U
@@ -1958,6 +1970,7 @@ mana={X}{G}
text={W}: Add {R} to your mana pool.
id=1137
name=Sunglasses of Urza
auto={W}: add {R}
rarity=R
type=Artifact
mana={3}
@@ -2182,7 +2195,7 @@ subtype=Island Mountain
[/card]
[card]
text=Defender, flying (This creature can't attack, and it can block creatures with flying.)
abilities=Defender, flying
abilities=Defender,flying
id=1232
name=Wall of Air
rarity=U
@@ -2296,6 +2309,7 @@ toughness=3
text=Enchant creature At the beginning of the upkeep of enchanted creature's controller, Wanderlust deals 1 damage to that player.
target=creature
id=1276
alias=1200
name=Wanderlust
rarity=U
type=Enchantment
@@ -2367,7 +2381,7 @@ mana={2}{R}
[/card]
[card]
text=First strike, protection from black
abilities=First strike, protection from black
abilities=first strike,protection from black
id=1370
name=White Knight
rarity=U

View File

@@ -1543,47 +1543,6 @@ public:
};
//1109 flying Carpet
class AFlyingCarpet:public ABasicAbilityModifierUntilEOT{
public:
AFlyingCarpet(int _id, MTGCardInstance * _source): ABasicAbilityModifierUntilEOT(_id,_source,FLYING, NEW ManaCost()){
cost->add(MTG_COLOR_ARTIFACT,2);
}
void Update(float dt){
ABasicAbilityModifierUntilEOT::Update(dt);
if (nbTargets){
MTGCardInstance * mTarget = mTargets[0];
for (int i = 0; i < 2; i++){
if(game->players[i]->game->graveyard->hasCard(mTarget)){
game->players[i]->game->putInGraveyard(source);
mTarget = NULL;
}
}
}
}
int destroy(){
if (!nbTargets) return 0;
MTGCardInstance * mTarget = mTargets[0];
if (mTarget && mTarget->basicAbilities[FLYING]){
mTarget->basicAbilities[FLYING] = stateBeforeActivation[0];
mTarget = NULL;
return 1;
}else{
//BUG !!!
return 0;
}
}
};
//1110 Glasses of Urza
class AGlassesOfUrza:public MTGAbility{
public:
@@ -1644,25 +1603,6 @@ public:
}
};
//1118 Jandors Sandlebag
class AJandorsSandlebag:public TargetAbility{
public:
AJandorsSandlebag(int _id, MTGCardInstance * card):TargetAbility(_id, card){
int _cost[] = {MTG_COLOR_ARTIFACT, 3};
cost = NEW ManaCost(_cost,1);
tc = NEW CreatureTargetChooser();
}
int resolve(){
MTGCardInstance * card = tc->getNextCardTarget();
if (card->tapped){
card->tapped = 0;
return 1;
}
return 0;
}
};
//1119 Jayemdae Tome
class AJayemdaeTome:public ActivatedAbility{
public:
@@ -1678,36 +1618,6 @@ public:
};
//1205 Lifetap
class ALifetap:public MTGAbility{
public:
int nbforeststapped;
int countForestsTapped(){
int result = 0;
MTGInPlay * inplay = source->controller()->opponent()->game->inPlay;
for (int i = 0; i < inplay->nb_cards; i++){
MTGCardInstance * card = inplay->cards[i];
if (card->tapped && card->hasType("forest")) result++;
}
return result;
}
ALifetap(int _id, MTGCardInstance * source):MTGAbility(_id, source){
nbforeststapped = countForestsTapped();
}
void Update(float dt){
int newcount = countForestsTapped();
for (int i=0; i < newcount - nbforeststapped; i++){
source->controller()->life++;
}
nbforeststapped = newcount;
}
};
//Living Artifact
class ALivingArtifact:public MTGAbility{
public:
@@ -2733,22 +2643,6 @@ public:
}
};
//Sunglasses of Urza
class ASunglassesOfUrza:public ActivatedAbility{
public:
ASunglassesOfUrza(int _id, MTGCardInstance * card):ActivatedAbility(_id, card,NEW ManaCost(),0,0){
cost->add(MTG_COLOR_WHITE, 1);
}
int resolve(){
source->controller()->getManaPool()->add(MTG_COLOR_RED, 1);
return 1;
}
};
//--------------Addon Abra------------------
//ShieldOfTheAge
class AShieldOfTheAge: public TargetAbility{
@@ -2765,33 +2659,36 @@ public:
}
};
//2593 Thoughtleech
class AThoughtleech:public MTGAbility{
public:
int nbIslandstapped;
// GiveLifeForTappedType
int countIslandsTapped(){
class AGiveLifeForTappedType:public MTGAbility{
public:
char type[20];
int nbtypestapped;
int counttypesTapped(){
int result = 0;
MTGInPlay * inplay = source->controller()->opponent()->game->inPlay;
for (int i = 0; i < inplay->nb_cards; i++){
MTGCardInstance * card = inplay->cards[i];
if (card->tapped && card->hasType("island")) result++;
if (card->tapped && card->hasType(type)) result++;
}
return result;
}
AThoughtleech(int _id, MTGCardInstance * source):MTGAbility(_id, source){
nbIslandstapped = countIslandsTapped();
AGiveLifeForTappedType(int _id, MTGCardInstance * source, const char * _type):MTGAbility(_id, source){
sprintf(type,"%s",_type);{
nbtypestapped = counttypesTapped();
}
}
void Update(float dt){
int newcount = countIslandsTapped();
for (int i=0; i < newcount - nbIslandstapped; i++){
int newcount = counttypesTapped();
for (int i=0; i < newcount - nbtypestapped; i++){
source->controller()->life++;
}
nbIslandstapped = newcount;
nbtypestapped = newcount;
}
};
//Minion of Leshrac

View File

@@ -25,7 +25,7 @@ using std::map;
class AbilityFactory{
private:
int destroyAllFromTypeInPlay(const char * type, MTGCardInstance * source, int bury = 0);
int destroyAllFromTypeInPlay(char * type, MTGCardInstance * source, int bury = 0);
int destroyAllFromColorInPlay(int color, MTGCardInstance * source, int bury = 0);
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
public:

View File

@@ -82,8 +82,15 @@ static int _b[7] = {20, 0, 140,15, 50,255,128};
#define RETRACE 26
#define EXALTED 27
#define LEGENDARY 28
#define SHADOW 29
#define REACHSHADOW 29
#define FORESTHOME 30
#define ISLANDHOME 31
#define MOUNTAINHOME 32
#define SWAMPHOME 33
#define PLAINSHOME 34
#define NB_BASIC_ABILITIES 29
#define NB_BASIC_ABILITIES 35
static const char * MTGBasicAbilities[] = {
"trample",
@@ -114,7 +121,14 @@ static const char * MTGBasicAbilities[] = {
"persist",
"retrace",
"exalted",
"legendary"
"legendary",
"shadow",
"reachshadow",
"foresthome",
"islandhome",
"moutainhome",
"swamphome",
"plainshome"
};

View File

@@ -63,6 +63,7 @@ public:
class CreatureTargetChooser:public TargetZoneChooser{
public:
int maxpower;
int maxtoughness;
CreatureTargetChooser(MTGGameZone ** _zones, int _nbzones,MTGCardInstance * card = NULL, int _maxtargets = 1);
CreatureTargetChooser(MTGCardInstance * card = NULL, int _maxtargets = 1);
virtual int canTarget(Targetable * _card);

View File

@@ -8,7 +8,7 @@
#include "../include/CardGui.h"
#include "../include/MTGDeck.h"
int AbilityFactory::destroyAllFromTypeInPlay(const char * type, MTGCardInstance * source, int bury){
int AbilityFactory::destroyAllFromTypeInPlay(char * type, MTGCardInstance * source, int bury){
GameObserver * game = GameObserver::GetInstance();
for (int i = 0; i < 2 ; i++){
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
@@ -140,6 +140,20 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
continue;
}
//Tapper (icy manipulator)
found = s.find("tap");
if (found != string::npos){
if (dryMode) return BAKA_EFFECT_GOOD;
ManaCost * cost = ManaCost::parseManaCost(s);
if (tc){
game->addObserver(NEW ATapper(id, card, cost, tc));
}else{
target->tapped = 1;
}
result++;
continue;
}
//Regeneration
found = s.find("}:regenerate");
@@ -458,15 +472,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
game->addObserver(NEW AUntapManaBlocker(_id, card, NEW ManaCost(cost,1)));
break;
}
case 1100: //Celestial Prism
{
for (int i = MTG_COLOR_GREEN; i <= MTG_COLOR_WHITE; i++){
int cost[] = {MTG_COLOR_ARTIFACT, 2};
int cost2[] = {i + MTG_COLOR_GREEN,1};
game->addObserver(NEW AManaProducer(_id + i, card, NEW ManaCost(cost2, 1), NEW ManaCost(cost, 1)));
}
break;
}
case 1237: //Channel
{
game->addObserver(NEW AChannel(_id, card));
@@ -584,11 +589,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
int x = spell->cost->getConvertedCost() - 1; //TODO BETTER
game->addObserver(NEW AFireball(_id, card,spell, x));
break;
}
case 1109: //Flying Carpet
{
game->addObserver(NEW AFlyingCarpet(_id,card));
break;
}
case 1245: //Force of Nature
{
@@ -640,11 +640,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
game->addObserver(NEW AJandorsRing( _id, card));
break;
}
case 1118: //Jandors Sandlebag
{
game->addObserver(NEW AJandorsSandlebag( _id, card));
break;
}
case 1121: //Kormus Bell
{
game->addObserver(NEW AConvertLandToCreatures(id, card, "swamp"));
@@ -673,7 +668,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
}
case 1205: //Lifetap
{
game->addObserver(NEW ALifetap(_id, card));
game->addObserver(NEW AGiveLifeForTappedType(_id, card, "forest"));
break;
}
case 1259: //Living lands
@@ -725,13 +720,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
}
break;
}
case 1134: //Rod of Ruin
{
int cost[] = {MTG_COLOR_ARTIFACT, 3};
ADamager * ability = NEW ADamager(_id, card, NEW ManaCost(cost,1), 1);
game->addObserver(ability);
break;
}
case 1136: //Soul Net
{
game->addObserver( NEW ASoulNet(_id ,card));
@@ -941,23 +929,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
game->addObserver(NEW ADamager(_id+1, card, NEW ManaCost(), 1));
break;
}
case 1217: // Prodigal sorcerer
{
ADamager * ability = NEW ADamager(_id, card, NEW ManaCost(), 1);
game->addObserver(ability);
break;
}
case 1218: //Psychic Venom
{
game->addObserver(NEW APsychicVenom(_id, card, card->target));
break;
}
case 1219: //Reconstruction
{
MTGPlayerCards * zones = game->currentlyActing()->game;
zones->putInZone(card->target,zones->graveyard,zones->hand);
break;
}
case 1220: //Sea Serpent
{
game->addObserver(NEW AStrongLandLinkCreature(_id, card, "island"));
@@ -1074,11 +1050,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
}
break;
}
case 1276: //Wanderlust
{
game->addObserver(NEW AWanderlust(_id, card, card->target));
break;
}
case 1278: //Web
{
game->addObserver(NEW APowerToughnessModifier(_id, card, card->target, 0,2));
@@ -1244,11 +1215,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
}
break;
}
case 1137: //Sunglasses of Urza
{
game->addObserver(NEW ASunglassesOfUrza(_id, card));
break;
}
case 1367: //Sword to Plowshares
{
card->target->controller()->life+= card->target->power;
@@ -1289,7 +1255,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
break;
}
//Addons Abra
//Addons ICE-AGE Cards
case 2631: //Jokulhaups
{
destroyAllFromTypeInPlay("artifact", card);
@@ -1298,16 +1264,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
break;
}
case 2491: //Touch of Death
{
game->currentlyActing()->life+=1;
break;
}
case 2650: //Pyroclasm
case 2650: //Pyroclasm Need to be improved copied from hurricane with does 0 dammage to player and does 2 dammage to each creature
{
int x = 2;
for (int i = 0; i < 2 ; i++){
game->mLayers->stackLayer()->addDamage(card, game->players[i], 0);
game->mLayers->stackLayer()->addDamage(card, game->players[i], 0);// To be removed ?
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
MTGCardInstance * current = game->players[i]->game->inPlay->cards[j];
if (current->isACreature()){
@@ -1333,17 +1294,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
}
case 2593: //Thoughtleech
{
game->addObserver(NEW AThoughtleech(_id, card));
break;
}
case 2667: //Blessed Wine
{
game->currentlyActing()->life+=1;
break;
}
case 2571: //Gorilla Pack
{
game->addObserver(NEW AStrongLandLinkCreature(_id, card, "forest"));
game->addObserver(NEW AGiveLifeForTappedType (_id, card, "island"));
break;
}
case 2484: //Songs of the Damned
@@ -1384,6 +1335,15 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
game->addObserver(NEW ABasicAbilityModifierUntilEOT(_id, card, FLYING, NEW ManaCost(cost,1),tc));
break;
}
case 2393: //Aegis of the Meek work but work also for 0/1 creatures... :D
{
int cost[] = {MTG_COLOR_ARTIFACT,1};
CreatureTargetChooser * tc = NEW CreatureTargetChooser(card);
tc->maxpower = 1;
tc->maxtoughness =1;
game->addObserver(NEW ATargetterPowerToughnessModifierUntilEOT(id, card, 1,2, NEW ManaCost(cost,1),tc));
break;
}
case 2703: // Lost Order of Jarkeld
{
game->addObserver(NEW ALostOrderofJarkeld(_id, card));
@@ -1407,7 +1367,27 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
if (card->basicAbilities[EXALTED]){
game->addObserver(NEW AExalted(_id, card));
}
// Tested the two variant none is working properly I don't know why ??
if (card->basicAbilities[FORESTHOME]){
game->addObserver(NEW AStrongLandLinkCreature(_id, card, "forest"));
}
if (card->basicAbilities[ISLANDHOME]){
AStrongLandLinkCreature * ability = NEW AStrongLandLinkCreature(_id, card,"island");
game->addObserver(ability);
}
if (card->basicAbilities[MOUNTAINHOME]){
AStrongLandLinkCreature * ability = NEW AStrongLandLinkCreature(_id, card,"moutain");
game->addObserver(ability);
}
if (card->basicAbilities[SWAMPHOME]){
AStrongLandLinkCreature * ability = NEW AStrongLandLinkCreature(_id, card,"swamp");
game->addObserver(ability);
}
if (card->basicAbilities[PLAINSHOME]){
AStrongLandLinkCreature * ability = NEW AStrongLandLinkCreature(_id, card,"plains");
game->addObserver(ability);
}
//Instants are put in the graveyard automatically if that's not already done
if (!putSourceInGraveyard){
if (card->hasType("instant") || card->hasType("sorcery")){

View File

@@ -232,8 +232,8 @@ int MTGCardInstance::setToughness(int value){
}
int MTGCardInstance::canBlock(){
if (!tapped && isACreature())
return 1;
if (!tapped && isACreature())return 1;
if (!basicAbilities[SHADOW]&& isACreature()) return 1; // Try to add shadow
return 0;
}
@@ -249,6 +249,7 @@ int MTGCardInstance::canBlock(MTGCardInstance * opponent){
if (opponent->basicAbilities[UNBLOCKABLE]) return 0;
if (opponent->basicAbilities[FEAR] && !(hasColor(MTG_COLOR_ARTIFACT) || hasColor(MTG_COLOR_BLACK))) return 0;
if (opponent->basicAbilities[FLYING] && !( basicAbilities[FLYING] || basicAbilities[REACH])) return 0;
if (opponent->basicAbilities[SHADOW] && !( basicAbilities[SHADOW] || basicAbilities[REACHSHADOW])) return 0;
if (opponent->basicAbilities[SWAMPWALK] && controller()->game->inPlay->hasType("swamp")) return 0;
if (opponent->basicAbilities[FORESTWALK] && controller()->game->inPlay->hasType("forest")) return 0;
if (opponent->basicAbilities[ISLANDWALK] && controller()->game->inPlay->hasType("island")) return 0;

View File

@@ -284,6 +284,7 @@ CreatureTargetChooser::CreatureTargetChooser( MTGCardInstance * card, int _maxta
MTGGameZone * default_zones[] = {game->players[0]->game->inPlay, game->players[1]->game->inPlay};
init(default_zones,2);
maxpower= -1;
maxtoughness= -1;
}
CreatureTargetChooser::CreatureTargetChooser(MTGGameZone ** _zones, int nbzones, MTGCardInstance * card, int _maxtargets):TargetZoneChooser(card, _maxtargets){
@@ -295,6 +296,7 @@ CreatureTargetChooser::CreatureTargetChooser(MTGGameZone ** _zones, int nbzones,
init(_zones, nbzones);
}
maxpower = -1;
maxtoughness= -1;
}
@@ -303,6 +305,7 @@ int CreatureTargetChooser::canTarget(Targetable * target){
if (target->typeAsTarget() == TARGET_CARD){
MTGCardInstance * card = (MTGCardInstance *) target;
if (maxpower != -1 && card->power > maxpower) return 0;
if (maxtoughness != -1 && card->toughness > maxtoughness) return 0;
return card->isACreature();
}
return 0;