mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Renamed PlayCards in ComputerUtil to playAbilities.
This commit is contained in:
@@ -71,7 +71,7 @@ public class ComputerAIGeneral implements Computer {
|
|||||||
private void playCards(final String phase) {
|
private void playCards(final String phase) {
|
||||||
SpellAbility[] sp = phase.equals(Constant.Phase.MAIN1) ? getMain1() : getMain2();
|
SpellAbility[] sp = phase.equals(Constant.Phase.MAIN1) ? getMain1() : getMain2();
|
||||||
|
|
||||||
boolean nextPhase = ComputerUtil.playCards(sp);
|
boolean nextPhase = ComputerUtil.playAbilities(sp);
|
||||||
|
|
||||||
if (nextPhase) {
|
if (nextPhase) {
|
||||||
AllZone.getPhase().passPriority();
|
AllZone.getPhase().passPriority();
|
||||||
@@ -501,7 +501,7 @@ public class ComputerAIGeneral implements Computer {
|
|||||||
boolean pass = (sas.length == 0)
|
boolean pass = (sas.length == 0)
|
||||||
|| AllZone.getPhase().is(Constant.Phase.END_OF_TURN, AllZone.getComputerPlayer());
|
|| AllZone.getPhase().is(Constant.Phase.END_OF_TURN, AllZone.getComputerPlayer());
|
||||||
if (!pass) { // Each AF should check the phase individually
|
if (!pass) { // Each AF should check the phase individually
|
||||||
pass = ComputerUtil.playCards(sas);
|
pass = ComputerUtil.playAbilities(sas);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pass) {
|
if (pass) {
|
||||||
@@ -530,7 +530,7 @@ public class ComputerAIGeneral implements Computer {
|
|||||||
|
|
||||||
possibleCounters.clear();
|
possibleCounters.clear();
|
||||||
possibleCounters = getPossibleETBCounters();
|
possibleCounters = getPossibleETBCounters();
|
||||||
if (possibleCounters.size() > 0 && !ComputerUtil.playCards(possibleCounters)) {
|
if (possibleCounters.size() > 0 && !ComputerUtil.playAbilities(possibleCounters)) {
|
||||||
// Responding Permanent w/ ETB Counter is on the Stack
|
// Responding Permanent w/ ETB Counter is on the Stack
|
||||||
// AllZone.getPhase().passPriority();
|
// AllZone.getPhase().passPriority();
|
||||||
return;
|
return;
|
||||||
@@ -538,7 +538,7 @@ public class ComputerAIGeneral implements Computer {
|
|||||||
|
|
||||||
if (sas.length > 0) {
|
if (sas.length > 0) {
|
||||||
// Spell not Countered
|
// Spell not Countered
|
||||||
if (!ComputerUtil.playCards(sas)) {
|
if (!ComputerUtil.playAbilities(sas)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class ComputerUtil {
|
|||||||
* objects.
|
* objects.
|
||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public static boolean playCards(final SpellAbility[] all) {
|
public static boolean playAbilities(final SpellAbility[] all) {
|
||||||
// not sure "playing biggest spell" matters?
|
// not sure "playing biggest spell" matters?
|
||||||
sortSpellAbilityByCost(all);
|
sortSpellAbilityByCost(all);
|
||||||
// MyRandom.shuffle(all);
|
// MyRandom.shuffle(all);
|
||||||
@@ -95,12 +95,12 @@ public class ComputerUtil {
|
|||||||
* a {@link java.util.ArrayList} object.
|
* a {@link java.util.ArrayList} object.
|
||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public static boolean playCards(final ArrayList<SpellAbility> all) {
|
public static boolean playAbilities(final ArrayList<SpellAbility> all) {
|
||||||
SpellAbility[] sas = new SpellAbility[all.size()];
|
SpellAbility[] sas = new SpellAbility[all.size()];
|
||||||
for (int i = 0; i < sas.length; i++) {
|
for (int i = 0; i < sas.length; i++) {
|
||||||
sas[i] = all.get(i);
|
sas[i] = all.get(i);
|
||||||
}
|
}
|
||||||
return playCards(sas);
|
return playAbilities(sas);
|
||||||
} // playCards()
|
} // playCards()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user