MCPcopy Create free account
hub / github.com/crawl/crawl / attack

Method attack

crawl-ref/source/attack.cc:58–76  ·  view source on GitHub ↗

************************************************** * BEGIN PUBLIC FUNCTIONS * ************************************************** */

Source from the content-addressed store, hash-verified

56 **************************************************
57*/
58attack::attack(actor *attk, actor *defn, actor *blame)
59 : attacker(attk), defender(defn), responsible(blame ? blame : attk),
60 cancel_attack(false), did_hit(false),
61 needs_message(false), attacker_visible(false), defender_visible(false),
62 perceived_attack(false), obvious_effect(false), to_hit(0),
63 damage_done(0), special_damage(0), aux_damage(0),
64 special_damage_flavour(BEAM_NONE),
65 stab_attempt(false), stab_bonus(0), ev_margin(0), weapon(nullptr),
66 damage_brand(SPWPN_NORMAL), wpn_skill(SK_UNARMED_COMBAT),
67 unrand_entry(nullptr),
68 attacker_to_hit_penalty(0), attack_verb("bug"), verb_degree(),
69 no_damage_message(), special_damage_message(), aux_attack(), aux_verb(),
70 defender_shield(nullptr), simu(false),
71 aux_source(""), kill_type(KILLED_BY_MONSTER)
72{
73 // No effective code should execute, we'll call init_attack again from
74 // the child class, since initializing an attack will vary based the within
75 // type of attack actually being made (melee, ranged, etc.)
76}
77
78bool attack::handle_phase_attempted()
79{

Callers 7

_paragon_tempestFunction · 0.45
do_ranged_attackMethod · 0.45
fireMethod · 0.45
cast_manifold_assaultFunction · 0.45
_do_one_fsim_roundFunction · 0.45
_player_shootFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected