00001
00002
00003
00004
00005
00006
00007
00008 #ifndef RELIGION_H
00009 #define RELIGION_H
00010
00011 #include "enum.h"
00012 #include "externs.h"
00013 #include "ouch.h"
00014 #include "mon-iter.h"
00015 #include "player.h"
00016
00017 #include "religion-enum.h"
00018
00019 #define MAX_PIETY 200
00020 #define HALF_MAX_PIETY (MAX_PIETY / 2)
00021
00022 #define MAX_PENANCE 200
00023
00024 bool is_evil_god(god_type god);
00025 bool is_good_god(god_type god);
00026 bool is_chaotic_god(god_type god);
00027
00028
00029
00030 bool is_unavailable_god(god_type god);
00031 void simple_god_message(const char *event, god_type which_deity = you.religion);
00032 int piety_breakpoint(int i);
00033 std::string god_name(god_type which_god, bool long_name = false);
00034 std::string god_name_jiyva(bool second_name = false);
00035 god_type str_to_god(const std::string name, bool exact = true);
00036
00037 std::string get_god_powers(god_type which_god);
00038 std::string get_god_likes(god_type which_god, bool verbose = false);
00039 std::string get_god_dislikes(god_type which_god, bool verbose = false);
00040
00041 void dec_penance(int val);
00042 void dec_penance(god_type god, int val);
00043
00044 void excommunication(god_type new_god = GOD_NO_GOD);
00045
00046 void gain_piety(int pgn, int denominator = 1,
00047 bool force = false, bool should_scale_piety = true);
00048 void dock_piety(int pietyloss, int penance);
00049 void god_speaks(god_type god, const char *mesg);
00050 void lose_piety(int pgn);
00051 void handle_god_time(void);
00052 int god_colour(god_type god);
00053 uint8_t god_message_altar_colour(god_type god);
00054 bool player_can_join_god(god_type which_god);
00055 bool transformed_player_can_join_god(god_type which_god);
00056 void god_pitch(god_type which_god);
00057 int piety_rank(int piety = -1);
00058 int piety_scale(int piety_change);
00059 bool god_hates_your_god(god_type god,
00060 god_type your_god = you.religion);
00061 std::string god_hates_your_god_reaction(god_type god,
00062 god_type your_god = you.religion);
00063 bool god_hates_cannibalism(god_type god);
00064 bool god_hates_killing(god_type god, const monster* mon);
00065 bool god_likes_fresh_corpses(god_type god);
00066 bool god_likes_butchery(god_type god);
00067 bool god_likes_spell(spell_type spell, god_type god);
00068 bool god_hates_spell(spell_type spell, god_type god);
00069 harm_protection_type god_protects_from_harm(god_type god, bool actual = true);
00070 bool jiyva_is_dead();
00071 bool fedhas_protects(const monster* target);
00072 bool fedhas_protects_species(int mc);
00073 bool fedhas_neutralises(const monster* target);
00074 void print_sacrifice_message(god_type, const item_def &,
00075 piety_gain_t, bool = false);
00076 void nemelex_death_message();
00077
00078 bool tso_unchivalric_attack_safe_monster(const monster* mon);
00079
00080 void mons_make_god_gift(monster* mon, god_type god = you.religion);
00081 bool mons_is_god_gift(const monster* mon, god_type god = you.religion);
00082
00083 int yred_random_servants(unsigned int threshold, bool force_hostile = false);
00084 bool is_undead_slave(const monster* mon);
00085 bool is_yred_undead_slave(const monster* mon);
00086 bool is_orcish_follower(const monster* mon);
00087 bool is_fellow_slime(const monster* mon);
00088 bool is_neutral_plant(const monster* mon);
00089 bool is_follower(const monster* mon);
00090 bool bless_follower(monster* follower = NULL,
00091 god_type god = you.religion,
00092 bool (*suitable)(const monster* mon) = is_follower,
00093 bool force = false);
00094
00095 bool god_hates_attacking_friend(god_type god, const actor *fr);
00096 bool god_hates_attacking_friend(god_type god, int species);
00097 bool god_likes_item(god_type god, const item_def& item);
00098 bool god_likes_items(god_type god);
00099
00100 void get_pure_deck_weights(int weights[]);
00101
00102 void religion_turn_start();
00103 void religion_turn_end();
00104
00105 int get_tension(god_type god = you.religion);
00106 int get_monster_tension(const monster* mons, god_type god = you.religion);
00107
00108 bool do_god_gift(bool prayed_for = false, bool forced = false);
00109
00110 std::vector<god_type> temple_god_list();
00111 std::vector<god_type> nontemple_god_list();
00112
00113 extern const char* god_gain_power_messages[NUM_GODS][MAX_GOD_ABILITIES];
00114 std::string adjust_abil_message(const char *pmsg, bool allow_upgrades = true);
00115 #endif