Fix date in Dat files, Added IKO and HA3 sets, updated the manifest and build files, Added SD card support for Android, Fix the Android app crash when resuming from background, Improved Android downloader, added finger sliding popup menu for Android devices without sidebar menu, fixed several crashes during game, added the mutating card ability, fixed the adventure card ability, added new borderline primitives.
This commit is contained in:
@@ -178,6 +178,8 @@ private:
|
||||
intValue = 0;
|
||||
bool halfup = false;
|
||||
bool halfdown = false;
|
||||
bool thirdup = false;
|
||||
bool thirddown = false;
|
||||
bool twice = false;
|
||||
bool thrice = false;
|
||||
bool other = false;//othertype:[subtype]
|
||||
@@ -218,6 +220,18 @@ private:
|
||||
size_t hD = s.find("halfdown");
|
||||
s.erase(hD,hD + 8);
|
||||
}
|
||||
if(s.find("thirdup") != string::npos)
|
||||
{
|
||||
thirdup = true;
|
||||
size_t tU = s.find("thirdup");
|
||||
s.erase(tU,tU + 7);
|
||||
}
|
||||
if(s.find("thirddown") != string::npos)
|
||||
{
|
||||
thirddown = true;
|
||||
size_t tD = s.find("thirddown");
|
||||
s.erase(tD,tD + 9);
|
||||
}
|
||||
if(s.find("twice") != string::npos)
|
||||
{
|
||||
twice = true;
|
||||
@@ -328,6 +342,10 @@ private:
|
||||
{
|
||||
intValue = target->equipment;
|
||||
}
|
||||
else if (s == "mutations")
|
||||
{
|
||||
intValue = target->mutation;
|
||||
}
|
||||
else if (s == "colors")
|
||||
{
|
||||
intValue = target->countColors();
|
||||
@@ -560,6 +578,14 @@ private:
|
||||
{
|
||||
intValue = card->controller()->opponent()->energyCount;
|
||||
}
|
||||
else if (s == "pyidarocount")
|
||||
{
|
||||
intValue = card->controller()->yidaroCount;
|
||||
}
|
||||
else if (s == "oyidarocount")
|
||||
{
|
||||
intValue = card->controller()->opponent()->yidaroCount;
|
||||
}
|
||||
else if (s == "praidcount")
|
||||
{
|
||||
intValue = card->controller()->raidcount;
|
||||
@@ -1047,6 +1073,16 @@ private:
|
||||
}
|
||||
if (halfdown)
|
||||
intValue = intValue / 2;
|
||||
|
||||
if (thirdup)
|
||||
{
|
||||
if (intValue % 3 > 0)
|
||||
intValue = (intValue / 3) + 1;
|
||||
else
|
||||
intValue = intValue / 3;
|
||||
}
|
||||
if (thirddown)
|
||||
intValue = intValue / 3;
|
||||
}
|
||||
if (twice)
|
||||
intValue = intValue * 2;
|
||||
@@ -1613,6 +1649,29 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class TrCardMutated: public Trigger
|
||||
{
|
||||
public:
|
||||
bool thiscontroller, thisopponent;
|
||||
TrCardMutated(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc,bool once = false) :
|
||||
Trigger(observer, id, source,once, tc)
|
||||
{
|
||||
}
|
||||
|
||||
int triggerOnEventImpl(WEvent * event)
|
||||
{
|
||||
WEventCardMutated * e = dynamic_cast<WEventCardMutated *> (event);
|
||||
if (!e) return 0;
|
||||
if (!tc->canTarget(e->card)) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
TrCardMutated * clone() const
|
||||
{
|
||||
return NEW TrCardMutated(*this);
|
||||
}
|
||||
};
|
||||
|
||||
class TrCardSacrificed: public Trigger
|
||||
{
|
||||
public:
|
||||
@@ -3045,6 +3104,8 @@ public:
|
||||
|
||||
int addToGame()
|
||||
{
|
||||
if(!ability)
|
||||
return 1; //Fix a possible crash on mutate cards
|
||||
ability->forceDestroy = -1;
|
||||
ability->target = target; //Might have changed since initialization
|
||||
ability->addToGame();
|
||||
@@ -3762,6 +3823,7 @@ public:
|
||||
|
||||
int unequip();
|
||||
int equip(MTGCardInstance * equipped);
|
||||
int mutate(MTGCardInstance * mutated);
|
||||
|
||||
int resolve();
|
||||
const string getMenuText();
|
||||
@@ -4696,6 +4758,19 @@ public:
|
||||
AAAlterEnergy * clone() const;
|
||||
~AAAlterEnergy();
|
||||
};
|
||||
//Yidaro Counter
|
||||
class AAAlterYidaroCount: public ActivatedAbilityTP
|
||||
{
|
||||
public:
|
||||
int yidarocount;
|
||||
|
||||
AAAlterYidaroCount(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, int yidarocount, ManaCost * _cost = NULL,
|
||||
int who = TargetChooser::UNSET);
|
||||
int resolve();
|
||||
const string getMenuText();
|
||||
AAAlterYidaroCount * clone() const;
|
||||
~AAAlterYidaroCount();
|
||||
};
|
||||
/* Standard Damager, can choose a NEW target each time the price is paid */
|
||||
class TADamager: public TargetAbility
|
||||
{
|
||||
@@ -4808,7 +4883,8 @@ public:
|
||||
bool retarget;
|
||||
bool reequip;
|
||||
bool newhook;
|
||||
AANewTarget(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,bool retarget = false, ManaCost * _cost = NULL, bool reequip = false, bool newhook = false);
|
||||
int mutation;
|
||||
AANewTarget(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,bool retarget = false, ManaCost * _cost = NULL, bool reequip = false, bool newhook = false, int mutation = 0);
|
||||
int resolve();
|
||||
const string getMenuText();
|
||||
AANewTarget * clone() const;
|
||||
@@ -6959,7 +7035,8 @@ public:
|
||||
bool noEvent;
|
||||
bool putinplay;
|
||||
bool asNormalMadness;
|
||||
AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool restricted,bool copied,bool _asNormal,string nameCard,string abilityName,bool _noEvent, bool putinplay,bool asNormalMadness = false);
|
||||
bool alternative;
|
||||
AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool restricted,bool copied,bool _asNormal,string nameCard,string abilityName,bool _noEvent, bool putinplay,bool asNormalMadness = false,bool alternative = false);
|
||||
|
||||
int testDestroy(){return 0;};
|
||||
void Update(float dt);
|
||||
|
||||
@@ -176,6 +176,7 @@ public:
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
virtual int addToGame();
|
||||
virtual int removeFromGame();
|
||||
static vector<void *> deletedpointers;
|
||||
|
||||
/*Poor man's casting */
|
||||
/* Todo replace that crap with dynamic casting */
|
||||
|
||||
@@ -62,6 +62,7 @@ public:
|
||||
int frozen;
|
||||
int sunburst;
|
||||
int equipment;
|
||||
int mutation;
|
||||
int auras;
|
||||
bool wasDealtDamage;
|
||||
bool combatdamageToOpponent;
|
||||
|
||||
@@ -281,7 +281,9 @@ class Constants
|
||||
TOTEMARMOR = 155,
|
||||
DISCARDTOPLAYBYOPPONENT = 156,
|
||||
MODULAR = 157,
|
||||
NB_BASIC_ABILITIES = 158,
|
||||
MUTATE = 158,
|
||||
ADVENTURE = 159,
|
||||
NB_BASIC_ABILITIES = 160,
|
||||
|
||||
RARITY_S = 'S', //Special Rarity
|
||||
RARITY_M = 'M', //Mythics
|
||||
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
int extraTurn;
|
||||
int drawCounter;
|
||||
int energyCount;
|
||||
int yidaroCount;
|
||||
int epic;
|
||||
int forcefield;
|
||||
int dealsdamagebycombat;
|
||||
|
||||
@@ -77,6 +77,14 @@ class ThisOpponentlife:public ThisDescriptor{
|
||||
ThisOpponentlife * clone() const;
|
||||
};
|
||||
|
||||
class ThisMutation:public ThisDescriptor{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
ThisMutation(int mutation);
|
||||
ThisMutation * clone() const;
|
||||
};
|
||||
|
||||
class ThisEquip:public ThisDescriptor{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
@@ -72,7 +72,7 @@ struct WEventLife : public WEvent {
|
||||
Player * player;
|
||||
int amount;
|
||||
MTGCardInstance * source;
|
||||
WEventLife(Player * player,int amount, MTGCardInstance * source);
|
||||
WEventLife(Player * player, int amount, MTGCardInstance * source);
|
||||
virtual Targetable * getTarget(int target);
|
||||
};
|
||||
|
||||
@@ -351,6 +351,12 @@ struct WEventplayerEnergized : public WEvent {
|
||||
virtual Targetable * getTarget(Player * player);
|
||||
};
|
||||
|
||||
//mutation event
|
||||
struct WEventCardMutated : public WEventCardUpdate {
|
||||
WEventCardMutated(MTGCardInstance * card);
|
||||
virtual Targetable * getTarget(int target);
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream&, const WEvent&);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,7 @@ This file was auto-generated by ant build script on Sat, 26-Oct-2013 23::59:07
|
||||
To make changes please edit the ant build script, otherwise your changes will be lost
|
||||
|
||||
Author: Michael Nguyen
|
||||
Mod by: Vitty85
|
||||
|
||||
*/
|
||||
|
||||
@@ -13,7 +14,7 @@ Author: Michael Nguyen
|
||||
/* Wagic versions */
|
||||
#define WAGIC_VERSION_MAJOR 0
|
||||
#define WAGIC_VERSION_MEDIUM 22
|
||||
#define WAGIC_VERSION_MINOR 2
|
||||
#define WAGIC_VERSION_MINOR 3
|
||||
|
||||
#define VERSION_DOT(a, b, c) a ##.## b ##.## c
|
||||
#define VERSION_WITHOUT_DOT(a, b, c) a ## b ## c
|
||||
|
||||
Reference in New Issue
Block a user