00001
00002
00003
00004
00005
00006
00007 #ifndef XOM_H
00008 #define XOM_H
00009
00010 #include "ouch.h"
00011
00012 struct item_def;
00013
00014 enum xom_message_type
00015 {
00016 XM_NORMAL,
00017 XM_INTRIGUED,
00018 NUM_XOM_MESSAGE_TYPES
00019 };
00020
00021 enum xom_event_type
00022 {
00023 XOM_DID_NOTHING = 0,
00024
00025
00026 XOM_GOOD_NOTHING,
00027 XOM_GOOD_POTION,
00028 XOM_GOOD_SPELL_TENSION,
00029 XOM_GOOD_SPELL_CALM,
00030 XOM_GOOD_MAPPING,
00031 XOM_GOOD_CONFUSION,
00032 XOM_GOOD_SINGLE_ALLY,
00033 XOM_GOOD_ANIMATE_MON_WPN,
00034 XOM_GOOD_ANNOYANCE_GIFT,
00035 XOM_GOOD_RANDOM_ITEM,
00036 XOM_GOOD_ACQUIREMENT,
00037 XOM_GOOD_ALLIES,
00038 XOM_GOOD_POLYMORPH,
00039 XOM_GOOD_SWAP_MONSTERS,
00040 XOM_GOOD_TELEPORT,
00041 XOM_GOOD_VITRIFY,
00042 XOM_GOOD_MUTATION,
00043 XOM_GOOD_MAJOR_ALLY,
00044 XOM_GOOD_LIGHTNING,
00045 XOM_GOOD_SCENERY,
00046 XOM_GOOD_SNAKES,
00047 XOM_LAST_GOOD_ACT = XOM_GOOD_SNAKES,
00048
00049
00050 XOM_BAD_NOTHING,
00051 XOM_BAD_COLOUR_SMOKE_TRAIL,
00052 XOM_BAD_MISCAST_PSEUDO,
00053 XOM_BAD_MISCAST_MINOR,
00054 XOM_BAD_MISCAST_MAJOR,
00055 XOM_BAD_MISCAST_NASTY,
00056 XOM_BAD_STATLOSS,
00057 XOM_BAD_TELEPORT,
00058 XOM_BAD_SWAP_WEAPONS,
00059 XOM_BAD_CHAOS_UPGRADE,
00060 XOM_BAD_MUTATION,
00061 XOM_BAD_POLYMORPH,
00062 XOM_BAD_STAIRS,
00063 XOM_BAD_CONFUSION,
00064 XOM_BAD_DRAINING,
00065 XOM_BAD_TORMENT,
00066 XOM_BAD_ANIMATE_WPN,
00067 XOM_BAD_SUMMON_DEMONS,
00068 XOM_BAD_PSEUDO_BANISHMENT,
00069 XOM_BAD_BANISHMENT,
00070 XOM_LAST_BAD_ACT = XOM_BAD_BANISHMENT,
00071
00072 XOM_PLAYER_DEAD = 100,
00073 NUM_XOM_EVENTS
00074 };
00075
00076 void xom_tick();
00077 void xom_is_stimulated(int maxinterestingness,
00078 xom_message_type message_type = XM_NORMAL,
00079 bool force_message = false);
00080 void xom_is_stimulated(int maxinterestingness, const std::string& message,
00081 bool force_message = false);
00082 bool xom_is_nice(int tension = -1);
00083 int xom_acts(bool niceness, int sever, int tension = -1, bool debug = false);
00084 const std::string describe_xom_favour(bool upper = false);
00085
00086 inline int xom_acts(int sever, int tension = -1)
00087 {
00088 return xom_acts(xom_is_nice(tension), sever, tension);
00089 }
00090
00091 void xom_check_lost_item(const item_def& item);
00092 void xom_check_destroyed_item(const item_def& item, int cause = -1);
00093 void xom_death_message(const kill_method_type killed_by);
00094 bool xom_saves_your_life(const int dam, const int death_source,
00095 const kill_method_type death_type, const char *aux,
00096 const bool see_source);
00097
00098 #ifdef WIZARD
00099 void debug_xom_effects();
00100 #endif
00101
00102 bool move_stair(coord_def stair_pos, bool away, bool allow_under);
00103
00104 #endif