Merge branch 'master' into iOS-build

This commit is contained in:
xawotihs
2015-09-04 00:04:59 +02:00
22 changed files with 2938 additions and 204 deletions

View File

@@ -3140,7 +3140,7 @@ public:
SAFE_DELETE(NewPow);
SAFE_DELETE(NewTou);
}
for (int i = 0; i < multiplier->getValue(); ++i)
for (int i = 0; i < Tokenizer(); ++i)
{
//MTGCardInstance * myToken;
if (tokenId)
@@ -3199,6 +3199,23 @@ public:
return 1;
}
int Tokenizer()//tokenizer
{
int tokenize = 1;
if (source->controller()->game->battlefield->hasAbility(Constants::TOKENIZER))
{
int nbcards = source->controller()->game->battlefield->nb_cards;
for (int j = 0; j < nbcards; j++)
{
if (source->controller()->game->battlefield->cards[j]->has(Constants::TOKENIZER))
tokenize *= 2;
}
return multiplier->getValue()*tokenize;
}
else
return multiplier->getValue();
}
void setTokenOwner()
{
switch(who)
@@ -5540,6 +5557,17 @@ public:
AAShuffle * clone() const;
};
//Mulligan
class AAMulligan: public ActivatedAbilityTP
{
public:
AAMulligan(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost = NULL, int who =
TargetChooser::UNSET);
int resolve();
const string getMenuText();
AAMulligan * clone() const;
};
//Remove Mana From ManaPool
class AARemoveMana: public ActivatedAbilityTP
{

View File

@@ -151,6 +151,7 @@ class GameObserver{
bool undo();
bool isLoading(){ return mLoading; };
void Mulligan(Player* player = NULL);
void serumMulligan(Player* player = NULL);
Player* getPlayer(size_t index) { return players[index];};
bool isStarted() { return (mLayers!=NULL);};
RandomGenerator* getRandomGenerator() { return &randomGenerator; };

View File

@@ -219,7 +219,8 @@ class Constants
LURE = 101,
NOLEGEND = 102,
CANPLAYFROMGRAVEYARD = 103,
NB_BASIC_ABILITIES = 104,
TOKENIZER = 104,
NB_BASIC_ABILITIES = 105,
RARITY_S = 'S', //Special Rarity

View File

@@ -68,6 +68,8 @@ public:
MTGInPlay * inPlay();
ManaPool * getManaPool();
void takeMulligan();
void serumMulligan();
bool DeadLifeState();
ManaCost * doesntEmpty;
ManaCost * poolDoesntEmpty;
void cleanupPhase();