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!
44 lines
994 B
C++
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;
|
|
}
|
|
|
|
};
|