Updated an AI commander deck, improved damage and life and manaproduce ability to send the correct source card on triggers when they are used inside the "ability$!!$" keyword, fixed issue #1090 about filtering cards with add{c} instead of add{1} ability.

This commit is contained in:
Vittorio Alfieri
2023-05-30 00:08:25 +02:00
parent c17abc3dca
commit 4f4addb8e9
5 changed files with 32 additions and 9 deletions

View File

@@ -24,7 +24,10 @@ void Damage::init(MTGCardInstance * _source, Damageable * _target, int _damage,
{
typeOfDamage = _typeOfDamage;
target = _target;
source = _source;
if(_source && _source->name.empty() && _source->storedSourceCard) // Fix for damage dealt inside ability$!!$ keyword.
source = _source->storedSourceCard;
else
source = _source;
if (_damage < 0)
_damage = 0; //Negative damages cannot happen