mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
*Added Quest Item - Charm of Vigor: Let's you play best of 5 games rather than 3.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -15580,6 +15580,7 @@ forge-gui/src/main/java/forge/quest/StartingPoolType.java -text
|
||||
forge-gui/src/main/java/forge/quest/bazaar/IQuestBazaarItem.java svneol=native#text/plain
|
||||
forge-gui/src/main/java/forge/quest/bazaar/QuestBazaarManager.java svneol=native#text/plain
|
||||
forge-gui/src/main/java/forge/quest/bazaar/QuestItemBasic.java svneol=native#text/plain
|
||||
forge-gui/src/main/java/forge/quest/bazaar/QuestItemCharmOfVigor.java -text
|
||||
forge-gui/src/main/java/forge/quest/bazaar/QuestItemElixir.java -text
|
||||
forge-gui/src/main/java/forge/quest/bazaar/QuestItemEstates.java svneol=native#text/plain
|
||||
forge-gui/src/main/java/forge/quest/bazaar/QuestItemPoundFlesh.java -text
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<items>
|
||||
<string>Map</string>
|
||||
<string>Zeppelin</string>
|
||||
<string>Charm of Vigor</string>
|
||||
</items>
|
||||
</stall>
|
||||
<stall name="Nursery" displayName="Force of Nature Nursery" icon="ICO_LEAF">
|
||||
@@ -91,69 +92,75 @@ Effect: Reduces maximum life by 1."</description>
|
||||
Effect: Gives +1 to maximum life.
|
||||
Fine Print: Loses effectiveness after 15 uses.</description>
|
||||
</item>
|
||||
<item name="Charm of Vigor" maxLevel="1" basePrice="1000"
|
||||
itemType="CHARM" icon="ICO_CHARM">
|
||||
<description>A charm to ward off the fatigue of battle.
|
||||
|
||||
Effect: You may have each match be best of 5 instead of 3.</description>
|
||||
</item>
|
||||
</questItems>
|
||||
<pets>
|
||||
<pet name="Plant" slot="0" saveFileKey="Plant" maxLevel="6">
|
||||
<desc>Start each of your battles with this lush, verdant plant on your side.
|
||||
Excellent at blocking the nastiest of critters!</desc>
|
||||
<levels>
|
||||
<level value="0" stats="You do not own a plant" nextLevel="Purchase Plant"/>
|
||||
<level value="0" stats="You do not own a plant" nextLevel="Purchase Plant" />
|
||||
<level value="1" pic="plantwall_lvl1" stats="0/1, G, Defender" cost="100" cardFile="plant_wall_l1.txt" nextLevel="Improve the defense power of your plant." />
|
||||
<level value="2" pic="plantwall_lvl2" stats="0/2, G, Defender" cost="150" cardFile="plant_wall_l2.txt" nextLevel="Improve the defense power of your plant." />
|
||||
<level value="3" pic="plantwall_lvl3" stats="0/3, G, Defender" cost="200" cardFile="plant_wall_l3.txt" nextLevel="Improve the defense power of your plant."/>
|
||||
<level value="3" pic="plantwall_lvl3" stats="0/3, G, Defender" cost="200" cardFile="plant_wall_l3.txt" nextLevel="Improve the defense power of your plant." />
|
||||
<level value="4" pic="plantwall_lvl4" stats="1/3, G, Defender" cost="300" cardFile="plant_wall_l4.txt" nextLevel="Grow venomous thorns on your plant." />
|
||||
<level value="5" pic="plantwall_lvl5" stats="1/3, G, Defender, Wither" cost="750" cardFile="plant_wall_l5.txt" nextLevel="Improve the defense power of your plant and your plant will have healing properties" />
|
||||
<level value="6" pic="plantwall_lvl6" stats="1/4, G, Defender, Wither, T: Gain 1 life" cost="1000" cardFile="plant_wall_l6.txt" nextLevel="You cannot train your plant any further."/>
|
||||
<level value="6" pic="plantwall_lvl6" stats="1/4, G, Defender, Wither, T: Gain 1 life" cost="1000" cardFile="plant_wall_l6.txt" nextLevel="You cannot train your plant any further." />
|
||||
</levels>
|
||||
</pet>
|
||||
<pet name="Wolf" slot="1" saveFileKey="Wolf" maxLevel="4" >
|
||||
<pet name="Wolf" slot="1" saveFileKey="Wolf" maxLevel="4">
|
||||
<desc>This ferocious animal may have been raised in captivity, but it has been trained to kill.</desc>
|
||||
<levels>
|
||||
<level value="0" stats="You do not own a wolf" nextLevel="Purchase Wolf"/>
|
||||
<level value="0" stats="You do not own a wolf" nextLevel="Purchase Wolf" />
|
||||
<level value="1" pic="petwolf_lvl1" stats="1/1 W" cost="250" cardFile="wolf_pet_l1.txt" nextLevel="The wolf's speed allows it to strike first." />
|
||||
<level value="2" pic="petwolf_lvl2" stats="1/1 W First Strike" cost="350" cardFile="wolf_pet_l2.txt" nextLevel="Improve offensive prowess of your wolf." />
|
||||
<level value="3" pic="petwolf_lvl3" stats="2/1 W First Strike" cost="500" cardFile="wolf_pet_l3.txt" nextLevel="Your wolf stands ever vigilant."/>
|
||||
<level value="4" pic="petwolf_lvl4" stats="2/1 W First Strike Vigilance" cost="750" cardFile="wolf_pet_l4.txt" nextLevel="You cannot train your wolf any further"/>
|
||||
<level value="3" pic="petwolf_lvl3" stats="2/1 W First Strike" cost="500" cardFile="wolf_pet_l3.txt" nextLevel="Your wolf stands ever vigilant." />
|
||||
<level value="4" pic="petwolf_lvl4" stats="2/1 W First Strike Vigilance" cost="750" cardFile="wolf_pet_l4.txt" nextLevel="You cannot train your wolf any further" />
|
||||
</levels>
|
||||
</pet>
|
||||
<pet name="Bird" slot="1" saveFileKey="Bird" maxLevel="4">
|
||||
<desc>Unmatched in speed, agility and awareness, this trained hawk makes a fantastic hunter.</desc>
|
||||
<levels>
|
||||
<level value="0" stats="You do not own a bird" nextLevel="Purchase Bird"/>
|
||||
<level value="0" stats="You do not own a bird" nextLevel="Purchase Bird" />
|
||||
<level value="1" pic="petbird_lvl1" stats="1/1 U" cost="250" cardFile="bird_pet_l1.txt" nextLevel="Your baby bird learns how to fly." />
|
||||
<level value="2" pic="petbird_lvl2" stats="1/1 U Flying" cost="350" cardFile="bird_pet_l2.txt" nextLevel="Toughen up your bird by having it fly through storms like a crow." />
|
||||
<level value="3" pic="petbird_lvl3" stats="1/2 U Flying" cost="450" cardFile="bird_pet_l3.txt" nextLevel="Your bird learns the art of looting, picking up scraps anywhere it can."/>
|
||||
<level value="4" pic="petbird_lvl4" stats="1/3 Flying Loot" cost="750" cardFile="bird_pet_l4.txt" nextLevel="You cannot train your bird any further"/>
|
||||
<level value="3" pic="petbird_lvl3" stats="1/2 U Flying" cost="450" cardFile="bird_pet_l3.txt" nextLevel="Your bird learns the art of looting, picking up scraps anywhere it can." />
|
||||
<level value="4" pic="petbird_lvl4" stats="1/3 Flying Loot" cost="750" cardFile="bird_pet_l4.txt" nextLevel="You cannot train your bird any further" />
|
||||
</levels>
|
||||
</pet>
|
||||
<pet name="Hound" slot="1" saveFileKey="Hound" maxLevel="4">
|
||||
<desc>Dogs are said to be man's best friend. Definitely not this one.</desc>
|
||||
<levels>
|
||||
<level value="0" stats="You do not own a hound" nextLevel="Purchase Hound"/>
|
||||
<level value="0" stats="You do not own a hound" nextLevel="Purchase Hound" />
|
||||
<level value="1" pic="pethound_lvl1" stats="1/1 R" cost="250" cardFile="hound_pet_l1.txt" nextLevel="Give Haste to your hound." />
|
||||
<level value="2" pic="pethound_lvl2" stats="1/1 R Haste" cost="400" cardFile="hound_pet_l2.txt" nextLevel="Improve the attack power of your hound." />
|
||||
<level value="3" pic="pethound_lvl3" stats="2/1 R Haste" cost="500" cardFile="hound_pet_l3.txt" nextLevel="Your hound can burst into flames, dealing extra damage but perishing in the process."/>
|
||||
<level value="4" pic="pethound_lvl4" stats="2/1 R Haste Burst Into Flames" cost="700" cardFile="hound_pet_l4.txt" nextLevel="You cannot train your hound any further"/>
|
||||
<level value="3" pic="pethound_lvl3" stats="2/1 R Haste" cost="500" cardFile="hound_pet_l3.txt" nextLevel="Your hound can burst into flames, dealing extra damage but perishing in the process." />
|
||||
<level value="4" pic="pethound_lvl4" stats="2/1 R Haste Burst Into Flames" cost="700" cardFile="hound_pet_l4.txt" nextLevel="You cannot train your hound any further" />
|
||||
</levels>
|
||||
</pet>
|
||||
<pet name="Crocodile" slot="1" saveFileKey="Crocodile" maxLevel="4">
|
||||
<desc>With its razor sharp teeth, this monster is extremely dangerous and hard to track.</desc>
|
||||
<levels>
|
||||
<level value="0" stats="You do not own a crocodile" cost="0" cardfile="null" nextLevel="Purchase Crocodile"/>
|
||||
<level value="0" stats="You do not own a crocodile" cost="0" cardfile="null" nextLevel="Purchase Crocodile" />
|
||||
<level value="1" pic="petcrocodile_lvl1" stats="1/1 B" cost="250" cardFile="crocodile_pet_l1.txt" nextLevel="Crocodile hides, not able to block or be tracked when its not your turn." />
|
||||
<level value="2" pic="petcrocodile_lvl2" stats="2/1 B Hides" cost="350" cardFile="crocodile_pet_l2.txt" nextLevel="Improve the durability of your Crocodile" />
|
||||
<level value="3" pic="petcrocodile_lvl3" stats="2/2 B Hides" cost="450" cardFile="crocodile_pet_l3.txt" nextLevel="Crocodiles teeth become razor sharp, being a major danger for anything in its way"/>
|
||||
<level value="4" pic="petcrocodile_lvl4" stats="2/2 B Hides Deathtouch" cost="750" cardFile="crocodile_pet_l4.txt" nextLevel="You cannot train your crocodile any further"/>
|
||||
<level value="3" pic="petcrocodile_lvl3" stats="2/2 B Hides" cost="450" cardFile="crocodile_pet_l3.txt" nextLevel="Crocodiles teeth become razor sharp, being a major danger for anything in its way" />
|
||||
<level value="4" pic="petcrocodile_lvl4" stats="2/2 B Hides Deathtouch" cost="750" cardFile="crocodile_pet_l4.txt" nextLevel="You cannot train your crocodile any further" />
|
||||
</levels>
|
||||
</pet>
|
||||
<pet name="Ape" slot="1" saveFileKey="Ape" maxLevel="4">
|
||||
<desc>This beast swells up to deal some hearty damage.</desc>
|
||||
<levels>
|
||||
<level value="0" stats="You do not own an Ape" cost="0" cardfile="null" nextLevel="Purchase Ape"/>
|
||||
<level value="0" stats="You do not own an Ape" cost="0" cardfile="null" nextLevel="Purchase Ape" />
|
||||
<level value="1" pic="petape_lvl1" stats="1/1 G" cost="250" cardFile="ape_pet_l1.txt" nextLevel="Ape starts putting on some extra pounds." />
|
||||
<level value="2" pic="petape_lvl2" stats="2/1 G" cost="400" cardFile="ape_pet_l2.txt" nextLevel="Your Ape uses his weight advantage to stomp past smaller beasts." />
|
||||
<level value="3" pic="petape_lvl3" stats="2/1 G Trample" cost="450" cardFile="ape_pet_l3.txt" nextLevel="Your Ape intensity grows in battle able to dish out and take more damage."/>
|
||||
<level value="4" pic="petape_lvl4" stats="2/1 G Trample Pump" cost="750" cardFile="ape_pet_l4.txt" nextLevel="You cannot train your Ape any further"/>
|
||||
<level value="3" pic="petape_lvl3" stats="2/1 G Trample" cost="450" cardFile="ape_pet_l3.txt" nextLevel="Your Ape intensity grows in battle able to dish out and take more damage." />
|
||||
<level value="4" pic="petape_lvl4" stats="2/1 G Trample Pump" cost="750" cardFile="ape_pet_l4.txt" nextLevel="You cannot train your Ape any further" />
|
||||
</levels>
|
||||
</pet>
|
||||
</pets>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 627 KiB After Width: | Height: | Size: 685 KiB |
@@ -37,10 +37,17 @@ public class Match {
|
||||
/**
|
||||
* This should become constructor once.
|
||||
*/
|
||||
public Match(GameType type, List<RegisteredPlayer> players0) {
|
||||
public Match(GameType type, List<RegisteredPlayer> players0, int games) {
|
||||
gamesPlayedRo = Collections.unmodifiableList(gamesPlayed);
|
||||
players = Collections.unmodifiableList(Lists.newArrayList(players0));
|
||||
gameType = type;
|
||||
|
||||
gamesPerMatch = games;
|
||||
gamesToWinMatch = (int)Math.ceil((gamesPerMatch+1)/2);
|
||||
}
|
||||
|
||||
public Match(GameType type, List<RegisteredPlayer> players0) {
|
||||
this(type,players0,3);
|
||||
}
|
||||
|
||||
public Match(GameType type, List<RegisteredPlayer> players0, Boolean overrideAnte) {
|
||||
@@ -48,6 +55,12 @@ public class Match {
|
||||
if( overrideAnte != null )
|
||||
this.useAnte = overrideAnte.booleanValue();
|
||||
}
|
||||
|
||||
public Match(GameType type, List<RegisteredPlayer> players0, Boolean overrideAnte, int games) {
|
||||
this(type, players0, games);
|
||||
if( overrideAnte != null )
|
||||
this.useAnte = overrideAnte.booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the games played.
|
||||
@@ -67,7 +80,7 @@ public class Match {
|
||||
public int getGamesToWinMatch() {
|
||||
return gamesToWinMatch;
|
||||
}
|
||||
|
||||
|
||||
public void addGamePlayed(Game finished) {
|
||||
if (!finished.isGameOver()) {
|
||||
throw new IllegalStateException("Game is not over yet.");
|
||||
|
||||
@@ -98,6 +98,14 @@ public enum CSubmenuChallenges implements ICDoc {
|
||||
quest.save();
|
||||
}
|
||||
});
|
||||
|
||||
view.getCbCharm().addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent arg0) {
|
||||
quest.setCharmState(view.getCbCharm().isSelected());
|
||||
quest.save();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private final KeyAdapter _startOnEnter = new KeyAdapter() {
|
||||
|
||||
@@ -67,6 +67,14 @@ public enum CSubmenuDuels implements ICDoc {
|
||||
quest.save();
|
||||
}
|
||||
});
|
||||
|
||||
view.getCbCharm().addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent arg0) {
|
||||
quest.setCharmState(view.getCbCharm().isSelected());
|
||||
quest.save();
|
||||
}
|
||||
});
|
||||
|
||||
view.getCbxPet().addActionListener(new ActionListener() {
|
||||
@Override
|
||||
|
||||
@@ -51,6 +51,9 @@ public interface IVQuestStats {
|
||||
/** @return {@link javax.swing.JCheckBox} */
|
||||
JCheckBox getCbPlant();
|
||||
|
||||
/** @return {@link javax.swing.JCheckBox} */
|
||||
JCheckBox getCbCharm();
|
||||
|
||||
/** @return {@link javax.swing.JLabel} */
|
||||
JLabel getLblZep();
|
||||
}
|
||||
|
||||
@@ -122,6 +122,15 @@ public class SSubmenuQuestUtil {
|
||||
view.getCbxPet().setVisible(false);
|
||||
}
|
||||
}
|
||||
if (iSlot == 2) {
|
||||
if (petList.isEmpty()) {
|
||||
view.getCbCharm().setVisible(false);
|
||||
}
|
||||
else {
|
||||
view.getCbCharm().setVisible(true);
|
||||
view.getCbCharm().setSelected(currentPetName != null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (view.equals(VSubmenuChallenges.SINGLETON_INSTANCE)) {
|
||||
@@ -212,6 +221,7 @@ public class SSubmenuQuestUtil {
|
||||
// Classic mode display changes
|
||||
view0.getCbxPet().setVisible(false);
|
||||
view0.getCbPlant().setVisible(false);
|
||||
view0.getCbCharm().setVisible(false);
|
||||
view0.getLblZep().setVisible(false);
|
||||
view0.getLblNextChallengeInWins().setVisible(false);
|
||||
view0.getBtnBazaar().setVisible(false);
|
||||
@@ -448,7 +458,7 @@ public class SSubmenuQuestUtil {
|
||||
aiPlayer.setIconImageKey(event.getIconImageKey());
|
||||
starter.add(aiStart.setPlayer(aiPlayer));
|
||||
|
||||
final Match mc = new Match(GameType.Quest, starter, forceAnte);
|
||||
final Match mc = new Match(GameType.Quest, starter, forceAnte, qData.getCharmState() ? 5 : 3);
|
||||
FThreads.invokeInEdtLater(new Runnable(){
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -48,6 +48,7 @@ public enum VSubmenuChallenges implements IVSubmenu<CSubmenuChallenges>, IVQuest
|
||||
private final JButton btnStart = new StartButton();
|
||||
private final FComboBoxWrapper<String> cbxPet = new FComboBoxWrapper<String>();
|
||||
private final JCheckBox cbPlant = new FCheckBox("Summon Plant");
|
||||
private final JCheckBox cbCharm = new FCheckBox("Use Charm of Vigor");
|
||||
private final JLabel lblZep = new FLabel.Builder().text("<html>Launch<br>Zeppelin</html>")
|
||||
.hoverable(true).icon(FSkin.getIcon(FSkin.QuestIcons.ICO_ZEP))
|
||||
.fontSize(16).build();
|
||||
@@ -109,6 +110,7 @@ public enum VSubmenuChallenges implements IVSubmenu<CSubmenuChallenges>, IVQuest
|
||||
pnlStats.add(lblLife, constraints);
|
||||
pnlStats.add(lblWorld, constraints);
|
||||
pnlStats.add(cbPlant, constraints);
|
||||
pnlStats.add(cbCharm, constraints);
|
||||
cbxPet.addTo(pnlStats, constraints);
|
||||
pnlStats.add(lblZep, "w 130px!, h 60px!, gap 0 0 0 5px");
|
||||
pnlStats.setOpaque(false);
|
||||
@@ -298,4 +300,11 @@ public enum VSubmenuChallenges implements IVSubmenu<CSubmenuChallenges>, IVQuest
|
||||
public DragCell getParentCell() {
|
||||
return parentCell;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cbCharm
|
||||
*/
|
||||
public JCheckBox getCbCharm() {
|
||||
return cbCharm;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ public enum VSubmenuDuels implements IVSubmenu<CSubmenuDuels>, IVQuestStats {
|
||||
|
||||
private final JButton btnStart = new StartButton();
|
||||
private final FComboBoxWrapper<String> cbxPet = new FComboBoxWrapper<String>();
|
||||
private final JCheckBox cbCharm = new FCheckBox("Use Charm of Vigor");
|
||||
private final JCheckBox cbPlant = new FCheckBox("Summon Plant");
|
||||
private final JLabel lblZep = new FLabel.Builder().text("Launch Zeppelin").fontSize(14).build();
|
||||
|
||||
@@ -107,6 +108,7 @@ public enum VSubmenuDuels implements IVSubmenu<CSubmenuDuels>, IVQuestStats {
|
||||
pnlStats.add(lblLife, constraints);
|
||||
pnlStats.add(lblWorld, constraints);
|
||||
pnlStats.add(cbPlant, constraints);
|
||||
pnlStats.add(cbCharm, constraints);
|
||||
cbxPet.addTo(pnlStats, constraints);
|
||||
pnlStats.setOpaque(false);
|
||||
}
|
||||
@@ -291,4 +293,11 @@ public enum VSubmenuDuels implements IVSubmenu<CSubmenuDuels>, IVQuestStats {
|
||||
public DragCell getParentCell() {
|
||||
return parentCell;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cbCharm
|
||||
*/
|
||||
public JCheckBox getCbCharm() {
|
||||
return cbCharm;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1417,6 +1417,7 @@ public enum FSkin {
|
||||
ICO_BOTTLES (new int[] {400, 480, 80, 80}), /** */
|
||||
ICO_BOX (new int[] {480, 480, 80, 80}), /** */
|
||||
ICO_COIN (new int[] {560, 480, 80, 80}), /** */
|
||||
ICO_CHARM (new int[] {480, 800, 80, 80}), /** */
|
||||
|
||||
ICO_FOX (new int[] {0, 560, 80, 80}), /** */
|
||||
ICO_LEAF (new int[] {80, 560, 80, 80}), /** */
|
||||
|
||||
@@ -107,6 +107,17 @@ public class QuestController {
|
||||
this.model.getPetSlots().put(slot, name);
|
||||
}
|
||||
}
|
||||
|
||||
public void setCharmState(boolean active) {
|
||||
if (this.model != null) {
|
||||
this.model.setCharmActive(active);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getCharmState() {
|
||||
return this.model == null ? false : this.model.isCharmActive();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slot   int
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Forge: Play Magic: the Gathering.
|
||||
* Copyright (C) 2011 Forge Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package forge.quest.bazaar;
|
||||
|
||||
import forge.quest.data.QuestAssets;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* QuestItemAmuletOfEndurance class.
|
||||
* </p>
|
||||
*
|
||||
* @author Forge
|
||||
* @version $Id: QuestItemZeppelin.java 14797 2012-03-18 18:09:02Z Max mtg $
|
||||
*/
|
||||
public class QuestItemCharmOfVigor extends QuestItemBasic {
|
||||
/**
|
||||
* <p>
|
||||
* Constructor for QuestItemAmuletOfEndurance.
|
||||
* </p>
|
||||
*/
|
||||
QuestItemCharmOfVigor() {
|
||||
super(QuestItemType.CHARM); // , QuestStallManager.GEAR
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final boolean isAvailableForPurchase(QuestAssets qA) {
|
||||
return super.isAvailableForPurchase(qA);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -41,7 +41,9 @@ public enum QuestItemType {
|
||||
/** The ELIXIR_OF_LIFE. */
|
||||
ELIXIR_OF_LIFE("Elixir of Life", QuestItemElixir.class, QuestItemCondition.class),
|
||||
/** The POUND_FLESH. */
|
||||
POUND_FLESH("Pound of Flesh", QuestItemPoundFlesh.class, QuestItemCondition.class);
|
||||
POUND_FLESH("Pound of Flesh", QuestItemPoundFlesh.class, QuestItemCondition.class),
|
||||
/** The AMULET. */
|
||||
CHARM("Charm of Vigor", QuestItemCharmOfVigor.class, QuestItemCondition.class);
|
||||
|
||||
private final String saveFileKey;
|
||||
private final Class<? extends QuestItemBasic> bazaarControllerClass;
|
||||
|
||||
@@ -40,7 +40,7 @@ import forge.quest.io.QuestDataIO;
|
||||
public final class QuestData {
|
||||
|
||||
/** Holds the latest version of the Quest Data. */
|
||||
public static final int CURRENT_VERSION_NUMBER = 7;
|
||||
public static final int CURRENT_VERSION_NUMBER = 8;
|
||||
|
||||
// This field places the version number into QD instance,
|
||||
// but only when the object is created through the constructor
|
||||
@@ -62,6 +62,7 @@ public final class QuestData {
|
||||
private final QuestAssets assets;
|
||||
private final QuestAchievements achievements;
|
||||
private final Map<Integer, String> petSlots = new HashMap<Integer, String>();
|
||||
private boolean isCharmActive = false;
|
||||
|
||||
|
||||
/**
|
||||
@@ -186,4 +187,18 @@ public final class QuestData {
|
||||
worldId = newId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isCharmActive
|
||||
*/
|
||||
public boolean isCharmActive() {
|
||||
return isCharmActive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isCharmActive the isCharmActive to set
|
||||
*/
|
||||
public void setCharmActive(boolean isCharmActive) {
|
||||
this.isCharmActive = isCharmActive;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -202,6 +202,11 @@ public class QuestDataIO {
|
||||
QuestDataIO.setFinalField(QuestData.class, "petSlots", newData, new HashMap<Integer, String>());
|
||||
}
|
||||
|
||||
if(saveVersion < 8) {
|
||||
QuestDataIO.setFinalField(QuestData.class, "isCharmActive", newData, false);
|
||||
}
|
||||
|
||||
|
||||
final QuestAssets qS = newData.getAssets();
|
||||
final QuestAchievements qA = newData.getAchievements();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user