mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
make sure a bunch of TODOs are properly marked so they are easier to find in Eclipse
This commit is contained in:
@@ -38,7 +38,7 @@ public class ComputerAI_Input extends Input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void think() {
|
private void think() {
|
||||||
//todo: instead of setNextPhase, pass priority
|
//TODO: instead of setNextPhase, pass priority
|
||||||
final String phase = AllZone.Phase.getPhase();
|
final String phase = AllZone.Phase.getPhase();
|
||||||
|
|
||||||
if (AllZone.Stack.size() > 0)
|
if (AllZone.Stack.size() > 0)
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ public class ComputerUtil
|
|||||||
|
|
||||||
final static public void playNoStack(SpellAbility sa)
|
final static public void playNoStack(SpellAbility sa)
|
||||||
{
|
{
|
||||||
// todo: We should really restrict what doesn't use the Stack
|
// TODO: We should really restrict what doesn't use the Stack
|
||||||
|
|
||||||
if(canPayCost(sa))
|
if(canPayCost(sa))
|
||||||
{
|
{
|
||||||
@@ -997,7 +997,7 @@ public class ComputerUtil
|
|||||||
list.reverse();
|
list.reverse();
|
||||||
|
|
||||||
for (int i = 0; i < max; i++) {
|
for (int i = 0; i < max; i++) {
|
||||||
// todo: use getWorstPermanent() would be wayyyy better
|
// TODO: use getWorstPermanent() would be wayyyy better
|
||||||
|
|
||||||
Card c;
|
Card c;
|
||||||
if (list.getNotType("Creature").size() == 0) {
|
if (list.getNotType("Creature").size() == 0) {
|
||||||
@@ -1011,7 +1011,7 @@ public class ComputerUtil
|
|||||||
ArrayList<Card> auras = c.getEnchantedBy();
|
ArrayList<Card> auras = c.getEnchantedBy();
|
||||||
|
|
||||||
if (auras.size() > 0){
|
if (auras.size() > 0){
|
||||||
// todo: choose "worst" controlled enchanting Aura
|
// TODO: choose "worst" controlled enchanting Aura
|
||||||
for(int j = 0; j < auras.size(); j++){
|
for(int j = 0; j < auras.size(); j++){
|
||||||
Card aura = auras.get(j);
|
Card aura = auras.get(j);
|
||||||
if (aura.getController().isPlayer(c.getController()) && list.contains(aura)){
|
if (aura.getController().isPlayer(c.getController()) && list.contains(aura)){
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class ComputerUtil_Attack2 {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return possibleBlockers;
|
return possibleBlockers;
|
||||||
}//getUntappedCreatures()
|
}//getPossibleBlockers()
|
||||||
|
|
||||||
//this checks to make sure that the computer player
|
//this checks to make sure that the computer player
|
||||||
//doesn't lose when the human player attacks
|
//doesn't lose when the human player attacks
|
||||||
@@ -396,7 +396,7 @@ public class ComputerUtil_Attack2 {
|
|||||||
// *****************
|
// *****************
|
||||||
|
|
||||||
// decide on attack aggression based on a comparison of forces, life totals and other considerations
|
// decide on attack aggression based on a comparison of forces, life totals and other considerations
|
||||||
// some bad "magic numbers" here, todo replace with nice descriptive variable names
|
// some bad "magic numbers" here, TODO replace with nice descriptive variable names
|
||||||
if((ratioDiff > 0 && doAttritionalAttack)){ // (playerLifeToDamageRatio <= 1 && ratioDiff >= 1 && outNumber > 0) ||
|
if((ratioDiff > 0 && doAttritionalAttack)){ // (playerLifeToDamageRatio <= 1 && ratioDiff >= 1 && outNumber > 0) ||
|
||||||
aiAggression = 5; // attack at all costs
|
aiAggression = 5; // attack at all costs
|
||||||
}else if((playerLifeToDamageRatio < 2 && ratioDiff >= 0) || ratioDiff > 3 || (ratioDiff > 0 && outNumber > 0)){
|
}else if((playerLifeToDamageRatio < 2 && ratioDiff >= 0) || ratioDiff > 3 || (ratioDiff > 0 && outNumber > 0)){
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class ComputerUtil_Block2
|
|||||||
|
|
||||||
boolean bLifeInDanger = CombatUtil.lifeInDanger(combat);
|
boolean bLifeInDanger = CombatUtil.lifeInDanger(combat);
|
||||||
|
|
||||||
// todo: Add creatures attacking Planeswalkers in order of which we want to protect
|
// TODO: Add creatures attacking Planeswalkers in order of which we want to protect
|
||||||
// defend planeswalkers with more loyalty before planeswalkers with less loyalty
|
// defend planeswalkers with more loyalty before planeswalkers with less loyalty
|
||||||
// if planeswalker will be too difficult to defend don't even bother
|
// if planeswalker will be too difficult to defend don't even bother
|
||||||
for(int i = 1; i < attackerLists.length; i++){
|
for(int i = 1; i < attackerLists.length; i++){
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo(sol) Combine all of these move tos
|
// TODO(sol) Combine all of these move tos
|
||||||
|
|
||||||
public Card moveTo(PlayerZone zone, Card c) {
|
public Card moveTo(PlayerZone zone, Card c) {
|
||||||
// Ideally move to should never be called without a prevZone
|
// Ideally move to should never be called without a prevZone
|
||||||
@@ -76,7 +76,7 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (zone.is(Constant.Zone.Battlefield) && c.isAura()){
|
if (zone.is(Constant.Zone.Battlefield) && c.isAura()){
|
||||||
// todo: add attachment code here
|
// TODO: add attachment code here
|
||||||
}
|
}
|
||||||
|
|
||||||
// copyCard above seems to already clearRemembered, commenting out for now
|
// copyCard above seems to already clearRemembered, commenting out for now
|
||||||
@@ -2447,7 +2447,7 @@ public class GameAction {
|
|||||||
AllZone.ComputerPlayer.drawCard();
|
AllZone.ComputerPlayer.drawCard();
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: ManaPool should be moved to Player and be represented in the player panel
|
// TODO: ManaPool should be moved to Player and be represented in the player panel
|
||||||
ManaPool mp = AllZone.ManaPool;
|
ManaPool mp = AllZone.ManaPool;
|
||||||
mp.setImageFilename("mana_pool");
|
mp.setImageFilename("mana_pool");
|
||||||
AllZone.Human_Battlefield.add(mp);
|
AllZone.Human_Battlefield.add(mp);
|
||||||
|
|||||||
@@ -2186,7 +2186,7 @@ public class GameActionUtil {
|
|||||||
if(showLandfallDialog(c)) AllZone.Stack.addSimultaneousStackEntry(ability);
|
if(showLandfallDialog(c)) AllZone.Stack.addSimultaneousStackEntry(ability);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
// todo: once AI has a mana pool he should choose add Ability and choose a mana as appropriate
|
// TODO: once AI has a mana pool he should choose add Ability and choose a mana as appropriate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4694,7 +4694,7 @@ public class GameActionUtil {
|
|||||||
}//upkeep_Shapeshifter
|
}//upkeep_Shapeshifter
|
||||||
|
|
||||||
private static void upkeep_Vesuvan_Doppelganger_Keyword() {
|
private static void upkeep_Vesuvan_Doppelganger_Keyword() {
|
||||||
// todo: what about enchantments? i dont know how great this solution is
|
// TODO: what about enchantments? i dont know how great this solution is
|
||||||
final Player player = AllZone.Phase.getPlayerTurn();
|
final Player player = AllZone.Phase.getPlayerTurn();
|
||||||
final String keyword = "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability.";
|
final String keyword = "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability.";
|
||||||
CardList list = AllZoneUtil.getPlayerCardsInPlay(player);
|
CardList list = AllZoneUtil.getPlayerCardsInPlay(player);
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
|
|
||||||
private String getWinText(long creds, QuestMatchState winLose, forge.quest.data.QuestData q)
|
private String getWinText(long creds, QuestMatchState winLose, forge.quest.data.QuestData q)
|
||||||
{
|
{
|
||||||
// todo use q.qdPrefs to write bonus credits in prefs file
|
// TODO use q.qdPrefs to write bonus credits in prefs file
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
String[] wins = winLose.getWinMethods();
|
String[] wins = winLose.getWinMethods();
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class MagicStack extends MyObservable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearFrozen() {
|
public void clearFrozen() {
|
||||||
// todo: frozen triggered abilities and undoable costs have nasty
|
// TODO: frozen triggered abilities and undoable costs have nasty
|
||||||
// consequences
|
// consequences
|
||||||
frozen = false;
|
frozen = false;
|
||||||
frozenStack.clear();
|
frozenStack.clear();
|
||||||
@@ -282,7 +282,7 @@ public class MagicStack extends MyObservable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (sp.isXCost()) {
|
else if (sp.isXCost()) {
|
||||||
// todo: convert any X costs to use abCost so it happens earlier
|
// TODO: convert any X costs to use abCost so it happens earlier
|
||||||
final SpellAbility sa = sp;
|
final SpellAbility sa = sp;
|
||||||
final Ability ability = new Ability(sp.getSourceCard(), sa.getXManaCost()) {
|
final Ability ability = new Ability(sp.getSourceCard(), sa.getXManaCost()) {
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
@@ -330,7 +330,7 @@ public class MagicStack extends MyObservable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (sp.isMultiKicker()){
|
else if (sp.isMultiKicker()){
|
||||||
// todo: convert multikicker support in abCost so this doesn't happen here
|
// TODO: convert multikicker support in abCost so this doesn't happen here
|
||||||
// both X and multi is not supported yet
|
// both X and multi is not supported yet
|
||||||
|
|
||||||
final SpellAbility sa = sp;
|
final SpellAbility sa = sp;
|
||||||
@@ -413,7 +413,7 @@ public class MagicStack extends MyObservable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (sp.isReplicate()){
|
else if (sp.isReplicate()){
|
||||||
// todo: convert multikicker/replicate support in abCost so this doesn't happen here
|
// TODO: convert multikicker/replicate support in abCost so this doesn't happen here
|
||||||
// X and multi and replicate are not supported yet
|
// X and multi and replicate are not supported yet
|
||||||
|
|
||||||
final SpellAbility sa = sp;
|
final SpellAbility sa = sp;
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ public class Phase extends MyObservable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is(Constant.Phase.Combat_End) && extraCombats > 0){
|
if (is(Constant.Phase.Combat_End) && extraCombats > 0){
|
||||||
// todo: ExtraCombat needs to be changed for other spell/abilities that give extra combat
|
// TODO: ExtraCombat needs to be changed for other spell/abilities that give extra combat
|
||||||
// can do it like ExtraTurn stack ExtraPhases
|
// can do it like ExtraTurn stack ExtraPhases
|
||||||
|
|
||||||
Player player = getPlayerTurn();
|
Player player = getPlayerTurn();
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ public class PhaseUtil {
|
|||||||
|
|
||||||
|
|
||||||
// ***** Combat Utility **********
|
// ***** Combat Utility **********
|
||||||
// todo: the below functions should be removed and the code blocks that use them should instead use SA_Restriction
|
// TODO: the below functions should be removed and the code blocks that use them should instead use SA_Restriction
|
||||||
public static boolean isBeforeAttackersAreDeclared() {
|
public static boolean isBeforeAttackersAreDeclared() {
|
||||||
String phase = AllZone.Phase.getPhase();
|
String phase = AllZone.Phase.getPhase();
|
||||||
return phase.equals(Constant.Phase.Untap) || phase.equals(Constant.Phase.Upkeep)
|
return phase.equals(Constant.Phase.Untap) || phase.equals(Constant.Phase.Upkeep)
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ public abstract class Player extends MyObservable{
|
|||||||
PlayerZone library = AllZone.getZone(Constant.Zone.Library, this);
|
PlayerZone library = AllZone.getZone(Constant.Zone.Library, this);
|
||||||
|
|
||||||
for(int i = 0; i < n; i++) {
|
for(int i = 0; i < n; i++) {
|
||||||
// todo: any draw replacements would go here, not just Dredge
|
// TODO: any draw replacements would go here, not just Dredge
|
||||||
if(getDredge().size() == 0 || !dredge()) {
|
if(getDredge().size() == 0 || !dredge()) {
|
||||||
doDraw(library);
|
doDraw(library);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
public class PlayerZoneUtil
|
public class PlayerZoneUtil
|
||||||
{
|
{
|
||||||
//todo(sol) this whole class is pretty useless
|
//TODO(sol) this whole class is pretty useless
|
||||||
public static ArrayList<Card> getCardType(PlayerZone zone, String cardType)
|
public static ArrayList<Card> getCardType(PlayerZone zone, String cardType)
|
||||||
{
|
{
|
||||||
Card c;
|
Card c;
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class InputControl extends MyObservable implements java.io.Serializable {
|
|||||||
final Player playerTurn = AllZone.Phase.getPlayerTurn();
|
final Player playerTurn = AllZone.Phase.getPlayerTurn();
|
||||||
final Player priority = AllZone.Phase.getPriorityPlayer();
|
final Player priority = AllZone.Phase.getPriorityPlayer();
|
||||||
|
|
||||||
// todo: this resolving portion needs more work, but fixes Death Cloud issues
|
// TODO: this resolving portion needs more work, but fixes Death Cloud issues
|
||||||
if (resolvingStack.size() > 0) {
|
if (resolvingStack.size() > 0) {
|
||||||
if (input != null) {
|
if (input != null) {
|
||||||
return input;
|
return input;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class Input_Attack extends Input {
|
|||||||
|
|
||||||
if(zone.is(Constant.Zone.Battlefield, AllZone.HumanPlayer) && CombatUtil.canAttack(card,AllZone.Combat)) {
|
if(zone.is(Constant.Zone.Battlefield, AllZone.HumanPlayer) && CombatUtil.canAttack(card,AllZone.Combat)) {
|
||||||
|
|
||||||
// todo add the propaganda code here and remove it in Phase.nextPhase()
|
// TODO add the propaganda code here and remove it in Phase.nextPhase()
|
||||||
// if (!CombatUtil.checkPropagandaEffects(card))
|
// if (!CombatUtil.checkPropagandaEffects(card))
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class Input_Cleanup extends Input {
|
|||||||
CombatUtil.removeAllDamage();
|
CombatUtil.removeAllDamage();
|
||||||
|
|
||||||
AllZone.Phase.setNeedToNextPhase(true);
|
AllZone.Phase.setNeedToNextPhase(true);
|
||||||
AllZone.Phase.nextPhase(); // todo: keep an eye on this code, see if we can get rid of it.
|
AllZone.Phase.nextPhase(); // TODO: keep an eye on this code, see if we can get rid of it.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class Input_PayManaCostUtil
|
|||||||
if(abilities.isEmpty())
|
if(abilities.isEmpty())
|
||||||
return manaCost;
|
return manaCost;
|
||||||
|
|
||||||
// todo when implementing sunburst
|
// TODO when implementing sunburst
|
||||||
// If the card has sunburst or any other ability that tracks mana spent, skip express Mana choice
|
// If the card has sunburst or any other ability that tracks mana spent, skip express Mana choice
|
||||||
// if (card.getTrackManaPaid()) skipExpress = true;
|
// if (card.getTrackManaPaid()) skipExpress = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user