Skip to content

Commit

Permalink
Floundering: show monster status
Browse files Browse the repository at this point in the history
  • Loading branch information
chucksellick committed Aug 23, 2024
1 parent cc958f5 commit f05e114
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crawl-ref/source/describe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6167,6 +6167,8 @@ static string _monster_stat_description(const monster_info& mi, bool mark_spells
else
result << " (at present)";
}
if (mi.floundering())
result << " (floundering)";
result << ".\n";
}
result << _monster_attacks_description(mi);
Expand Down
7 changes: 7 additions & 0 deletions crawl-ref/source/mon-info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ monster_info::monster_info(const monster* m, int milev)

if (m->airborne())
mb.set(MB_AIRBORNE);
if (m->floundering())
mb.set(MB_FLOUNDERING);
if (mons_wields_two_weapons(*m))
mb.set(MB_TWO_WEAPONS);
if (!mons_can_regenerate(*m))
Expand Down Expand Up @@ -1719,6 +1721,11 @@ bool monster_info::ground_level() const
return !airborne();
}

bool monster_info::floundering() const
{
return is(MB_FLOUNDERING);
}

bool monster_info::fellow_slime() const {
return attitude == ATT_GOOD_NEUTRAL
&& have_passive(passive_t::neutral_slimes)
Expand Down
2 changes: 2 additions & 0 deletions crawl-ref/source/mon-info.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ enum monster_info_flags
MB_FROZEN_IN_TERROR,
MB_SOUL_SPLINTERED,
MB_BYPASS_ARMOUR,
MB_FLOUNDERING,
NUM_MB_FLAGS
};

Expand Down Expand Up @@ -429,6 +430,7 @@ struct monster_info : public monster_info_base
bool cannot_move() const;
bool airborne() const;
bool ground_level() const;
bool floundering() const;

bool is_named() const
{
Expand Down

0 comments on commit f05e114

Please sign in to comment.