other={convoke} name(Convoke)
delve
other={delve}
they might be able to be added directly to the real manacost.

added an ability that grants an ability while the source remains tapped
grant ability grantend...

added dethrone
abilities=dethrone

added support of multitargeting to extra cost, it acts the same as normal multitargeting, repeats dopay() the effects for each.
This commit is contained in:
zethfoxster
2016-07-01 21:29:51 -04:00
parent 9841ce32ae
commit f76c28fa64
13 changed files with 467 additions and 22 deletions

View File

@@ -166,8 +166,11 @@ private:
{
if(!s.size())
return;
if(!card)
return;
if (!card)
{
intValue = atoi(s.c_str());//if there is no card, try parsing a number.
return;
}
MTGCardInstance * target = card->target;
if(!card->storedCard)
card->storedCard = card->storedSourceCard;
@@ -5166,7 +5169,38 @@ public:
~AShackleWrapper();
};
//Grant
class AGrant : public MTGAbility
{
public:
MTGCardInstance * Blessed;
bool resolved;
MTGAbility * Granted;
MTGAbility * toGrant;
AGrant(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target, MTGAbility * toGrant);
void Update(float dt);
void resolveGrant();
int resolve();
const string getMenuText();
AGrant * clone() const;
~AGrant();
private:
void removeGranted(MTGCardInstance *_target);
};
//GrantWrapper
class AGrantWrapper : public InstantAbility
{
public:
AGrant * ability;
MTGAbility * Granted;
AGrantWrapper(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target, MTGAbility * toGrant);
int resolve();
const string getMenuText();
AGrantWrapper * clone() const;
~AGrantWrapper();
};
//ABlink
class ABlink: public MTGAbility
{

View File

@@ -274,7 +274,27 @@ public:
virtual int doPay();
virtual Ninja * clone() const;
};
//Convoke
class Convoke : public ExtraCost
{
public:
ManaCost * getReduction();
Convoke(TargetChooser *_tc = NULL);
virtual int canPay();
virtual int isPaymentSet();
virtual int doPay();
virtual Convoke * clone() const;
};
//delve
class Delve : public ExtraCost
{
public:
Delve(TargetChooser *_tc = NULL);
virtual int canPay();
virtual int isPaymentSet();
virtual int doPay();
virtual Delve * clone() const;
};
//offering cost
class Offering : public ExtraCost
{

View File

@@ -251,7 +251,8 @@ class Constants
MENACE = 129,
NOSOLO = 130,//cant attack alone
MUSTBLOCK = 131,//blocks each turn
NB_BASIC_ABILITIES = 132,
DETHRONE = 132,
NB_BASIC_ABILITIES = 133,
RARITY_S = 'S', //Special Rarity
RARITY_M = 'M', //Mythics