Make Tree of Perdition's effect check to make sure that it's a creature before swapping toughness, because noncreatures do not have toughness.

This commit is contained in:
Grath 2025-08-22 12:15:29 -04:00
parent ca8b02d5ab
commit dd67682c12

View file

@ -63,7 +63,7 @@ class TreeOfPerditionEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player opponent = game.getPlayer(source.getFirstTarget());
Permanent perm = game.getPermanent(source.getSourceId());
if (perm == null || opponent == null || !opponent.isLifeTotalCanChange()) {
if (perm == null || opponent == null || !opponent.isLifeTotalCanChange() || !perm.isCreature()) {
return false;
}