- fix for ACounterTracker (this fixes the ability - it wasn't working before - as well as the memory leak)

- fix "release" build in VC++
- Let AI play creatures with ACounterTracker by making that ability a "positive" one (used for MotD)
This commit is contained in:
wagic.the.homebrew
2011-09-23 10:24:20 +00:00
parent c633dc805f
commit fe88b747c0
4 changed files with 12 additions and 6 deletions
+6
View File
@@ -2437,6 +2437,11 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
return BAKA_EFFECT_BAD;
if (dynamic_cast<AManaProducer *> (a))
return BAKA_EFFECT_GOOD;
// For now, ACounterTracker is only used for Creatures that "belong" to one of our domains, need to target one of our own lands, so we return a "positive" value
if (ACounterTracker * act = dynamic_cast<ACounterTracker *>(a))
return BAKA_EFFECT_GOOD;
if (AACounter * ac = dynamic_cast<AACounter *>(a))
{
bool negative_effect = ac->power < 0 || ac->toughness < 0;
@@ -2444,6 +2449,7 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
return BAKA_EFFECT_BAD;
return BAKA_EFFECT_GOOD;
}
if (dynamic_cast<ATokenCreator *> (a))
return BAKA_EFFECT_GOOD;