Remove KickerAbility.getSpellKickedCount (#12553)

* Remove KickerAbility.getSpellKickedCount

* Check spell LKI instead of only current spell object

* Remove bad LKI storage under wrong ID
This commit is contained in:
ssk97 2024-07-22 20:13:48 -07:00 committed by GitHub
parent 2118570a0d
commit 78649c1a62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 91 additions and 127 deletions

View file

@ -1727,7 +1727,8 @@ public final class CardUtil {
/**
* Returns the entire cost tags map of either the source ability, or the permanent source of the ability. May be null.
* Works in any moment (even before source ability activated)
* Usually you should use one of the single tag functions instead: getSourceCostsTag() or checkSourceCostsTagExists()
* <p>
* Usually you should use one of the single tag functions instead: getSourceCostsTag() or checkSourceCostsTagExists().
* Use this function with caution, as it directly exposes the backing data structure.
*
* @param game
@ -1751,9 +1752,9 @@ public final class CardUtil {
}
// from any ability before resolve (on stack) - access by spell ability
MageObject sourceObject = source.getSourceObject(game);
if (sourceObject instanceof Spell) {
return ((Spell) sourceObject).getSpellAbility().getCostsTagMap();
Spell sourceObject = game.getSpellOrLKIStack(source.getSourceId());
if (sourceObject != null) {
return sourceObject.getSpellAbility().getCostsTagMap();
}
return null;