*/
// opponent creatures should only be attackers to make sense!
public static CombatFormation getAgressiveBlocker(CardList myCreatures, CardList attackerOpponent, CardList myLands, CardList opponentLands, int minorMood, int intellligence)
{
Logable D = Configuration.getConfiguration().getDebugEntity();
CombatFormation result = new CombatFormation();
if (myCreatures.size()==0) return result;
if (attackerOpponent.size() == 0)
{
//System.out.println("Unused blocker: " +myCreatures);
return result;
}
CardList defenderPlayer = myCreatures.getSubListTapState(false);
if (intellligence > 3) defenderPlayer = removeWithHint(defenderPlayer, "CAN_BE_TAPPED_INSTEAD_ATTACK");
CombatSim cs = new CombatSim(attackerOpponent, defenderPlayer);
CombatSim.attackerLands = opponentLands;
CombatSim.blockerLands = myLands;
result = cs.simAgressiveBlocker(intellligence, minorMood);
int myLife = Match.match.getLife(Match.match.getOwner(myCreatures.getCard(0)));
if (result != null)
if (result.attackerDead == 0)
{
D.addLog("No attacker dead!",3);
if (result.blockerDead > 0)
{
D.addLog("But blocker dead!",3);
if (result.blockerManaDead / result.blockerDead >4 )
{
D.addLog("Attacker will damage player for: "+result.getAllAttackerDamage(),3);
D.addLog("Attacker will damage player for2: "+result.playerDamage,3);
D.addLog("player Life: "+myLife,3);
if (myLife - result.getAllAttackerDamage() >0)
{
D.addLog("Player damage accepted",3);
result = null;
}
}
}
}
if (result != null)
if (result.playerDamage > myLife)
{
return getMediumBlocker(myCreatures, attackerOpponent, myLands, opponentLands, minorMood, intellligence);
}
if (result==null)
return new CombatFormation();
return result;
}