summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-16 19:13:32 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-16 19:13:32 +0000
commit8d5b0016051005ca53981b9e6908e318d8f3163c (patch)
tree92ea0a5ae4dec893e4fbe88d80d5ba8d6094d8f0
parentb0d1c0cf7315275fa5cb8854f5e3c44a0764a616 (diff)
downloadcrawl-ref-8d5b0016051005ca53981b9e6908e318d8f3163c.tar.gz
crawl-ref-8d5b0016051005ca53981b9e6908e318d8f3163c.zip
Move asphyxiation resistance to the actor interface.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7452 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/externs.h3
-rw-r--r--crawl-ref/source/mon-util.cc5
-rw-r--r--crawl-ref/source/player.cc16
3 files changed, 19 insertions, 5 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 1a439d5a68..926aca17df 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -346,6 +346,7 @@ public:
virtual int res_steam() const = 0;
virtual int res_cold() const = 0;
virtual int res_elec() const = 0;
+ virtual int res_asphyx() const = 0;
virtual int res_poison() const = 0;
virtual int res_sticky_flame() const = 0;
virtual int res_negative_energy() const = 0;
@@ -905,6 +906,7 @@ public:
int res_steam() const;
int res_cold() const;
int res_elec() const;
+ int res_asphyx() const;
int res_poison() const;
int res_sticky_flame() const;
int res_negative_energy() const;
@@ -1255,6 +1257,7 @@ public:
int res_steam() const;
int res_cold() const;
int res_elec() const;
+ int res_asphyx() const;
int res_poison() const;
int res_sticky_flame() const;
int res_negative_energy() const;
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index e7feff2411..edc9fbd46b 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -5107,6 +5107,11 @@ int monsters::res_elec() const
return (mons_res_elec(this));
}
+int monsters::res_asphyx() const
+{
+ return (mons_res_asphyx(this));
+}
+
int monsters::res_poison() const
{
return (mons_res_poison(this));
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index a210328302..47720f878c 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1474,6 +1474,7 @@ bool player_res_asphyx()
case TRAN_AIR:
return (true);
}
+
return (false);
}
@@ -6467,11 +6468,6 @@ int player::res_fire() const
return (player_res_fire());
}
-int player::res_sticky_flame() const
-{
- return (player_res_sticky_flame());
-}
-
int player::res_steam() const
{
return (player_res_steam());
@@ -6487,11 +6483,21 @@ int player::res_elec() const
return (player_res_electricity() * 2);
}
+int player::res_asphyx() const
+{
+ return (player_res_asphyx());
+}
+
int player::res_poison() const
{
return (player_res_poison());
}
+int player::res_sticky_flame() const
+{
+ return (player_res_sticky_flame());
+}
+
int player::res_negative_energy() const
{
return (player_prot_life());