AdjustTargets method for dynamic targets

This commit is contained in:
magenoxx 2012-08-03 07:43:43 +03:00
parent ab9db5a60a
commit a5d846f970
8 changed files with 72 additions and 13 deletions

View file

@ -162,6 +162,10 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
logger.debug("activate failed - choice");
return false;
}
Card card = game.getCard(sourceId);
if (card != null) {
card.adjustTargets(this, game);
}
//20100716 - 601.2b
if (getTargets().size() > 0 && getTargets().chooseTargets(getEffects().get(0).getOutcome(), this.controllerId, this, game) == false) {
logger.debug("activate failed - target");
@ -182,7 +186,6 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
}
}
//20100716 - 601.2e
Card card = game.getCard(sourceId);
if (card != null) {
card.adjustCosts(this, game);
for (Ability ability : card.getAbilities()) {