summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-14 12:29:29 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-14 12:29:29 +0000
commit9eff4a73889f90cea1f4d5c869205f9e127c20c5 (patch)
treedb8a7412bd3132f56ec023c3b1fe826b06377be0 /crawl-ref/source
parent4efe1cbf594c4dc47e67a1ed30f038202d21dc8a (diff)
downloadcrawl-ref-9eff4a73889f90cea1f4d5c869205f9e127c20c5.tar.gz
crawl-ref-9eff4a73889f90cea1f4d5c869205f9e127c20c5.zip
Player and monster naga no longer flounder or lose stealth in shallow water, and water creatures do not get double damage vs naga in shallow water. This is on account of naga being very clever at keeping themselves stable with their tails :P The reduced movement speed in shallow water still applies, and invisible naga in shallow water are still revealed.
Removed Cerebov's shock resistance - he no longer uses lightning bolt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6920 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/externs.h5
-rw-r--r--crawl-ref/source/mon-data.h2
-rw-r--r--crawl-ref/source/mon-util.cc8
-rw-r--r--crawl-ref/source/player.cc9
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