Jeck - Added custom booster packs (see miki), numerous small fixes. Once we hit feature-freeze I'll be reviewing this stuff in depth, as again there's likely a lot of room for cleaning... just wanted to get it in first :).
I cut some bits out that weren't ready for SVN, hopefully I've committed everything correctly.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
OBJS = objs/ActionElement.o objs/ActionLayer.o objs/ActionStack.o objs/AIMomirPlayer.o objs/AIPlayer.o objs/AIStats.o objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o objs/CardEffect.o objs/CardPrimitive.o objs/CardSelector.o objs/Counters.o objs/Credits.o objs/Damage.o objs/DamagerDamaged.o objs/DeckDataWrapper.o objs/DeckMetaData.o objs/DeckStats.o objs/DuelLayers.o objs/Effects.o objs/ExtraCost.o objs/GameApp.o objs/GameLauncher.o objs/GameObserver.o objs/GameOptions.o objs/GameState.o objs/GameStateAwards.o objs/GameStateDeckViewer.o objs/GameStateDuel.o objs/GameStateMenu.o objs/GameStateOptions.o objs/GameStateShop.o objs/GameStateTransitions.o objs/GuiAvatars.o objs/GuiBackground.o objs/GuiCardsController.o objs/GuiCombat.o objs/GuiFrame.o objs/GuiHand.o objs/GuiLayers.o objs/GuiMana.o objs/GuiPhaseBar.o objs/GuiPlay.o objs/GuiStatic.o objs/Logger.o objs/ManaCost.o objs/ManaCostHybrid.o objs/MenuItem.o objs/MTGAbility.o objs/MTGCardInstance.o objs/MTGCard.o objs/MTGDeck.o objs/MTGDefinitions.o objs/MTGGamePhase.o objs/MTGGameZones.o objs/MTGRules.o objs/OptionItem.o objs/PhaseRing.o objs/Player.o objs/PlayerData.o objs/PlayGuiObjectController.o objs/PlayGuiObject.o objs/Pos.o objs/PriceList.o objs/ReplacementEffects.o objs/Rules.o objs/SimpleMenu.o objs/SimpleMenuItem.o objs/SimplePad.o objs/Subtypes.o objs/TargetChooser.o objs/TargetsList.o objs/TextScroller.o objs/Token.o objs/Translate.o objs/Trash.o objs/utils.o objs/WEvent.o objs/WResourceManager.o objs/WCachedResource.o objs/WDataSrc.o objs/WGui.o objs/WFilter.o objs/Tasks.o
|
||||
OBJS = objs/ActionElement.o objs/ActionLayer.o objs/ActionStack.o objs/AIMomirPlayer.o objs/AIPlayer.o objs/AIStats.o objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o objs/CardEffect.o objs/CardPrimitive.o objs/CardSelector.o objs/Counters.o objs/Credits.o objs/Damage.o objs/DamagerDamaged.o objs/DeckDataWrapper.o objs/DeckMetaData.o objs/DeckStats.o objs/DuelLayers.o objs/Effects.o objs/ExtraCost.o objs/GameApp.o objs/GameLauncher.o objs/GameObserver.o objs/GameOptions.o objs/GameState.o objs/GameStateAwards.o objs/GameStateDeckViewer.o objs/GameStateDuel.o objs/GameStateMenu.o objs/GameStateOptions.o objs/GameStateShop.o objs/GameStateTransitions.o objs/GuiAvatars.o objs/GuiBackground.o objs/GuiCardsController.o objs/GuiCombat.o objs/GuiFrame.o objs/GuiHand.o objs/GuiLayers.o objs/GuiMana.o objs/GuiPhaseBar.o objs/GuiPlay.o objs/GuiStatic.o objs/Logger.o objs/ManaCost.o objs/ManaCostHybrid.o objs/MenuItem.o objs/MTGAbility.o objs/MTGCardInstance.o objs/MTGCard.o objs/MTGDeck.o objs/MTGDefinitions.o objs/MTGGamePhase.o objs/MTGGameZones.o objs/MTGPack.o objs/MTGRules.o objs/OptionItem.o objs/PhaseRing.o objs/Player.o objs/PlayerData.o objs/PlayGuiObjectController.o objs/PlayGuiObject.o objs/Pos.o objs/PriceList.o objs/ReplacementEffects.o objs/Rules.o objs/SimpleMenu.o objs/SimpleMenuItem.o objs/SimplePad.o objs/Subtypes.o objs/TargetChooser.o objs/TargetsList.o objs/TextScroller.o objs/Token.o objs/Translate.o objs/Trash.o objs/utils.o objs/WEvent.o objs/WResourceManager.o objs/WCachedResource.o objs/WDataSrc.o objs/WGui.o objs/WFilter.o objs/Tasks.o
|
||||
DEPS = $(patsubst objs/%.o, deps/%.d, $(OBJS))
|
||||
|
||||
RESULT = $(shell psp-config --psp-prefix 2> Makefile.cache)
|
||||
|
||||
21
projects/mtg/bin/Res/packs/artifact_booster.txt
Normal file
21
projects/mtg/bin/Res/packs/artifact_booster.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Artifact" type="Booster" pool="unlocked color:x;" price="900">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/black_booster.txt
Normal file
21
projects/mtg/bin/Res/packs/black_booster.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Black" type="Booster" pool="unlocked color:b;" price="900">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/blue_booster.txt
Normal file
21
projects/mtg/bin/Res/packs/blue_booster.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Blue" type="Booster" pool="unlocked color:u;" price="900">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/elf_pack.txt
Normal file
21
projects/mtg/bin/Res/packs/elf_pack.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Elf Tribe" type="Booster" pool="unlocked type:elf;" price="750" requires="set:LRW;">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/goblin_pack.txt
Normal file
21
projects/mtg/bin/Res/packs/goblin_pack.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Goblin Tribe" type="Booster" pool="unlocked type:goblin;" price="750" requires="set:LRW;">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/green_booster.txt
Normal file
21
projects/mtg/bin/Res/packs/green_booster.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Green" type="Booster" pool="unlocked color:g;" price="900">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
18
projects/mtg/bin/Res/packs/lotto_pack.txt
Normal file
18
projects/mtg/bin/Res/packs/lotto_pack.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
<PACK name="???" type="Pack" pool="unlocked" price="1500" requires="set:PLC;|set:TSP;|set:FUT;">
|
||||
<slot copies="15">
|
||||
<random_card copies="2">rarity:rare;|rarity:mythic</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
<random_card copies="2">rarity:uncommon;</random_card>
|
||||
<random_card>rarity:common;</random_card>
|
||||
<random_card>rarity:common;</random_card>
|
||||
<random_card>rarity:common;</random_card>
|
||||
<random_card>rarity:common;</random_card>
|
||||
<random_card>rarity:common;</random_card>
|
||||
<random_card copies="2">rarity:common;|rarity:land;</random_card>
|
||||
<random_card copies="2">rarity:common;|rarity:land;</random_card>
|
||||
<random_card copies="2">rarity:common;|rarity:land;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/mage_pack.txt
Normal file
21
projects/mtg/bin/Res/packs/mage_pack.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Mage Class" type="Booster" pool="unlocked type:cleric;|type:druid;|type:shaman;|type:wizard;|type:mystic;" requires="set:MOR;" price="750">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/red_booster.txt
Normal file
21
projects/mtg/bin/Res/packs/red_booster.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Red" type="Booster" pool="unlocked color:r;" price="900">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/soldier_pack.txt
Normal file
21
projects/mtg/bin/Res/packs/soldier_pack.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="Fighter Class" type="Booster" pool="unlocked type:warrior;|type:knight;|type:barbarian;|type:soldier;" requires="set:MOR;" price="750">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
21
projects/mtg/bin/Res/packs/white_booster.txt
Normal file
21
projects/mtg/bin/Res/packs/white_booster.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
<PACK name="White" type="Booster" pool="unlocked color:w;" price="900">
|
||||
<slot copies="1">
|
||||
<random_card>rarity:mythic;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
<random_card>rarity:rare;</random_card>
|
||||
</slot>
|
||||
<slot copies="3">
|
||||
<random_card>rarity:uncommon;</random_card>
|
||||
</slot>
|
||||
<slot copies="10">
|
||||
<random_card>rarity:common;</random_card>
|
||||
</slot>
|
||||
<slot copies="1" pool="unlocked">
|
||||
<random_card>rarity:land;type:basic;</random_card>
|
||||
</slot>
|
||||
</PACK>
|
||||
@@ -27,7 +27,22 @@
|
||||
#define SHOP_ITEMS SHOP_SLOTS+1
|
||||
#define LIST_FADEIN 15
|
||||
|
||||
struct ShopBooster{
|
||||
class MTGPack;
|
||||
class MTGPacks;
|
||||
|
||||
class ShopBooster{
|
||||
public:
|
||||
ShopBooster();
|
||||
string getName();
|
||||
void randomize(MTGPacks * packlist);
|
||||
int basePrice();
|
||||
int maxInventory();
|
||||
void addToDeck(MTGDeck * d, WSrcCards * srcCards);
|
||||
string getSort();
|
||||
private:
|
||||
void randomCustom(MTGPacks * packlist);
|
||||
void randomStandard();
|
||||
MTGPack * pack;
|
||||
MTGSetInfo * mainSet;
|
||||
MTGSetInfo * altSet;
|
||||
};
|
||||
@@ -58,6 +73,7 @@ class GameStateShop: public GameState, public JGuiListener
|
||||
SimpleMenu * menu;
|
||||
PriceList * pricelist;
|
||||
PlayerData * playerdata;
|
||||
MTGPacks * packlist;
|
||||
bool mTouched;
|
||||
bool needLoad;
|
||||
int mPrices[SHOP_ITEMS];
|
||||
@@ -75,7 +91,6 @@ class GameStateShop: public GameState, public JGuiListener
|
||||
void load();
|
||||
void save(bool force=false);
|
||||
void updateCounts();
|
||||
void assembleBooster(int controlId);
|
||||
void beginPurchase(int controlId);
|
||||
void purchaseCard(int controlId);
|
||||
void purchaseBooster(int controlId);
|
||||
|
||||
@@ -35,18 +35,14 @@ class MTGCard {
|
||||
MTGCard(MTGCard * source);
|
||||
|
||||
void setMTGId(int id);
|
||||
int getMTGId();
|
||||
int getId();
|
||||
|
||||
|
||||
char getRarity();
|
||||
void setRarity(char _rarity);
|
||||
|
||||
//void setImageName( char * value);
|
||||
char * getImageName ();
|
||||
|
||||
void setPrimitive(CardPrimitive * cp);
|
||||
|
||||
int getMTGId() const;
|
||||
int getId() const;
|
||||
char getRarity() const;
|
||||
char * getImageName();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -127,7 +127,11 @@ class Constants
|
||||
PRICE_1L = 5,
|
||||
|
||||
//Price in booster
|
||||
PRICE_XM = 2500,
|
||||
PRICE_BOOSTER = 700,
|
||||
PRICE_MIXED_BOOSTER = 800,
|
||||
CHANCE_CUSTOM_PACK = 15,
|
||||
CHANCE_PURE_OVERRIDE = 50,
|
||||
CHANCE_MIXED_OVERRIDE = 25,
|
||||
PRICE_XR = 355,
|
||||
PRICE_XU = 88,
|
||||
PRICE_XC = 8,
|
||||
|
||||
79
projects/mtg/include/MTGPack.h
Normal file
79
projects/mtg/include/MTGPack.h
Normal file
@@ -0,0 +1,79 @@
|
||||
#ifndef _MTGPACCK_H_
|
||||
#define _MTGPACK_H_
|
||||
|
||||
class MTGPackEntry{
|
||||
public:
|
||||
virtual int addCard(WSrcCards * pool,MTGDeck * to) = 0;
|
||||
int copies;
|
||||
};
|
||||
|
||||
class MTGPackEntryRandom: public MTGPackEntry{
|
||||
public:
|
||||
int addCard(WSrcCards * pool,MTGDeck * to);
|
||||
string filter;
|
||||
};
|
||||
class MTGPackEntrySpecific: public MTGPackEntry{
|
||||
public:
|
||||
int addCard(WSrcCards * pool,MTGDeck * to);
|
||||
MTGCard * card;
|
||||
};
|
||||
|
||||
class MTGPackEntryNothing: public MTGPackEntry{
|
||||
public:
|
||||
int addCard(WSrcCards * pool,MTGDeck * to) {return 0;};
|
||||
};
|
||||
|
||||
class MTGPackSlot{
|
||||
public:
|
||||
~MTGPackSlot();
|
||||
int add(WSrcCards * ocean, MTGDeck * to, int carryover);
|
||||
void addEntry(MTGPackEntry*item);
|
||||
int copies;
|
||||
string pool;
|
||||
vector<MTGPackEntry*> entries;
|
||||
};
|
||||
|
||||
class MTGPack{
|
||||
public:
|
||||
friend class MTGPacks;
|
||||
bool meetsRequirements(); //Check if pool contains locked cards.
|
||||
bool isUnlocked();
|
||||
bool isValid() {return bValid;};
|
||||
void load(string filename);
|
||||
int assemblePack(MTGDeck * to);
|
||||
|
||||
MTGPack(string s) {bValid = false; load(s); unlockStatus=0;};
|
||||
~MTGPack();
|
||||
string getName();
|
||||
string getSort() {return sort;};
|
||||
int getPrice() {return price;};
|
||||
static WSrcCards * getPool(string poolstr);
|
||||
protected:
|
||||
void countCards();
|
||||
string name; //Name of the pack.
|
||||
string type; //"Booster", "Deck", "Whatever"
|
||||
string pool; //The starting pool.
|
||||
string sort; //The sorting method.
|
||||
string check; //Unlock requirements.
|
||||
string desc; //Big card description.
|
||||
bool bValid;
|
||||
int unlockStatus;
|
||||
|
||||
int price; //Base price.
|
||||
int minCards, maxCards;
|
||||
vector<MTGPackSlot*> slots;
|
||||
};
|
||||
|
||||
class MTGPacks{
|
||||
public:
|
||||
~MTGPacks();
|
||||
MTGPack * randomPack(int key=0);
|
||||
void loadAll();
|
||||
int size() {return (int)packs.size();};
|
||||
void refreshUnlocked();
|
||||
|
||||
|
||||
private:
|
||||
vector<MTGPack*> packs;
|
||||
};
|
||||
#endif
|
||||
@@ -21,7 +21,8 @@ class PriceList{
|
||||
int getSellPrice(int cardid);
|
||||
int getPurchasePrice(int cardid);
|
||||
int getPrice(int cardId);
|
||||
int setPrice(int cardId, int price);
|
||||
int setPrice(int cardId,int price);
|
||||
int getOtherPrice(int amt);
|
||||
static float difficultyScalar(float price, int cardid=0);
|
||||
static void updateKey() {randomKey = rand();};
|
||||
};
|
||||
|
||||
@@ -5,8 +5,10 @@ class WCardFilter;
|
||||
struct WCardSort;
|
||||
struct WDistort;
|
||||
class PriceList;
|
||||
class MTGCard;
|
||||
class MTGDeck;
|
||||
class MTGAllCards;
|
||||
class JQuad;
|
||||
|
||||
class WSyncable{
|
||||
public:
|
||||
@@ -69,22 +71,29 @@ public:
|
||||
|
||||
virtual void Sort(int method);
|
||||
virtual bool setOffset(int pos);
|
||||
virtual bool isEmptySet(WCardFilter * f);
|
||||
virtual void addFilter(WCardFilter * f);
|
||||
virtual void clearFilters();
|
||||
virtual WCardFilter* unhookFilters();
|
||||
virtual bool matchesFilters(MTGCard * c);
|
||||
virtual void validateFilters();
|
||||
virtual void bakeFilters(); //Discards all invalidated cards.
|
||||
virtual float filterFee();
|
||||
|
||||
virtual int addToDeck(MTGDeck * i, int num=-1); //Returns num that didn't add
|
||||
//Loads into us.
|
||||
virtual int loadMatches(MTGAllCards* ac); //loadMatches adds the cards from something
|
||||
virtual int loadMatches(MTGDeck * deck); //into this, if it matches our filter
|
||||
virtual int loadMatches(WSrcCards* src, bool all=false); //If all==true, ignore filters on src.
|
||||
|
||||
//We load it
|
||||
virtual int addRandomCards(MTGDeck * i, int howmany=1);
|
||||
virtual int addToDeck(MTGDeck * i, int num=-1); //Returns num that didn't add
|
||||
|
||||
enum {
|
||||
MAX_CYCLES = 4, //How many cycles to search, for addToDeck
|
||||
SORT_COLLECTOR,
|
||||
SORT_ALPHA
|
||||
SORT_ALPHA,
|
||||
SORT_RARITY
|
||||
};
|
||||
protected:
|
||||
vector<MTGCard*> cards;
|
||||
@@ -122,5 +131,10 @@ struct WCSortAlpha{
|
||||
bool operator()(const MTGCard*l, const MTGCard*r);
|
||||
};
|
||||
|
||||
struct WCSortRarity{
|
||||
int rareToInt(char r);
|
||||
bool operator()(const MTGCard*l, const MTGCard*r);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -8,11 +8,11 @@ public:
|
||||
WCFilterFactory() {};
|
||||
static WCFilterFactory * GetInstance();
|
||||
static void Destroy();
|
||||
WCardFilter * Construct(string x);
|
||||
WCardFilter * Construct(string src);
|
||||
private:
|
||||
size_t findNext(string src, size_t start, char open='(', char close=')');
|
||||
WCardFilter * Leaf(string src);
|
||||
WCardFilter * Terminal(string type, string arg);
|
||||
WCardFilter * Terminal(string src, string arg);
|
||||
static WCFilterFactory * me;
|
||||
};
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ void GameStateAwards::Start()
|
||||
detailview = NULL;
|
||||
setSrc = NULL;
|
||||
showMenu = false;
|
||||
resources.Unmiss("awardback.jpg"); //Last resort, same as shop.
|
||||
mBgTex = resources.RetrieveTexture("awardback.jpg",TEXTURE_SUB_5551);
|
||||
mBg = resources.RetrieveQuad("awardback.jpg");
|
||||
}
|
||||
|
||||
@@ -149,10 +149,10 @@ void GameStateDeckViewer::Start()
|
||||
menu->Add(22,"Filter by...");
|
||||
menu->Add(2,"Switch decks without saving");
|
||||
if(options[Options::CHEATMODE].number)
|
||||
menu->Add(-1,"*Complete collection & reset*");
|
||||
menu->Add(-1,"Complete Collection");
|
||||
menu->Add(1,"Save & Rename");
|
||||
menu->Add(3,"Back to Main Menu");
|
||||
menu->Add(0,"Save & Back to Main Menu");
|
||||
menu->Add(3,"Back to main menu");
|
||||
menu->Add(4,"Cancel");
|
||||
|
||||
|
||||
@@ -646,7 +646,7 @@ void GameStateDeckViewer::renderOnScreenMenu(){
|
||||
if (value > 9){nb_letters += 3;}else{nb_letters+=2;}
|
||||
}
|
||||
}
|
||||
int value = myDeck->getCount();
|
||||
int value = myDeck->totalCopies();
|
||||
sprintf(buffer, _("Your Deck: %i cards").c_str(), value);
|
||||
font->DrawString(buffer, SCREEN_WIDTH-200+rightTransition, SCREEN_HEIGHT/2 + 25);
|
||||
|
||||
@@ -1090,7 +1090,7 @@ void GameStateDeckViewer::updateStats() {
|
||||
|
||||
stw.needUpdate = false;
|
||||
|
||||
stw.cardCount = myDeck->getCount();
|
||||
stw.cardCount = myDeck->totalCopies();
|
||||
stw.countLands = myDeck->getCount(Constants::MTG_COLOR_LAND);
|
||||
stw.totalPrice = myDeck->totalPrice();
|
||||
|
||||
@@ -1518,7 +1518,9 @@ void GameStateDeckViewer::ButtonPressed(int controllerId, int controlId)
|
||||
goa->giveAward();
|
||||
}
|
||||
options.save();
|
||||
mStage = STAGE_WELCOME; // Reset the deck viewer, so that the new collection gets loaded
|
||||
SAFE_DELETE(myCollection);
|
||||
myCollection = NEW DeckDataWrapper(playerdata->collection);
|
||||
myCollection->Sort(WSrcCards::SORT_ALPHA);
|
||||
break;
|
||||
case 0:
|
||||
myDeck->save();
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "../include/PlayerData.h"
|
||||
#include "../include/utils.h"
|
||||
#include "../include/DeckDataWrapper.h"
|
||||
#include "../include/MTGPack.h"
|
||||
|
||||
static const char* GAME_VERSION = "WTH?! 0.11.0 - by wololo";
|
||||
|
||||
@@ -404,9 +405,7 @@ void GameStateMenu::Update(float dt)
|
||||
|
||||
//Reload list of unlocked sets, now that we know about the sets.
|
||||
options.reloadProfile(false);
|
||||
|
||||
genNbCardsStr();
|
||||
|
||||
resetDirectory();
|
||||
//All major things have been loaded, resize the cache to use it as efficiently as possible
|
||||
resources.autoResize();
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "../include/GameStateShop.h"
|
||||
#include "../include/GameApp.h"
|
||||
#include "../include/MTGDeck.h"
|
||||
#include "../include/MTGPack.h"
|
||||
#include "../include/Translate.h"
|
||||
#include "../include/GameOptions.h"
|
||||
#include <hge/hgedistort.h>
|
||||
@@ -35,6 +36,7 @@ GameStateShop::GameStateShop(GameApp* parent): GameState(parent) {
|
||||
shopMenu = NULL;
|
||||
bigDisplay = NULL;
|
||||
myCollection = NULL;
|
||||
packlist = NULL;
|
||||
pricelist = NULL;
|
||||
playerdata = NULL;
|
||||
booster = NULL;
|
||||
@@ -117,6 +119,8 @@ void GameStateShop::Start(){
|
||||
JRenderer::GetInstance()->EnableVSync(true);
|
||||
|
||||
taskList = NULL;
|
||||
packlist = NEW MTGPacks();
|
||||
packlist->loadAll();
|
||||
load();
|
||||
}
|
||||
|
||||
@@ -124,13 +128,7 @@ string GameStateShop::descPurchase(int controlId, bool tiny){
|
||||
char buffer[4096];
|
||||
string name;
|
||||
if(controlId < BOOSTER_SLOTS){
|
||||
if(mBooster[controlId].altSet == mBooster[controlId].mainSet)
|
||||
mBooster[controlId].altSet = NULL;
|
||||
if(mBooster[controlId].altSet)
|
||||
sprintf(buffer,_("%s & %s (15 Cards)").c_str(),mBooster[controlId].mainSet->id.c_str(),mBooster[controlId].altSet->id.c_str());
|
||||
else
|
||||
sprintf(buffer,_("%s Booster (15 Cards)").c_str(),mBooster[controlId].mainSet->id.c_str());
|
||||
name = buffer;
|
||||
name = mBooster[controlId].getName();
|
||||
}
|
||||
else{
|
||||
MTGCard * c = srcCards->getCard(controlId-BOOSTER_SLOTS);
|
||||
@@ -159,43 +157,6 @@ string GameStateShop::descPurchase(int controlId, bool tiny){
|
||||
sprintf(buffer,_("%s (%i) : %i credits").c_str(),name.c_str(),mCounts[controlId],mPrices[controlId]);
|
||||
return buffer;
|
||||
}
|
||||
void GameStateShop::assembleBooster(int controlId){
|
||||
int mSet = -1;
|
||||
MTGSetInfo * si = setlist.randomSet(-1);
|
||||
mBooster[controlId].mainSet = si;
|
||||
mBooster[controlId].altSet = NULL;
|
||||
|
||||
int mSetCount = si->counts[MTGSetInfo::TOTAL_CARDS];
|
||||
if(mSetCount < 80){
|
||||
if(rand() % 100 < 50){ //50% Chance of picking a pure pack instead. Combo packs are more rare :)
|
||||
si = setlist.randomSet(-1,80);
|
||||
mSetCount = si->counts[MTGSetInfo::TOTAL_CARDS];
|
||||
mBooster[controlId].mainSet = si;
|
||||
}else
|
||||
mBooster[controlId].altSet = setlist.randomSet(si->block,mSetCount);
|
||||
}
|
||||
else {
|
||||
mBooster[controlId].altSet = NULL;
|
||||
if(rand() % 100 < 10) //10% chance of having a mixed booster anyways.
|
||||
mBooster[controlId].altSet = setlist.randomSet(si->block);
|
||||
}
|
||||
|
||||
for(int attempts=0;attempts<10;attempts++){
|
||||
if(mBooster[controlId].altSet != mBooster[controlId].mainSet)
|
||||
break;
|
||||
mBooster[controlId].altSet = setlist.randomSet(-1,mSetCount);
|
||||
}
|
||||
|
||||
int price = mBooster[controlId].mainSet->boosterCost();
|
||||
mInventory[controlId] = 2+rand()%4;
|
||||
if(mBooster[controlId].altSet != NULL){
|
||||
price += mBooster[controlId].altSet->boosterCost();
|
||||
price /= 2;
|
||||
price = price + .05 * price; //Mixed sets add a 5% premium.
|
||||
mInventory[controlId] = 1+rand()%2;
|
||||
}
|
||||
mPrices[controlId] = price;
|
||||
}
|
||||
void GameStateShop::beginPurchase(int controlId){
|
||||
JLBFont * mFont = resources.GetJLBFont(Constants::MENU_FONT);
|
||||
mFont->SetScale(DEFAULT_MENU_FONT_SCALE);
|
||||
@@ -239,45 +200,31 @@ void GameStateShop::purchaseBooster(int controlId){
|
||||
return;
|
||||
playerdata->credits -= mPrices[controlId];
|
||||
mInventory[controlId]--;
|
||||
WSrcCards * pool = NEW WSrcCards(0);
|
||||
WCFilterSet *main, *alt;
|
||||
|
||||
int num = setlist.getSetNum(mBooster[controlId].mainSet);
|
||||
main = NEW WCFilterSet(num);
|
||||
if(mBooster[controlId].altSet){
|
||||
num = setlist.getSetNum(mBooster[controlId].altSet);
|
||||
alt = NEW WCFilterSet(num);
|
||||
pool->addFilter(NEW WCFilterOR(main,alt));
|
||||
}else
|
||||
pool->addFilter(main);
|
||||
pool->loadMatches(srcCards,true);
|
||||
pool->Shuffle();
|
||||
|
||||
SAFE_DELETE(booster);
|
||||
deleteDisplay();
|
||||
booster = NEW MTGDeck(mParent->collection);
|
||||
|
||||
//Add cards to booster. Pool is shuffled, so just step through.
|
||||
int carryover = 1;
|
||||
if(!(rand() % 8)){
|
||||
pool->addFilter(NEW WCFilterRarity(Constants::RARITY_M));
|
||||
carryover = pool->addToDeck(booster,carryover);
|
||||
}
|
||||
pool->clearFilters();
|
||||
pool->addFilter(NEW WCFilterRarity(Constants::RARITY_R));
|
||||
carryover = pool->addToDeck(booster,carryover);
|
||||
pool->clearFilters();
|
||||
pool->addFilter(NEW WCFilterRarity(Constants::RARITY_U));
|
||||
carryover = pool->addToDeck(booster,carryover+3);
|
||||
pool->clearFilters();
|
||||
pool->addFilter(NEW WCFilterRarity(Constants::RARITY_C));
|
||||
carryover = pool->addToDeck(booster,carryover+11);
|
||||
boosterDisplay = NEW CardDisplay(12,NULL, SCREEN_WIDTH - 200, SCREEN_HEIGHT/2,this,NULL,5);
|
||||
mBooster[controlId].addToDeck(booster,srcCards);
|
||||
|
||||
myCollection->Add(booster);
|
||||
makeDisplay(booster);
|
||||
string sort = mBooster[controlId].getSort();
|
||||
DeckDataWrapper * ddw = NEW DeckDataWrapper(booster);
|
||||
if(sort == "alpha")
|
||||
ddw->Sort(WSrcCards::SORT_ALPHA);
|
||||
else if(sort == "collector")
|
||||
ddw->Sort(WSrcCards::SORT_COLLECTOR);
|
||||
else
|
||||
ddw->Sort(WSrcCards::SORT_RARITY);
|
||||
for (int x=0;x<ddw->Size();x++){
|
||||
MTGCard * c = ddw->getCard(x);
|
||||
MTGCardInstance * ci = NEW MTGCardInstance(c, NULL);
|
||||
boosterDisplay->AddCard(ci);
|
||||
subBooster.push_back(ci);
|
||||
}
|
||||
SAFE_DELETE(ddw);
|
||||
|
||||
myCollection->Add(booster);
|
||||
mTouched = true;
|
||||
save(true);
|
||||
SAFE_DELETE(pool);
|
||||
menu->Close();
|
||||
}
|
||||
|
||||
@@ -308,8 +255,11 @@ void GameStateShop::load(){
|
||||
int nbboostersets = 0;
|
||||
|
||||
JQuad * mBackThumb = resources.GetQuad("back_thumb");
|
||||
for(int i=0;i<BOOSTER_SLOTS;i++)
|
||||
assembleBooster(i);
|
||||
for(int i=0;i<BOOSTER_SLOTS;i++){
|
||||
mBooster[i].randomize(packlist);
|
||||
mInventory[i] = 1+rand()%mBooster[i].maxInventory();
|
||||
mPrices[i] = pricelist->getOtherPrice(mBooster[i].basePrice());
|
||||
}
|
||||
for(int i=BOOSTER_SLOTS;i<SHOP_ITEMS;i++){
|
||||
MTGCard * c = NULL;
|
||||
if((c = srcCards->getCard(i-BOOSTER_SLOTS)) == NULL){
|
||||
@@ -365,6 +315,7 @@ void GameStateShop::End()
|
||||
SAFE_DELETE(myCollection);
|
||||
SAFE_DELETE(booster);
|
||||
SAFE_DELETE(filterMenu);
|
||||
SAFE_DELETE(packlist);
|
||||
deleteDisplay();
|
||||
|
||||
//Release alternate thumbnails.
|
||||
@@ -530,17 +481,7 @@ void GameStateShop::Update(float dt)
|
||||
}
|
||||
|
||||
void GameStateShop::makeDisplay(MTGDeck * d){
|
||||
deleteDisplay();
|
||||
boosterDisplay = NEW CardDisplay(12,NULL, SCREEN_WIDTH - 200, SCREEN_HEIGHT/2,this,NULL,5);
|
||||
|
||||
map<int,int>::iterator it;
|
||||
|
||||
for (it = d->cards.begin(); it!=d->cards.end(); it++){
|
||||
MTGCard * c = d->getCardById(it->first);
|
||||
MTGCardInstance * ci = NEW MTGCardInstance(c, NULL);
|
||||
boosterDisplay->AddCard(ci);
|
||||
subBooster.push_back(ci);
|
||||
}
|
||||
}
|
||||
void GameStateShop::deleteDisplay(){
|
||||
vector<MTGCardInstance*>::iterator i;
|
||||
@@ -688,3 +629,124 @@ void GameStateShop::ButtonPressed(int controllerId, int controlId)
|
||||
}
|
||||
menu->Close();
|
||||
}
|
||||
|
||||
//ShopBooster
|
||||
ShopBooster::ShopBooster(){
|
||||
pack = NULL;
|
||||
mainSet = NULL;
|
||||
altSet = NULL;
|
||||
}
|
||||
string ShopBooster::getSort() {
|
||||
if(pack)
|
||||
return pack->getSort();
|
||||
return "";
|
||||
};
|
||||
string ShopBooster::getName(){
|
||||
char buffer[512];
|
||||
if(!pack){
|
||||
if(altSet == mainSet)
|
||||
altSet = NULL;
|
||||
if(altSet)
|
||||
sprintf(buffer,_("%s & %s (15 Cards)").c_str(),mainSet->id.c_str(),altSet->id.c_str());
|
||||
else if(mainSet)
|
||||
sprintf(buffer,_("%s Booster (15 Cards)").c_str(),mainSet->id.c_str());
|
||||
}else{
|
||||
return pack->getName();
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void ShopBooster::randomize(MTGPacks * packlist){
|
||||
mainSet = NULL; altSet = NULL; pack = NULL;
|
||||
if(!setlist.size()) return;
|
||||
if(packlist && setlist.size() > 10){ //FIXME make these an unlockable item.
|
||||
int rnd = rand() % 100;
|
||||
if(rnd <= Constants::CHANCE_CUSTOM_PACK){
|
||||
randomCustom(packlist);
|
||||
return;
|
||||
}
|
||||
}
|
||||
randomStandard();
|
||||
}
|
||||
int ShopBooster::basePrice(){
|
||||
if(pack)
|
||||
return pack->getPrice();
|
||||
else if(altSet)
|
||||
return Constants::PRICE_MIXED_BOOSTER;
|
||||
return Constants::PRICE_BOOSTER;
|
||||
}
|
||||
void ShopBooster::randomCustom(MTGPacks * packlist){
|
||||
pack = packlist->randomPack();
|
||||
if(pack && !pack->isUnlocked())
|
||||
pack = NULL;
|
||||
if(!pack){
|
||||
randomStandard();
|
||||
}
|
||||
}
|
||||
void ShopBooster::randomStandard(){
|
||||
int mSet = -1;
|
||||
MTGSetInfo * si = setlist.randomSet(-1);
|
||||
mainSet = si;
|
||||
altSet = NULL;
|
||||
|
||||
int mSetCount = si->counts[MTGSetInfo::TOTAL_CARDS];
|
||||
if(mSetCount < 80){
|
||||
if(rand() % 100 < Constants::CHANCE_PURE_OVERRIDE){ //Chance of picking a pure pack instead.
|
||||
si = setlist.randomSet(-1,80);
|
||||
mSetCount = si->counts[MTGSetInfo::TOTAL_CARDS];
|
||||
mainSet = si;
|
||||
}else
|
||||
altSet = setlist.randomSet(si->block,80-mSetCount);
|
||||
}
|
||||
else if(rand() % 100 < Constants::CHANCE_MIXED_OVERRIDE) //Chance of having a mixed booster anyways.
|
||||
altSet = setlist.randomSet(si->block);
|
||||
|
||||
for(int attempts=0;attempts<10;attempts++){ //Try to prevent altSet == mainSet.
|
||||
if(altSet != mainSet) break;
|
||||
altSet = setlist.randomSet(-1,80-mSetCount);
|
||||
}
|
||||
if(altSet == mainSet) altSet = NULL; //Prevent "10E & 10E Booster"
|
||||
|
||||
}
|
||||
int ShopBooster::maxInventory(){
|
||||
if(altSet || pack)
|
||||
return 2;
|
||||
return 5;
|
||||
}
|
||||
void ShopBooster::addToDeck(MTGDeck * d, WSrcCards * srcCards){
|
||||
|
||||
if(pack){
|
||||
pack->assemblePack(d);
|
||||
}
|
||||
else{
|
||||
WSrcCards * pool = NEW WSrcCards(0);
|
||||
WCFilterSet *main, *alt;
|
||||
int num = setlist.getSetNum(mainSet);
|
||||
main = NEW WCFilterSet(num);
|
||||
if(altSet){
|
||||
num = setlist.getSetNum(altSet);
|
||||
alt = NEW WCFilterSet(num);
|
||||
pool->addFilter(NEW WCFilterOR(main,alt));
|
||||
} else
|
||||
pool->addFilter(main);
|
||||
pool->loadMatches(srcCards,true);
|
||||
pool->Shuffle();
|
||||
|
||||
//Add cards to booster. Pool is shuffled, so just step through.
|
||||
int carryover = 1;
|
||||
if(!(rand() % 8)){
|
||||
pool->addFilter(NEW WCFilterRarity(Constants::RARITY_M));
|
||||
carryover = pool->addToDeck(d,carryover);
|
||||
}
|
||||
pool->clearFilters();
|
||||
pool->addFilter(NEW WCFilterRarity(Constants::RARITY_R));
|
||||
carryover = pool->addToDeck(d,carryover);
|
||||
pool->clearFilters();
|
||||
pool->addFilter(NEW WCFilterRarity(Constants::RARITY_U));
|
||||
carryover = pool->addToDeck(d,carryover+3);
|
||||
pool->clearFilters();
|
||||
pool->addFilter(NEW WCFilterRarity(Constants::RARITY_C));
|
||||
carryover = pool->addToDeck(d,carryover+11);
|
||||
SAFE_DELETE(pool);
|
||||
}
|
||||
}
|
||||
@@ -50,13 +50,13 @@ void MTGCard::setMTGId(int id){
|
||||
}
|
||||
}
|
||||
|
||||
int MTGCard::getMTGId(){
|
||||
int MTGCard::getMTGId() const {
|
||||
return mtgid;
|
||||
}
|
||||
int MTGCard::getId(){
|
||||
int MTGCard::getId() const {
|
||||
return mtgid;
|
||||
}
|
||||
char MTGCard::getRarity(){
|
||||
char MTGCard::getRarity() const {
|
||||
return rarity;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ void MTGCard::setRarity(char _rarity){
|
||||
rarity = _rarity;
|
||||
}
|
||||
|
||||
char * MTGCard::getImageName(){
|
||||
char * MTGCard::getImageName() {
|
||||
return image_name;
|
||||
}
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@ int MTGDeck::remove(MTGCard * card){
|
||||
|
||||
int MTGDeck::save(){
|
||||
std::ofstream file(filename.c_str());
|
||||
char writer[10];
|
||||
char writer[512];
|
||||
if (file){
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
OutputDebugString("saving");
|
||||
|
||||
269
projects/mtg/src/MTGPack.cpp
Normal file
269
projects/mtg/src/MTGPack.cpp
Normal file
@@ -0,0 +1,269 @@
|
||||
#include <JGui.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <dirent.h>
|
||||
#include "../include/config.h"
|
||||
#include "../include/GameApp.h"
|
||||
#include "../include/Translate.h"
|
||||
#include "../include/WDataSrc.h"
|
||||
#include "../include/WFilter.h"
|
||||
#include "../include/DeckDataWrapper.h"
|
||||
#include "../include/MTGPack.h"
|
||||
#include "../../../JGE/src/TinyXML/tinyxml.h"
|
||||
|
||||
int MTGPackEntryRandom::addCard(WSrcCards *pool, MTGDeck *to){
|
||||
int fails = 0;
|
||||
if(!pool) return 1;
|
||||
WCFilterFactory * ff = WCFilterFactory::GetInstance();
|
||||
WCardFilter * oldf = pool->unhookFilters();
|
||||
pool->addFilter(ff->Construct(filter));
|
||||
fails = pool->addRandomCards(to,copies);
|
||||
pool->clearFilters();
|
||||
pool->addFilter(oldf);
|
||||
return fails;
|
||||
}
|
||||
int MTGPackEntrySpecific::addCard(WSrcCards *pool, MTGDeck *to){
|
||||
int fails = 0;
|
||||
//Ignores pool entirely.
|
||||
MTGAllCards * ac = GameApp::collection;
|
||||
|
||||
if(!card) return copies;
|
||||
for(int i=0;i<copies;i++)
|
||||
to->add(card);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MTGPackSlot::add(WSrcCards * ocean, MTGDeck *to, int carryover){
|
||||
if(!entries.size()) return copies;
|
||||
int fails = 0;
|
||||
int amt = copies + carryover;
|
||||
WSrcCards * myPool = MTGPack::getPool(pool);
|
||||
if(!myPool) myPool = ocean;
|
||||
for(int i=0;i<amt;i++){
|
||||
size_t pos = rand() % entries.size();
|
||||
#if defined WIN32 || defined LINUX //First try other entries in slot
|
||||
while(pos < entries.size() && entries[pos]->addCard(myPool,to))
|
||||
pos++;
|
||||
if(pos == entries.size()) fails++;
|
||||
#else //Fall straight through to next slot
|
||||
fails = entries[pos]->addCard(myPool,to);
|
||||
#endif
|
||||
}
|
||||
return fails;
|
||||
}
|
||||
|
||||
WSrcCards * MTGPack::getPool(string poolstr){
|
||||
WSrcCards * mySrc = NULL;
|
||||
size_t s = poolstr.find("all");
|
||||
WCFilterFactory * ff = WCFilterFactory::GetInstance();
|
||||
|
||||
if(s == string::npos){ //Default to just unlocked cards
|
||||
mySrc = NEW WSrcUnlockedCards();
|
||||
s = poolstr.find("unlocked");
|
||||
string sub = poolstr;
|
||||
if(s != string::npos) sub = poolstr.substr(s+8);
|
||||
if(sub.size()){
|
||||
mySrc->addFilter(ff->Construct(sub));
|
||||
mySrc->bakeFilters();
|
||||
}
|
||||
}
|
||||
else{ //Use everything.
|
||||
mySrc = NEW WSrcCards();
|
||||
string sub = poolstr.substr(s+3);
|
||||
if(sub.size()){
|
||||
mySrc->addFilter(ff->Construct(sub));
|
||||
mySrc->loadMatches(GameApp::collection);
|
||||
mySrc->bakeFilters();
|
||||
}else
|
||||
mySrc->loadMatches(GameApp::collection);
|
||||
}
|
||||
mySrc->Shuffle();
|
||||
return mySrc;
|
||||
}
|
||||
|
||||
void MTGPackSlot::addEntry(MTGPackEntry*item){
|
||||
if(item)
|
||||
entries.push_back(item);
|
||||
}
|
||||
int MTGPack::assemblePack(MTGDeck *to){
|
||||
int carryover = 0;
|
||||
WSrcCards * p = getPool(pool);
|
||||
if(!p)
|
||||
return -1;
|
||||
|
||||
for(size_t i=0;i<slots.size();i++){
|
||||
carryover = slots[i]->add(p,to,carryover);
|
||||
}
|
||||
SAFE_DELETE(p);
|
||||
return carryover;
|
||||
}
|
||||
void MTGPack::countCards(){
|
||||
minCards = 0;
|
||||
maxCards = 0;
|
||||
for(size_t i=0;i<slots.size();i++){
|
||||
MTGPackSlot * ps = slots[i];
|
||||
int top = 0;
|
||||
int bot = 999999999;
|
||||
for(size_t y=0;y<ps->entries.size();y++){
|
||||
int test = ps->entries[y]->copies * ps->copies;
|
||||
if(test > top) top = test;
|
||||
if(test < bot) bot = test;
|
||||
}
|
||||
maxCards += top;
|
||||
minCards += bot;
|
||||
}
|
||||
}
|
||||
void MTGPack::load(string filename){
|
||||
//TODO Placeholder until XML format available.
|
||||
TiXmlDocument packfile(filename.c_str());
|
||||
if(!packfile.LoadFile())
|
||||
return;
|
||||
TiXmlHandle hDoc(&packfile);
|
||||
TiXmlElement * pPack;
|
||||
pPack = hDoc.FirstChildElement().Element();
|
||||
if(!pPack ) return;
|
||||
//root should be "pack"
|
||||
string tag = pPack->Value();
|
||||
std::transform(tag.begin(),tag.end(),tag.begin(),::tolower);
|
||||
if(tag != "pack")
|
||||
return;
|
||||
//After validating, handle actual loading.
|
||||
TiXmlElement * pSlot;
|
||||
const char * holder = NULL;
|
||||
holder = pPack->Attribute("price");
|
||||
if(holder) price = atoi(holder); else price = Constants::PRICE_BOOSTER;
|
||||
holder = pPack->Attribute("pool");
|
||||
if(holder) pool = holder; else pool = "";
|
||||
holder = pPack->Attribute("type");
|
||||
if(holder) type = holder; else type = "Booster";
|
||||
holder = pPack->Attribute("name");
|
||||
if(holder) name = holder; else name = "Special";
|
||||
holder = pPack->Attribute("requires");
|
||||
if(holder) check = holder;
|
||||
holder = pPack->Attribute("sort");
|
||||
if(holder) sort = holder; else sort = "";
|
||||
std::transform(sort.begin(),sort.end(),sort.begin(),::tolower);
|
||||
|
||||
for (pSlot=pPack->FirstChildElement();pSlot!=NULL;pSlot=pSlot->NextSiblingElement()){
|
||||
TiXmlElement * pEntry;
|
||||
//Load slot.
|
||||
tag = pSlot->Value();
|
||||
std::transform(tag.begin(),tag.end(),tag.begin(),::tolower);
|
||||
if(tag != "slot") continue;
|
||||
MTGPackSlot * s = NEW MTGPackSlot();
|
||||
slots.push_back(s);
|
||||
holder = pSlot->Attribute("copies");
|
||||
if(holder) s->copies = atoi(holder);
|
||||
else s->copies = 1;
|
||||
|
||||
for(pEntry = pSlot->FirstChildElement();pEntry!=NULL;pEntry=pEntry->NextSiblingElement()){
|
||||
tag = pEntry->Value();
|
||||
std::transform(tag.begin(),tag.end(),tag.begin(),::tolower);
|
||||
if(tag == "card"){ //Load specific card
|
||||
MTGPackEntrySpecific * es = NEW MTGPackEntrySpecific();
|
||||
holder = pEntry->Attribute("copies");
|
||||
if(holder) es->copies = atoi(holder);
|
||||
else es->copies = 1;
|
||||
es->card = GameApp::collection->getCardByName(pEntry->Value());
|
||||
s->addEntry(es);
|
||||
}else if(tag == "random_card"){ //Load random card
|
||||
MTGPackEntryRandom * er = NEW MTGPackEntryRandom();
|
||||
holder = pEntry->Attribute("copies");
|
||||
if(holder) er->copies = atoi(holder);
|
||||
else er->copies = 1;
|
||||
const char * text = pEntry->GetText();
|
||||
if(text) er->filter = text;
|
||||
s->addEntry(er);
|
||||
}else if(tag == "nothing"){
|
||||
MTGPackEntryNothing * nt = NEW MTGPackEntryNothing();
|
||||
s->addEntry(nt);
|
||||
}
|
||||
}
|
||||
}
|
||||
bValid = true;
|
||||
countCards();
|
||||
return;
|
||||
}
|
||||
MTGPackSlot::~MTGPackSlot(){
|
||||
for(size_t t=0;t<entries.size();t++){
|
||||
SAFE_DELETE(entries[t]);
|
||||
}
|
||||
entries.clear();
|
||||
}
|
||||
MTGPack::~MTGPack(){
|
||||
for(size_t t=0;t<slots.size();t++){
|
||||
SAFE_DELETE(slots[t]);
|
||||
}
|
||||
slots.clear();
|
||||
}
|
||||
MTGPacks::~MTGPacks(){
|
||||
for(size_t t=0;t<packs.size();t++){
|
||||
SAFE_DELETE(packs[t]);
|
||||
}
|
||||
packs.clear();
|
||||
}
|
||||
MTGPack * MTGPacks::randomPack(int key){
|
||||
if(!key) key = rand();
|
||||
size_t s = packs.size();
|
||||
if(!s) return NULL;
|
||||
return packs[key%s];
|
||||
}
|
||||
void MTGPacks::loadAll(){
|
||||
DIR *mDip = opendir(RESPATH"/packs/");
|
||||
struct dirent *mDit;
|
||||
|
||||
while ((mDit = readdir(mDip))){
|
||||
char myFilename[4096];
|
||||
sprintf(myFilename, RESPATH"/packs/%s", mDit->d_name);
|
||||
if(myFilename[0] == '.') continue;
|
||||
MTGPack * p = NEW MTGPack(myFilename);
|
||||
if(!p->isValid()){
|
||||
SAFE_DELETE(p);
|
||||
continue;
|
||||
}
|
||||
packs.push_back(p);
|
||||
}
|
||||
closedir(mDip);
|
||||
}
|
||||
string MTGPack::getName(){
|
||||
string n = _(name);
|
||||
string t = _(type);
|
||||
char buf[1024];
|
||||
if(minCards != maxCards)
|
||||
sprintf(buf,"%s %s (%i-%i cards)",n.c_str(),t.c_str(),minCards,maxCards);
|
||||
else
|
||||
sprintf(buf,"%s %s (%i cards)",n.c_str(),t.c_str(),maxCards);
|
||||
return buf;
|
||||
}
|
||||
|
||||
bool MTGPack::meetsRequirements(){
|
||||
bool unlocked = true;
|
||||
WCFilterFactory * ff = WCFilterFactory::GetInstance();
|
||||
WSrcCards * myC = getPool(pool);
|
||||
if(!myC || myC->Size() < maxCards) unlocked = false; //Top pool lacks cards.
|
||||
SAFE_DELETE(myC);
|
||||
if(!check.size() || !unlocked) return unlocked;
|
||||
myC = NEW WSrcUnlockedCards(); //Requirements are independent of pool;
|
||||
WCardFilter * cf = ff->Construct(check);
|
||||
unlocked = !myC->isEmptySet(cf); //Quick check for empty set status.
|
||||
SAFE_DELETE(cf); //delete requirement filter
|
||||
SAFE_DELETE(myC); //delete pool.
|
||||
return unlocked;
|
||||
}
|
||||
|
||||
bool MTGPack::isUnlocked(){
|
||||
if(unlockStatus == 0){
|
||||
if(meetsRequirements())
|
||||
unlockStatus = 1;
|
||||
else
|
||||
unlockStatus = -1;
|
||||
}
|
||||
return (unlockStatus > 0);
|
||||
}
|
||||
|
||||
void MTGPacks::refreshUnlocked(){
|
||||
for(size_t t=0;t<packs.size();t++){
|
||||
if(packs[t]->unlockStatus < 0)
|
||||
packs[t]->unlockStatus = 0;
|
||||
}
|
||||
}
|
||||
@@ -95,3 +95,8 @@ int PriceList::getPurchasePrice(int cardid){
|
||||
if(p < 2) p = 2; //Prevents "Sell for 0 credits"
|
||||
return (int)p;
|
||||
}
|
||||
int PriceList::getOtherPrice(int amt){
|
||||
float p = difficultyScalar(amt,0);
|
||||
if(p < 2) p = 2;
|
||||
return (int)p;
|
||||
}
|
||||
|
||||
@@ -160,6 +160,22 @@ int WSrcCards::loadMatches(WSrcCards* src, bool all){
|
||||
validateFilters();
|
||||
return count;
|
||||
}
|
||||
int WSrcCards::addRandomCards(MTGDeck * i, int howmany){
|
||||
if(!cards.size() || (filtersRoot && !validated.size()))
|
||||
return howmany;
|
||||
for(int x=0;x<howmany;x++){
|
||||
if(validated.size()){
|
||||
size_t pos = rand() % validated.size();
|
||||
i->add(cards[validated[pos]]);
|
||||
}
|
||||
else{
|
||||
size_t pos = rand() % cards.size();
|
||||
i->add(cards[pos]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int WSrcCards::addToDeck(MTGDeck * i, int num){
|
||||
int oldpos = getOffset();
|
||||
int added = 0;
|
||||
@@ -256,6 +272,7 @@ void WSrcCards::Shuffle(){
|
||||
}
|
||||
void WSrcCards::validateFilters(){
|
||||
validated.clear();
|
||||
if(filtersRoot == NULL) return; //No filter, no validation
|
||||
for(size_t t=0;t<cards.size();t++){
|
||||
if(matchesFilters(cards[t]))
|
||||
validated.push_back(t);
|
||||
@@ -270,6 +287,19 @@ bool WSrcCards::thisCard(int mtgid){
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool WSrcCards::isEmptySet(WCardFilter * f){
|
||||
size_t max = cards.size();
|
||||
if(validated.size()) max = validated.size();
|
||||
if(!f) return (max > 0);
|
||||
for(size_t t=0;t<max;t++){
|
||||
if(validated.size()){
|
||||
if(f->isMatch(cards[validated[t]]))
|
||||
return false;
|
||||
}else if(f->isMatch(cards[t]))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void WSrcCards::addFilter(WCardFilter * f) {
|
||||
if(filtersRoot == NULL)
|
||||
@@ -288,13 +318,21 @@ void WSrcCards::clearFilters() {
|
||||
SAFE_DELETE(filtersRoot);
|
||||
validated.clear();
|
||||
}
|
||||
|
||||
WCardFilter* WSrcCards::unhookFilters(){
|
||||
WCardFilter* temp = filtersRoot;
|
||||
filtersRoot = NULL;
|
||||
clearFilters();
|
||||
return temp;
|
||||
}
|
||||
void WSrcCards::Sort(int method){
|
||||
switch(method){
|
||||
case SORT_COLLECTOR:
|
||||
case WSrcCards::SORT_COLLECTOR:
|
||||
std::sort(cards.begin(),cards.end(),WCSortCollector());
|
||||
break;
|
||||
case SORT_ALPHA:
|
||||
case WSrcCards::SORT_RARITY:
|
||||
std::sort(cards.begin(),cards.end(),WCSortRarity());
|
||||
break;
|
||||
case WSrcCards::SORT_ALPHA:
|
||||
default:
|
||||
std::sort(cards.begin(),cards.end(),WCSortAlpha());
|
||||
break;
|
||||
@@ -386,6 +424,8 @@ void WSrcDeck::Rebuild(MTGDeck * d){
|
||||
}
|
||||
|
||||
int WSrcDeck::count(MTGCard * c){
|
||||
if(!c)
|
||||
return totalCopies();
|
||||
if(copies.find(c->getMTGId()) == copies.end())
|
||||
return 0;
|
||||
return copies[c->getMTGId()];
|
||||
@@ -425,12 +465,28 @@ int WSrcDeck::totalCopies(){
|
||||
return totalCards;
|
||||
}
|
||||
//Sorting methods:
|
||||
|
||||
int WCSortRarity::rareToInt(char r){
|
||||
switch(r){
|
||||
default: case Constants::RARITY_T: return 0;
|
||||
case Constants::RARITY_L: return 1;
|
||||
case Constants::RARITY_C: return 2;
|
||||
case Constants::RARITY_U: return 3;
|
||||
case Constants::RARITY_R: return 4;
|
||||
case Constants::RARITY_M: return 5;
|
||||
}
|
||||
}
|
||||
bool WCSortRarity::operator()(const MTGCard*l, const MTGCard*r){
|
||||
if(!l || !r || !l->data || !r->data)
|
||||
return false;
|
||||
return (rareToInt(l->getRarity()) < rareToInt(r->getRarity()));
|
||||
}
|
||||
bool WCSortAlpha::operator()(const MTGCard*l, const MTGCard*r){
|
||||
if(!l || !r || !l->data || !r->data)
|
||||
return false;
|
||||
string ln = l->data->getLCName();
|
||||
string rn = r->data->getLCName();
|
||||
if(ln == rn)
|
||||
return l->getMTGId() < r->getMTGId();
|
||||
return (ln < rn);
|
||||
}
|
||||
bool WCSortCollector::operator()(const MTGCard*l, const MTGCard*r){
|
||||
|
||||
@@ -29,15 +29,11 @@ size_t WCFilterFactory::findNext(string src, size_t start,char open, char close)
|
||||
}
|
||||
return string::npos;
|
||||
}
|
||||
WCardFilter * WCFilterFactory::Construct(string in){
|
||||
WCardFilter * WCFilterFactory::Construct(string src){
|
||||
size_t x = 0;
|
||||
string src;
|
||||
|
||||
for(x=0;x < in.size();x++){
|
||||
if(isspace(in[x]))
|
||||
continue;
|
||||
src+=in[x];
|
||||
}
|
||||
string whitespaces (" \t\f\v\n\r");
|
||||
x = src.find_first_not_of(whitespaces);
|
||||
if(x != string::npos) src = src.substr(x);
|
||||
|
||||
if(!src.size())
|
||||
return NEW WCFilterNULL(); //Empty string.
|
||||
@@ -89,6 +85,9 @@ WCardFilter * WCFilterFactory::Construct(string in){
|
||||
|
||||
WCardFilter * WCFilterFactory::Leaf(string src){
|
||||
string filter;
|
||||
string whitespaces (" \t\f\v\n\r");
|
||||
size_t x = src.find_first_not_of(whitespaces);
|
||||
if(x != string::npos) src = src.substr(x);
|
||||
|
||||
for(size_t i=0;i<src.size();i++){
|
||||
unsigned char c = src[i];
|
||||
@@ -120,8 +119,14 @@ WCardFilter * WCFilterFactory::Leaf(string src){
|
||||
return NEW WCFilterNULL();
|
||||
}
|
||||
|
||||
WCardFilter * WCFilterFactory::Terminal(string type, string arg){
|
||||
WCardFilter * WCFilterFactory::Terminal(string src, string arg){
|
||||
string type;
|
||||
for(size_t x=0;x<src.size();x++){
|
||||
if(isspace(src[x])) continue;
|
||||
type += src[x];
|
||||
}
|
||||
std::transform(type.begin(),type.end(),type.begin(),::tolower);
|
||||
|
||||
if(type == "r" || type == "rarity")
|
||||
return NEW WCFilterRarity(arg);
|
||||
else if(type == "c" || type == "color")
|
||||
|
||||
@@ -1105,8 +1105,13 @@ void WGuiCardImage::Render(){
|
||||
|
||||
if(!source || (c = source->getCard(mOffset.getPos())) == NULL){
|
||||
JQuad * q;
|
||||
if(bThumb)
|
||||
if(bThumb){
|
||||
q = resources.GetQuad("back_thumb");
|
||||
#if defined WIN32 || defined LINUX
|
||||
if(!q)
|
||||
q = resources.GetQuad("back");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
q = resources.GetQuad("back");
|
||||
float scale = p.actZ * 257.f / q->mHeight;
|
||||
@@ -1116,8 +1121,13 @@ void WGuiCardImage::Render(){
|
||||
return;
|
||||
if(bThumb){
|
||||
JQuad * q = NULL;
|
||||
if(!options[Options::DISABLECARDS].number)
|
||||
if(!options[Options::DISABLECARDS].number){
|
||||
q = source->getThumb(mOffset.getPos());
|
||||
#if defined WIN32 || defined LINUX
|
||||
if(!q)
|
||||
q = source->getImage(mOffset.getPos());
|
||||
#endif
|
||||
}
|
||||
if(!q && (q = CardGui::alternateThumbQuad(c)) == NULL)
|
||||
return; //TODO Some kind of error image.
|
||||
renderer->RenderQuad(q,p.x,p.y);
|
||||
@@ -1153,8 +1163,13 @@ void WGuiCardDistort::Render(){
|
||||
|
||||
if(!source){
|
||||
//Default to back.
|
||||
if(bThumb)
|
||||
if(bThumb){
|
||||
q = resources.GetQuad("back_thumb");
|
||||
#if defined WIN32 || defined LINUX
|
||||
if(!q)
|
||||
q = resources.GetQuad("back");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
q = resources.GetQuad("back");
|
||||
}else {
|
||||
@@ -1164,6 +1179,10 @@ void WGuiCardDistort::Render(){
|
||||
|
||||
if(bThumb){
|
||||
q = source->getThumb(mOffset.getPos());
|
||||
#if defined WIN32 || defined LINUX
|
||||
if(!q)
|
||||
q = source->getImage(mOffset.getPos());
|
||||
#endif
|
||||
if(!q || options[Options::DISABLECARDS].number)
|
||||
q = CardGui::alternateThumbQuad(c);
|
||||
}
|
||||
|
||||
@@ -306,6 +306,104 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="HQ Debug|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/template.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../JGE/include;../../JGE/Dependencies/include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
PrecompiledHeaderFile=".\Debug/template.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="3081"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib libpngd.lib fmodvc.lib jge_debug.lib libjpeg-static-mt-debug.lib freetype.lib"
|
||||
OutputFile="bin/template.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\JGE\Dependencies\lib,..\..\JGE\lib\win"
|
||||
IgnoreDefaultLibraryNames="LIBCD,LIBC,MSVCRT,LIBCMTD"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/template.pdb"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Debug/template.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
@@ -424,6 +522,15 @@
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="HQ Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="src\GameLauncher.cpp"
|
||||
@@ -455,6 +562,15 @@
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="HQ Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\GameObserver.cpp"
|
||||
@@ -584,6 +700,10 @@
|
||||
RelativePath=".\src\MTGGameZones.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\MTGPack.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\MTGRules.cpp"
|
||||
>
|
||||
@@ -953,6 +1073,10 @@
|
||||
RelativePath=".\include\MTGGameZones.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\MTGPack.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\MTGRules.h"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user