Erwan
- hopefully solved problem of AI's manaburn effect on linux
This commit is contained in:
@@ -46,7 +46,7 @@ class AIPlayer: public Player{
|
|||||||
class AIPlayerBaka: public AIPlayer{
|
class AIPlayerBaka: public AIPlayer{
|
||||||
protected:
|
protected:
|
||||||
int oldGamePhase;
|
int oldGamePhase;
|
||||||
int timer;
|
float timer;
|
||||||
MTGCardInstance * FindCardToPlay(ManaCost * potentialMana, const char * type);
|
MTGCardInstance * FindCardToPlay(ManaCost * potentialMana, const char * type);
|
||||||
public:
|
public:
|
||||||
AIPlayerBaka(MTGPlayerCards * _deck, char * deckFile, char * avatarFile);
|
AIPlayerBaka(MTGPlayerCards * _deck, char * deckFile, char * avatarFile);
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ AIPlayerBaka::AIPlayerBaka(MTGPlayerCards * _deck, char * file, char * avatarFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AIPlayerBaka::initTimer(){
|
void AIPlayerBaka::initTimer(){
|
||||||
timer = 20;
|
timer = 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AIPlayerBaka::Act(float dt){
|
int AIPlayerBaka::Act(float dt){
|
||||||
@@ -475,7 +475,7 @@ int AIPlayerBaka::Act(float dt){
|
|||||||
|
|
||||||
if (checkInterrupt()) return 0;
|
if (checkInterrupt()) return 0;
|
||||||
|
|
||||||
timer--;
|
timer-= dt;
|
||||||
if (timer>0){
|
if (timer>0){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user