fixed Ai not using regenerate during combat, taught Ai a little about prevent:number, changed "removepoison" mtgability to "alterpoison" as it made more sense.

This commit is contained in:
omegablast2002@yahoo.com
2010-10-21 15:52:04 +00:00
parent f209dd7b89
commit 18ff503bd9
5 changed files with 32 additions and 15 deletions

View File

@@ -5,7 +5,7 @@
#include "../include/MTGCardInstance.h"
#include "../include/WEvent.h"
#include "../include/AllAbilities.h"
//TODO:better comments this is too cryptic to work on by anyone but original coder.
bool compare_aistats(AIStat * first, AIStat * second){
float damage1 = first->value / first->occurences;
float damage2 = second->value/ second->occurences;
@@ -81,7 +81,7 @@ int AIStats::receiveEvent(WEvent * event){
stats.sort(compare_aistats); //this could be slow, if it is, let's run it only at the end of the turn
return 1; //is this meant to return 0 or 1?
}
//TODO:what does this do?
bool AIStats::isInTop(MTGCardInstance * card, unsigned int max, bool tooSmallCountsForTrue ){
if (stats.size()<max) return tooSmallCountsForTrue;
unsigned int n = 0;