// spells1.c
extern bool in_disintegration_range(floor_type *floor_ptr, int y1, int x1, int y2, int x2);
extern void breath_shape(COODINATES *path_g, floor_type *floor_ptr, int dist, int *pgrids, COODINATES *gx, COODINATES *gy, int *gm, int *pgm_rad, COODINATES rad, COODINATES y1, COODINATES x1, COODINATES y2, COODINATES x2, int typ);
extern u16b bolt_pict(int y, int x, int ny, int nx, int typ);
extern sint project_path(COODINATES *gp, COODINATES range, floor_type *floor_ptr, COODINATES y1, COODINATES x1, COODINATES y2, COODINATES x2, int flg);
extern COODINATES dist_to_line(COODINATES y, COODINATES x, COODINATES y1, COODINATES x1, COODINATES y2, COODINATES x2);
extern bool project(creature_type *caster_ptr, COODINATES range, COODINATES rad, COODINATES y, COODINATES x, POWER dam, int typ, int flg, TRAIT_ID trait_id);
extern bool binding_field(creature_type *caster_ptr, COODINATES range, POWER dam);
extern void seal_of_mirror(creature_type *caster_ptr, POWER dam);

// spells2.c
extern void message_pain(CREATURE_ID creature_idx, POWER dam);
extern bool eat_rock(creature_type *caster_ptr, COODINATES y, COODINATES x);
extern void creature_knowledge(creature_type *creature_ptr);
extern bool detect_traps(creature_type *creature_ptr, COODINATES range, bool known);
extern bool detect_doors(creature_type *creature_ptr, COODINATES range);
extern bool detect_stairs(creature_type *creature_ptr, COODINATES range);
extern bool detect_treasure(creature_type *creature_ptr, COODINATES range);
extern bool detect_objects_gold(creature_type *creature_ptr, COODINATES range);
extern bool detect_objects_normal(creature_type *creature_ptr, COODINATES range);
extern bool detect_objects_magic(creature_type *creature_ptr, COODINATES range);
extern bool detect_creatures_normal(creature_type *creature_ptr, COODINATES range);
extern bool detect_creatures_invis(creature_type *creature_ptr, COODINATES range);
extern bool detect_creatures_evil(creature_type *creature_ptr, COODINATES range);
extern bool detect_creatures_xxx(creature_type *creature_ptr, COODINATES range, u32b match_flag);
extern bool detect_creatures_string(creature_type *creature_ptr, COODINATES range, cptr);
extern bool detect_creatures_nonliving(creature_type *creature_ptr, COODINATES range);
extern bool detect_creatures_mind(creature_type *creature_ptr, COODINATES range);
extern bool detect_all(creature_type *creature_ptr, COODINATES range);
extern bool wall_stone(creature_type *caster_ptr);
extern void aggravate_creatures(creature_type *target_ptr);
extern bool genocide_aux(creature_type *user_ptr, CREATURE_ID creature_idx, POWER power, bool player_cast, POWER dam_side, cptr spell_name);
extern bool symbol_genocide(creature_type *caster_ptr, POWER power, bool player_cast);
extern bool mass_genocide(creature_type *caster_ptr, POWER power, bool player_cast);
extern bool mass_genocide_undead(creature_type *caster_ptr, POWER power, bool player_cast);
extern bool probing(floor_type *floor_ptr);
extern bool destroy_area(creature_type *caster_ptr, COODINATES y1, COODINATES x1, COODINATES r, bool in_generate);
extern bool charge_combat(creature_type *caster_ptr);
extern bool earthquake_aux(creature_type *caster_ptr, COODINATES cy, COODINATES cx, COODINATES r, CREATURE_ID creature_idx);
extern bool earthquake(creature_type *caster_ptr, COODINATES cy, COODINATES cx, COODINATES r);
extern bool massacre(creature_type *caster_ptr);
extern void lite_room(creature_type *creature_ptr, COODINATES y1, COODINATES x1);
extern void unlite_room(creature_type *caster_ptr, COODINATES y1, COODINATES x1);
extern bool lite_area(creature_type *creature_ptr, POWER dam, COODINATES rad);
extern bool unlite_area(creature_type *caster_ptr, POWER dam, COODINATES rad);
extern bool cast_bolt(creature_type *caster_ptr, int typ, COODINATES range, POWER dam, TRAIT_ID trait_id);
extern bool cast_ball(creature_type *caster_ptr, int typ, COODINATES range, POWER dam, COODINATES rad);
extern bool cast_ball_hide(creature_type *caster_ptr, int typ, COODINATES range, POWER dam, COODINATES rad);
extern bool cast_self(creature_type *caster_ptr, EFFECT_ID typ, POWER power, TRAIT_ID trait_id);
extern bool cast_bolt_aux(creature_type *caster_ptr, COODINATES y, COODINATES x, int typ, COODINATES range, POWER dam, TRAIT_ID trait_id, FLAGS_32 options);
extern bool cast_beam_aux(creature_type *caster_ptr, COODINATES y, COODINATES x, int typ, COODINATES range, POWER dam, TRAIT_ID trait_id, FLAGS_32 options);
extern void cast_ball_aux(creature_type *caster_ptr, COODINATES y, COODINATES x, int typ, POWER power, COODINATES rad, TRAIT_ID trait_id, FLAGS_32 options);
extern void cast_breath_aux(creature_type *caster_ptr, COODINATES y, COODINATES x, EFFECT_ID typ, COODINATES range, POWER power, COODINATES rad, TRAIT_ID trait_id);
extern bool cast_splash(creature_type *caster_ptr, int typ, COODINATES range, int num, POWER dam, TRAIT_ID trait_id, FLAGS_32 options);
extern bool cast_chain(creature_type *caster_ptr, int typ, COODINATES range, int num, POWER power, TRAIT_ID trait_id, FLAGS_32 options);
extern bool cast_grenade(creature_type *caster_ptr, COODINATES y, COODINATES x, EFFECT_ID typ, COODINATES range, POWER dam, COODINATES rad);
extern bool cast_swarm(creature_type *caster_ptr, EFFECT_ID typ, COODINATES range, COODINATES rad, QUANTITY num, POWER power, TRAIT_ID trait_id, FLAGS_32 options);
extern bool cast_beam(creature_type *caster_ptr, int typ, COODINATES range, POWER dam, TRAIT_ID trait_id);
extern void cast_breath(creature_type *caster_ptr, EFFECT_ID typ, COODINATES range, POWER dam_hp, COODINATES rad, TRAIT_ID trait_id);
extern void call_chaos(creature_type *creature_ptr);
extern bool activate_ty_curse(creature_type *creature_ptr, bool stop_ty, int *count);
extern void wall_breaker(creature_type *creature_ptr);
extern s32b flag_cost(object_type *object_ptr, int plusses);
extern bool teleport_swap(creature_type *creature_ptr, int dir);
extern bool item_tester_hook_recharge(creature_type *creature_ptr, object_type *object_ptr);
extern bool project_all_vision(creature_type *caster_ptr, int typ, POWER dam);
extern bool fishing(creature_type *caster_ptr, COODINATES y, COODINATES x);
extern bool rodeo(creature_type *caster_ptr);
extern void getaway(creature_type *caster_ptr);
extern void check_cursed_inventory(creature_type *caster_ptr);
extern void try_livingtrump(creature_type *caster_ptr);
extern void fetch_servants(creature_type *caster_ptr);
extern void monster_ball(creature_type *caster_ptr);
extern bool eat_magic(creature_type *creature_ptr, POWER power);
extern void discharge_minion(creature_type *caster_ptr);
extern bool kawarimi(creature_type *user_ptr, bool success);
extern bool rush_attack(creature_type *creature_ptr, bool *mdeath);
extern void remove_all_mirrors(creature_type *user_ptr, floor_type *floor_ptr, bool explode);

// spells3.c
extern bool teleport_away(creature_type *creature_ptr, COODINATES dis, FLAGS_32 mode);
extern void teleport_creature_to2(CREATURE_ID creature_idx, COODINATES ty, COODINATES tx, POWER power, FLAGS_32 mode);
extern bool cave_player_teleportable_bold(creature_type *creature_ptr, COODINATES y, COODINATES x, FLAGS_32 mode);
extern bool teleport_player_aux(creature_type *creature_ptr, COODINATES dis, FLAGS_32 mode);
extern void teleport_creature(creature_type *creature_ptr, COODINATES dis, FLAGS_32 mode);
extern void teleport_player_away(creature_type *creature_ptr, COODINATES dis);
extern void teleport_creature_to(creature_type *caster_ptr, COODINATES ny, COODINATES nx, FLAGS_32 mode);
extern void teleport_away_followable(creature_type *creature_ptr);
extern void teleport_level(creature_type *creature_ptr, CREATURE_ID creature_idx);
extern bool shock_wave(creature_type *creature_ptr);
extern bool hit_and_away(creature_type *caster_ptr);
extern bool spreading_throw(creature_type *caster_ptr);
extern bool chain_hook(creature_type *caster_ptr);
extern bool rengoku_kaen(creature_type *caster_ptr);
extern int choose_dungeon(cptr note, int y, int x);
extern bool word_of_recall(creature_type *creature_ptr, int turns);
extern bool reset_recall(creature_type *creature_ptr);
extern bool object_disenchant(creature_type *owner_ptr, object_type *object_ptr, bool heavy);
extern bool apply_disenchant(creature_type *creature_ptr, bool heavy);
extern void mutate_creature(creature_type *creature_ptr);
extern void apply_nexus(creature_type *m_ptr);
extern void phlogiston(creature_type *creature_ptr);
extern void brand_weapon(creature_type *creature_ptr, OBJECT_EGO_ID brand_type);
extern void call_the_void(creature_type *creature_ptr);
extern void fetch(creature_type *creature_ptr, COODINATES range, int dir, int wgt, bool require_los);
extern void alter_reality(creature_type *creature_ptr);
extern bool warding_glyph(creature_type *creature_ptr);
extern bool place_mirror(creature_type *creature_ptr);
extern bool explosive_rune(creature_type *creature_ptr);
extern void identify_pack(creature_type *creature_ptr);
extern bool remove_curse(creature_type *creature_ptr);
extern bool remove_all_curse(creature_type *creature_ptr);
extern bool alchemy(creature_type *creature_ptr);
extern bool enchant(creature_type *creature_ptr, object_type *object_ptr, int n, int eflag);
extern bool enchant_spell(creature_type *creature_ptr, int num_hit, int num_dam, int num_ac, int num_ev, int num_vo);
extern bool artifact_scroll(creature_type *caster_ptr);
extern bool ident_spell(creature_type *creature_ptr, bool only_equip);
extern bool mundane_spell(creature_type *creature_ptr, bool only_equip);
extern bool identify_item(creature_type *creature_ptr, object_type *object_ptr);
extern bool identify_fully(creature_type *creature_ptr, bool only_equip);
extern bool recharge(creature_type *creature_ptr, POWER num);
extern bool bless_weapon(creature_type *caster_ptr);
extern bool pulish_shield(creature_type *creature_ptr);
extern bool potion_smash_effect(CREATURE_ID who, COODINATES y, COODINATES x, OBJECT_KIND_ID k_idx);
extern void display_spell_list(creature_type *creature_ptr);
extern int mod_need_mana(creature_type *creature_ptr, int need_mana, int spell, REALM_ID realm);
extern PROB calc_device_difficulty(creature_type *caster_ptr, object_type *object_ptr);
extern PROB calc_trait_difficulty(creature_type *caster_ptr, TRAIT_ID trait_id, STAT_ID stat_type);
extern int mod_spell_chance_1(creature_type *creature_ptr, int chance);
extern int mod_spell_chance_2(creature_type *creature_ptr, int chance);
extern PERCENT spell_chance(creature_type *creature_ptr, TRAIT_ID spell, REALM_ID realm);
extern bool spell_okay(creature_type *creature_ptr, TRAIT_ID spell, bool learned, bool study_pray, REALM_ID realm);
extern void print_spells(creature_type *creature_ptr, int target_spell, KEY *spells, int num, int y, int x, REALM_ID realm);
extern bool hates_acid(object_type *object_ptr);
extern bool hates_elec(object_type *object_ptr);
extern bool hates_fire(object_type *object_ptr);
extern bool hates_cold(object_type *object_ptr);
extern int set_acid_destroy(object_type *object_ptr);
extern int set_elec_destroy(object_type *object_ptr);
extern int set_fire_destroy(object_type *object_ptr);
extern int set_cold_destroy(object_type *object_ptr);
extern int inven_damage(creature_type *creature_ptr, inven_func typ, int perc);
extern int dissolve_armour(creature_type *creature_ptr);
extern bool get_rumor(creature_type *caster_ptr);
extern bool rustproof(creature_type *creature_ptr);
extern bool curse_armor(creature_type *creature_ptr);
extern bool curse_weapon(creature_type *target_ptr, bool force, int slot);
extern bool brand_bolts(creature_type *creature_ptr);
extern bool polymorph_creature(creature_type *creature_ptr);
extern bool dimension_door(creature_type *creature_ptr);
extern bool mirror_tunnel(creature_type *creature_ptr);
extern cptr spell_category_name(TVAL tval);
extern void ring_of_power(creature_type *creature_ptr);
extern void have_nightmare(creature_type *watcher_ptr, SPECIES_ID species_idx);

