- AI should block a lot more often now.

This commit is contained in:
jendave
2011-08-06 03:33:49 +00:00
parent 9c88ef0e40
commit d3c2c19e91

View File

@@ -231,14 +231,16 @@ public class ComputerUtil_Block2
//safe block - attacker dies, blocker lives //safe block - attacker dies, blocker lives
//if there is only one attacker it might be a trap //if there is only one attacker it might be a trap
//if holding a Giant Growth and a 2/2 attacking into a 3/3 //if holding a Giant Growth and a 2/2 attacking into a 3/3
if(shouldBlock) Random random = new Random();
int randomInt = random.nextInt(100);
if (randomInt >= 10)
{ {
c = safeSingleBlock(attackers.get(i)); c = safeSingleBlock(attackers.get(i));
if(c != null) if(c != null)
testing("safe"); testing("safe");
} }
if(c == null && randomInt >= 15)
if(c == null && shouldBlock)
{ {
//shield block - attacker lives, blocker lives //shield block - attacker lives, blocker lives
c = shieldSingleBlock(attackers.get(i)); c = shieldSingleBlock(attackers.get(i));