Implemented "Battle" type from MOM set (they are like planeswalkers), added some new primitives from MOM set, fixed some primitives targeting any target.

This commit is contained in:
Vittorio Alfieri
2023-05-11 15:57:08 +02:00
parent f395274c0b
commit 6ef8b45709
15 changed files with 225 additions and 44 deletions
+8 -2
View File
@@ -723,7 +723,7 @@ int OrderedAIAction::getEfficiency()
if (ability->source)
{
if(ability->source->hasType(Subtypes::TYPE_PLANESWALKER))
if(ability->source->hasType(Subtypes::TYPE_PLANESWALKER) || ability->source->hasType(Subtypes::TYPE_BATTLE))
efficiency += 40;
else if(ability->source->hasType(Subtypes::TYPE_LAND))
{ // probably a shockland, don't pay life if hand is empty
@@ -2813,6 +2813,9 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_PLANESWALKER,card->types[1]))
continue;
if (card->hasType(Subtypes::TYPE_BATTLE) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_BATTLE,card->types[1]))
continue;
if(hints && hints->HintSaysItsForCombo(observer,card))
{
@@ -2981,6 +2984,9 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_PLANESWALKER,card->types[1]))
continue;
if (card->hasType(Subtypes::TYPE_BATTLE) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_BATTLE,card->types[1]))
continue;
if(hints && hints->HintSaysItsForCombo(observer,card))
{
@@ -3748,7 +3754,7 @@ int AIPlayerBaka::computeActions()
else
{
//look for the most expensive creature we can afford. If not found, try enchantment, then artifact, etc...
const char* types[] = {"planeswalker","creature", "enchantment", "artifact", "sorcery", "instant"};
const char* types[] = {"planeswalker","creature", "enchantment", "artifact", "sorcery", "instant", "battle"};
int count = 0;
while (!nextCardToPlay && count < 6)
{
+6 -6
View File
@@ -1545,7 +1545,7 @@ AADamager::AADamager(GameObserver* observer, int _id, MTGCardInstance * _source,
if (_target)
{
WParsedInt damage(d, NULL, (MTGCardInstance *)source);
if(_target == game->opponent() && game->opponent()->inPlay()->hasType("planeswalker") && !redirected)
if(_target == game->opponent() && (game->opponent()->inPlay()->hasType("planeswalker") || game->opponent()->inPlay()->hasType("battle")) && !redirected)
{
vector<MTGAbility*>selection;
MTGCardInstance * check = NULL;
@@ -1557,7 +1557,7 @@ AADamager::AADamager(GameObserver* observer, int _id, MTGCardInstance * _source,
for(int i = 0; i < checkWalkers;++i)
{
check = ((Player*)_target)->game->battlefield->cards[i];
if(check->hasType(Subtypes::TYPE_PLANESWALKER))
if(check->hasType(Subtypes::TYPE_PLANESWALKER) || check->hasType(Subtypes::TYPE_BATTLE))
{
this->redirected = true;
MTGAbility * setWalker = this->clone();
@@ -1591,7 +1591,7 @@ AADamager::AADamager(GameObserver* observer, int _id, MTGCardInstance * _source,
const string AADamager::getMenuText()
{
MTGCardInstance * _target = dynamic_cast<MTGCardInstance*>(target);
if(_target && _target->hasType(Subtypes::TYPE_PLANESWALKER))
if(_target && _target->hasType(Subtypes::TYPE_PLANESWALKER) || _target && _target->hasType(Subtypes::TYPE_BATTLE))
return _target->name.c_str();
if(redirected)
{
@@ -10015,7 +10015,7 @@ int AACastCard::resolveSpell()
}
}
if (putinplay && (copy->hasType(Subtypes::TYPE_ARTIFACT) || copy->hasType(Subtypes::TYPE_CREATURE) || copy->hasType(Subtypes::TYPE_ENCHANTMENT) || copy->hasType(Subtypes::TYPE_PLANESWALKER)))
if (putinplay && (copy->hasType(Subtypes::TYPE_ARTIFACT) || copy->hasType(Subtypes::TYPE_CREATURE) || copy->hasType(Subtypes::TYPE_ENCHANTMENT) || copy->hasType(Subtypes::TYPE_PLANESWALKER) || copy->hasType(Subtypes::TYPE_BATTLE)))
spell->resolve(); // Fixed a crash when using and!()! with namedcard permanents.
if(andAbility)
@@ -10041,7 +10041,7 @@ int AACastCard::resolveSpell()
MTGCardInstance * copy = NULL;
if ((normal || asNormalMadness)||(!_target->hasType(Subtypes::TYPE_INSTANT) && !_target->hasType(Subtypes::TYPE_SORCERY)))
{
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)||_target->hasType(Subtypes::TYPE_BATTLE)))
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->reveal, noEvent); // Fixed a problem with previous zone of card, it cannot be directly battlefield.
else
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack, noEvent);
@@ -10051,7 +10051,7 @@ int AACastCard::resolveSpell()
}
else
{
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)||_target->hasType(Subtypes::TYPE_BATTLE)))
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->reveal, noEvent); // Fixed a problem with previous zone of card, it cannot be directly battlefield.
else
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack, noEvent);
+14 -1
View File
@@ -75,7 +75,7 @@ int Damage::resolve()
//-------------------------------------------------
//Ajani Steadfast ---
if(target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE && ((MTGCardInstance*)target)->hasType("planeswalker") && ((MTGCardInstance*)target)->controller()->forcefield)
if(target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE && (((MTGCardInstance*)target)->hasType("planeswalker") || ((MTGCardInstance*)target)->hasType("battle")) && ((MTGCardInstance*)target)->controller()->forcefield)
damage = 1;
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
{
@@ -310,6 +310,19 @@ int Damage::resolve()
}
}
}
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE && ((MTGCardInstance*)target)->hasType(Subtypes::TYPE_BATTLE)){ // Fix life calculation for battle damage.
if (((MTGCardInstance*)target)->counters){
Counters * counters = ((MTGCardInstance*)target)->counters;
for(size_t i = 0; i < counters->counters.size(); ++i){
Counter * counter = counters->counters[i];
if(counter->name == "defense"){
target->life = counter->nb - target->damageCount;
break;
}
}
}
}
//Send (Damage/Replaced effect) event to listeners
observer->receiveEvent(e);
return a;
+2
View File
@@ -857,6 +857,8 @@ void GameObserver::gameStateBasedEffects()
found++;
if(stypes.find("planeswalker") != string::npos && card->target->hasType("planeswalker"))
found++;
if(stypes.find("battle") != string::npos && card->target->hasType("battle"))
found++;
}
if((!found || protectionfromQ) && !card->isBestowed)
+7 -7
View File
@@ -196,7 +196,7 @@ GuiPlay::~GuiPlay()
bool isSpell(CardView* c)
{
return c->card->isSpell() && !c->card->isCreature() && !c->card->hasType(Subtypes::TYPE_PLANESWALKER);
return c->card->isSpell() && !c->card->isCreature() && !c->card->hasType(Subtypes::TYPE_PLANESWALKER) && !c->card->hasType(Subtypes::TYPE_BATTLE);
}
void GuiPlay::Replace()
{
@@ -208,7 +208,7 @@ void GuiPlay::Replace()
for (iterator it = cards.begin(); it != end_spells; ++it)
if (!(*it)->card->target)
{
if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && (*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER))
if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && (*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER) && !(*it)->card->hasType(Subtypes::TYPE_BATTLE))
{
if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller())
++selfSpellsN;
@@ -229,7 +229,7 @@ void GuiPlay::Replace()
else
++opponentCreaturesN;
}
else if ((*it)->card->isLand() || (*it)->card->hasType(Subtypes::TYPE_PLANESWALKER))
else if ((*it)->card->isLand() || (*it)->card->hasType(Subtypes::TYPE_PLANESWALKER) || (*it)->card->hasType(Subtypes::TYPE_BATTLE))
{
if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller())
++selfLandsN;
@@ -244,7 +244,7 @@ void GuiPlay::Replace()
for (iterator it = cards.begin(); it != end_spells; ++it)
if (!(*it)->card->target)
{
if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && (*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER))
if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && (*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER) && !(*it)->card->hasType(Subtypes::TYPE_BATTLE))
{
if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller())
selfSpells.Enstack(*it);
@@ -287,7 +287,7 @@ void GuiPlay::Replace()
//rerun the iter reattaching planes walkers to the back of the lands.
for (iterator it = end_spells; it != cards.end(); ++it)
{
if ((*it)->card->hasType(Subtypes::TYPE_PLANESWALKER) && !(*it)->card->isCreature())
if (((*it)->card->hasType(Subtypes::TYPE_PLANESWALKER) || (*it)->card->hasType(Subtypes::TYPE_BATTLE)) && !(*it)->card->isCreature())
{
if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller())
selfLands.Enstack(*it);
@@ -310,7 +310,7 @@ void GuiPlay::Render()
if(dtarget && dtarget->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
{
MTGCardInstance * ctarget = ((MTGCardInstance *)(*it)->card->isAttacking);
if(ctarget->hasType(Subtypes::TYPE_PLANESWALKER) && observer->isInPlay(ctarget) && observer->getCurrentGamePhase() < MTG_PHASE_COMBATEND)
if((ctarget->hasType(Subtypes::TYPE_PLANESWALKER) || ctarget->hasType(Subtypes::TYPE_BATTLE)) && observer->isInPlay(ctarget) && observer->getCurrentGamePhase() < MTG_PHASE_COMBATEND)
{
JRenderer::GetInstance()->DrawLine((*it)->actX,(*it)->actY,ctarget->view->actX,ctarget->view->actY,0.5f,ARGB(128 - wave, 255, 40, 40));
}
@@ -331,7 +331,7 @@ void GuiPlay::Render()
else
opponentCreatures.Render(*it, cards.begin(), end_spells);
}
else if(!(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER))
else if(!(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER) && !(*it)->card->hasType(Subtypes::TYPE_BATTLE))
{
if (!(*it)->card->target)
{
+2
View File
@@ -521,6 +521,7 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
if (grave->hasType("land")) checkTypesAmount++;
if (grave->hasType("artifact")) checkTypesAmount++;
if (grave->hasType("planeswalker")) checkTypesAmount++;
if (grave->hasType("battle")) checkTypesAmount++;
if (grave->hasType("tribal")) checkTypesAmount++;
if (checkTypesAmount < 4)
return 0;
@@ -540,6 +541,7 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
if (grave->hasType("land")) checkTypesAmount++;
if (grave->hasType("artifact")) checkTypesAmount++;
if (grave->hasType("planeswalker")) checkTypesAmount++;
if (grave->hasType("battle")) checkTypesAmount++;
if (grave->hasType("tribal")) checkTypesAmount++;
if (checkTypesAmount > 3)
return 0;
+13 -6
View File
@@ -2055,7 +2055,7 @@ int MTGAttackRule::receiveEvent(WEvent *e)
if(dtarget->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
{
MTGCardInstance * ctarget = ((MTGCardInstance *)card->isAttacking);
if(ctarget->hasType(Subtypes::TYPE_PLANESWALKER))
if(ctarget->hasType(Subtypes::TYPE_PLANESWALKER) || ctarget->hasType(Subtypes::TYPE_BATTLE))
card->toggleAttacker();//if a card has cantpwattack, then you cant
}
}
@@ -2112,14 +2112,14 @@ int MTGPlaneswalkerAttackRule::isReactingToClick(MTGCardInstance * card, ManaCos
{
if (currentPhase == MTG_PHASE_COMBATATTACKERS && card->controller() == game->currentPlayer && card->controller() == game->currentlyActing())//on my turn and when I am the acting player.
{
if(!card->controller()->opponent()->game->inPlay->hasType("planeswalker"))
if(!card->controller()->opponent()->game->inPlay->hasType("planeswalker") && !card->controller()->opponent()->game->inPlay->hasType("battle"))
return 0;
if(card->isPhased)
return 0;
if ((card->isAttacker()) || (card->canAttack(true) && card->attackPlaneswalkerCost < 1))
{
if(!card->isAttacker())
attackpwmenu = "Attack Planeswalker";
attackpwmenu = "Attack Planeswalker or Battle";
else
attackpwmenu = "Remove Attacker";
@@ -2158,7 +2158,7 @@ int MTGPlaneswalkerAttackRule::reactToClick(MTGCardInstance * card)
for(int i = 0; i < checkWalkers;++i)
{
check = card->controller()->opponent()->game->battlefield->cards[i];
if(check->hasType(Subtypes::TYPE_PLANESWALKER))
if(check->hasType(Subtypes::TYPE_PLANESWALKER) || check->hasType(Subtypes::TYPE_BATTLE))
{
MTGAbility * setPw = NEW AAPlaneswalkerAttacked(game, game->mLayers->actionLayer()->getMaxId(), card,check);
MTGAbility * setWalker = setPw->clone();
@@ -2168,7 +2168,6 @@ int MTGPlaneswalkerAttackRule::reactToClick(MTGCardInstance * card)
}
}
if(selection.size())
{
MTGAbility * a1 = NEW MenuAbility(game, this->GetId(), card, card,false,selection);
@@ -3969,6 +3968,15 @@ int MTGPlaneswalkerDamage::receiveEvent(WEvent * event)
}
return 1;
}
if (d->damage > 0 && card && card->hasType(Subtypes::TYPE_BATTLE))
{
int howMany = d->damage;
for(int k = 0; k < howMany; k++)
{
card->counters->removeCounter("defense", 0, 0);
}
return 1;
}
}
if (WEventCounters * removel = dynamic_cast<WEventCounters*>(event))
{
@@ -3978,7 +3986,6 @@ int MTGPlaneswalkerDamage::receiveEvent(WEvent * event)
removel->targetCard->toGrave(true);
return 1;
}
}
return 0;
}
+8 -1
View File
@@ -26,6 +26,8 @@ Subtypes::Subtypes()
find("Dungeon");
find("Emblem");
find("Conspiracy");
find("Backgorund");
find("Battle");
}
int Subtypes::find(string value, bool forceAdd)
@@ -97,7 +99,12 @@ bool Subtypes::isType(unsigned int type)
type == TYPE_TRIBAL ||
type == TYPE_PLANE ||
type == TYPE_SCHEME ||
type == TYPE_VANGUARD
type == TYPE_VANGUARD ||
type == TYPE_DUNGEON ||
type == TYPE_EMBLEM ||
type == TYPE_CONSPIRACY ||
type == TYPE_BACKGROUND ||
type == TYPE_BATTLE
);
}
+12 -5
View File
@@ -141,19 +141,21 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
several = s.find("<anyamount>");
if (several != string::npos) maxtargets = TargetChooser::UNLITMITED_TARGETS;
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)
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker, battle)
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)
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker, battle)
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)
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker, battle)
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)
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "creature,planeswalker"); //Any Damageable target (player, creature, planeswalker, battle)
found = s.find("permanent");
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "permanent"); //Any player or permanet (player, creature, planeswalker, artifact, land, enchantment)
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "permanent"); //Any player or permanent (player, creature, planeswalker, artifact, land, enchantment, battle)
found = s.find("creature");
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other); //2 Damageable target (player, creature)
found = s.find("planeswalker");
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "planeswalker"); //2 Damageable target (player, planeswalker)
found = s.find("battle");
if (found != string::npos) return NEW DamageableTargetChooser(observer, card, maxtargets, other, false, "battle"); //2 Damageable target (player, battle)
return NEW PlayerTargetChooser(observer, card, maxtargets); //Any player
}
@@ -967,6 +969,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
cd->removeType("legendary");
cd->removeType("creature");
cd->removeType("planeswalker");
cd->removeType("battle");
cd->removeType("tribal");
if (!cd->types.size()){
int i = rand() % 10000 + 1;
@@ -1527,6 +1530,8 @@ TypeTargetChooser::TypeTargetChooser(GameObserver *observer, const char * _type,
addType(id);
id = MTGAllCards::findType("planeswalker");
addType(id);
id = MTGAllCards::findType("battle");
addType(id);
} else if(!strcmp(_type,"permanent")){
int id = MTGAllCards::findType("creature");
addType(id);
@@ -1538,6 +1543,8 @@ TypeTargetChooser::TypeTargetChooser(GameObserver *observer, const char * _type,
addType(id);
id = MTGAllCards::findType("enchantment");
addType(id);
id = MTGAllCards::findType("battle");
addType(id);
} else {
int id = MTGAllCards::findType(_type);
addType(id);
+3
View File
@@ -2112,6 +2112,9 @@ void WGuiFilterItem::updateValue()
mParent->addArg("Sorcery", "t:Sorcery;");
mParent->addArg("Tribal", "t:Tribal;");
mParent->addArg("Planeswalker", "t:Planeswalker;");
mParent->addArg("Battle", "t:Battle;");
mParent->addArg("Dungeon", "t:Dungeon;");
mParent->addArg("Conspiracy", "t:Conspiracy;");
}
else if (filterType == FILTER_SUBTYPE)
+11
View File
@@ -1184,6 +1184,8 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
intValue++;
if(card->hasType(Subtypes::TYPE_ARTIFACT))
intValue++;
if(card->hasType(Subtypes::TYPE_BATTLE))
intValue++;
}
}
else if (s == "pcycledcount" || s == "ocycledcount") //return how may cards have been cycled this turn from a specific player.
@@ -1258,6 +1260,8 @@ void WParsedInt::extendedParse(string s, Spell * spell, MTGCardInstance * card)
cc = 1;
if(cardHasTypeinZone("artifact",checkZone))
ac = 1;
if(cardHasTypeinZone("battle",checkZone))
ac = 1;
}
} else {
MTGGameZone * checkZone = (s.find("oppbattlefieldcardtypes")!=string::npos)?card->getObserver()->opponent()->game->inPlay:card->controller()->game->inPlay;
@@ -1277,6 +1281,8 @@ void WParsedInt::extendedParse(string s, Spell * spell, MTGCardInstance * card)
cc = 1;
if(cardHasTypeinZone("artifact",checkZone))
ac = 1;
if(cardHasTypeinZone("battle",checkZone))
ac = 1;
}
intValue = pc+tc+sc+lc+ic+ec+cc+ac;
}
@@ -1303,6 +1309,8 @@ void WParsedInt::extendedParse(string s, Spell * spell, MTGCardInstance * card)
cc = 1;
if(cardHasTypeinZone("artifact",checkZone))
ac = 1;
if(cardHasTypeinZone("battle",checkZone))
ac = 1;
}
} else {
MTGGameZone * checkZone = (s.find("oppgravecardtypes")!=string::npos)?card->getObserver()->opponent()->game->graveyard:card->controller()->game->graveyard;
@@ -1322,6 +1330,8 @@ void WParsedInt::extendedParse(string s, Spell * spell, MTGCardInstance * card)
cc = 1;
if(cardHasTypeinZone("artifact",checkZone))
ac = 1;
if(cardHasTypeinZone("battle",checkZone))
ac = 1;
}
intValue = pc+tc+sc+lc+ic+ec+cc+ac;
}
@@ -1334,6 +1344,7 @@ void WParsedInt::extendedParse(string s, Spell * spell, MTGCardInstance * card)
(s.find("totcntart") != string::npos && card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_ARTIFACT)) ||
(s.find("totcntenc") != string::npos && card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_ENCHANTMENT)) ||
(s.find("totcntlan") != string::npos && card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_LAND)) ||
(s.find("totcntbat") != string::npos && card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_BATTLE)) ||
s.find("totcntall") != string::npos){
if (card->controller()->game->inPlay->cards[j]->counters){
Counters * counters = card->controller()->game->inPlay->cards[j]->counters;