Added KHM and KHC sets, improved Android downloader, fixed/added primitives, improved "hascnt" keyword, added "myhandexilegrave" and "opponenthandexilegrave" zone targeters.
This commit is contained in:
@@ -137,6 +137,10 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker)
|
||||
found = s.find("planeswalker,creature");
|
||||
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker)
|
||||
found = s.find("creature^planeswalker");
|
||||
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker)
|
||||
found = s.find("planeswalker^creature");
|
||||
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker)
|
||||
found = s.find("creature");
|
||||
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other); //2 Damageable target (player, creature)
|
||||
found = s.find("planeswalker");
|
||||
@@ -286,6 +290,18 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_HAND;
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_COMMANDZONE;
|
||||
}
|
||||
else if (zoneName.compare("myhandexilegrave") == 0)
|
||||
{
|
||||
zones[nbzones++] = MTGGameZone::MY_GRAVEYARD;
|
||||
zones[nbzones++] = MTGGameZone::MY_EXILE;
|
||||
zones[nbzones++] = MTGGameZone::MY_HAND;
|
||||
}
|
||||
else if (zoneName.compare("opponenthandexilegrave") == 0)
|
||||
{
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_GRAVEYARD;
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_EXILE;
|
||||
zones[nbzones++] = MTGGameZone::OPPONENT_HAND;
|
||||
}
|
||||
else if (zoneName.compare("myzones") == 0)
|
||||
{
|
||||
zones[nbzones++] = MTGGameZone::MY_BATTLEFIELD;
|
||||
|
||||
@@ -610,7 +610,12 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
|
||||
Counters * counters = card->counters;
|
||||
for(size_t i = 0; i < counters->counters.size(); ++i){
|
||||
Counter * counter = counters->counters[i];
|
||||
if(counter->name == s.substr(6)){
|
||||
if(counter->name == "" && (s.substr(6) == "11" || s.substr(6) == "-1-1")){
|
||||
if((counter->power == 1 && counter->toughness == 1 && s.substr(6) == "11") || (counter->power == -1 && counter->toughness == -1 && s.substr(6) == "-1-1")){
|
||||
intValue = counter->nb;
|
||||
break;
|
||||
}
|
||||
} else if(counter->name == s.substr(6)){
|
||||
intValue = counter->nb;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user