diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-05 18:13:37 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-05 18:13:37 -0600 |
commit | dae931699043dca46c7617bf182d1216b1d35e99 (patch) | |
tree | 385144e9585226d544dc9f2a26f020e9cce9d766 | |
parent | 5d7f8159beb2d6fb6bf00967a65e900069490c1e (diff) | |
download | crawl-ref-dae931699043dca46c7617bf182d1216b1d35e99.tar.gz crawl-ref-dae931699043dca46c7617bf182d1216b1d35e99.zip |
Reorder a few functions.
-rw-r--r-- | crawl-ref/source/actor.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/monster.cc | 14 | ||||
-rw-r--r-- | crawl-ref/source/monster.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 14 | ||||
-rw-r--r-- | crawl-ref/source/player.h | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index ac4726c95a..cced93cb0c 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -167,8 +167,8 @@ public: virtual int mons_species() const = 0; virtual mon_holy_type holiness() const = 0; - virtual bool is_evil() const = 0; virtual bool is_unholy() const = 0; + virtual bool is_evil() const = 0; virtual bool is_chaotic() const = 0; virtual int res_fire() const = 0; virtual int res_steam() const = 0; diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 5b3445ffac..fd07573d2e 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -2867,6 +2867,13 @@ mon_holy_type monsters::holiness() const return (mons_class_holiness(type)); } +bool monsters::is_unholy() const +{ + const mon_holy_type holi = holiness(); + + return (holi == MH_UNDEAD || holi == MH_DEMONIC); +} + bool monsters::is_evil() const { if (is_unholy()) @@ -2885,13 +2892,6 @@ bool monsters::is_evil() const return (false); } -bool monsters::is_unholy() const -{ - const mon_holy_type holi = holiness(); - - return (holi == MH_UNDEAD || holi == MH_DEMONIC); -} - bool monsters::is_chaotic() const { if (type == MONS_UGLY_THING || type == MONS_VERY_UGLY_THING) diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index 5b3e85ae98..1eb019347a 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -293,8 +293,8 @@ public: int mons_species() const; mon_holy_type holiness() const; - bool is_evil() const; bool is_unholy() const; + bool is_evil() const; bool is_chaotic() const; int res_fire() const; int res_steam() const; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index c1615cd205..7814a4da7c 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6378,6 +6378,13 @@ mon_holy_type player::holiness() const return (MH_NATURAL); } +bool player::is_unholy() const +{ + const mon_holy_type holi = holiness(); + + return (holi == MH_UNDEAD || holi == MH_DEMONIC); +} + bool player::is_evil() const { if (is_unholy()) @@ -6389,13 +6396,6 @@ bool player::is_evil() const return (false); } -bool player::is_unholy() const -{ - const mon_holy_type holi = holiness(); - - return (holi == MH_UNDEAD || holi == MH_DEMONIC); -} - bool player::is_chaotic() const { if (is_chaotic_god(religion)) diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 8ec9756c8d..a2c4acb21b 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -426,8 +426,8 @@ public: int mons_species() const; mon_holy_type holiness() const; - bool is_evil() const; bool is_unholy() const; + bool is_evil() const; bool is_chaotic() const; int res_fire() const; int res_steam() const; |