Files
wagic/projects/mtg/include/DeckManager.h
omegablast2002@yahoo.com ed03d2f3ef 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!
2010-11-06 06:59:43 +00:00

44 lines
994 B
C++

#include <string>
#include <vector>
#include "DeckMetaData.h"
using namespace std;
class DeckManager
{
private:
static bool instanceFlag;
static DeckManager *mInstance;
DeckManager()
{
//private constructor
}
public:
vector<DeckMetaData *> playerDeckOrderList;
vector<DeckMetaData *> aiDeckOrderList;
void updateMetaDataList(vector<DeckMetaData *>* refList, bool isAI );
vector<DeckMetaData *> * getPlayerDeckOrderList();
vector<DeckMetaData *> * getAIDeckOrderList();
static DeckManager * GetInstance();
static void EndInstance();
//convenience method to get the difficulty rating between two decks. This should be refined a little more
//since the eventual move of all deck meta data should be managed by this class
static int getDifficultyRating( Player *statsPlayer, Player *player );
~DeckManager()
{
instanceFlag = false;
}
};