Cant life change

This commit is contained in:
Anthony Calosa
2016-06-02 09:10:30 +08:00
parent aaf2d271bc
commit aabb905313
11 changed files with 37 additions and 24 deletions

View File

@@ -2401,7 +2401,8 @@ public:
{
if (!isReactingToClick(_card)) return 0;
game->currentlyActing()->getManaPool()->pay(cost);
game->currentlyActing()->life += life;
if(!game->currentlyActing()->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
game->currentlyActing()->life += life;
lastUsedOn = lastChecked;
return 1;
}
@@ -3009,7 +3010,7 @@ public:
{
if (newPhase != currentPhase && newPhase == phase && game->currentPlayer == ((MTGCardInstance *) target)->controller())
{
if (!onlyIfTargetTapped || ((MTGCardInstance *) target)->isTapped())
if (!onlyIfTargetTapped || ((MTGCardInstance *) target)->isTapped() && !game->currentPlayer->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
{
if (life > 0)
{
@@ -4592,7 +4593,7 @@ public:
void Update(float)
{
if (newPhase != currentPhase && newPhase == phase)
if (newPhase != currentPhase && newPhase == phase && !game->currentPlayer->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
{
if ((controller && game->currentPlayer == source->controller()) || (!controller && game->currentPlayer
!= source->controller()))
@@ -6238,7 +6239,7 @@ public:
{
Player * p = (Player *) isDamaged->damage->target;
WParsedInt lifetoset(life_s, NULL, source);
if(p && p == source->controller() && p->life <= lifetoset.getValue())
if(p && p == source->controller() && p->life <= lifetoset.getValue() && !p->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
p->life = lifetoset.getValue();
}
}

View File

@@ -242,7 +242,8 @@ class Constants
CANPLAYFROMEXILE = 121,
LIBRARYEATER = 122,
DEVOID = 123,
NB_BASIC_ABILITIES = 124,
CANTCHANGELIFE = 124,
NB_BASIC_ABILITIES = 125,
RARITY_S = 'S', //Special Rarity