Fix the other two effects which exchange life totals with power/toughness to check to make sure that the permanent is a creature.

This commit is contained in:
Grath 2025-08-22 12:17:56 -04:00
parent dd67682c12
commit f3d6855965
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ class EvraHalcyonWitnessEffect extends OneShotEffect {
Player player = game.getPlayer(source.getControllerId());
if (player != null && player.isLifeTotalCanChange()) {
Permanent perm = game.getPermanent(source.getSourceId());
if (perm != null) {
if (perm != null && perm.isCreature()) {
int amount = perm.getPower().getValue();
int life = player.getLife();
if (life == amount) {

View file

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