diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-24 06:32:59 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-24 06:32:59 +0000 |
commit | 27a42940bf6942306c74fa5a52abcf1e69e56b1d (patch) | |
tree | 1bb4b462a4a2f9af78bace1b93264efb4adb3b72 | |
parent | 78146d5a232fb482d827b0110dee0cb9d2f2b9df (diff) | |
download | crawl-ref-27a42940bf6942306c74fa5a52abcf1e69e56b1d.tar.gz crawl-ref-27a42940bf6942306c74fa5a52abcf1e69e56b1d.zip |
Make zombified orcs vulnerable to weapons of orc slaying, too.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7581 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/fight.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 15 | ||||
-rw-r--r-- | crawl-ref/source/misc.h | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index ab988bcf71..40ac2c348d 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2154,7 +2154,7 @@ bool melee_attack::apply_damage_brand() break; case SPWPN_ORC_SLAYING: - if (defender->mons_species() == MONS_ORC) + if (is_orckind(defender, def)) { special_damage = 1 + random2(3*damage_done/2); if (defender_visible) diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index ace70f6b3d..3ea8557f0f 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2862,6 +2862,21 @@ bool stop_attack_prompt(const monsters *mon, bool beam_attack, return (retval); } +bool is_orckind(const actor *act, const monsters *mon) +{ + if (mons_genus(act->mons_species()) == MONS_ORC) + return (true); + + if (act->atype() == ACT_MONSTER + && mons_is_zombified(mon) + && mons_genus(mon->base_monster) == MONS_ORC) + { + return (true); + } + + return (false); +} + bool is_dragonkind(const actor *act, const monsters *mon) { if (mons_genus(act->mons_species()) == MONS_DRAGON diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h index 4c46506d0e..0eb05999b0 100644 --- a/crawl-ref/source/misc.h +++ b/crawl-ref/source/misc.h @@ -110,6 +110,8 @@ std::string your_hand(bool plural); bool stop_attack_prompt(const monsters *mon, bool beam_attack, bool beam_target); +bool is_orckind(const actor *act, const monsters *mon); + bool is_dragonkind(const actor *act, const monsters *mon); #endif |