Skip to content

Commit

Permalink
If we upgrade into a blacklisted monster, treat it as though we are n…
Browse files Browse the repository at this point in the history
…on-upgradeable (CleverRaven#62626)

Co-Authored-By: Rhxydos <[email protected]>

Co-authored-by: Rhxydos <[email protected]>
  • Loading branch information
Night-Pryanik and Rhxydos authored Dec 9, 2022
1 parent 6e617f6 commit 5fd0f93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5fd0f93

Please sign in to comment.