From 37ffd29a84d48b08c2ef799a271f3ab83202a03a Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 1 Dec 2007 18:30:23 +0000 Subject: Add one more cleanup of protection from harm. Since there's more than one type of it now, expand god_protects_from_harm() to include the logic for when certain gods do it. Also, as brought up on crawl-ref-discuss, make Elyvilon do it both casually and during prayer. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2959 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/religion.h') diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h index bce7b64b39..989f2b716a 100644 --- a/crawl-ref/source/religion.h +++ b/crawl-ref/source/religion.h @@ -23,6 +23,15 @@ class actor; class monsters; +enum harm_protection_type +{ + HPT_NONE = 0, + HPT_PRAYING, + HPT_ANYTIME, + HPT_PRAYING_PLUS_ANYTIME, + NUM_HPTS +}; + bool is_priest_god(god_type god); void simple_god_message( const char *event, god_type which_deity = GOD_NO_GOD ); int piety_breakpoint(int i); @@ -47,7 +56,7 @@ int piety_rank(int piety = -1); void offer_items(); bool god_likes_butchery(god_type god); bool god_hates_butchery(god_type god); -bool god_protects_from_harm(god_type god); +harm_protection_type god_protects_from_harm(god_type god, bool actual = true); void god_smites_you(god_type god, kill_method_type death_type, const char *message = NULL); void divine_retribution(god_type god); -- cgit v1.2.3-54-g00ecf