- Little fixes in the AI blocking code.

This commit is contained in:
jendave
2011-08-06 13:00:36 +00:00
parent 2573a75965
commit 79ae4adddb
4 changed files with 6 additions and 7 deletions

View File

@@ -506,7 +506,7 @@ public class CombatUtil {
int damage = 0;
int poison = 0;
CardList attackers = new CardList(combat.getAttackers());
CardList unblocked = new CardList(combat.getAttackers());
CardList unblocked = new CardList();
CardList blockers = new CardList();
Card attacker = new Card();

View File

@@ -560,7 +560,7 @@ public class ComputerUtil_Block2
//Begin with the weakest blockers
CardListUtil.sortAttackLowFirst(blockersLeft);
CardList currentAttackers = attackersLeft;
CardList currentAttackers = new CardList(attackersLeft.toArray());
//first choose good blocks only
for(int i = 0; i < attackersLeft.size(); i++) {
@@ -602,7 +602,7 @@ public class ComputerUtil_Block2
}
}
attackersLeft = currentAttackers;
attackersLeft = new CardList(currentAttackers.toArray());
if(blockersLeft.size() == 0) return combat;
@@ -619,7 +619,7 @@ public class ComputerUtil_Block2
}
}
attackersLeft = currentAttackers;
attackersLeft = new CardList(currentAttackers.toArray());
//choose necessary chump blocks if life is still in danger
if (CombatUtil.lifeInDanger(combat))

View File

@@ -181,8 +181,7 @@ public class MagicStack extends MyObservable {
String k[] = parse.split(":");
if (k[1].equals("ActualSpell")
&& ActualEffectTriggered == false) {
AllZone.GameAction.checkWheneverKeyword(sp.getSourceCard(),
"ActualSpell", null);
AllZone.GameAction.checkWheneverKeyword(sp.getSourceCard(),"ActualSpell", null);
sp.getSourceCard().removeIntrinsicKeyword(parse);
ActualEffectTriggered = true;
}

View File

@@ -437,7 +437,7 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
}
public void setTrigger(boolean b) {
public void setTrigger(boolean b) {%
trigger = b;
}