blocker = vMatch.removeAllreadyBlocking(blocker);
blocker = blocker.onlyTapstate(false);
String blKey = generateBlockerKey(attacker, blocker);
CombatFormation formation = blockerCache.get(blKey);
if (formation == null)
{
CombatSimConfig c = new CombatSimConfig(E.aiPlayer);
c.attackers = attacker;
c.attackerLands = vMatch.getLand(E.pNumber);
c.blockerLands = vMatch.getLand(opponentNo);
CombatSimNew csim = new CombatSimNew(attacker, blocker, c, false);
int blockerHealth = vMatch.getLife(opponentNo);
int preventDamage = EAIHelper.getDamagePrevention(vMatch, player, vMatch.getBattlefield((player)));
// TEST new Blocking!
formation = csim.computeBestBlock(blockerHealth, Weighting.DEFAULT, preventDamage);
if (formation != null)
{
blockerCache.put(blKey, formation);
}
else
{
formation = new CombatFormation();
blockerCache.put(blKey, formation);
}
cacheNotHit++;
}
else
{
cacheHit++;
}
Vector <SingleFight> fights = formation.getFormation();
int no=0;
for (int f = 0; f < fights.size(); f++)
{
SingleFight singleFight = fights.elementAt(f);
CardSim matchAttacker = vMatch.getAttacker(singleFight.attacker);