Skip to content

Commit

Permalink
add has_flag override attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
b3brodie committed Dec 14, 2024
1 parent ad9d669 commit 1931328
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/character.h
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ class Character : public Creature, public visitable
/** This is to prevent clang complaining about overloading a virtual function, the creature version uses monster flags so confusion is unlikely. */
using Creature::has_flag;
/** Returns true if player has a trait, bionic, effect, bodypart, or martial arts buff with a flag */
bool has_flag( const json_character_flag &flag ) const;
bool has_flag( const json_character_flag &flag ) const override;
/** Returns the count of traits, bionics, effects, bodyparts, and martial arts buffs with a flag */
int count_flag( const json_character_flag &flag ) const;

Expand Down
2 changes: 1 addition & 1 deletion src/monster.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class monster : public Creature
bool has_flag( const mon_flag_id &f ) const final;
// Evaluates monster for both JSON and monster flags (converted to mon_flag_id)
using Creature::has_flag;
bool has_flag( const flag_id &f ) const;
bool has_flag( const flag_id &f ) const override;
bool can_see() const; // MF_SEES and no MF_BLIND
bool can_hear() const; // MF_HEARS and no MF_DEAF
bool can_submerge() const; // MF_AQUATIC or swims() or MF_NO_BREATH, and not MF_ELECTRONIC
Expand Down

0 comments on commit 1931328

Please sign in to comment.