if (c.E != null)
{
// only cards here, are the like of DeathCoil Wurm
if (c.E.mInitiatorCard != null)
{
CardSim initiator = new CardSim(c.E.mInitiatorCard, c.E.mInitiatorMatch.getIntOwner(c.E.mInitiatorCard));
EAIAction action = mAStack.read();
if (action != null)
{
if (action.targets.size()>0)
{
EAIAction subAction;
subAction = action.targets.elementAt(0);
action.targets.removeElement(subAction);
if (subAction.type == EAIAction.ACTION_YES_NO)
{
subAction.source = c;
subAction.successfull = true;
subAction.cancled = false;
subAction.maybe = false;
subAction.started = true;
mAStack.put(subAction);
executePlan();
return;
}
}
}
AIEnhancedCardHints aHints = AIEnhancedCardHints.getHints(initiator);
String key = HintAll.HINT_SITUATION_BLOCKED;
if (aHints.hasHint(key, HintOccurrence.O_WHEN_BLOCKED))
{
if (aHints.hasHint(key, HintTargetTypes.TY_DAMAGE_AS_NON_BLOCKED))
{
VirtualMatch vMatch = new VirtualMatch(c.E.mInitiatorMatch);
int damageToDo = initiator.getNowPower();
CombatSimConfig configTMP = new CombatSimConfig();
configTMP.attackers = new CardSimList(initiator);
configTMP.blockerLands = vMatch.getLand((initiator.getOwner()+1)%2);
configTMP.attackerLands = vMatch.getLand(initiator.getOwner());
csa.jportal.ai.enhancedAI.enhancedSim.SingleFight sFight = csa.jportal.ai.enhancedAI.enhancedSim.SingleFight.getFight(initiator, vMatch.getBlocker(initiator), configTMP, false);
vMatch.getAttacker().remove(initiator);
int oldOpponentHealth = vMatch.getLife((initiator.getOwner()+1)%2);
vMatch.doCombat(initiator.getOwner());
int newOpponentHealth = vMatch.getLife((initiator.getOwner()+1)%2);
int otherDamage = oldOpponentHealth-newOpponentHealth;
boolean damagePlayer = EAIPlanTree.doRatherPlayerDamage(new VirtualMatch(c.E.mInitiatorMatch), sFight, initiator.getOwner(), otherDamage);
c.setBooleanResult(damagePlayer);
c.setSuccessfull(true);
return;
}