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
+5 -1
View File
@@ -190,7 +190,11 @@ int Player::gainOrLoseLife(int value, MTGCardInstance* source)
}
//Send life event to listeners
WEvent * lifed = NEW WEventLife(this, value, source);
WEvent * lifed = NULL;
if(source && source->name.empty() && source->storedSourceCard) // Fix for life gained inside ability$!!$ keyword.
lifed = NEW WEventLife(this, value, source->storedSourceCard);
else
lifed = NEW WEventLife(this, value, source);
observer->receiveEvent(lifed);
return value;