Skip to content

Commit

Permalink
Merge pull request #78745 from GuardianDll/monster_conditions
Browse files Browse the repository at this point in the history
Make monsters being able to evaluate enchantment conditions
  • Loading branch information
Maleclypse authored Dec 28, 2024
2 parents a014c17 + 6ebe7b0 commit 676f5e2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/magic_enchantment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,15 @@ bool enchantment::is_active( const Character &guy, const bool active ) const
bool enchantment::is_active( const monster &mon ) const
{
//This is very limited at the moment. Basically, we can't use any conditions except "ALWAYS"
if( active_conditions.second == condition::ALWAYS && !mon.is_fake() ) {
if( active_conditions.second == condition::ALWAYS ) {
return true;
}
// Dialogue conditions for monsters seems like overkill.
// Definitely not an excuse for not knowing how to add them. Nope! Sure isn't!

if( active_conditions.second == condition::DIALOG_CONDITION ) {
const_dialogue d( get_const_talker_for( mon ), nullptr );
return dialog_condition( d );
}

return false;
}

Expand Down

0 comments on commit 676f5e2

Please sign in to comment.