@@ -658,6 +658,14 @@ private:
|
||||
{
|
||||
intValue = target->controller()->lifeLostThisTurn;
|
||||
}
|
||||
else if (s == "oplifegain")
|
||||
{
|
||||
intValue = target->controller()->opponent()->lifeGainedThisTurn;
|
||||
}
|
||||
else if (s == "lifegain")
|
||||
{
|
||||
intValue = target->controller()->lifeGainedThisTurn;
|
||||
}
|
||||
else if (s == "pdcount")
|
||||
{
|
||||
intValue = target->controller()->damageCount;
|
||||
|
||||
@@ -27,11 +27,12 @@ public:
|
||||
int preventable;
|
||||
int thatmuch;
|
||||
int lifeLostThisTurn;
|
||||
int lifeGainedThisTurn;
|
||||
DamageableType type_as_damageable;
|
||||
Damageable(GameObserver* observer, int _life)
|
||||
: Targetable(observer), life(_life), handsize(0),
|
||||
poisonCount(0), damageCount(0), preventable(0), thatmuch(0),
|
||||
lifeLostThisTurn(0), type_as_damageable(DAMAGEABLE_MTGCARDINSTANCE)
|
||||
lifeLostThisTurn(0), lifeGainedThisTurn(0), type_as_damageable(DAMAGEABLE_MTGCARDINSTANCE)
|
||||
{}
|
||||
int getLife(){return life;}
|
||||
virtual int dealDamage(int damage){life-=damage;return life;}
|
||||
|
||||
@@ -248,6 +248,8 @@ void GameObserver::nextGamePhase()
|
||||
currentPlayer->prowledTypes.clear();
|
||||
currentPlayer->lifeLostThisTurn = 0;
|
||||
currentPlayer->opponent()->lifeLostThisTurn = 0;
|
||||
currentPlayer->lifeGainedThisTurn = 0;
|
||||
currentPlayer->opponent()->lifeGainedThisTurn = 0;
|
||||
currentPlayer->doesntEmpty->remove(currentPlayer->doesntEmpty);
|
||||
currentPlayer->opponent()->doesntEmpty->remove(currentPlayer->opponent()->doesntEmpty);
|
||||
nextPlayer();
|
||||
|
||||
@@ -166,6 +166,10 @@ int Player::gainOrLoseLife(int value)
|
||||
life+=value;
|
||||
if (value<0)
|
||||
lifeLostThisTurn += abs(value);
|
||||
else if (value > 0)
|
||||
{
|
||||
lifeGainedThisTurn += abs(value);
|
||||
}
|
||||
|
||||
//Send life event to listeners
|
||||
WEvent * lifed = NEW WEventLife(this,value);
|
||||
|
||||
Reference in New Issue
Block a user