fixed tapped for mana events not working for sacrificed tokens

This commit is contained in:
Evan Kranzler 2021-07-30 21:54:00 -04:00
parent f4e454c54c
commit 4125d1eb46
2 changed files with 25 additions and 0 deletions

View file

@ -22,6 +22,7 @@ import mage.game.command.Emblem;
import mage.game.command.Plane;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentToken;
import mage.game.stack.Spell;
import mage.game.stack.StackAbility;
import mage.players.Player;
@ -1258,6 +1259,10 @@ public abstract class AbilityImpl implements Ability {
@Override
public Permanent getSourcePermanentOrLKI(Game game) {
Permanent permanent = game.getPermanentOrLKIBattlefield(getSourceId());
if (permanent instanceof PermanentToken) {
return permanent;
}
if (getSourceObjectZoneChangeCounter() == 0
|| getSourceObjectZoneChangeCounter() == game.getState().getZoneChangeCounter(getSourceId())) {
return game.getPermanent(getSourceId());