mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
remove old code and add javadoc for new functions.
This commit is contained in:
@@ -234,13 +234,24 @@ public class AllZoneUtil {
|
||||
|
||||
///get a list of certain types are in play (like Mountain, Elf, etc...)
|
||||
|
||||
|
||||
/**
|
||||
* gets a list of all cards with a certain type (Mountain, Elf, etc...) in play
|
||||
*
|
||||
* @param the type to find in play
|
||||
* @return a CardList with all cards of the given type in play
|
||||
*/
|
||||
public static CardList getTypeInPlay(final String cardType) {
|
||||
CardList cards = getCardsInPlay();
|
||||
cards = cards.getType(cardType);
|
||||
return cards;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets a list of all cards of a certain type that a given player has in play
|
||||
* @param player the player to check for cards in play
|
||||
* @param cardType the card type to check for
|
||||
* @return a CardList with all cards of a certain type the player has in play
|
||||
*/
|
||||
public static CardList getPlayerTypeInPlay(final String player, final String cardType) {
|
||||
CardList cards = getPlayerCardsInPlay(player);
|
||||
cards = cards.getType(cardType);
|
||||
|
||||
@@ -10850,11 +10850,6 @@ public class GameActionUtil {
|
||||
private static final long serialVersionUID = -220650457326100804L;
|
||||
|
||||
public void execute() {
|
||||
// get all creatures
|
||||
/*CardList list = new CardList();
|
||||
list.addAll(AllZone.Human_Play.getCards());
|
||||
list.addAll(AllZone.Computer_Play.getCards());
|
||||
list = list.getName("Heedless One"); */
|
||||
CardList list = AllZoneUtil.getCardsInPlay("Heedless One");
|
||||
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
@@ -10862,14 +10857,9 @@ public class GameActionUtil {
|
||||
c.setBaseAttack(countElves(c));
|
||||
c.setBaseDefense(countElves(c));
|
||||
}
|
||||
|
||||
}// execute()
|
||||
|
||||
private int countElves(Card c) {
|
||||
/*PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController());
|
||||
CardList elves = new CardList(play.getCards());
|
||||
elves = elves.getType("Elf");
|
||||
return elves.size();*/
|
||||
return AllZoneUtil.getTypeInPlay("Elf").size();
|
||||
}
|
||||
};
|
||||
@@ -11074,7 +11064,6 @@ public class GameActionUtil {
|
||||
c.setBaseDefense(1);
|
||||
}
|
||||
}
|
||||
|
||||
}// execute()
|
||||
|
||||
private boolean hasThreeLevels(Card c) {
|
||||
|
||||
Reference in New Issue
Block a user