Erwan
- Lords are now taken into account in AI statistics. (To display information, uncomment RENDER_AI_STATS in config.h) - fixed a potential segfault with NoFizzle
This commit is contained in:
@@ -69,6 +69,7 @@ class AIPlayer: public Player{
|
||||
void End(){};
|
||||
virtual int displayStack() {return 0;};
|
||||
int receiveEvent(WEvent * event);
|
||||
void Render();
|
||||
AIStats * stats;
|
||||
ManaCost * getPotentialMana(MTGCardInstance * card = NULL);
|
||||
AIPlayer(MTGPlayerCards * deck, string deckFile, string deckFileSmall);
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
|
||||
#define STATS_PLAYER_MULTIPLIER 15
|
||||
#define STATS_CREATURE_MULTIPLIER 10
|
||||
#define STATS_AURA_MULTIPLIER 9
|
||||
|
||||
//floats
|
||||
#define STATS_AURA_MULTIPLIER 0.9
|
||||
#define STATS_LORD_MULTIPLIER 0.5
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
using std::list;
|
||||
@@ -38,6 +42,7 @@ class AIStats{
|
||||
bool isInTop(MTGCardInstance * card, unsigned int max, bool tooSmallCountsForTrue = true );
|
||||
void updateStatsCard(MTGCardInstance * cardInstance, Damage * damage, float multiplier = 1.0);
|
||||
int receiveEvent(WEvent * event);
|
||||
void Render();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -238,7 +238,7 @@ class AAFizzler:public ActivatedAbility{
|
||||
|
||||
int resolve(){
|
||||
Spell * _target = (Spell *) target;
|
||||
if(_target->source->has(Constants::NOFIZZLE))
|
||||
if(target && _target->source->has(Constants::NOFIZZLE))
|
||||
return 0;
|
||||
game->mLayers->stackLayer()->Fizzle(_target);
|
||||
return 1;
|
||||
|
||||
@@ -39,6 +39,7 @@ class Player: public Damageable{
|
||||
string deckFileSmall;
|
||||
|
||||
virtual int receiveEvent(WEvent * event){return 0;};
|
||||
virtual void Render(){};
|
||||
};
|
||||
|
||||
class HumanPlayer: public Player{
|
||||
|
||||
@@ -37,4 +37,9 @@
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
// Debug options - comment/uncomment as needed
|
||||
#ifdef _DEBUG
|
||||
//#define RENDER_AI_STATS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user