checkstyle

This commit is contained in:
jendave
2011-10-26 17:58:11 +00:00
parent ad3d7d6c86
commit 6d2615eff6
10 changed files with 321 additions and 274 deletions

View File

@@ -8,7 +8,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
// TODO: Auto-generated Javadoc
/**
* <p>
* ForgePreferences class.

View File

@@ -1,6 +1,5 @@
package forge.properties;
// TODO: Auto-generated Javadoc
/**
* NewConstants.java
*

View File

@@ -6,202 +6,247 @@ import forge.quest.data.bazaar.QuestStallManager;
import forge.quest.data.bazaar.QuestStallPurchasable;
/**
* <p>Abstract QuestPetAbstract class.</p>
*
* <p>
* Abstract QuestPetAbstract class.
* </p>
*
* @author Forge
* @version $Id$
*/
public abstract class QuestPetAbstract implements QuestStallPurchasable {
/** The level. */
int level;
private int maxLevel;
// transient here ?
private String name;
private String name;
private String description;
/**
* <p>getPetCard.</p>
*
* <p>
* getPetCard.
* </p>
*
* @return a {@link forge.Card} object.
*/
public abstract Card getPetCard();
/**
* <p>getAllUpgradePrices.</p>
*
* <p>
* getAllUpgradePrices.
* </p>
*
* @return an array of int.
*/
public abstract int[] getAllUpgradePrices();
/**
* <p>getPrice.</p>
*
* <p>
* getPrice.
* </p>
*
* @return a int.
*/
public int getPrice() {
public final int getPrice() {
return getAllUpgradePrices()[level];
}
/**
* <p>getAllUpgradeDescriptions.</p>
*
* <p>
* getAllUpgradeDescriptions.
* </p>
*
* @return an array of {@link java.lang.String} objects.
*/
public abstract String[] getAllUpgradeDescriptions();
/**
* <p>getUpgradeDescription.</p>
*
* <p>
* getUpgradeDescription.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getUpgradeDescription() {
public final String getUpgradeDescription() {
return getAllUpgradeDescriptions()[level];
}
/**
* <p>getAllImageNames.</p>
*
* <p>
* getAllImageNames.
* </p>
*
* @return an array of {@link java.lang.String} objects.
*/
public abstract String[] getAllImageNames();
/**
* <p>getImageName.</p>
*
* <p>
* getImageName.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getImageName() {
public final String getImageName() {
return getAllImageNames()[level];
}
/**
* <p>getAllStats.</p>
*
* <p>
* getAllStats.
* </p>
*
* @return an array of {@link java.lang.String} objects.
*/
public abstract String[] getAllStats();
/**
* <p>getStats.</p>
*
* <p>
* getStats.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getStats() {
public final String getStats() {
return getAllStats()[level];
}
/**
* <p>getUpgradedStats.</p>
*
* <p>
* getUpgradedStats.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getUpgradedStats() {
public final String getUpgradedStats() {
return getAllStats()[level + 1];
}
/**
* <p>Getter for the field <code>level</code>.</p>
*
* <p>
* Getter for the field <code>level</code>.
* </p>
*
* @return a int.
*/
public int getLevel() {
public final int getLevel() {
return level;
}
/**
* <p>incrementLevel.</p>
* <p>
* incrementLevel.
* </p>
*/
public void incrementLevel() {
public final void incrementLevel() {
if (level < maxLevel) {
level++;
}
}
/**
* <p>Getter for the field <code>maxLevel</code>.</p>
*
* <p>
* Getter for the field <code>maxLevel</code>.
* </p>
*
* @return a int.
*/
public int getMaxLevel() {
public final int getMaxLevel() {
return maxLevel;
}
/**
* <p>Constructor for QuestPetAbstract.</p>
*
* @param name a {@link java.lang.String} object.
* @param description a {@link java.lang.String} object.
* @param maxLevel a int.
* <p>
* Constructor for QuestPetAbstract.
* </p>
*
* @param name
* a {@link java.lang.String} object.
* @param description
* a {@link java.lang.String} object.
* @param maxLevel
* a int.
*/
protected QuestPetAbstract(String name, String description, int maxLevel) {
protected QuestPetAbstract(final String name, final String description, final int maxLevel) {
this.description = description;
this.name = name;
this.maxLevel = maxLevel;
}
/**
* <p>Setter for the field <code>level</code>.</p>
*
* @param level a int.
* <p>
* Setter for the field <code>level</code>.
* </p>
*
* @param level
* a int.
*/
public void setLevel(int level) {
public final void setLevel(final int level) {
this.level = level;
}
/**
* <p>getPurchaseDescription.</p>
*
* <p>
* getPurchaseDescription.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getPurchaseDescription() {
return "<em>" + getDescription() + "</em><br>" + getUpgradeDescription() +
"<br><br><u>Current stats:</u> " + getStats() +
"<br><u>Upgraded stats:</u> " + getUpgradedStats();
public final String getPurchaseDescription() {
return "<em>" + getDescription() + "</em><br>" + getUpgradeDescription() + "<br><br><u>Current stats:</u> "
+ getStats() + "<br><u>Upgraded stats:</u> " + getUpgradedStats();
}
/**
* <p>Getter for the field <code>description</code>.</p>
*
* <p>
* Getter for the field <code>description</code>.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getDescription() {
public final String getDescription() {
return description;
}
/**
* <p>Getter for the field <code>name</code>.</p>
*
* <p>
* Getter for the field <code>name</code>.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getName() {
public final String getName() {
return name;
}
/** {@inheritDoc} */
@Override
public String toString() {
public final String toString() {
return name;
}
/** {@inheritDoc} */
public int compareTo(Object o) {
public final int compareTo(final Object o) {
return name.compareTo(o.toString());
}
/**
* <p>getPurchaseName.</p>
*
* <p>
* getPurchaseName.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getPurchaseName() {
public final String getPurchaseName() {
return name;
}
/**
* <p>getStallName.</p>
*
* <p>
* getStallName.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getStallName() {
@@ -209,8 +254,10 @@ public abstract class QuestPetAbstract implements QuestStallPurchasable {
}
/**
* <p>isAvailableForPurchase.</p>
*
* <p>
* isAvailableForPurchase.
* </p>
*
* @return a boolean.
*/
public boolean isAvailableForPurchase() {
@@ -222,7 +269,9 @@ public abstract class QuestPetAbstract implements QuestStallPurchasable {
}
/**
* <p>onPurchase.</p>
* <p>
* onPurchase.
* </p>
*/
public void onPurchase() {
AllZone.getQuestData().getPetManager().addPetLevel(name);

View File

@@ -4,15 +4,17 @@ import forge.AllZone;
import forge.Card;
/**
* <p>QuestPetBird class.</p>
*
* <p>
* QuestPetBird class.
* </p>
*
* @author Forge
* @version $Id$
*/
public class QuestPetBird extends QuestPetAbstract {
/** {@inheritDoc} */
@Override
public Card getPetCard() {
public final Card getPetCard() {
Card petCard = new Card();
petCard.setName("Bird Pet");
@@ -28,7 +30,6 @@ public class QuestPetBird extends QuestPetAbstract {
petCard.addIntrinsicKeyword("Flying");
if (level == 1) {
petCard.setImageName("W 0 1 Bird Pet");
petCard.setBaseAttack(0);
@@ -52,50 +53,39 @@ public class QuestPetBird extends QuestPetAbstract {
}
/**
* <p>Constructor for QuestPetBird.</p>
* <p>
* Constructor for QuestPetBird.
* </p>
*/
public QuestPetBird() {
super("Bird",
"Unmatched in speed, agility and awareness, this trained hawk makes a fantastic hunter.",
4);
super("Bird", "Unmatched in speed, agility and awareness, this trained hawk makes a fantastic hunter.", 4);
}
/** {@inheritDoc} */
@Override
public int[] getAllUpgradePrices() {
return new int[]{200, 300, 450, 400};
public final int[] getAllUpgradePrices() {
return new int[] { 200, 300, 450, 400 };
}
/** {@inheritDoc} */
@Override
public String[] getAllUpgradeDescriptions() {
return new String[]{
"Purchase Bird",
"Improve the attack power of your bird.",
"Improve the attack power of your bird.",
"Give First Strike to your bird.",
public final String[] getAllUpgradeDescriptions() {
return new String[] {"Purchase Bird", "Improve the attack power of your bird.",
"Improve the attack power of your bird.", "Give First Strike to your bird.",
"You cannot train your bird any further"};
}
/** {@inheritDoc} */
@Override
public String[] getAllStats() {
return new String[]{"You do not own a bird",
"0/1, W, Flying",
"1/1, W, Flying",
"2/1, W, Flying",
public final String[] getAllStats() {
return new String[] {"You do not own a bird", "0/1, W, Flying", "1/1, W, Flying", "2/1, W, Flying",
"2/1, W, Flying, First Strike"};
}
/** {@inheritDoc} */
@Override
public String[] getAllImageNames() {
return new String[]{
"",
"w_0_1_bird_pet_small.jpg",
"w_1_1_bird_pet_small.jpg",
"w_2_1_bird_pet_small.jpg",
"w_2_1_bird_pet_first_strike_small.jpg"
};
public final String[] getAllImageNames() {
return new String[] {"", "w_0_1_bird_pet_small.jpg", "w_1_1_bird_pet_small.jpg", "w_2_1_bird_pet_small.jpg",
"w_2_1_bird_pet_first_strike_small.jpg"};
}
}

View File

@@ -4,15 +4,17 @@ import forge.AllZone;
import forge.Card;
/**
* <p>QuestPetCrocodile class.</p>
*
* <p>
* QuestPetCrocodile class.
* </p>
*
* @author Forge
* @version $Id$
*/
public class QuestPetCrocodile extends QuestPetAbstract {
/** {@inheritDoc} */
@Override
public Card getPetCard() {
public final Card getPetCard() {
Card petCard = new Card();
petCard.setName("Crocodile Pet");
petCard.addController(AllZone.getHumanPlayer());
@@ -44,55 +46,42 @@ public class QuestPetCrocodile extends QuestPetAbstract {
petCard.addIntrinsicKeyword("Swampwalk");
}
return petCard;
}
/**
* <p>Constructor for QuestPetCrocodile.</p>
* <p>
* Constructor for QuestPetCrocodile.
* </p>
*/
public QuestPetCrocodile() {
super("Crocodile",
"With its razor sharp teeth, this swamp-dwelling monster is extremely dangerous.",
4);
super("Crocodile", "With its razor sharp teeth, this swamp-dwelling monster is extremely dangerous.", 4);
}
/** {@inheritDoc} */
@Override
public int[] getAllUpgradePrices() {
return new int[]{250, 300, 450, 600};
public final int[] getAllUpgradePrices() {
return new int[] { 250, 300, 450, 600 };
}
/** {@inheritDoc} */
@Override
public String[] getAllUpgradeDescriptions() {
return new String[]{
"Purchase Crocodile",
"Improve the attack power of your crocodile.",
"Improve the attack power of your crocodile.",
"Give Swampwalking to your crocodile.",
public final String[] getAllUpgradeDescriptions() {
return new String[] {"Purchase Crocodile", "Improve the attack power of your crocodile.",
"Improve the attack power of your crocodile.", "Give Swampwalking to your crocodile.",
"You cannot train your crocodile any further"};
}
/** {@inheritDoc} */
@Override
public String[] getAllStats() {
return new String[]{"You do not own a crocodile",
"1/1, B",
"2/1, B",
"3/1, B",
"3/1, B, Swampwalking"};
public final String[] getAllStats() {
return new String[] {"You do not own a crocodile", "1/1, B", "2/1, B", "3/1, B", "3/1, B, Swampwalking"};
}
/** {@inheritDoc} */
@Override
public String[] getAllImageNames() {
return new String[]{
"",
"b_1_1_crocodile_pet_small.jpg",
"b_2_1_crocodile_pet_small.jpg",
"b_3_1_crocodile_pet_small.jpg",
"b_3_1_crocodile_pet_swampwalk_small.jpg"
};
public final String[] getAllImageNames() {
return new String[] {"", "b_1_1_crocodile_pet_small.jpg", "b_2_1_crocodile_pet_small.jpg",
"b_3_1_crocodile_pet_small.jpg", "b_3_1_crocodile_pet_swampwalk_small.jpg"};
}
}

View File

@@ -7,14 +7,18 @@ import forge.card.trigger.Trigger;
import forge.card.trigger.TriggerHandler;
/**
* <p>QuestPetHound class.</p>
*
* <p>
* QuestPetHound class.
* </p>
*
* @author Forge
* @version $Id$
*/
public class QuestPetHound extends QuestPetAbstract {
/**
* <p>Constructor for QuestPetHound.</p>
* <p>
* Constructor for QuestPetHound.
* </p>
*/
public QuestPetHound() {
super("Hound", "Dogs are said to be man's best friend. Definitely not this one.", 4);
@@ -22,7 +26,7 @@ public class QuestPetHound extends QuestPetAbstract {
/** {@inheritDoc} */
@Override
public Card getPetCard() {
public final Card getPetCard() {
Card petCard = new Card();
petCard.setName("Hound Pet");
@@ -57,52 +61,43 @@ public class QuestPetHound extends QuestPetAbstract {
petCard.setBaseDefense(1);
petCard.addIntrinsicKeyword("Haste");
final Trigger myTrigger = TriggerHandler.parseTrigger("Mode$ Attacks | ValidCard$ Card.Self | Alone$ True | TriggerDescription$ Whenever CARDNAME attacks alone, it gets +2/+0 until end of turn.", petCard,true);
final Trigger myTrigger = TriggerHandler
.parseTrigger(
"Mode$ Attacks | ValidCard$ Card.Self | Alone$ True | TriggerDescription$ Whenever CARDNAME attacks alone, it gets +2/+0 until end of turn.",
petCard, true);
AbilityFactory af = new AbilityFactory();
myTrigger.setOverridingAbility(af.getAbility("AB$Pump | Cost$ 0 | Defined$ Self | NumAtt$ 2", petCard));
petCard.addTrigger(myTrigger);
}
return petCard;
}
/** {@inheritDoc} */
@Override
public int[] getAllUpgradePrices() {
return new int[]{200, 350, 450, 750};
public final int[] getAllUpgradePrices() {
return new int[] { 200, 350, 450, 750 };
}
/** {@inheritDoc} */
@Override
public String[] getAllUpgradeDescriptions() {
return new String[]{
"Purchase hound",
"Give Haste to your hound.",
"Improve the attack power of your hound.",
public final String[] getAllUpgradeDescriptions() {
return new String[] {"Purchase hound", "Give Haste to your hound.", "Improve the attack power of your hound.",
"Greatly improves your hound's attack power if it attacks alone.",
"You cannot train your hound any further"};
}
/** {@inheritDoc} */
@Override
public String[] getAllStats() {
return new String[]{"You do not own a hound",
"1/1, R",
"1/1, R, Haste",
"2/1, R, Haste",
public final String[] getAllStats() {
return new String[] {"You do not own a hound", "1/1, R", "1/1, R, Haste", "2/1, R, Haste",
"2/1, R, Haste, Whenever this creature attacks alone, it gets +2/+0 until end of turn."};
}
/** {@inheritDoc} */
@Override
public String[] getAllImageNames() {
return new String[]{
"",
"r_1_1_hound_pet_small.jpg",
"r_1_1_hound_pet_haste_small.jpg",
"r_2_1_hound_pet_small.jpg",
"r_2_1_hound_pet_alone_small.jpg"
};
public final String[] getAllImageNames() {
return new String[] {"", "r_1_1_hound_pet_small.jpg", "r_1_1_hound_pet_haste_small.jpg",
"r_2_1_hound_pet_small.jpg", "r_2_1_hound_pet_alone_small.jpg"};
}
}

View File

@@ -1,22 +1,39 @@
package forge.quest.data.pet;
import java.util.*;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
/**
* <p>QuestPetManager class.</p>
*
* <p>
* QuestPetManager class.
* </p>
*
* @author Forge
* @version $Id$
*/
public class QuestPetManager {
/** The pets. */
public Map<String, QuestPetAbstract> pets = new HashMap<String, QuestPetAbstract>();
/** The selected pet. */
public QuestPetAbstract selectedPet;
/** The plant. */
public QuestPetAbstract plant;
/** The use plant. */
public boolean usePlant;
/**
* <p>Constructor for QuestPetManager.</p>
* <p>
* Constructor for QuestPetManager.
* </p>
*/
public QuestPetManager() {
plant = new QuestPetPlant();
@@ -26,36 +43,45 @@ public class QuestPetManager {
}
/**
* <p>Setter for the field <code>selectedPet</code>.</p>
*
* @param pet a {@link java.lang.String} object.
* <p>
* Setter for the field <code>selectedPet</code>.
* </p>
*
* @param pet
* a {@link java.lang.String} object.
*/
public void setSelectedPet(String pet) {
public final void setSelectedPet(final String pet) {
selectedPet = (pet == null) ? null : getPet(pet);
}
/**
* <p>Getter for the field <code>selectedPet</code>.</p>
*
* <p>
* Getter for the field <code>selectedPet</code>.
* </p>
*
* @return a {@link forge.quest.data.pet.QuestPetAbstract} object.
*/
public QuestPetAbstract getSelectedPet() {
public final QuestPetAbstract getSelectedPet() {
return selectedPet;
}
/**
* <p>Getter for the field <code>plant</code>.</p>
*
* <p>
* Getter for the field <code>plant</code>.
* </p>
*
* @return a {@link forge.quest.data.pet.QuestPetAbstract} object.
*/
public QuestPetAbstract getPlant() {
public final QuestPetAbstract getPlant() {
return plant;
}
/**
* <p>addPlantLevel.</p>
* <p>
* addPlantLevel.
* </p>
*/
public void addPlantLevel() {
public final void addPlantLevel() {
if (plant == null) {
plant = new QuestPetPlant();
} else {
@@ -64,64 +90,81 @@ public class QuestPetManager {
}
/**
* <p>getPet.</p>
*
* @param petName a {@link java.lang.String} object.
* <p>
* getPet.
* </p>
*
* @param petName
* a {@link java.lang.String} object.
* @return a {@link forge.quest.data.pet.QuestPetAbstract} object.
*/
public QuestPetAbstract getPet(String petName) {
public final QuestPetAbstract getPet(final String petName) {
return pets.get(petName);
}
/**
* <p>addPet.</p>
*
* @param newPet a {@link forge.quest.data.pet.QuestPetAbstract} object.
* <p>
* addPet.
* </p>
*
* @param newPet
* a {@link forge.quest.data.pet.QuestPetAbstract} object.
*/
public void addPet(QuestPetAbstract newPet) {
public final void addPet(final QuestPetAbstract newPet) {
pets.put(newPet.getName(), newPet);
}
/**
* <p>getPetNames.</p>
*
* <p>
* getPetNames.
* </p>
*
* @return a {@link java.util.Set} object.
*/
public Set<String> getPetNames() {
public final Set<String> getPetNames() {
return pets.keySet();
}
/**
* <p>addPetLevel.</p>
*
* @param s a {@link java.lang.String} object.
* <p>
* addPetLevel.
* </p>
*
* @param s
* a {@link java.lang.String} object.
*/
public void addPetLevel(String s) {
public final void addPetLevel(final String s) {
pets.get(s).incrementLevel();
}
/**
* <p>shouldPlantBeUsed.</p>
*
* <p>
* shouldPlantBeUsed.
* </p>
*
* @return a boolean.
*/
public boolean shouldPlantBeUsed() {
public final boolean shouldPlantBeUsed() {
return usePlant;
}
/**
* <p>shouldPetBeUsed.</p>
*
* <p>
* shouldPetBeUsed.
* </p>
*
* @return a boolean.
*/
public boolean shouldPetBeUsed() {
public final boolean shouldPetBeUsed() {
return selectedPet != null;
}
/**
* <p>getAllPets.</p>
*
* <p>
* getAllPets.
* </p>
*
* @return a {@link java.util.Set} object.
*/
private static Set<QuestPetAbstract> getAllPets() {
@@ -135,13 +178,14 @@ public class QuestPetManager {
return set;
}
/**
* <p>getAvailablePetNames.</p>
*
* <p>
* getAvailablePetNames.
* </p>
*
* @return a {@link java.util.Set} object.
*/
public Set<String> getAvailablePetNames() {
public final Set<String> getAvailablePetNames() {
SortedSet<String> set = new TreeSet<String>();
for (Map.Entry<String, QuestPetAbstract> pet : pets.entrySet()) {
if (pet.getValue().getLevel() > 0) {
@@ -151,23 +195,26 @@ public class QuestPetManager {
return set;
}
/**
* <p>getPetsAndPlants.</p>
*
* <p>
* getPetsAndPlants.
* </p>
*
* @return a {@link java.util.Collection} object.
*/
public Collection<QuestPetAbstract> getPetsAndPlants() {
public final Collection<QuestPetAbstract> getPetsAndPlants() {
Set<QuestPetAbstract> petsAndPlants = new HashSet<QuestPetAbstract>(pets.values());
petsAndPlants.add(plant);
return petsAndPlants;
}
//Magic to support added pet types when reading saves.
// Magic to support added pet types when reading saves.
/**
* <p>readResolve.</p>
*
* <p>
* readResolve.
* </p>
*
* @return a {@link java.lang.Object} object.
*/
private Object readResolve() {

View File

@@ -9,15 +9,17 @@ import forge.card.spellability.SpellAbility;
import forge.quest.data.bazaar.QuestStallManager;
/**
* <p>QuestPetPlant class.</p>
*
* <p>
* QuestPetPlant class.
* </p>
*
* @author Forge
* @version $Id$
*/
public class QuestPetPlant extends QuestPetAbstract {
/** {@inheritDoc} */
@Override
public Card getPetCard() {
public final Card getPetCard() {
final Card petCard = new Card();
petCard.setName("Plant Wall");
@@ -62,7 +64,6 @@ public class QuestPetPlant extends QuestPetAbstract {
petCard.setBaseDefense(4);
petCard.addIntrinsicKeyword("Deathtouch");
Cost abCost = new Cost("T", petCard.getName(), true);
final SpellAbility ability = new Ability_Activated(petCard, abCost, null) {
private static final long serialVersionUID = 7546242087593613719L;
@@ -87,79 +88,67 @@ public class QuestPetPlant extends QuestPetAbstract {
petCard.setText("tap: You gain 1 life.");
}
return petCard;
}
/**
* <p>Constructor for QuestPetPlant.</p>
* <p>
* Constructor for QuestPetPlant.
* </p>
*/
public QuestPetPlant() {
super("Plant",
super(
"Plant",
"Start each of your battles with this lush, verdant plant on your side. Excellent at blocking the nastiest of critters!",
6);
}
/** {@inheritDoc} */
@Override
public int[] getAllUpgradePrices() {
return new int[]{100, 150, 200, 300, 750, 1000};
public final int[] getAllUpgradePrices() {
return new int[] { 100, 150, 200, 300, 750, 1000 };
}
/** {@inheritDoc} */
@Override
public String[] getAllUpgradeDescriptions() {
return new String[]{
"Purchase Plant",
"Improve the defense power of your plant.",
"Improve the defense power of your plant.",
"Improve the defense power of your plant.",
public final String[] getAllUpgradeDescriptions() {
return new String[] { "Purchase Plant", "Improve the defense power of your plant.",
"Improve the defense power of your plant.", "Improve the defense power of your plant.",
"Grow venomous thorns on your plant.",
"Improve the defense power of your plant and your plant will have healing properties",
"You cannot train your plant any further"};
"You cannot train your plant any further" };
}
/** {@inheritDoc} */
@Override
public String[] getAllStats() {
return new String[]{"You do not own a plant",
"0/1, G, Defender",
"0/2, G, Defender",
"0/3, G, Defender",
"1/3, G, Defender",
"1/3, G, Defender, Deathtouch",
"1/4, G, Defender, Deathtouch, T: Gain 1 life"};
public final String[] getAllStats() {
return new String[] { "You do not own a plant", "0/1, G, Defender", "0/2, G, Defender", "0/3, G, Defender",
"1/3, G, Defender", "1/3, G, Defender, Deathtouch", "1/4, G, Defender, Deathtouch, T: Gain 1 life" };
}
/** {@inheritDoc} */
@Override
public String[] getAllImageNames() {
return new String[]{
"",
"g_0_1_plant_wall_small.jpg",
"g_0_2_plant_wall_small.jpg",
"g_0_3_plant_wall_small.jpg",
"g_1_3_plant_wall_small.jpg",
"g_1_3_plant_wall_deathtouch_small",
"g_1_4_plant_wall_small.jpg"
};
public final String[] getAllImageNames() {
return new String[] { "", "g_0_1_plant_wall_small.jpg", "g_0_2_plant_wall_small.jpg",
"g_0_3_plant_wall_small.jpg", "g_1_3_plant_wall_small.jpg", "g_1_3_plant_wall_deathtouch_small",
"g_1_4_plant_wall_small.jpg" };
}
/** {@inheritDoc} */
@Override
public String getStallName() {
public final String getStallName() {
return QuestStallManager.NURSERY;
}
/** {@inheritDoc} */
@Override
public void onPurchase() {
public final void onPurchase() {
AllZone.getQuestData().getPetManager().addPlantLevel();
}
/** {@inheritDoc} */
@Override
public boolean isAvailableForPurchase() {
public final boolean isAvailableForPurchase() {
QuestPetPlant plant = (QuestPetPlant) AllZone.getQuestData().getPetManager().getPlant();
return plant == null || plant.getLevel() < plant.getMaxLevel();

View File

@@ -4,15 +4,17 @@ import forge.AllZone;
import forge.Card;
/**
* <p>QuestPetWolf class.</p>
*
* <p>
* QuestPetWolf class.
* </p>
*
* @author Forge
* @version $Id$
*/
public class QuestPetWolf extends QuestPetAbstract {
/** {@inheritDoc} */
@Override
public Card getPetCard() {
public final Card getPetCard() {
Card petCard = new Card();
petCard.setName("Wolf Pet");
@@ -49,50 +51,38 @@ public class QuestPetWolf extends QuestPetAbstract {
}
/**
* <p>Constructor for QuestPetWolf.</p>
* <p>
* Constructor for QuestPetWolf.
* </p>
*/
public QuestPetWolf() {
super("Wolf",
"This ferocious animal may have been raised in captivity, but it has been trained to kill.",
4);
super("Wolf", "This ferocious animal may have been raised in captivity, but it has been trained to kill.", 4);
}
/** {@inheritDoc} */
@Override
public int[] getAllUpgradePrices() {
return new int[]{250, 250, 500, 550};
public final int[] getAllUpgradePrices() {
return new int[] { 250, 250, 500, 550 };
}
/** {@inheritDoc} */
@Override
public String[] getAllUpgradeDescriptions() {
return new String[]{
"Purchase Wolf",
"Improve the attack power of your wolf.",
"Improve the defense power of your wolf.",
"Give Flanking to your wolf.",
public final String[] getAllUpgradeDescriptions() {
return new String[] {"Purchase Wolf", "Improve the attack power of your wolf.",
"Improve the defense power of your wolf.", "Give Flanking to your wolf.",
"You cannot train your wolf any further"};
}
/** {@inheritDoc} */
@Override
public String[] getAllStats() {
return new String[]{"You do not own a wolf",
"1/1, G",
"1/2, G",
"2/2, G",
"2/2, G, Flanking"};
public final String[] getAllStats() {
return new String[] {"You do not own a wolf", "1/1, G", "1/2, G", "2/2, G", "2/2, G, Flanking"};
}
/** {@inheritDoc} */
@Override
public String[] getAllImageNames() {
return new String[]{
"",
"g_1_1_wolf_pet_small.jpg",
"g_1_2_wolf_pet_small.jpg",
"g_2_2_wolf_pet_small.jpg",
"g_2_2_wolf_pet_flanking_small.jpg"
};
public final String[] getAllImageNames() {
return new String[] {"", "g_1_1_wolf_pet_small.jpg", "g_1_2_wolf_pet_small.jpg", "g_2_2_wolf_pet_small.jpg",
"g_2_2_wolf_pet_flanking_small.jpg"};
}
}

View File

@@ -1,2 +1,2 @@
/** Forge Card Game */
/** Forge Card Game. */
package forge.quest.data.pet;