From 5fd0f93f26f6fee5f99e274d3110867d2bfd6558 Mon Sep 17 00:00:00 2001 From: Anton Burmistrov Date: Fri, 9 Dec 2022 07:13:48 +0400 Subject: [PATCH] If we upgrade into a blacklisted monster, treat it as though we are non-upgradeable (#62626) Co-Authored-By: Rhxydos <30204365+Rhxydos@users.noreply.github.com> Co-authored-by: Rhxydos <30204365+Rhxydos@users.noreply.github.com> --- src/monster.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/monster.cpp b/src/monster.cpp index fa15710cd2b12..a43a0f6eb4aac 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -382,6 +382,10 @@ void monster::try_upgrade( bool pin_time ) } if( type->upgrade_into ) { + //If we upgrade into a blacklisted monster, treat it as though we are non-upgradeable + if( MonsterGroupManager::monster_is_blacklisted( type->upgrade_into ) ) { + return; + } poly( type->upgrade_into ); } else { mtype_id new_type;