summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.h
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-24 00:50:31 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-24 00:50:31 +0000
commitdd34bc7bf8b38a93cffba657eb2658a48c2dacff (patch)
tree8af9cbdc13945b26e90f172addc532ec2b862664 /crawl-ref/source/religion.h
parent532d8dccff760d21593d5db61275e1d00a6af25b (diff)
downloadcrawl-ref-dd34bc7bf8b38a93cffba657eb2658a48c2dacff.tar.gz
crawl-ref-dd34bc7bf8b38a93cffba657eb2658a48c2dacff.zip
Generalize checks for spellbooks and rods of a particular class, or
which your god disapproves of. Now, if at least half of the spells in a spellbook or rod are in a particular class (this threshold may need adjustment; it's in is_spellbook_type()), the entire item is considered to be, too. This means that artefact spellbooks containing many evil spells may be considered evil items by good gods, as will artefact rods if/when they're implemented. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7927 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.h')
-rw-r--r--crawl-ref/source/religion.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index 406d3dbb31..a2019b7201 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -107,14 +107,31 @@ void beogh_convert_orc(monsters *orc, bool emergency,
bool is_holy_item(const item_def& item);
bool is_evil_item(const item_def& item);
bool is_chaotic_item(const item_def& item);
+bool is_holy_discipline(int discipline);
+bool is_evil_discipline(int discipline);
+bool is_holy_spell(spell_type spell, god_type god = GOD_NO_GOD);
+bool is_evil_spell(spell_type spell, god_type god = GOD_NO_GOD);
+bool is_chaotic_spell(spell_type spell, god_type god = GOD_NO_GOD);
+bool is_any_spell(spell_type spell, god_type god = GOD_NO_GOD);
+bool is_spellbook_type(const item_def& item, bool book_or_rod,
+ bool (*suitable)(spell_type spell, god_type god) =
+ is_any_spell,
+ god_type god = you.religion);
+bool is_holy_spellbook(const item_def& item);
+bool is_evil_spellbook(const item_def& item);
+bool is_chaotic_spellbook(const item_def& item);
+bool god_dislikes_spellbook(const item_def& item);
+bool is_holy_rod(const item_def& item);
+bool is_evil_rod(const item_def& item);
+bool is_chaotic_rod(const item_def& item);
+bool god_dislikes_rod(const item_def& item);
bool good_god_dislikes_item_handling(const item_def &item);
bool god_dislikes_item_handling(const item_def &item);
// NOTE: As of now, these two functions only say if a god won't give a
// spell/school when giving a gift.
bool god_dislikes_spell_type(spell_type spell, god_type god = you.religion);
-bool god_dislikes_spell_discipline(int discipline,
- god_type god = you.religion);
+bool god_dislikes_spell_discipline(int discipline, god_type god = you.religion);
bool trog_burn_spellbooks();
bool ely_destroy_weapons();