mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Renamed "getHumanPlantAndPet" and "getComputerCreatures" to "getHumanStartingCards" and "getComputerStartingCards".
This is more appropriate since the return values "computer creatures" and "plant and pet" can include enchantments, artifacts, tokens, etc.
This commit is contained in:
@@ -132,7 +132,7 @@ public class ComputerAI_General implements Computer {
|
||||
creatures2.add(creatures.get(i));
|
||||
}
|
||||
}
|
||||
if (creatures2.size() + Phase.getComputerCreatureSpellCount() > 1
|
||||
if (creatures2.size() + Phase.getComputerStartingCardspellCount() > 1
|
||||
&& c.isCreature()
|
||||
&& CardUtil.getConvertedManaCost(c.getManaCost()) <= 3) {
|
||||
return true;
|
||||
|
||||
@@ -1073,7 +1073,7 @@ public class GameAction {
|
||||
AllZone.getHumanPlayer().setLife(humanLife, null);
|
||||
|
||||
if (qa != null) {
|
||||
computer.addAll(forge.quest.data.QuestUtil.getComputerCreatures(AllZone.getQuestData(), AllZone.getQuestAssignment()));
|
||||
computer.addAll(forge.quest.data.QuestUtil.getComputerStartingCards(AllZone.getQuestData(), AllZone.getQuestAssignment()));
|
||||
}
|
||||
|
||||
for (Card c : human) {
|
||||
|
||||
@@ -326,7 +326,7 @@ public final class GameActionUtil {
|
||||
*/
|
||||
public static void playCard_Vengevine(final Card c) {
|
||||
if (c.isCreature() == true
|
||||
&& (Phase.getPlayerCreatureSpellCount() == 2 || Phase.getComputerCreatureSpellCount() == 2))
|
||||
&& (Phase.getPlayerCreatureSpellCount() == 2 || Phase.getComputerStartingCardspellCount() == 2))
|
||||
{
|
||||
final Player controller = c.getController();
|
||||
final PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, controller);
|
||||
@@ -608,7 +608,7 @@ public final class GameActionUtil {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
final Player controller = list.get(i).getController();
|
||||
if ((player.isHuman() && Phase.getPlayerCreatureSpellCount() == 0)
|
||||
|| (player.isComputer() && Phase.getComputerCreatureSpellCount() == 0))
|
||||
|| (player.isComputer() && Phase.getComputerStartingCardspellCount() == 0))
|
||||
{
|
||||
Ability abTrig = new Ability(list.get(i), "0") {
|
||||
public void resolve() {
|
||||
|
||||
@@ -194,7 +194,7 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
||||
}
|
||||
//AllZone.getGameAction().newGame(Constant.Runtime.HumanDeck[0], Constant.Runtime.ComputerDeck[0],
|
||||
//humanList, computerList, humanLife, computerLife);
|
||||
CardList humanList = forge.quest.data.QuestUtil.getHumanPlantAndPet(model.quest, model.qa);
|
||||
CardList humanList = forge.quest.data.QuestUtil.getHumanStartingCards(model.quest, model.qa);
|
||||
CardList computerList = new CardList();
|
||||
|
||||
|
||||
|
||||
@@ -1003,11 +1003,11 @@ public class Phase extends MyObservable implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>getComputerCreatureSpellCount.</p>
|
||||
* <p>getComputerStartingCardspellCount.</p>
|
||||
*
|
||||
* @return a int.
|
||||
*/
|
||||
static int getComputerCreatureSpellCount() {
|
||||
static int getComputerStartingCardspellCount() {
|
||||
return ComputerCreatureSpellCount;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,24 +18,24 @@ import java.util.ArrayList;
|
||||
public class QuestUtil {
|
||||
|
||||
/**
|
||||
* <p>getComputerCreatures.</p>
|
||||
* <p>getComputerStartingCards.</p>
|
||||
*
|
||||
* @param qd a {@link forge.quest.data.QuestData} object.
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public static CardList getComputerCreatures(final QuestData qd) {
|
||||
public static CardList getComputerStartingCards(final QuestData qd) {
|
||||
return new CardList();
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>getComputerCreatures.</p>
|
||||
* <p>getComputerStartingCards.</p>
|
||||
* Returns extra AI cards in play at start of quest.
|
||||
*
|
||||
* @param qd a {@link forge.quest.data.QuestData} object.
|
||||
* @param qa a {@link forge.Quest_Assignment} object.
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public static CardList getComputerCreatures(final QuestData qd, Quest_Assignment qa) {
|
||||
public static CardList getComputerStartingCards(final QuestData qd, Quest_Assignment qa) {
|
||||
CardList list = new CardList();
|
||||
|
||||
if (qa != null) {
|
||||
@@ -45,13 +45,13 @@ public class QuestUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>getHumanPlantAndPet.</p>
|
||||
* Returns list of current plant/pet configuration.
|
||||
* <p>getHumanStartingCards.</p>
|
||||
* Returns list of current plant/pet configuration only.
|
||||
*
|
||||
* @param qd a {@link forge.quest.data.QuestData} object.
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public static CardList getHumanPlantAndPet(final QuestData qd) {
|
||||
public static CardList getHumanStartingCards(final QuestData qd) {
|
||||
CardList list = new CardList();
|
||||
|
||||
if (qd.getPetManager().shouldPetBeUsed()) {
|
||||
@@ -66,7 +66,7 @@ public class QuestUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>getHumanPlantAndPet.</p>
|
||||
* <p>getHumanStartingCards.</p>
|
||||
* Returns extra human cards, including current plant/pet configuration,
|
||||
* and cards in play at start of quest.
|
||||
*
|
||||
@@ -74,8 +74,8 @@ public class QuestUtil {
|
||||
* @param qa a {@link forge.Quest_Assignment} object.
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public static CardList getHumanPlantAndPet(final QuestData qd, Quest_Assignment qa) {
|
||||
CardList list = getHumanPlantAndPet(qd);
|
||||
public static CardList getHumanStartingCards(final QuestData qd, Quest_Assignment qa) {
|
||||
CardList list = getHumanStartingCards(qd);
|
||||
|
||||
if (qa != null) {
|
||||
list.addAll(qa.getHumanExtraCards());
|
||||
|
||||
@@ -685,7 +685,7 @@ public class QuestMainPanel extends QuestAbstractPanel {
|
||||
Deck computer = QuestBattleManager.getAIDeckFromFile((selectedOpponent).getName());
|
||||
Constant.Runtime.ComputerDeck[0] = computer;
|
||||
|
||||
AllZone.getGameAction().newGame(humanDeck, computer, forge.quest.data.QuestUtil.getHumanPlantAndPet(questData),
|
||||
AllZone.getGameAction().newGame(humanDeck, computer, forge.quest.data.QuestUtil.getHumanStartingCards(questData),
|
||||
new CardList(), questData.getLife(), 20, null);
|
||||
}
|
||||
|
||||
@@ -709,7 +709,7 @@ public class QuestMainPanel extends QuestAbstractPanel {
|
||||
}
|
||||
|
||||
AllZone.getGameAction().newGame(humanDeck, computerDeck,
|
||||
forge.quest.data.QuestUtil.getHumanPlantAndPet(questData, selectedQuest), new CardList(),
|
||||
forge.quest.data.QuestUtil.getHumanStartingCards(questData, selectedQuest), new CardList(),
|
||||
questData.getLife() + extraLife, selectedQuest.getComputerLife(), selectedQuest);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user