1 #pragma once 2 3 #include <vector> 4 5 #include "enum.h" 6 #include "mpr.h" 7 #include "spl-cast.h" 8 9 using std::vector; 10 11 struct bolt; 12 struct dice_def; 13 class dist; 14 15 const int DEFAULT_SHATTER_DICE = 3; 16 17 void setup_fire_storm(const actor *source, int pow, bolt &beam); 18 spret cast_fire_storm(int pow, bolt &beam, bool fail); 19 bool cast_smitey_damnation(int pow, bolt &beam); 20 spret cast_chain_spell(spell_type spell_cast, int pow, 21 const actor *caster, bool fail = false); 22 spret cast_chain_lightning(int pow, const actor &caster, bool fail); 23 vector<coord_def> chain_lightning_targets(); 24 25 spret trace_los_attack_spell(spell_type spell, int pow, 26 const actor* agent); 27 spret fire_los_attack_spell(spell_type spell, int pow, const actor* agent, 28 bool fail = false, int* damage_done = nullptr); 29 void sonic_damage(bool scream); 30 bool mons_shatter(monster* caster, bool actual = true); 31 void shillelagh(actor *wielder, coord_def where, int pow); 32 spret cast_freeze(int pow, monster* mons, bool fail); 33 dice_def freeze_damage(int pow); 34 spret cast_airstrike(int pow, const dist &beam, bool fail); 35 spret cast_shatter(int pow, bool fail); 36 dice_def shatter_damage(int pow, monster *mons = nullptr); 37 int terrain_shatter_chance(coord_def where, const actor &agent); 38 spret cast_irradiate(int powc, actor* who, bool fail); 39 dice_def irradiate_damage(int powc, bool random = true); 40 bool ignite_poison_affects(const actor* act); 41 bool ignite_poison_affects_cell(const coord_def where, actor* agent); 42 spret cast_ignite_poison(actor *agent, int pow, bool fail, 43 bool tracer = false); 44 spret cast_poisonous_vapours(int pow, const dist &beam, bool fail, bool test=false); 45 bool safe_discharge(coord_def where, vector<const actor *> &exclude); 46 spret cast_discharge(int pow, const actor &agent, bool fail = false, 47 bool prompt = true); 48 dice_def base_fragmentation_damage(int pow); 49 bool setup_fragmentation_beam(bolt &beam, int pow, const actor *caster, 50 const coord_def target, bool quiet, 51 const char **what, bool &hole); 52 spret cast_fragmentation(int powc, const actor *caster, 53 const coord_def target, bool fail); 54 pair<int, item_def *> sandblast_find_ammo(); 55 spret cast_sandblast(int powc, bolt &beam, bool fail); 56 spret cast_polar_vortex(int powc, bool fail); 57 void polar_vortex_damage(actor *caster, int dur); 58 void cancel_polar_vortex(bool tloc = false); 59 coord_def get_thunderbolt_last_aim(actor *caster); 60 spret cast_thunderbolt(actor *caster, int pow, coord_def aim, 61 bool fail); 62 63 actor* forest_near_enemy(const actor *mon); 64 void forest_message(const coord_def pos, const string &msg, 65 msg_channel_type ch = MSGCH_PLAIN); 66 void forest_damage(const actor *mon); 67 68 int dazzle_chance_numerator(int hd); 69 int dazzle_chance_denom(int pow); 70 bool dazzle_monster(monster *mon, int pow); 71 spret cast_dazzling_flash(int pow, bool fail, bool tracer = false); 72 73 spret cast_toxic_radiance(actor *caster, int pow, bool fail = false, 74 bool mon_tracer = false); 75 void toxic_radiance_effect(actor* agent, int mult, bool on_cast = false); 76 77 dice_def glaciate_damage(int pow, int eff_range); 78 spret cast_glaciate(actor *caster, int pow, coord_def aim, 79 bool fail = false); 80 81 vector<coord_def> get_ignition_blast_sources(const actor *agent, 82 bool tracer = false); 83 spret cast_ignition(const actor *caster, int pow, bool fail); 84 85 spret cast_starburst(int pow, bool fail, bool tracer=false); 86 87 void foxfire_attack(const monster *foxfire, const actor *target); 88 89 spret cast_hailstorm(int pow, bool fail, bool tracer=false); 90 91 spret cast_imb(int pow, bool fail); 92 93 void actor_apply_toxic_bog(actor *act); 94 95 vector<coord_def> find_ramparts_walls(const coord_def ¢er); 96 spret cast_frozen_ramparts(int pow, bool fail); 97 void end_frozen_ramparts(); 98 dice_def ramparts_damage(int pow, bool random = true); 99 100 bool wait_spell_active(spell_type spell); 101 102 spret cast_searing_ray(int pow, bolt &beam, bool fail); 103 void handle_searing_ray(); 104 void end_searing_ray(); 105 106 vector<monster *> find_maxwells_possibles(); 107 spret cast_maxwells_coupling(int pow, bool fail, bool tracer = false); 108 void handle_maxwells_coupling(); 109 void end_maxwells_coupling(bool quiet = false); 110 111 spret cast_noxious_bog(int pow, bool fail); 112 vector<coord_def> find_bog_locations(const coord_def ¢er, int pow); 113