AIPlayer minor tweaks:

- In order to clarify getEfficiency, started creating "getEfficiency" functions specific to each type of ability (see example with Damager). This won't reduce the file size but should make things bit clearer
- Minor cleanup of getEfficiency
- bug fixes in getEfficiency
This commit is contained in:
wagic.the.homebrew
2011-09-21 15:10:06 +00:00
parent 11095f3339
commit 15f0143a8f
10 changed files with 413 additions and 2489 deletions
+5 -4
View File
@@ -492,7 +492,7 @@ MTGCardInstance * MTGGameZone::hasCard(MTGCardInstance * card)
}
int MTGGameZone::countByType(const char * value)
unsigned int MTGGameZone::countByType(const char * value)
{
int result = 0;
int subTypeId = Subtypes::subtypesList->find(value);
@@ -506,10 +506,11 @@ int MTGGameZone::countByType(const char * value)
return result;
}
int MTGGameZone::countByCanTarget(TargetChooser * tc)
unsigned int MTGGameZone::countByCanTarget(TargetChooser * tc)
{
if(!tc)
return 0;
if(!tc)
return 0;
int result = 0;
for (int i = 0; i < (nb_cards); i++)
{