File: ouch.h

package info (click to toggle)
crawl 2%3A0.33.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 95,264 kB
  • sloc: cpp: 358,145; ansic: 27,203; javascript: 9,491; python: 8,359; perl: 3,327; java: 2,667; xml: 2,191; makefile: 1,830; sh: 611; objc: 250; cs: 15; sed: 9; lisp: 3
file content (54 lines) | stat: -rw-r--r-- 1,633 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
 * @file
 * @brief Functions used when Bad Things happen to the player.
**/

#pragma once

#define DEATH_NAME_LENGTH 10

#include "beam.h"
#include "enum.h"
#include "kill-method-type.h"

/**
 * Key for <tt>you.props</tt> indicating that the player already received a
 * message about melting Ozocubu's Armour this turn. The value does not
 * matter, only the key's existence in the hash.
 */
#define MELT_ARMOUR_KEY "melt_armour"

void maybe_melt_player_enchantments(beam_type flavour, int damage);
int check_your_resists(int hurted, beam_type flavour, string source,
                       bolt *beam = 0, bool doEffects = true);

class actor;
int actor_to_death_source(const actor* agent);

string morgue_name(string char_name, time_t when_crawl_got_even);

int corrosion_chance(int sources);

int outgoing_harm_amount(int levels);
int incoming_harm_amount(int levels);

void reset_damage_counters();
void ouch(int dam, kill_method_type death_type, mid_t source = MID_NOBODY,
          const char *aux = nullptr, bool see_source = true,
          const char *death_source_name = nullptr,
          bool skip_multipliers = false,
          bool skip_awaken = false);

void lose_level();
bool drain_player(int power = 25, bool announce_full = true,
                  bool ignore_protection = false, bool quiet = false);

void expose_player_to_element(beam_type flavour, int strength = 0,
                              bool slow_cold_blooded = true);

int timescale_damage(const actor *act, int damage);
void _maybe_blood_hastes_allies();
#if TAG_MAJOR_VERSION == 34
bool can_shave_damage();
int do_shave_damage(int dam);
#endif