Fixed some primitives, fixed several bug on damage management for planeswalkers and battle cards, added new keywords "noloyaltydamage" and "nodefensedamage" to avoid damage remove counters,

This commit is contained in:
Vittorio Alfieri
2023-05-22 01:19:15 +02:00
parent dd28f274d1
commit 2374b00dfd
10 changed files with 53 additions and 38 deletions

View File

@@ -1240,6 +1240,10 @@ public:
e->damage->target->exceededDamage = e->damage->target->life;
e->damage->source->exceededDamage = e->damage->target->life;
this->source->exceededDamage = e->damage->target->life;
} else {
e->damage->target->exceededDamage = 0;
e->damage->source->exceededDamage = 0;
this->source->exceededDamage = 0;
}
triggeredTurn = game->turn;

View File

@@ -33,7 +33,7 @@ public:
DamageableType type_as_damageable;
Damageable(GameObserver* observer, int _life)
: Targetable(observer), life(_life), handsize(0),
poisonCount(0), damageCount(0), preventable(0), thatmuch(0),
poisonCount(0), damageCount(0), preventable(0), thatmuch(0), exceededDamage(0),
lifeLostThisTurn(0), lifeGainedThisTurn(0), type_as_damageable(DAMAGEABLE_MTGCARDINSTANCE)
{}
int getLife(){return life;}

View File

@@ -341,7 +341,9 @@ class Constants
NODAMAGEREMOVED = 213,
BACKGROUNDPARTNER = 214,
BOTTOMLIBRARYDEATH = 215,
NB_BASIC_ABILITIES = 216,
NOLOYALTYDAMAGE = 216,
NODEFENSEDAMAGE = 217,
NB_BASIC_ABILITIES = 218,
RARITY_S = 'S', //Special Rarity
RARITY_M = 'M', //Mythics