diff --git a/projects/mtg/bin/Res/sets/10E/_cards.dat b/projects/mtg/bin/Res/sets/10E/_cards.dat index 25cf76f0f..5e19b3725 100644 --- a/projects/mtg/bin/Res/sets/10E/_cards.dat +++ b/projects/mtg/bin/Res/sets/10E/_cards.dat @@ -483,7 +483,7 @@ mana={2}{U} [card] text={T}: Target creature with power 2 or less is unblockable this turn. id=134758 -alias=1285 +auto={T}:unblockable target(creature[power<=2]) name=Crafty Pathmage rarity=C type=Creature diff --git a/projects/mtg/bin/Res/sets/ATQ/_cards.dat b/projects/mtg/bin/Res/sets/ATQ/_cards.dat index 7334262e5..fb39f5974 100644 --- a/projects/mtg/bin/Res/sets/ATQ/_cards.dat +++ b/projects/mtg/bin/Res/sets/ATQ/_cards.dat @@ -346,7 +346,7 @@ toughness=4 [card] text={2}, {T}:Target creature with power 2 or less is unblockable this turn. id=1025 -alias=1285 +auto={T}:unblockable target(creature[power<=2]) name=Tawnos's Wand rarity=U mana={4} diff --git a/projects/mtg/bin/Res/sets/FUT/_cards.dat b/projects/mtg/bin/Res/sets/FUT/_cards.dat index ac13b7161..9f8e44063 100644 --- a/projects/mtg/bin/Res/sets/FUT/_cards.dat +++ b/projects/mtg/bin/Res/sets/FUT/_cards.dat @@ -267,6 +267,19 @@ auto=foreach(creature|myBattlefield) draw:1 auto=foreach(creature|myBattlefield) life:-1 [/card] [card] +id=130346 +name=Mistmeadow Skulk +mana={1}{W} +type=Creature +subtype=Kithkin Rogue +power=1 +toughness=1 +text=Lifelink, protection from converted mana cost 3 or greater +auto=protection from(*[manacost>=3]) +abilities=lifelink +rarity=U +[/card] +[card] id=136138 name=Nessian Courser rarity=C diff --git a/projects/mtg/bin/Res/sets/FUT/todo.dat b/projects/mtg/bin/Res/sets/FUT/todo.dat index 62646ec7b..ed227c221 100644 --- a/projects/mtg/bin/Res/sets/FUT/todo.dat +++ b/projects/mtg/bin/Res/sets/FUT/todo.dat @@ -741,17 +741,6 @@ text=All Slivers have "When this permanent comes into play, you may fateseal 1." rarity=C [/card] [card] -id=130346 -name=Mistmeadow Skulk -mana={1}{W} -type=Creature -subtype=Kithkin Rogue -power=1 -toughness=1 -text=Lifelink, protection from converted mana cost 3 or greater -rarity=U -[/card] -[card] id=136154 name=Molten Disaster mana={X}{R}{R} diff --git a/projects/mtg/bin/Res/sets/HML/_cards.dat b/projects/mtg/bin/Res/sets/HML/_cards.dat index ef31bb36a..2faadcdf7 100644 --- a/projects/mtg/bin/Res/sets/HML/_cards.dat +++ b/projects/mtg/bin/Res/sets/HML/_cards.dat @@ -206,6 +206,30 @@ auto={2}{T}:add{U} rarity=U [/card] [card] +id=3013 +name=Aysen Bureaucrats +mana={1}{W} +type=Creature +subtype=Human Advisor +power=1 +toughness=1 +text={T}: Tap target creature with power 2 or less. +auto={T}:tap target(creature[power<=2]) +rarity=C +[/card] +[card] +id=3014 +name=Aysen Bureaucrats +mana={1}{W} +type=Creature +subtype=Human Advisor +power=1 +toughness=1 +text={T}: Tap target creature with power 2 or less. +auto={T}:tap target(creature[power<=2]) +rarity=C +[/card] +[card] id=3015 name=Aysen Crusader mana={2}{W}{W} diff --git a/projects/mtg/bin/Res/sets/HML/todo.dat b/projects/mtg/bin/Res/sets/HML/todo.dat index 6c7d5c5b7..a584fac09 100644 --- a/projects/mtg/bin/Res/sets/HML/todo.dat +++ b/projects/mtg/bin/Res/sets/HML/todo.dat @@ -23,17 +23,6 @@ text={2}, {T}, Sacrifice Apocalypse Chime: Destroy all nontoken permanents from rarity=R [/card] [card] -id=3014 -name=Aysen Bureaucrats -mana={1}{W} -type=Creature -subtype=Human Advisor -power=1 -toughness=1 -text={T}: Tap target creature with power 2 or less. -rarity=C -[/card] -[card] id=2936 name=Baki's Curse mana={2}{U}{U} diff --git a/projects/mtg/bin/Res/sets/ICE/_cards.dat b/projects/mtg/bin/Res/sets/ICE/_cards.dat index 5c923daa6..c870c642f 100644 --- a/projects/mtg/bin/Res/sets/ICE/_cards.dat +++ b/projects/mtg/bin/Res/sets/ICE/_cards.dat @@ -22,6 +22,7 @@ type=Land [/card] [card] text={1}, {T}: Target 1/1 creature gets +1/+2 until end of turn. +auto={1}{T}: 1/2 target(creature[power=1;toughness=1]) id=2393 name=Aegis of the Meek rarity=R @@ -1531,6 +1532,7 @@ type=Instant [/card] [card] text={2}, {T}: Target creature with power 3 or less gains flying until end of turn. +auto={2}{T}: flying target(creature[power<=3]) id=2435 name=Whalebone Glider rarity=U diff --git a/projects/mtg/bin/Res/sets/LEG/_cards.dat b/projects/mtg/bin/Res/sets/LEG/_cards.dat index d60b0dd5f..f5e3b4652 100644 --- a/projects/mtg/bin/Res/sets/LEG/_cards.dat +++ b/projects/mtg/bin/Res/sets/LEG/_cards.dat @@ -964,6 +964,7 @@ abilities=legendary text={T}: Add {G} to your mana pool. {T}: Target 1/1 creature gets +1/+2 until end of turn. id=1703 auto={T}:Add {G} +auto={T}: 1/2 target(creature[power=1;toughness=1]) name=Pendelhaven rarity=U type=Land diff --git a/projects/mtg/bin/Res/sets/MIR/_cards.dat b/projects/mtg/bin/Res/sets/MIR/_cards.dat index 9fbfc1857..a405cceed 100644 --- a/projects/mtg/bin/Res/sets/MIR/_cards.dat +++ b/projects/mtg/bin/Res/sets/MIR/_cards.dat @@ -345,7 +345,7 @@ toughness=2 text={T}: Target creature with power 2 or less is unblockable this turn. id=3441 name=Dwarven Nomad -alias=1285 +auto={T}:unblockable target(creature[power<=2]) type=Creature subtype=Dwarf Nomad rarity=C diff --git a/projects/mtg/bin/Res/sets/ONS/_cards.dat b/projects/mtg/bin/Res/sets/ONS/_cards.dat index f173e5ccf..6e8839676 100644 --- a/projects/mtg/bin/Res/sets/ONS/_cards.dat +++ b/projects/mtg/bin/Res/sets/ONS/_cards.dat @@ -192,7 +192,7 @@ toughness=0 [card] text={T}: Target creature with power 2 or less is unblockable this turn. id=40060 -alias=1285 +auto={T}:unblockable target(creature[power<=2]) name=Crafty Pathmage rarity=C mana={2}{U} diff --git a/projects/mtg/bin/Res/sets/RV/_cards.dat b/projects/mtg/bin/Res/sets/RV/_cards.dat index 197f2f1ce..9f51083e6 100644 --- a/projects/mtg/bin/Res/sets/RV/_cards.dat +++ b/projects/mtg/bin/Res/sets/RV/_cards.dat @@ -608,6 +608,7 @@ toughness=1 [/card] [card] text={T}: Target creature with power 2 or less is unblockable this turn. +auto={T}:unblockable target(creature[power<=2]) id=1285 name=Dwarven Warriors rarity=C @@ -1406,6 +1407,15 @@ mana={1} type=Artifact [/card] [card] +text=Creatures with power 3 or greater don't untap during their controllers' untap steps. +auto=lord(creature[power>=3]) doesnotuntap +id=1125 +name=Meekstone +rarity=R +type=Artifact +mana={1} +[/card] +[card] id=1210 name=Merfolk of the Pearl Trident rarity=C diff --git a/projects/mtg/bin/Res/sets/RV/todo.dat b/projects/mtg/bin/Res/sets/RV/todo.dat index 9724d1f26..173102a02 100644 --- a/projects/mtg/bin/Res/sets/RV/todo.dat +++ b/projects/mtg/bin/Res/sets/RV/todo.dat @@ -264,15 +264,6 @@ type=Enchantment mana={3}{R} [/card] [card] -text=Creatures with power 3 or greater don't untap during their controllers' untap steps. -id=1125 -name=Meekstone -rarity=R -color=Artifact -type=Artifact -mana={1} -[/card] -[card] text=Flying, banding #Banding not supported in Wagic 0.9 abilities=Flying, banding diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index e4a5ec80c..49de7f796 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -57,6 +57,7 @@ generic/wither.txt #Specific Cards ######################## act_of_treason.txt +aegis_of_the_meek.txt aether_mutation.txt afflict.txt akron_legionnaire.txt @@ -93,6 +94,7 @@ ashen_firebeast.txt ashen_firebeast2.txt aura_mutation.txt avarice_totem.txt +aysen_bureaucrats.txt baneslayer_angel.txt baneslayer_angel2.txt barbed_sliver.txt @@ -174,6 +176,7 @@ drift_of_the_dead.txt dromad_purebred.txt dross_harvester.txt duskwalker.txt +dwarven_warriors.txt ebony_horse.txt ekundu_cyclops1_i218.txt ekundu_cyclops2_i218.txt @@ -266,6 +269,7 @@ lord_of_the_pit.txt lord_of_the_pit2.txt master_decoy.txt master_of_etherium.txt +meekstone.txt memory_erosion.txt millstone.txt misc01.txt diff --git a/projects/mtg/bin/Res/test/aegis_of_the_meek.txt b/projects/mtg/bin/Res/test/aegis_of_the_meek.txt new file mode 100644 index 000000000..114710b9d --- /dev/null +++ b/projects/mtg/bin/Res/test/aegis_of_the_meek.txt @@ -0,0 +1,28 @@ +#NAME: Aegis of the Meek +#DESC: "{1}{T}: Target 1/1 creature +#DESC: gets +1/+2 until end of turn." +#DESC: Test tries some illegal targets +#DESC: before settling on a legal one. +[INIT] +firstmain +[PLAYER1] +inplay:Aegis of the Meek,Raging Goblin,Steppe Lynx,Savannah Lions,Courier Hawk +hand:Swords to Plowshares +manapool:{W}{W} +[PLAYER2] +[DO] +Aegis of the Meek +Steppe Lynx +Savannah Lions +Courier Hawk +Raging Goblin +Swords to Plowshares +Raging Goblin +[ASSERT] +firstmain +[PLAYER1] +inplay:Aegis of the Meek,Steppe Lynx,Savannah Lions,Courier Hawk +graveyard:Swords to Plowshares +life:22 +[PLAYER2] +[END] diff --git a/projects/mtg/bin/Res/test/aysen_bureaucrats.txt b/projects/mtg/bin/Res/test/aysen_bureaucrats.txt new file mode 100644 index 000000000..0a95c8d9d --- /dev/null +++ b/projects/mtg/bin/Res/test/aysen_bureaucrats.txt @@ -0,0 +1,25 @@ +#NAME: Aysen Bureaucrats +#DESC: "{T}: Tap target creature with power 2 or less." +#DESC: Test tries to tap an illegal +#DESC: target before tapping the +#DESC: legal one. +[INIT] +firstmain +[PLAYER1] +inplay:Aysen Bureaucrats,Spark Elemental,Grizzly Bears +hand:Assassinate +manapool:{2}{B} +[PLAYER2] +[DO] +Aysen Bureaucrats +Spark Elemental +Grizzly Bears +Assassinate +Grizzly Bears +[ASSERT] +firstmain +[PLAYER1] +inplay:Aysen Bureaucrats,Spark Elemental +graveyard:Grizzly Bears,Assassinate +[PLAYER2] +[END] diff --git a/projects/mtg/bin/Res/test/dwarven_warriors.txt b/projects/mtg/bin/Res/test/dwarven_warriors.txt new file mode 100644 index 000000000..762e2efd5 --- /dev/null +++ b/projects/mtg/bin/Res/test/dwarven_warriors.txt @@ -0,0 +1,27 @@ +#NAME: Dwarven Warriors +#DESC: "{T}: Target creature with power 2 +#DESC: or less is unblockable this turn." +[INIT] +firstmain +[PLAYER1] +inplay:Dwarven Warriors,Grizzly Bears +[PLAYER2] +inplay:Craw Wurm +[DO] +Dwarven Warriors +Grizzly Bears +next +next +Grizzly Bears +next +Craw Wurm +next +next +[ASSERT] +combatend +[PLAYER1] +inplay:Dwarven Warriors,Grizzly Bears +[PLAYER2] +inplay:Craw Wurm +life:18 +[END] diff --git a/projects/mtg/bin/Res/test/meekstone.txt b/projects/mtg/bin/Res/test/meekstone.txt new file mode 100644 index 000000000..ee556c6f5 --- /dev/null +++ b/projects/mtg/bin/Res/test/meekstone.txt @@ -0,0 +1,35 @@ +#NAME: Meekstone +#DESC: "Creatures with power 3 or +#DESC: greater don't untap during +#DESC: their controllers' untap steps." +[INIT] +secondmain +[PLAYER1] +inplay:Meekstone,Flood +manapool:{U}{U}{U}{U} +[PLAYER2] +inplay:Grizzly Bears,War Mammoth,1373,1374,1375 +hand:Assassinate +[DO] +Flood +Grizzly Bears +Flood +War Mammoth +eot +next +next +next +1373 +1374 +1375 +Assassinate +Grizzly Bears +War Mammoth +[ASSERT] +firstmain +[PLAYER1] +inplay:Meekstone,Flood +[PLAYER2] +inplay:Grizzly Bears,1373,1374,1375 +graveyard:War Mammoth,Assassinate +[END] diff --git a/projects/mtg/include/CardDescriptor.h b/projects/mtg/include/CardDescriptor.h index 4ec8143a1..34e1eb1cd 100644 --- a/projects/mtg/include/CardDescriptor.h +++ b/projects/mtg/include/CardDescriptor.h @@ -11,12 +11,28 @@ #define CD_OR 1 #define CD_AND 2 +enum ENUM_COMPARISON_MODES + { + COMPARISON_NONE = 0, // Needs to remain 0 for quick if(comparison_mode) checks + COMPARISON_AT_MOST, + COMPARISON_AT_LEAST, + COMPARISON_EQUAL, + COMPARISON_GREATER, + COMPARISON_LESS, + COMPARISON_UNEQUAL + }; + class CardDescriptor: public MTGCardInstance{ protected: MTGCardInstance * match_or(MTGCardInstance * card); MTGCardInstance * match_and(MTGCardInstance * card); + bool valueInRange(int comparisonMode, int value, int criterion); public: int mode; + int powerComparisonMode; + int toughnessComparisonMode; + int manacostComparisonMode; + int convertedManacost; // might fit better into MTGCardInstance? int init(); CardDescriptor(); void unsecureSetTapped(int i); diff --git a/projects/mtg/include/TargetChooser.h b/projects/mtg/include/TargetChooser.h index 1f3ec19f0..f64d5286c 100644 --- a/projects/mtg/include/TargetChooser.h +++ b/projects/mtg/include/TargetChooser.h @@ -91,8 +91,6 @@ public: class CreatureTargetChooser:public TargetZoneChooser{ public: - int maxpower; - int maxtoughness; CreatureTargetChooser(int * _zones, int _nbzones,MTGCardInstance * card = NULL, int _maxtargets = 1, bool other = false); CreatureTargetChooser(MTGCardInstance * card = NULL, int _maxtargets = 1, bool other = false); virtual bool canTarget(Targetable * _card); diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index f342ffc6e..08aef6f94 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -3,9 +3,14 @@ #include "../include/Subtypes.h" #include "../include/Counters.h" + CardDescriptor::CardDescriptor(): MTGCardInstance(){ init(); mode = CD_AND; + powerComparisonMode = COMPARISON_NONE; + toughnessComparisonMode = COMPARISON_NONE; + manacostComparisonMode = COMPARISON_NONE; + convertedManacost = -1; } int CardDescriptor::init(){ @@ -29,6 +34,26 @@ void CardDescriptor::setNegativeSubtype( string value){ addType(-id); } +// Very generic function to compare a value to a criterion. +// Should be easily transferable to a more generic class if desired. +bool CardDescriptor::valueInRange(int comparisonMode, int value, int criterion){ + switch (comparisonMode){ + case COMPARISON_AT_MOST: + return (value <= criterion); + case COMPARISON_AT_LEAST: + return (value >= criterion); + case COMPARISON_EQUAL: + return (value == criterion); + case COMPARISON_GREATER: + return (value > criterion); + case COMPARISON_LESS: + return (value < criterion); + case COMPARISON_UNEQUAL: + return (value != criterion); + } + return false; +} + MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card){ int found = 1; for (int i = 0; i< nb_types; i++){ @@ -65,6 +90,12 @@ MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card){ } } if (!found) return NULL; + + // Quantified restrictions are always AND-ed: + if (powerComparisonMode && !valueInRange(powerComparisonMode, card->getPower(), power) ) return NULL; + if (toughnessComparisonMode && !valueInRange(toughnessComparisonMode, card->getToughness(), toughness) ) return NULL; + if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->getManaCost()->getConvertedCost(), convertedManacost) ) return NULL; + return card; } @@ -86,6 +117,11 @@ MTGCardInstance * CardDescriptor::match_and(MTGCardInstance * card){ match = NULL; } } + + if (powerComparisonMode && !valueInRange(powerComparisonMode, card->getPower(), power) ) match = NULL; + if (toughnessComparisonMode && !valueInRange(toughnessComparisonMode, card->getToughness(), toughness) ) match = NULL; + if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->getManaCost()->getConvertedCost(), convertedManacost) ) match = NULL; + return match; } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 252397592..e080ca9bc 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -364,10 +364,10 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG int mini = 0; int maxi = 0; - found = s.find(">"); - if (found !=string::npos) mini = atoi(s.substr(found+1,1).c_str()); - found = s.find("<"); - if (found !=string::npos) maxi = atoi(s.substr(found+1,1).c_str()); + found = s.find(" >"); + if (found !=string::npos) mini = atoi(s.substr(found+2,1).c_str()); + found = s.find(" <"); + if (found !=string::npos) maxi = atoi(s.substr(found+2,1).c_str()); switch(i){ case 0: result = NEW ALord(id, card, lordTargets, lordIncludeSelf, a); break; case 1: result = NEW AForeach(id, card, _target,lordTargets, lordIncludeSelf, a,mini,maxi); break; @@ -1351,13 +1351,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ } break; } - case 1285: //Dwarven Warriors - { - CreatureTargetChooser * tc = NEW CreatureTargetChooser(card); - tc->maxpower = 2; - game->addObserver(NEW ABasicAbilityModifierUntilEOT(_id, card, Constants::UNBLOCKABLE, NULL,tc)); - break; - } case 1288: //EarthBind { game->addObserver(NEW AEarthbind(_id, card, card->target)); @@ -1435,15 +1428,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ game->addObserver(NEW AInstantPowerToughnessModifierUntilEOT(id, card, card->target, NEW WParsedPT(power,toughness))); } - case 1703: //Pendelhaven - { - CreatureTargetChooser * tc = NEW CreatureTargetChooser(card); - tc->maxpower = 1; - tc->maxtoughness =1; - game->addObserver(NEW ATargetterPowerToughnessModifierUntilEOT(id, card, NEW WParsedPT(1,2), NEW ManaCost(),tc)); - break; - } - //Addons ICE-AGE Cards case 2474: //Minion of Leshrac @@ -1456,25 +1440,8 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ game->addObserver(NEW AShieldOfTheAge( _id, card)); break; } - case 2435: //Whalebone Glider - { - int cost[] = {Constants::MTG_COLOR_ARTIFACT,2}; - CreatureTargetChooser * tc = NEW CreatureTargetChooser(card); - tc->maxpower = 3; - game->addObserver(NEW ABasicAbilityModifierUntilEOT(_id, card, Constants::FLYING, NEW ManaCost(cost,1),tc)); - break; - } - case 2393: //Aegis of the Meek work but work also for 0/1 creatures... :D - { - int cost[] = {Constants::MTG_COLOR_ARTIFACT,1}; - CreatureTargetChooser * tc = NEW CreatureTargetChooser(card); - tc->maxpower = 1; - tc->maxtoughness =1; - game->addObserver(NEW ATargetterPowerToughnessModifierUntilEOT(id, card, NEW WParsedPT(1,2), NEW ManaCost(cost,1),tc)); - break; - } -// --- addon Mirage --- + // --- addon Mirage --- case 3410: //Seed of Innocence { diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index 97d96e115..ce5948435 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -121,6 +121,40 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta nbminuses++; attribute=attribute.substr(1); } + int comparisonMode = COMPARISON_NONE; + int comparisonCriterion = 0; + if (attribute.size() > 1){ + size_t operatorPosition = attribute.find("=",1); + if (operatorPosition != string::npos){ + comparisonCriterion = atoi(attribute.substr(operatorPosition+1,attribute.size()-operatorPosition-1).c_str()); + switch (attribute[operatorPosition-1]){ + case '<': + if (minus){ + comparisonMode = COMPARISON_GREATER; + }else{ + comparisonMode = COMPARISON_AT_MOST; + } + operatorPosition--; + break; + case '>': + if (minus){ + comparisonMode = COMPARISON_LESS; + }else{ + comparisonMode = COMPARISON_AT_LEAST; + } + operatorPosition--; + break; + default: + if (minus){ + comparisonMode = COMPARISON_UNEQUAL; + }else{ + comparisonMode = COMPARISON_EQUAL; + } + } + attribute = attribute.substr(0,operatorPosition); + } + } + //Attacker if (attribute.find("attacking") != string::npos){ if (minus){ @@ -142,6 +176,18 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta }else{ cd->unsecureSetTapped(1); } + //Power restrictions + }else if (attribute.find("power") != string::npos){ + cd->setPower(comparisonCriterion); + cd->powerComparisonMode = comparisonMode; + //Toughness restrictions + }else if (attribute.find("toughness") != string::npos){ + cd->setToughness(comparisonCriterion); + cd->toughnessComparisonMode = comparisonMode; + //Manacost restrictions + }else if (attribute.find("manacost") != string::npos){ + cd->convertedManacost = comparisonCriterion; + cd->manacostComparisonMode = comparisonMode; }else{ int attributefound = 0; //Colors @@ -474,8 +520,6 @@ DescriptorTargetChooser::~DescriptorTargetChooser(){ CreatureTargetChooser::CreatureTargetChooser( MTGCardInstance * card, int _maxtargets, bool other):TargetZoneChooser(card, _maxtargets, other){ int default_zones[] = {MTGGameZone::MY_BATTLEFIELD, MTGGameZone::OPPONENT_BATTLEFIELD}; init(default_zones,2); - maxpower= -1; - maxtoughness= -1; } CreatureTargetChooser::CreatureTargetChooser(int * _zones, int nbzones, MTGCardInstance * card, int _maxtargets, bool other):TargetZoneChooser(card, _maxtargets, other){ @@ -485,8 +529,6 @@ CreatureTargetChooser::CreatureTargetChooser(int * _zones, int nbzones, MTGCardI }else{ init(_zones, nbzones); } - maxpower = -1; - maxtoughness= -1; } @@ -494,8 +536,6 @@ bool CreatureTargetChooser::canTarget(Targetable * target){ if (!TargetZoneChooser::canTarget(target)) return false; if (target->typeAsTarget() == TARGET_CARD){ MTGCardInstance * card = (MTGCardInstance *) target; - if (maxpower != -1 && card->power > maxpower) return false; - if (maxtoughness != -1 && card->toughness > maxtoughness) return false; return card->isCreature(); } return false;