Added boast ability, refactored WParsedInt class (this class has been removed from AllAbilities.h file and it has been included into two dedicated .h and .cpp files), refactored all makefiles (Windows, Linux, PSP and Android) in order to to include the new .h and .cpp files added for WParsedInt class.
This commit is contained in:
@@ -133,6 +133,7 @@ LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.cpp \
|
||||
$(MTG_PATH)/src/WFilter.cpp \
|
||||
$(MTG_PATH)/src/WFont.cpp \
|
||||
$(MTG_PATH)/src/WGui.cpp \
|
||||
$(MTG_PATH)/src/WParsedInt.cpp \
|
||||
$(MTG_PATH)/src/WResourceManager.cpp \
|
||||
$(MTG_PATH)/src/DeckView.cpp \
|
||||
$(MTG_PATH)/src/CarouselDeckView.cpp \
|
||||
|
||||
@@ -27,7 +27,7 @@ OBJS = objs/InteractiveButton.o objs/AbilityParser.o objs/ActionElement.o\
|
||||
objs/ThisDescriptor.o objs/Token.o objs/Translate.o objs/TranslateKeys.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/WFont.o objs/CarouselDeckView.o objs/GridDeckView.o objs/DeckView.o
|
||||
objs/WFont.o objs/WParsedInt.o objs/CarouselDeckView.o objs/GridDeckView.o objs/DeckView.o
|
||||
DEPS = $(patsubst objs/%.o, deps/%.d, $(OBJS))
|
||||
|
||||
RESULT = $(shell psp-config --psp-prefix 2> Makefile.cache)
|
||||
|
||||
@@ -135,6 +135,7 @@ wagic_FILES = ../../../JGE/src/iOS/main.m\
|
||||
../src/WFilter.cpp\
|
||||
../src/WFont.cpp\
|
||||
../src/WGui.cpp\
|
||||
../src/WParsedInt.cpp\
|
||||
../src/WResourceManager.cpp \
|
||||
../src/AIPlayerBakaB.cpp \
|
||||
../src/TestSuiteAI.cpp\
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -300,7 +300,8 @@ class Constants
|
||||
CYCLING = 173,
|
||||
FORETELL = 174,
|
||||
ANYTYPEOFMANAABILITY = 175,
|
||||
NB_BASIC_ABILITIES = 176,
|
||||
BOAST = 176,
|
||||
NB_BASIC_ABILITIES = 177,
|
||||
|
||||
RARITY_S = 'S', //Special Rarity
|
||||
RARITY_M = 'M', //Mythics
|
||||
|
||||
35
projects/mtg/include/WParsedInt.h
Normal file
35
projects/mtg/include/WParsedInt.h
Normal file
@@ -0,0 +1,35 @@
|
||||
class WParsedInt
|
||||
{
|
||||
private:
|
||||
void init(string s, Spell * spell, MTGCardInstance * card);
|
||||
|
||||
public:
|
||||
int intValue;
|
||||
|
||||
int getValue();
|
||||
string getStringValue();
|
||||
|
||||
int computeX(Spell * spell, MTGCardInstance * card);
|
||||
int countDevotionTo(MTGCardInstance * card, MTGGameZone * zone, int color1, int color2);
|
||||
int countCardNameinZone(string name, MTGGameZone * zone);
|
||||
int countCardsInPlaybyColor(int color, GameObserver * observer);
|
||||
int mostCommonColor(int color, MTGCardInstance * card);
|
||||
int countCardTypeinZone(string type, MTGGameZone * zone);
|
||||
int cardHasTypeinZone(const char * type, MTGGameZone * zone);
|
||||
int countCanTargetby(string type, MTGCardInstance * card, Player * player);
|
||||
int countManaProducedby(int color, MTGCardInstance * target, Player * player);
|
||||
|
||||
WParsedInt(int value = 0);
|
||||
WParsedInt(string s, Spell * spell, MTGCardInstance * card);
|
||||
WParsedInt(string s, MTGCardInstance * card);
|
||||
};
|
||||
|
||||
class WParsedPT
|
||||
{
|
||||
public:
|
||||
bool ok;
|
||||
WParsedInt power, toughness;
|
||||
|
||||
WParsedPT(int p, int t);
|
||||
WParsedPT(string s, Spell * spell, MTGCardInstance * card);
|
||||
};
|
||||
@@ -206,7 +206,8 @@ const char* Constants::MTGBasicAbilities[] = {
|
||||
"gainedhanddeath", //It goes to hand after death (use just to give add ability to instants and sorceries which originally have not, e.g. with transforms keyword)
|
||||
"cycling", //It has cycling ability
|
||||
"foretell", //It has foretell cost
|
||||
"anytypeofmanaability" //It allows to spend mana as it were of any color to activate abilities.
|
||||
"anytypeofmanaability", //It allows to spend mana as it were of any color to activate abilities.
|
||||
"boast" //It has boast ability
|
||||
};
|
||||
|
||||
map<string,int> Constants::MTGBasicAbilitiesMap;
|
||||
|
||||
1086
projects/mtg/src/WParsedInt.cpp
Normal file
1086
projects/mtg/src/WParsedInt.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -452,6 +452,7 @@
|
||||
<ClCompile Include="src\WFilter.cpp" />
|
||||
<ClCompile Include="src\WFont.cpp" />
|
||||
<ClCompile Include="src\WGui.cpp" />
|
||||
<ClInclude Include="src\WParsedInt.cpp" />
|
||||
<ClCompile Include="src\WResourceManager.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -574,6 +575,7 @@
|
||||
<ClInclude Include="include\WFilter.h" />
|
||||
<ClInclude Include="include\WFont.h" />
|
||||
<ClInclude Include="include\WGui.h" />
|
||||
<ClInclude Include="include\WParsedInt.h" />
|
||||
<ClInclude Include="include\WResourceManager.h" />
|
||||
<ClInclude Include="include\WResourceManagerImpl.h" />
|
||||
<ClInclude Include="include\WResource_Fwd.h" />
|
||||
|
||||
@@ -340,6 +340,9 @@
|
||||
<ClCompile Include="src\GridDeckView.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WParsedInt.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\ActionElement.h">
|
||||
@@ -699,6 +702,9 @@
|
||||
<ClInclude Include="include\GridDeckView.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\WParsedInt.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Makefile" />
|
||||
|
||||
@@ -158,6 +158,7 @@ SOURCES += \
|
||||
src/WFilter.cpp\
|
||||
src/WFont.cpp\
|
||||
src/WGui.cpp\
|
||||
src/WParsedInt.cpp\
|
||||
src/WResourceManager.cpp \
|
||||
src/AIPlayerBakaB.cpp \
|
||||
src/TestSuiteAI.cpp
|
||||
@@ -265,6 +266,7 @@ HEADERS += \
|
||||
include/GuiPhaseBar.h\
|
||||
include/ReplacementEffects.h\
|
||||
include/WGui.h\
|
||||
include/WParsedInt.h\
|
||||
include/DeckStats.h\
|
||||
include/GuiPlay.h\
|
||||
include/Rules.h\
|
||||
|
||||
Reference in New Issue
Block a user