cleanup in GameActionUtil

This commit is contained in:
slapshot5
2011-11-24 17:27:43 +00:00
parent c819b40e9e
commit eea94e00b0

View File

@@ -51,7 +51,7 @@ public final class GameActionUtil {
/** /**
* <p> * <p>
* playCard_Cascade. * playCardCascade.
* </p> * </p>
* *
* @param c * @param c
@@ -78,13 +78,8 @@ public final class GameActionUtil {
} }
} }
} }
if (c.hasKeyword("Cascade") || c.getName().equals("Bituminous Blast")) // keyword //keyword get cleared for Bitumonous Blast
// gets if (c.hasKeyword("Cascade") || c.getName().equals("Bituminous Blast")) {
// cleared
// for
// Bitumonous
// Blast
{
doCascade(c); doCascade(c);
} }
} // execute() } // execute()
@@ -164,11 +159,11 @@ public final class GameActionUtil {
} }
}; };
cascade.execute(); cascade.execute();
} } //end playCardCascade
/** /**
* <p> * <p>
* playCard_Ripple. * playCardRipple.
* </p> * </p>
* *
* @param c * @param c
@@ -320,7 +315,7 @@ public final class GameActionUtil {
/** /**
* <p> * <p>
* endOfTurn_Wall_Of_Reverence. * endOfTurnWallOfReverence.
* </p> * </p>
*/ */
public static void endOfTurnWallOfReverence() { public static void endOfTurnWallOfReverence() {
@@ -364,11 +359,11 @@ public final class GameActionUtil {
AllZone.getStack().addSimultaneousStackEntry(ability); AllZone.getStack().addSimultaneousStackEntry(ability);
} }
} // endOfTurn_Wall_Of_Reverence() } // endOfTurnWallOfReverence()
/** /**
* <p> * <p>
* endOfTurn_Lighthouse_Chronologist. * endOfTurnLighthouseChronologist.
* </p> * </p>
*/ */
public static void endOfTurnLighthouseChronologist() { public static void endOfTurnLighthouseChronologist() {
@@ -553,7 +548,7 @@ public final class GameActionUtil {
Object q = null; Object q = null;
q = GuiUtils.getChoiceOptional("Use " + c.getName() + " Landfall?", choices); q = GuiUtils.getChoiceOptional("Use " + c + " Landfall?", choices);
if (q == null || q.equals("No")) { if (q == null || q.equals("No")) {
return false; return false;
@@ -564,7 +559,7 @@ public final class GameActionUtil {
/** /**
* <p> * <p>
* landfall_Lotus_Cobra. * landfallLotusCobra.
* </p> * </p>
* *
* @param c * @param c
@@ -863,9 +858,6 @@ public final class GameActionUtil {
public void resolve() { public void resolve() {
if (AllZoneUtil.isCardInPlay(zone)) { if (AllZoneUtil.isCardInPlay(zone)) {
zone.addController(c.getController()); zone.addController(c.getController());
// AllZone.getGameAction().changeController(new
// CardList(zone), zone.getController(),
// c.getController());
} }
} }
}; };
@@ -942,7 +934,7 @@ public final class GameActionUtil {
/** /**
* <p> * <p>
* execute_Celestial_Mantle. * executeCelestialMantle.
* </p> * </p>
* *
* @param enchanted * @param enchanted
@@ -969,7 +961,7 @@ public final class GameActionUtil {
/** /**
* <p> * <p>
* playerCombatDamage_Treva. * playerCombatDamageTreva.
* </p> * </p>
* *
* @param c * @param c
@@ -987,7 +979,7 @@ public final class GameActionUtil {
/** /**
* <p> * <p>
* playerCombatDamage_Whirling_Dervish. * playerCombatDamageWhirlingDervish.
* </p> * </p>
* *
* @param c * @param c
@@ -1024,7 +1016,7 @@ public final class GameActionUtil {
/** /**
* <p> * <p>
* playerCombatDamage_lose_halflife_up. * playerCombatDamageLoseHalfLifeUp.
* </p> * </p>
* *
* @param c * @param c
@@ -1076,7 +1068,7 @@ public final class GameActionUtil {
/** /**
* <p> * <p>
* playerCombatDamage_Scalpelexis. * playerCombatDamageScalpelexis.
* </p> * </p>
* *
* @param c * @param c
@@ -1412,8 +1404,7 @@ public final class GameActionUtil {
return false; return false;
} }
} }
if (specialConditions.contains("isValid")) { // does this card meet the if (specialConditions.contains("isValid")) {
// valid description?
String requirements = specialConditions.replaceAll("isValid ", ""); String requirements = specialConditions.replaceAll("isValid ", "");
if (!sourceCard.isValid(requirements, sourceCard.getController(), sourceCard)) { if (!sourceCard.isValid(requirements, sourceCard.getController(), sourceCard)) {
return false; return false;
@@ -1892,12 +1883,11 @@ public final class GameActionUtil {
} // execute() } // execute()
}; // Muraganda_Petroglyphs }; // Muraganda_Petroglyphs
// returns all PlayerZones that has at least 1 Glorious Anthem
// if Computer has 2 Glorious Anthems, AllZone.getComputerPlay() will be
// returned twice
/** /**
* <p> * <p>
* getZone. * getZone. Returns all PlayerZones that has at least 1 Glorious Anthem
* if Computer has 2 Glorious Anthems, AllZone.getComputerPlay() will be
* returned twice.
* </p> * </p>
* *
* @param cardName * @param cardName
@@ -1933,17 +1923,14 @@ public final class GameActionUtil {
getCommands().put("Homarid", homarid); getCommands().put("Homarid", homarid);
getCommands().put("Liu_Bei", liuBei); getCommands().put("Liu_Bei", liuBei);
getCommands().put("Muraganda_Petroglyphs", muragandaPetroglyphs); getCommands().put("Muraganda_Petroglyphs", muragandaPetroglyphs);
getCommands().put("Old_Man_of_the_Sea", oldManOfTheSea); getCommands().put("Old_Man_of_the_Sea", oldManOfTheSea);
getCommands().put("Sound_the_Call_Wolf", soundTheCallWolf); getCommands().put("Sound_the_Call_Wolf", soundTheCallWolf);
getCommands().put("Tarmogoyf", tarmogoyf); getCommands().put("Tarmogoyf", tarmogoyf);
getCommands().put("Umbra_Stalker", umbraStalker); getCommands().put("Umbra_Stalker", umbraStalker);
// /The commands above are in alphabetical order by cardname. // The commands above are in alphabetical order by cardname.
} }
/** /**
@@ -1995,8 +1982,8 @@ public final class GameActionUtil {
/** /**
* @param stLandManaAbilities the stLandManaAbilities to set * @param stLandManaAbilities the stLandManaAbilities to set
*/ */
public static void setStLandManaAbilities(Command stLandManaAbilities) { public static void setStLandManaAbilities(Command stLandManaAbilitiesIn) {
GameActionUtil.stLandManaAbilities = stLandManaAbilities; // TODO: Add 0 to parameter's name. GameActionUtil.stLandManaAbilities = stLandManaAbilitiesIn;
} }
} // end class GameActionUtil } // end class GameActionUtil