mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- AI should block a lot more often now.
This commit is contained in:
@@ -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));
|
||||||
|
|||||||
Reference in New Issue
Block a user