diff options
-rw-r--r-- | crawl-ref/source/externs.h | 5 | ||||
-rw-r--r-- | crawl-ref/source/mon-data.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 9 |
4 files changed, 20 insertions, 4 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 8626972a11..c8f294523c 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -246,6 +246,9 @@ public: virtual bool submerged() const = 0; virtual bool floundering() const = 0; + // Returns true if the actor is exceptionally well balanced. + virtual bool extra_balanced() const = 0; + virtual int get_experience_level() const = 0; virtual bool can_pass_through_feat(dungeon_feature_type grid) const = 0; @@ -845,6 +848,7 @@ public: bool swimming() const; bool submerged() const; bool floundering() const; + bool extra_balanced() const; bool can_pass_through_feat(dungeon_feature_type grid) const; size_type body_size(int psize = PSIZE_TORSO, bool base = false) const; int body_weight() const; @@ -1172,6 +1176,7 @@ public: bool submerged() const; bool can_drown() const; bool floundering() const; + bool extra_balanced() const; bool can_pass_through_feat(dungeon_feature_type grid) const; size_type body_size(int psize = PSIZE_TORSO, bool base = false) const; int body_weight() const; diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 45e3d1edc5..941caf03af 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -4252,7 +4252,7 @@ static monsterentry mondata[] = { { MONS_CEREBOV, '&', RED, "Cerebov", M_FIGHTER | M_SPELLCASTER | M_SEE_INVIS | M_SPEAKS | M_EVIL | M_UNIQUE, - MR_RES_ELEC | MR_RES_POISON | mrd(MR_RES_HELLFIRE, 3), + MR_RES_POISON | mrd(MR_RES_HELLFIRE, 3), 0, 15, MONS_CEREBOV, MONS_CEREBOV, MH_DEMONIC, -6, { {AT_HIT, AF_PLAIN, 60}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 21, 0, 0, 650 }, diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index c415a1a5ea..997a503406 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -2996,6 +2996,11 @@ bool monsters::submerged() const return (mons_is_submerged(this)); } +bool monsters::extra_balanced() const +{ + return (mons_genus(type) == MONS_NAGA); +} + bool monsters::floundering() const { const dungeon_feature_type grid = grd(pos()); @@ -3004,7 +3009,8 @@ bool monsters::floundering() const // for non-water monsters in shallow water. && mons_habitat(this) != HT_WATER && !mons_amphibious(this) - && !mons_flies(this)); + && !mons_flies(this) + && !extra_balanced()); } bool mons_class_can_pass(const int mclass, const dungeon_feature_type grid) diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 799b038380..fe0e26a6fc 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3636,7 +3636,7 @@ int check_stealth(void) // Merfolk can sneak up on monsters underwater -- bwr if (you.species == SP_MERFOLK) stealth += 50; - else if ( !player_can_swim() ) + else if ( !player_can_swim() && !you.extra_balanced() ) stealth /= 2; // splashy-splashy } else if (player_mutation_level(MUT_HOOVES)) @@ -5724,9 +5724,14 @@ bool player::has_spell(spell_type spell) const return (false); } +bool player::extra_balanced() const +{ + return (species == SP_NAGA); +} + bool player::floundering() const { - return in_water() && !can_swim(); + return in_water() && !can_swim() && !extra_balanced(); } bool player::can_pass_through_feat(dungeon_feature_type grid) const |