Cant life change
This commit is contained in:
@@ -73994,6 +73994,16 @@ power=4
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Platinum Emperion
|
||||
abilities=cantchangelife
|
||||
mana={8}
|
||||
type=Artifact Creature
|
||||
subtype=Golem
|
||||
power=8
|
||||
toughness=8
|
||||
text=Your life total can't change. (You can't gain or lose life. You can't pay any amount of life except 0.)
|
||||
[/card]
|
||||
[card]
|
||||
name=Plaxcaster Frogling
|
||||
auto=counter(1/1,3)
|
||||
auto={2}:shroud target(creature[counter{1/1.1}])
|
||||
|
||||
@@ -11748,15 +11748,6 @@ power=1
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Platinum Emperion
|
||||
mana={8}
|
||||
type=Artifact Creature
|
||||
subtype=Golem
|
||||
power=8
|
||||
toughness=8
|
||||
text=Your life total can't change. (You can't gain or lose life. You can't pay any amount of life except 0.)
|
||||
[/card]
|
||||
[card]
|
||||
name=Plow Through Reito
|
||||
text=Sweep - Return any number of Plains you control to their owner's hand. Target creature gets +1/+1 until end of turn for each Plains returned this way.
|
||||
mana={1}{W}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4623,6 +4623,8 @@ int AAExchangeLife::resolve()
|
||||
Damageable * _target = (Damageable *) getTarget();
|
||||
if (_target)
|
||||
{
|
||||
if(_target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER && ((Player*)_target)->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
return 0;
|
||||
Player *player = source->controller();
|
||||
int oldlife = player->getLife();
|
||||
int targetOldLife = _target->getLife();
|
||||
|
||||
@@ -196,7 +196,8 @@ int Damage::resolve()
|
||||
{
|
||||
//Damage + 1, 2, or 3 poison counters on player
|
||||
Player * _target = (Player *) target;
|
||||
a = target->dealDamage(damage);
|
||||
if(!_target->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
a = target->dealDamage(damage);
|
||||
target->damageCount += damage;
|
||||
if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes.
|
||||
{
|
||||
@@ -228,7 +229,10 @@ int Damage::resolve()
|
||||
{
|
||||
// "Normal" case,
|
||||
//return the left over amount after effects have been applied to them.
|
||||
a = target->dealDamage(damage);
|
||||
if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER && !((Player *)target)->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
a = target->dealDamage(damage);
|
||||
else
|
||||
a = target->dealDamage(damage);
|
||||
target->damageCount += damage;//the amount must be the actual damage so i changed this from 1 to damage, this fixes pdcount and odcount
|
||||
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE){
|
||||
((MTGCardInstance*)target)->wasDealtDamage = true;
|
||||
|
||||
@@ -245,7 +245,7 @@ LifeCost::LifeCost(TargetChooser *_tc)
|
||||
int LifeCost::canPay()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if(_target->controller()->life <= 0)
|
||||
if(_target->controller()->life <= 0 || _target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -283,7 +283,7 @@ SpecificLifeCost::SpecificLifeCost(TargetChooser *_tc, int slc)
|
||||
int SpecificLifeCost::canPay()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if(_target->controller()->life >= slc)
|
||||
if(_target->controller()->life >= slc && !_target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4389,8 +4389,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
|
||||
case 130553:// Beacon of Immortality
|
||||
{
|
||||
Player * player = spell->getNextPlayerTarget();
|
||||
if (player->life < (INT_MAX / 4))
|
||||
player->life += player->life;
|
||||
if (!player->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
{
|
||||
if (player->life < (INT_MAX / 4))
|
||||
player->life += player->life;
|
||||
}
|
||||
zones->putInZone(card, spell->from, zones->library);
|
||||
zones->library->shuffle();
|
||||
break;
|
||||
@@ -5771,7 +5774,7 @@ const string AManaProducer::getMenuText()
|
||||
menutext.append(",");
|
||||
sprintf(buffer, "%i ", value);
|
||||
menutext.append(buffer);
|
||||
if (i == Constants::MTG_COLOR_WASTE)
|
||||
if (i == Constants::MTG_COLOR_WASTE)
|
||||
menutext.append(_(" colorless"));
|
||||
else if (i >= Constants::MTG_COLOR_GREEN && i <= Constants::MTG_COLOR_WASTE)
|
||||
menutext.append(_(Constants::MTGColorStrings[i]));
|
||||
|
||||
@@ -153,7 +153,8 @@ const char* Constants::MTGBasicAbilities[] = {
|
||||
"trinisphere",
|
||||
"canplayfromexile",
|
||||
"libraryeater",
|
||||
"devoid"
|
||||
"devoid",
|
||||
"cantchangelife"
|
||||
};
|
||||
|
||||
map<string,int> Constants::MTGBasicAbilitiesMap;
|
||||
|
||||
@@ -882,7 +882,6 @@ int ManaCost::pay(ManaCost * _cost)
|
||||
ManaCost * diff = Diff(toPay);
|
||||
for (int i = 0; i < Constants::NB_Colors; i++)
|
||||
{
|
||||
|
||||
cost[i] = diff->getCost(i);
|
||||
}
|
||||
delete diff;
|
||||
|
||||
@@ -162,7 +162,8 @@ int Player::gainOrLoseLife(int value)
|
||||
thatmuch = abs(value); //the value that much is a variable to be used with triggered abilities.
|
||||
//ie:when ever you gain life, draw that many cards. when used in a trigger draw:thatmuch, will return the value
|
||||
//that the triggered event stored in the card for "that much".
|
||||
life+=value;
|
||||
if (!inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
life+=value;
|
||||
if (value<0)
|
||||
lifeLostThisTurn += abs(value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user