[mad-ai] Fixed not using combat and post combat main phases.

This commit is contained in:
magenoxx 2011-02-18 00:17:55 +03:00
parent 27420f784c
commit 97a83998eb
4 changed files with 7 additions and 6 deletions

View file

@ -116,6 +116,11 @@ public class ComputerPlayer6 extends ComputerPlayer<ComputerPlayer6> implements
pass();
break;
case PRECOMBAT_MAIN:
case BEGIN_COMBAT:
case DECLARE_ATTACKERS:
case DECLARE_BLOCKERS:
case COMBAT_DAMAGE:
case END_COMBAT:
case POSTCOMBAT_MAIN:
if (game.getActivePlayerId().equals(playerId)) {
Player player = game.getPlayer(playerId);
@ -141,11 +146,6 @@ public class ComputerPlayer6 extends ComputerPlayer<ComputerPlayer6> implements
}
act(game);
break;
case BEGIN_COMBAT:
case DECLARE_ATTACKERS:
case DECLARE_BLOCKERS:
case COMBAT_DAMAGE:
case END_COMBAT:
case END_TURN:
pass();
break;

View file

@ -1,6 +1,7 @@
### ComputerA ###
# Battlefield
battlefield:ComputerA:Island:1
battlefield:ComputerA:Goblin Guide:1
# Hand
hand:ComputerA:Mountain:2
hand:ComputerA:Lightning Bolt:5

View file

@ -56,7 +56,7 @@ public class PlayGameTest extends MageTestBase {
game.addPlayer(computerB, deck2);
game.loadCards(deck2.getCards(), computerB.getId());
parseScenario("scenario1.txt");
//parseScenario("scenario1.txt");
game.cheat(computerA.getId(), commandsA);
game.cheat(computerA.getId(), libraryCardsA, handCardsA, battlefieldCardsA, graveyardCardsA);
game.cheat(computerB.getId(), commandsB);