ComputerUtil: set CastSA for AI

This commit is contained in:
Hanmac
2016-08-12 15:50:24 +00:00
parent 411d23a3a4
commit b25b3b0eda

View File

@@ -89,6 +89,7 @@ public class ComputerUtil {
final Card source = sa.getHostCard(); final Card source = sa.getHostCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
source.setCastSA(sa);
sa.setHostCard(game.getAction().moveToStack(source)); sa.setHostCard(game.getAction().moveToStack(source));
} }
@@ -206,6 +207,7 @@ public class ComputerUtil {
final Card source = sa.getHostCard(); final Card source = sa.getHostCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
source.setCastSA(sa);
sa.setHostCard(game.getAction().moveToStack(source)); sa.setHostCard(game.getAction().moveToStack(source));
} }
final Cost cost = sa.getPayCosts(); final Cost cost = sa.getPayCosts();
@@ -226,6 +228,7 @@ public class ComputerUtil {
final Card source = sa.getHostCard(); final Card source = sa.getHostCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
source.setCastSA(sa);
sa.setHostCard(ai.getGame().getAction().moveToStack(source)); sa.setHostCard(ai.getGame().getAction().moveToStack(source));
} }
@@ -242,6 +245,7 @@ public class ComputerUtil {
final Card source = newSA.getHostCard(); final Card source = newSA.getHostCard();
if (newSA.isSpell() && !source.isCopiedSpell()) { if (newSA.isSpell() && !source.isCopiedSpell()) {
source.setCastSA(newSA);
newSA.setHostCard(game.getAction().moveToStack(source)); newSA.setHostCard(game.getAction().moveToStack(source));
} }
@@ -258,6 +262,7 @@ public class ComputerUtil {
if (ComputerUtilCost.canPayCost(sa, ai)) { if (ComputerUtilCost.canPayCost(sa, ai)) {
final Card source = sa.getHostCard(); final Card source = sa.getHostCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
source.setCastSA(sa);
sa.setHostCard(game.getAction().moveToStack(source)); sa.setHostCard(game.getAction().moveToStack(source));
} }