added optimizing of opponents hand if the opponent deck is listed as "easy". slight optimize if listed as "normal" none if listed as "hard" this provides slightly more challange from even poorly constructed Ai decks. taught Ai to pump creatures during combat, and more so if its heading directly at player, taught Ai that its better to use "becomes" and "transforms" during first main. this allow its to actually attack with the manlands ect.

new ability lord...teach(whatever[whatever]) ability.
teach is a targeted lord, it takes the cards current target and lords it the ability. im aware of a tiny memleak it contains, but the leak is happening on parser lvl, so i need more eyes to look at it. teach is ideally used for equipment, and was designed to fix issue 244 taught abilities are not given to the source cards.

forced Ai to pay for sunburst correctly. it was choosing to pay with all of one type of mana. now it pays either max or 1 from max sunburst.

added a tiny double check for Ai to try and find something to use if it suddenly has mana in its pool. it is only a single check in a turn, but i notice it actually does slightly improve the usages of dark ritual and foreach mana producers. ideally i wanted it to check EVERYTIME. but i could not achieve it without putting the game in danger of looping. so once is better then none :/

fixed a bug with affinity where it was not counting duel lands, this is becuase of not setting it up correctly for lands with multiple types SORRY!
This commit is contained in:
omegablast2002@yahoo.com
2010-11-06 06:59:43 +00:00
parent 0c34d7a04f
commit ed03d2f3ef
15 changed files with 548 additions and 269 deletions

View File

@@ -1,6 +1,7 @@
#include "PrecompiledHeader.h"
#include "DeckManager.h"
#include "Player.h"
#include <JRenderer.h>
void DeckManager::updateMetaDataList( vector<DeckMetaData *> * refList, bool isAI )
@@ -49,3 +50,15 @@ DeckManager* DeckManager::GetInstance()
return mInstance;
}
// p1 is assumed to be the player you want stats for
// p2 is the opponent
int DeckManager::getDifficultyRating( Player *statsPlayer, Player *player )
{
DeckMetaDataList * metas = DeckMetaDataList::decksMetaData;
DeckMetaData *meta = metas->get( player->deckFile, statsPlayer );
return meta->getDifficulty();
}