From d94c7e9f87b997f6ed27fda3252b70ec461f5288 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 30 Jun 2008 03:37:17 +0000 Subject: Simplify. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6232 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monplace.cc | 2 +- crawl-ref/source/religion.cc | 13 ++++--------- crawl-ref/source/religion.h | 1 - 3 files changed, 5 insertions(+), 11 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index d17b46d5e4..150e2588ad 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -2075,7 +2075,7 @@ bool player_will_anger_monster(monsters *mon, bool *holy, const bool isUnholy = (is_evil_god(you.religion) && mons_is_holy(mon)); const bool isLawful = - (is_lawful_god(you.religion) && mons_is_chaotic(mon)); + (you.religion == GOD_ZIN && mons_is_chaotic(mon)); const bool isAntimagical = (you.religion == GOD_TROG && mons_is_magic_user(mon)); diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 851dc78e81..8c0c97ca2a 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -441,11 +441,6 @@ bool is_chaotic_god(god_type god) || god == GOD_MAKHLEB); } -bool is_lawful_god(god_type god) -{ - return (god == GOD_ZIN); -} - bool is_priest_god(god_type god) { return (god == GOD_ZIN @@ -4273,7 +4268,7 @@ static bool _chaotic_beings_on_level_attitude_change() // If you worship Zin, you make all friendly and good neutral // chaotic beings hostile. - if (is_lawful_god(you.religion) && mons_wont_attack(monster)) + if (you.religion == GOD_ZIN && mons_wont_attack(monster)) { monster->attitude = ATT_HOSTILE; monster->del_ench(ENCH_CHARM, true); @@ -5508,7 +5503,7 @@ void god_pitch(god_type which_god) // hostile. if (is_good_god(you.religion) && _evil_beings_attitude_change()) mpr("Your evil allies forsake you.", MSGCH_MONSTER_ENCHANT); - if (is_lawful_god(you.religion) && _chaotic_beings_attitude_change()) + if (you.religion == GOD_ZIN && _chaotic_beings_attitude_change()) mpr("Your chaotic allies forsake you.", MSGCH_MONSTER_ENCHANT); if (you.religion == GOD_TROG && _magic_users_attitude_change()) mpr("Your magic-using allies forsake you.", MSGCH_MONSTER_ENCHANT); @@ -5570,7 +5565,7 @@ bool god_hates_your_god(god_type god, return (true); // Zin hates Xom and Makhleb. - if (is_lawful_god(god) && is_chaotic_god(your_god)) + if (god == GOD_ZIN && is_chaotic_god(your_god)) return (true); return (is_evil_god(your_god)); @@ -5586,7 +5581,7 @@ std::string god_hates_your_god_reaction(god_type god, return ""; // Zin hates Xom and Makhleb. - if (is_lawful_god(god) && is_chaotic_god(your_god)) + if (god == GOD_ZIN && is_chaotic_god(your_god)) return " for chaos"; if (is_evil_god(your_god)) diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h index fbd6afbf38..f925b5e4f2 100644 --- a/crawl-ref/source/religion.h +++ b/crawl-ref/source/religion.h @@ -54,7 +54,6 @@ struct god_conduct_trigger bool is_evil_god(god_type god); bool is_good_god(god_type god); bool is_chaotic_god(god_type god); -bool is_lawful_god(god_type god); bool is_priest_god(god_type god); bool god_gives_permanent_followers(god_type god); void simple_god_message(const char *event, god_type which_deity = you.religion); -- cgit v1.2.3-54-g00ecf