mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
"Human" -> Constant.Player.Human; "Computer" -> Constant.Player.Computer
This commit is contained in:
@@ -3962,7 +3962,7 @@ public class CardFactory implements NewConstants {
|
|||||||
if (Destination.equals("Hand")) AllZone.Computer_Hand.add(c); //move to hand
|
if (Destination.equals("Hand")) AllZone.Computer_Hand.add(c); //move to hand
|
||||||
if (Destination.equals("TopOfLibrary")) AllZone.Computer_Library.add(c, 0); //move to top of library
|
if (Destination.equals("TopOfLibrary")) AllZone.Computer_Library.add(c, 0); //move to top of library
|
||||||
if (Destination.equals("ThirdFromTopOfLibrary")) AllZone.Computer_Library.add(c, 2); //move to third from top of library
|
if (Destination.equals("ThirdFromTopOfLibrary")) AllZone.Computer_Library.add(c, 2); //move to third from top of library
|
||||||
if (Destination.equals("Battlefield")) AllZone.getZone(Constant.Zone.Play, "Computer").add(c); //move to battlezone
|
if (Destination.equals("Battlefield")) AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer).add(c); //move to battlezone
|
||||||
|
|
||||||
if (!Targets.startsWith("Card") && !Destination.equals("Battlefield")) {
|
if (!Targets.startsWith("Card") && !Destination.equals("Battlefield")) {
|
||||||
CardList l = new CardList();
|
CardList l = new CardList();
|
||||||
|
|||||||
@@ -1008,7 +1008,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayAI() {
|
public boolean canPlayAI() {
|
||||||
PlayerLife compLife = AllZone.GameAction.getPlayerLife("Computer");
|
PlayerLife compLife = AllZone.GameAction.getPlayerLife(Constant.Player.Computer);
|
||||||
int life = compLife.getLife();
|
int life = compLife.getLife();
|
||||||
|
|
||||||
return (life > (loss + 2));
|
return (life > (loss + 2));
|
||||||
|
|||||||
@@ -2802,7 +2802,7 @@ public class CardFactory_Instants {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayAI() {
|
public boolean canPlayAI() {
|
||||||
PlayerLife compLife = AllZone.GameAction.getPlayerLife("Computer");
|
PlayerLife compLife = AllZone.GameAction.getPlayerLife(Constant.Player.Computer);
|
||||||
int life = compLife.getLife();
|
int life = compLife.getLife();
|
||||||
if(4 < AllZone.Phase.getTurn() && AllZone.Computer_Library.size() > 0 && life >= 4) return true;
|
if(4 < AllZone.Phase.getTurn() && AllZone.Computer_Library.size() > 0 && life >= 4) return true;
|
||||||
else return false;
|
else return false;
|
||||||
@@ -3377,7 +3377,7 @@ public class CardFactory_Instants {
|
|||||||
}
|
}
|
||||||
}// if choice yes
|
}// if choice yes
|
||||||
} // player equals human
|
} // player equals human
|
||||||
else if(player.equals("Computer") && lands.size() > 0) {
|
else if(player.equals(Constant.Player.Computer) && lands.size() > 0) {
|
||||||
Card card = lands.get(0);
|
Card card = lands.get(0);
|
||||||
lib.remove(card);
|
lib.remove(card);
|
||||||
// hand.add(card);
|
// hand.add(card);
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ class CardFactory_Lands {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
CardList creature = new CardList();
|
CardList creature = new CardList();
|
||||||
PlayerZone zone = AllZone.getZone(Constant.Zone.Play, "Computer");
|
PlayerZone zone = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
|
||||||
if(zone != null) {
|
if(zone != null) {
|
||||||
creature.addAll(zone.getCards());
|
creature.addAll(zone.getCards());
|
||||||
creature = creature.getType("Creature");
|
creature = creature.getType("Creature");
|
||||||
|
|||||||
@@ -176,12 +176,12 @@ public class ComputerAI_General implements Computer {
|
|||||||
if(c.isLand()) return false;
|
if(c.isLand()) return false;
|
||||||
|
|
||||||
CardList Vengevines = new CardList();
|
CardList Vengevines = new CardList();
|
||||||
Vengevines.addAll(AllZone.getZone(Constant.Zone.Graveyard, "Computer").getCards());
|
Vengevines.addAll(AllZone.getZone(Constant.Zone.Graveyard, Constant.Player.Computer).getCards());
|
||||||
Vengevines = Vengevines.getName("Vengevine");
|
Vengevines = Vengevines.getName("Vengevine");
|
||||||
if(Vengevines.size() > 0) {
|
if(Vengevines.size() > 0) {
|
||||||
CardList Creatures = new CardList();
|
CardList Creatures = new CardList();
|
||||||
CardList Creatures2 = new CardList();
|
CardList Creatures2 = new CardList();
|
||||||
Creatures.addAll(AllZone.getZone(Constant.Zone.Hand, "Computer").getCards());
|
Creatures.addAll(AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer).getCards());
|
||||||
for(int i = 0; i < Creatures.size(); i++) {
|
for(int i = 0; i < Creatures.size(); i++) {
|
||||||
if(Creatures.get(i).getType().contains("Creature") && CardUtil.getConvertedManaCost(Creatures.get(i).getManaCost()) <= 3) {
|
if(Creatures.get(i).getType().contains("Creature") && CardUtil.getConvertedManaCost(Creatures.get(i).getManaCost()) <= 3) {
|
||||||
Creatures2.add(Creatures.get(i));
|
Creatures2.add(Creatures.get(i));
|
||||||
|
|||||||
@@ -535,7 +535,7 @@ public class ComputerUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
while(!landList.isEmpty() && (AllZone.GameInfo.computerNumberLandPlaysLeft() > 0 ||
|
while(!landList.isEmpty() && (AllZone.GameInfo.computerNumberLandPlaysLeft() > 0 ||
|
||||||
CardFactoryUtil.getCards("Fastbond", "Computer").size() > 0)){
|
CardFactoryUtil.getCards("Fastbond", Constant.Player.Computer).size() > 0)){
|
||||||
// play as many lands as you can
|
// play as many lands as you can
|
||||||
int ix = 0;
|
int ix = 0;
|
||||||
while (landList.get(ix).isReflectedLand() && (ix+1 < landList.size())) {
|
while (landList.get(ix).isReflectedLand() && (ix+1 < landList.size())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user