Erwan
- Fix issue #16 (testsuite segfaults if file does not exist) - Fix issue #37 (Normal Combat Damage is not dealt to creatures when the AI attacks) - TestSuite now has an "AI" mode (see test/manual/p2_attacks.txt)
This commit is contained in:
@@ -70,6 +70,7 @@ class AIPlayer: public Player{
|
||||
virtual MTGCardInstance * chooseCard(TargetChooser * tc, MTGCardInstance * source, int random = 0);
|
||||
virtual int chooseTarget(TargetChooser * tc = NULL);
|
||||
virtual int Act(float dt);
|
||||
virtual int affectCombatDamages(CombatStep);
|
||||
int isAI(){return 1;};
|
||||
int canHandleCost(MTGAbility * ability);
|
||||
int selectAbility();
|
||||
|
||||
@@ -15,18 +15,20 @@ class GuiCombat : public GuiLayer
|
||||
AttackerDamaged* activeAtk;
|
||||
static JTexture* ok_tex;
|
||||
Pos ok, enemy_avatar;
|
||||
vector<AttackerDamaged*> attackers;
|
||||
DamagerDamaged* current;
|
||||
enum { BLK, ATK, OK, NONE } cursor_pos;
|
||||
CombatStep step;
|
||||
void validateDamage();
|
||||
void addOne(DefenserDamaged* blocker, CombatStep);
|
||||
void removeOne(DefenserDamaged* blocker, CombatStep);
|
||||
void autoaffectDamage(AttackerDamaged* attacker, CombatStep);
|
||||
void remaskBlkViews(AttackerDamaged* before, AttackerDamaged* after);
|
||||
int resolve();
|
||||
|
||||
public:
|
||||
|
||||
vector<AttackerDamaged*> attackers;
|
||||
void autoaffectDamage(AttackerDamaged* attacker, CombatStep);
|
||||
|
||||
GuiCombat(GameObserver* go);
|
||||
~GuiCombat();
|
||||
virtual void Update(float dt);
|
||||
|
||||
@@ -76,14 +76,14 @@ class TestSuite{
|
||||
|
||||
};
|
||||
|
||||
class TestSuiteAI:public AIPlayer{
|
||||
class TestSuiteAI:public AIPlayerBaka{
|
||||
public:
|
||||
TestSuite * suite;
|
||||
float timer;
|
||||
int humanMode;
|
||||
int playMode;
|
||||
TestSuiteAI(TestSuite * suite, int playerId);
|
||||
virtual int Act(float dt);
|
||||
virtual int displayStack(){return 1;}
|
||||
virtual int displayStack();
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user