From 8d5b0016051005ca53981b9e6908e318d8f3163c Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 16 Nov 2008 19:13:32 +0000 Subject: 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 --- crawl-ref/source/externs.h | 3 +++ crawl-ref/source/mon-util.cc | 5 +++++ crawl-ref/source/player.cc | 16 +++++++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source') 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()); -- cgit v1.2.3-54-g00ecf