had to move setActivatingPlayer to an earlier moment because player was needed yet at the point of costs check

This commit is contained in:
Maxmtg
2013-04-03 15:18:52 +00:00
parent 0d00496afe
commit e7b1a07742

View File

@@ -278,6 +278,7 @@ public class ComputerUtil {
* a {@link forge.card.spellability.SpellAbility} object.
*/
public static final void playNoStack(final AIPlayer ai, final SpellAbility sa, final GameState game) {
sa.setActivatingPlayer(ai);
// TODO: We should really restrict what doesn't use the Stack
if (ComputerUtilCost.canPayCost(sa, ai)) {
final Card source = sa.getSourceCard();
@@ -285,8 +286,6 @@ public class ComputerUtil {
sa.setSourceCard(game.getAction().moveToStack(source));
}
sa.setActivatingPlayer(ai);
final Cost cost = sa.getPayCosts();
if (cost == null) {
ComputerUtilMana.payManaCost(ai, sa);