mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Little tweak for playStack in ComputerUtil.
This commit is contained in:
@@ -302,17 +302,22 @@ public class ComputerUtil {
|
|||||||
* a {@link forge.card.spellability.SpellAbility} object.
|
* a {@link forge.card.spellability.SpellAbility} object.
|
||||||
*/
|
*/
|
||||||
public static final void playStack(final SpellAbility sa) {
|
public static final void playStack(final SpellAbility sa) {
|
||||||
|
sa.setActivatingPlayer(AllZone.getComputerPlayer());
|
||||||
if (ComputerUtil.canPayCost(sa)) {
|
if (ComputerUtil.canPayCost(sa)) {
|
||||||
final Card source = sa.getSourceCard();
|
final Card source = sa.getSourceCard();
|
||||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||||
sa.setSourceCard(Singletons.getModel().getGameAction().moveToStack(source));
|
sa.setSourceCard(Singletons.getModel().getGameAction().moveToStack(source));
|
||||||
}
|
}
|
||||||
|
final Cost cost = sa.getPayCosts();
|
||||||
sa.setActivatingPlayer(AllZone.getComputerPlayer());
|
if (cost == null) {
|
||||||
|
ComputerUtil.payManaCost(sa);
|
||||||
ComputerUtil.payManaCost(sa);
|
AllZone.getStack().add(sa);
|
||||||
|
} else {
|
||||||
AllZone.getStack().add(sa);
|
final CostPayment pay = new CostPayment(cost, sa);
|
||||||
|
if (pay.payComputerCosts()) {
|
||||||
|
AllZone.getStack().add(sa);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user