// if (card==null)
// System.out.println("Buh");
for (int i = 0; i < action.manaPayment.size(); i++)
{
EAIAction manaSource = action.manaPayment.elementAt(i);
executeAction(manaSource, player, false);
}
if (manaOnly) return true;
if (card.getCard().getId().equals("4262"))
System.out.println("Buh");
if (action.getCard().hasType("Legendary Creature"))
{
csa.jportal.config.Configuration C = csa.jportal.config.Configuration.getConfiguration();
boolean legandaryRuling = C.isLegendaryRuling();
if (legandaryRuling)
{
int opponent = (player +1)%2;
CardSimList myField = getBattlefield(player);
CardSim otherCard = myField.getCardID(card.getId());
boolean foundOne = false;
while (otherCard != null)
{
creatureToGrave(otherCard);
foundOne = true;
myField = getBattlefield(player);
otherCard = myField.getCardID(card.getId());
}
CardSimList otherField = getBattlefield(opponent);
otherCard = otherField.getCardID(card.getId());
while (otherCard != null)
{
creatureToGrave(otherCard);
foundOne = true;
otherField = getBattlefield(opponent);
otherCard = otherField.getCardID(card.getId());
}
if (foundOne)
{
// remove card - and dont play it out!
mHand[player].moveCardTo(card, mGraveyard[player]);
checkTriggerMoveToGrave(card);
// return true
// so EAI has a chance to evaulate this
// and possibly kill an opponents legendary
return true;
}
}
}
currentAction = action;
if (isSourceEmpty(action))
{
doSourceCardEffect(HintAll.HINT_SITUATION_CARD_PLAYED, card, null, player);
}
for (int i = 0; i < action.targets.size(); i++)
{
EAIAction target = action.targets.elementAt(i);
if (target.isSource)
doSourceCardEffect(HintAll.HINT_SITUATION_CARD_PLAYED, card, target, player);
}
if (isTargetEmpty(action))
{
doTargetCardEffect(HintAll.HINT_SITUATION_CARD_PLAYED, card, null, player);
}
for (int i = 0; i < action.targets.size(); i++)
{
EAIAction target = action.targets.elementAt(i);
if (!target.isSource)
doTargetCardEffect(HintAll.HINT_SITUATION_CARD_PLAYED, card, target, player);
}
AIEnhancedCardHints hints = AIEnhancedCardHints.getHints(action.getCard());