a9e4c58af2
this is by no means absolutely perfect, i like it tho, and makes for some real good times with level up deck built with equips. you will notice i added a level=number...to the level up creatures, this has no effect on players, this is just a small hint to the Ai as to when it should stop investing mana in that creature. the chances are a little over half that ai will want to level a creature, increased ever so slightly with each level up. for equipment, the Ai will now want to equip its best Creature(determined by power+toughness+convertedcost+how many abilities it has) and will want to equip these "better" cards atleast 2 times before it is reduced. same system for prevent damage, it will want to save its "better creature" more then a 1/1 token. for both tho i added slight bonuses... to equip, there is a higher chance that the ai will want to target a white creature, with an extra bonus if the creature is a 1/1 and nontoken. this is to encourage Ai to equip in white weenie decks in prevent, there is a slight bonus if the creature is a 1/1 and the blocker/blockee has a power of 1. currently prevent damage treated this way is not coded for direct damage spell, sorry ! but for combat you will notice ai taking a stand and fighting back hard.
54 lines
864 B
C++
54 lines
864 B
C++
#ifndef _MTGCARD_H_
|
|
#define _MTGCARD_H_
|
|
|
|
#define MTGCARD_NAME_SIZE 16
|
|
|
|
#define MTG_IMAGE_WIDTH 200
|
|
#define MTG_IMAGE_HEIGHT 285
|
|
|
|
#define MTG_MINIIMAGE_WIDTH 45
|
|
#define MTG_MINIIMAGE_HEIGHT 64
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
class CardPrimitive;
|
|
|
|
using namespace std;
|
|
|
|
class MTGCard {
|
|
protected:
|
|
friend class MTGSetInfo;
|
|
int mtgid;
|
|
char rarity;
|
|
char image_name[MTGCARD_NAME_SIZE];
|
|
int init();
|
|
|
|
public:
|
|
int LevelUp;
|
|
int setId;
|
|
CardPrimitive * data;
|
|
|
|
MTGCard();
|
|
MTGCard(int set_id);
|
|
MTGCard(MTGCard * source);
|
|
|
|
void setMTGId(int id);
|
|
void setRarity(char _rarity);
|
|
void setLevelcap(int _levelupcap);
|
|
//void setImageName( char * value);
|
|
void setPrimitive(CardPrimitive * cp);
|
|
|
|
int getMTGId() const;
|
|
int getId() const;
|
|
int getLevelcap() const;
|
|
char getRarity() const;
|
|
char * getImageName();
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|