extern const byte adj_chr_chm[];
extern const byte blows_table[12][12];
extern const arena_type arena_info[MAX_ARENA_MONS + 2];
-extern const owner_type owners[MAX_STORES][MAX_OWNERS];
extern const byte extract_energy[200];
extern const s32b player_exp[PY_MAX_LEVEL];
extern const s32b player_exp_a[PY_MAX_LEVEL];
extern const mbe_info_type mbe_info[];
extern const byte feature_action_flags[FF_FLAG_MAX];
extern const dragonbreath_type dragonbreath_info[];
-extern const activation_type activation_info[];
-extern const concptr artifact_bias_name[MAX_BIAS];
extern const option_type option_info[];
extern const option_type cheat_info[CHEAT_MAX];
extern POSITION panel_row_min, panel_row_max;
extern POSITION panel_col_min, panel_col_max;
extern POSITION panel_col_prt, panel_row_prt;
-extern IDX target_who;
+extern MONSTER_IDX target_who;
extern POSITION target_col;
extern POSITION target_row;
extern int player_uid;
extern byte angband_color_table[256][4];
extern const concptr angband_sound_name[SOUND_MAX];
extern const concptr angband_music_basic_name[MUSIC_BASIC_MAX];
-extern cave_type *cave[MAX_HGT];
+extern grid_type *cave[MAX_HGT];
extern saved_floor_type saved_floors[MAX_SAVED_FLOORS];
-extern s16b max_floor_id;
+extern FLOOR_IDX max_floor_id;
extern u32b saved_floor_file_sign;
extern object_type *o_list;
extern monster_type *m_list;
extern s16b *mproc_list[MAX_MTIMED];
extern s16b mproc_max[MAX_MTIMED];
-extern u16b max_towns;
-extern town_type *town;
+extern TOWN_IDX max_towns;
+extern town_type *town_info;
extern object_type *inventory;
extern s16b alloc_kind_size;
extern alloc_entry *alloc_kind_table;
extern monster_race *r_info;
extern char *r_name;
extern char *r_text;
-extern dungeon_info_type *d_info;
+extern dungeon_type *d_info;
extern char *d_name;
extern char *d_text;
extern concptr ANGBAND_SYS;
extern building_type building[MAX_BLDG];
extern QUEST_IDX max_q_idx;
extern MONRACE_IDX max_r_idx;
-extern IDX max_k_idx;
-extern IDX max_v_idx;
-extern IDX max_f_idx;
+extern KIND_OBJECT_IDX max_k_idx;
+extern VAULT_IDX max_v_idx;
+extern FEAT_IDX max_f_idx;
extern ARTIFACT_IDX max_a_idx;
-extern IDX max_e_idx;
+extern EGO_IDX max_e_idx;
extern DUNGEON_IDX max_d_idx;
extern OBJECT_IDX max_o_idx;
extern MONSTER_IDX max_m_idx;
extern int mutant_regenerate_mod;
extern bool can_save;
extern s16b world_monster;
-extern bool world_player;
extern int cap_mon;
extern int cap_mspeed;
extern HIT_POINT cap_hp;
extern FEAT_IDX feat_swamp;
extern FEAT_IDX feat_undetected;
-extern DUNGEON_IDX dungeon_type;
extern DEPTH *max_dlv;
extern FEAT_IDX feat_wall_outer;
extern FEAT_IDX feat_wall_inner;
extern FEAT_IDX feat_wall_solid;
-extern FEAT_IDX floor_type[100], fill_type[100];
+extern FEAT_IDX feat_ground_type[100], feat_wall_type[100];
extern bool now_damaged;
extern COMMAND_CODE now_message;
extern bool use_menu;
extern int is_autopick(object_type *o_ptr);
extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
extern void autopick_delayed_alter(void);
-extern void autopick_pickup_items(cave_type *c_ptr);
+extern void autopick_pickup_items(grid_type *c_ptr);
extern bool autopick_autoregister(object_type *o_ptr);
extern void do_cmd_edit_autopick(void);
extern void player_birth(void);
extern void get_max_stats(void);
extern void get_height_weight(void);
-extern void determine_random_questor(quest_type *q_ptr);
extern void player_outfit(void);
extern void dump_yourself(FILE *fff);
/* cave.c */
extern POSITION distance(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern bool is_trap(IDX feat);
-extern bool is_known_trap(cave_type *c_ptr);
+extern bool is_known_trap(grid_type *c_ptr);
extern bool is_closed_door(IDX feat);
-extern bool is_hidden_door(cave_type *c_ptr);
+extern bool is_hidden_door(grid_type *c_ptr);
extern bool los(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern void update_local_illumination(POSITION y, POSITION x);
extern bool player_can_see_bold(POSITION y, POSITION x);
extern FEAT_IDX feat_state(IDX feat, int action);
extern void cave_alter_feat(POSITION y, POSITION x, int action);
extern void remove_mirror(POSITION y, POSITION x);
-extern bool is_mirror_grid(cave_type *c_ptr);
-extern bool is_glyph_grid(cave_type *c_ptr);
-extern bool is_explosive_rune_grid(cave_type *c_ptr);
+extern bool is_mirror_grid(grid_type *c_ptr);
+extern bool is_glyph_grid(grid_type *c_ptr);
+extern bool is_explosive_rune_grid(grid_type *c_ptr);
extern void mmove2(POSITION *y, POSITION *x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
extern void glow_deep_lava_and_bldg(void);
extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
extern bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode);
+extern bool is_open(FEAT_IDX feat);
/* cmd1.c */
extern HIT_POINT critical_shot(WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam);
#endif
/* cmd2.c */
+extern bool cmd_limit_cast(player_type *creature_ptr);
+extern bool cmd_limit_arena(player_type *creature_ptr);
+extern bool cmd_limit_time_walk(player_type *creature_ptr);
+extern bool cmd_limit_blind(player_type *creature_ptr);
+extern bool cmd_limit_confused(player_type *creature_ptr);
extern void forget_travel_flow(void);
extern bool confirm_leave_level(bool down_stair);
extern void do_cmd_go_up(void);
extern void do_cmd_checkquest(void);
extern void do_cmd_time(void);
-/* cmd5.c */
-extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
-extern void do_cmd_browse(void);
-extern void do_cmd_study(void);
-extern void do_cmd_cast(void);
-
/* cmd-spell.c */
-extern void stop_singing(void);
extern concptr do_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode);
extern bool trump_summoning(int num, bool pet, POSITION y, POSITION x, DEPTH lev, int type, BIT_FLAGS mode);
extern bool make_gold(object_type *j_ptr);
extern void place_gold(POSITION y, POSITION x);
extern OBJECT_IDX drop_near(object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
-extern void acquirement(POSITION y1, POSITION x1, int num, bool great, bool special, bool known);
-extern void amusement(POSITION y1, POSITION x1, int num, bool known);
extern void inven_item_charges(INVENTORY_IDX item);
extern void inven_item_describe(INVENTORY_IDX item);
extern void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
extern concptr essence_name[];
/* racial.c */
-extern bool gain_magic(void);
extern void do_cmd_racial_power(void);
/* save.c */
extern void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ);
extern int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
-extern sint project_path(u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
extern int project_length;
extern bool binding_field(HIT_POINT dam);
extern void seal_of_mirror(HIT_POINT dam);
+extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
/* spells2.c */
extern void message_pain(MONSTER_IDX m_idx, HIT_POINT dam);
extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
extern void lite_room(POSITION y1, POSITION x1);
+extern bool starlight(bool magic);
extern void unlite_room(POSITION y1, POSITION x1);
extern bool lite_area(HIT_POINT dam, POSITION rad);
extern bool unlite_area(HIT_POINT dam, POSITION rad);
extern bool destroy_door(DIRECTION dir);
extern bool disarm_trap(DIRECTION dir);
extern bool wizard_lock(DIRECTION dir);
-extern bool heal_monster(DIRECTION dir, HIT_POINT dam);
-extern bool speed_monster(DIRECTION dir, int power);
-extern bool slow_monster(DIRECTION dir, int power);
-extern bool sleep_monster(DIRECTION dir, int power);
-extern bool stasis_monster(DIRECTION dir); /* Like sleep, affects undead as well */
-extern bool stasis_evil(DIRECTION dir); /* Like sleep, affects undead as well */
-extern bool confuse_monster(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool stun_monster(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool fear_monster(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool poly_monster(DIRECTION dir, int power);
-extern bool clone_monster(DIRECTION dir);
extern bool teleport_monster(DIRECTION dir, int distance);
extern bool door_creation(void);
extern bool trap_creation(POSITION y, POSITION x);
extern bool sleep_monsters_touch(void);
extern bool activate_ty_curse(bool stop_ty, int *count);
extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
-extern int summon_cyber(MONSTER_IDX who, POSITION y, POSITION x);
extern void wall_breaker(void);
extern bool confuse_monsters(HIT_POINT dam);
extern bool charm_monsters(HIT_POINT dam);
extern void cast_wonder(DIRECTION dir);
extern void cast_invoke_spirits(DIRECTION dir);
extern void cast_shuffle(void);
-extern bool_hack life_stream(bool_hack message, bool_hack virtue_change);
-extern bool_hack heroism(int base);
-extern bool_hack berserk(int base);
-extern bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides);
-extern bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides);
-extern bool_hack cure_critical_wounds(HIT_POINT pow);
-extern bool_hack true_healing(HIT_POINT pow);
-extern bool_hack restore_mana(bool_hack magic_eater);
-extern bool restore_all_status(void);
extern void stop_mouth(void);
extern bool_hack vampirism(void);
extern bool panic_hit(void);
extern bool psychometry(void);
+extern bool draconian_breath(player_type *creature_ptr);
+extern bool android_inside_weapon(player_type *creature_ptr);
+extern bool create_ration(player_type *crature_ptr);
+extern void hayagake(player_type *creature_ptr);
+extern bool double_attack(player_type *creature_ptr);
+extern bool comvert_hp_to_mp(player_type *creature_ptr);
+extern bool comvert_mp_to_hp(player_type *creature_ptr);
+extern bool demonic_breath(player_type *creature_ptr);
+extern bool mirror_concentration(player_type *creature_ptr);
+extern bool sword_dancing(player_type *creature_ptr);
+extern bool confusing_light(player_type *creature_ptr);
+extern bool rodeo(player_type *creature_ptr);
+extern bool clear_mind(player_type *creature_ptr);
+extern bool concentration(player_type *creature_ptr);
/* spells3.c */
extern bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode);
extern void teleport_player_away(MONSTER_IDX m_idx, POSITION dis);
extern void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode);
extern void teleport_away_followable(MONSTER_IDX m_idx);
+extern bool teleport_level_other(player_type *creature_ptr);
extern void teleport_level(MONSTER_IDX m_idx);
extern DUNGEON_IDX choose_dungeon(concptr note, POSITION y, POSITION x);
extern bool recall_player(player_type *creature_ptr, TIME_EFFECT turns);
extern void massacre(void);
extern bool eat_lock(void);
extern bool shock_power(void);
+extern bool booze(player_type *creature_ptr);
+extern bool detonation(player_type *creature_ptr);
+
/* bldg.c */
extern void battle_monsters(void);
extern void do_cmd_bldg(void);
extern void do_cmd_quest(void);
extern void quest_discovery(QUEST_IDX q_idx);
-extern QUEST_IDX quest_number(DEPTH level);
-extern QUEST_IDX random_quest_number(DEPTH level);
extern bool tele_town(void);
extern HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow);
extern HIT_POINT calc_expect_crit_shot(WEIGHT weight, int plus_ammo,int plus_bow, HIT_POINT dam);
extern s16b modify_stat_value(int value, int amount);
extern void prt_time(void);
extern concptr map_name(void);
-extern WEIGHT weight_limit(void);
-extern bool buki_motteruka(int i);
-extern bool is_heavy_shoot(object_type *o_ptr);
extern int bow_tval_ammo(object_type *o_ptr);
-extern s16b calc_num_fire(object_type *o_ptr);
-extern void calc_bonuses(void);
extern void handle_stuff(void);
extern void update_output(void);
-extern void update_creature(player_type *creature_ptr);
-extern BIT_FLAGS16 empty_hands(bool riding_control);
-extern bool heavy_armor(void);
extern void print_monster_list(TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
extern void update_playtime(void);
extern bool set_tim_esp(TIME_EFFECT v, bool do_dec);
extern bool set_superstealth(bool set);
+/* view-mainwindow.c */
+extern void resize_map(void);
+extern void redraw_window(void);
+extern bool change_panel(POSITION dy, POSITION dx);
+
+
/* xtra2.c */
extern void check_experience(void);
extern concptr extract_note_dies(MONRACE_IDX r_idx);
extern void monster_death(MONSTER_IDX m_idx, bool drop_item);
extern void get_screen_size(TERM_LEN *wid_p, TERM_LEN *hgt_p);
extern void panel_bounds_center(void);
-extern void resize_map(void);
-extern void redraw_window(void);
-extern bool change_panel(POSITION dy, POSITION dx);
extern void verify_panel(void);
extern concptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode);
extern bool target_able(MONSTER_IDX m_idx);
extern bool tgt_pt(POSITION *x, POSITION *y);
extern void do_poly_wounds(void);
extern void change_race(CHARACTER_IDX new_race, concptr effect_msg);
-extern ENERGY bow_energy(OBJECT_SUBTYPE_VALUE sval);
-extern int bow_tmul(OBJECT_SUBTYPE_VALUE sval);
-extern void display_rumor(bool ex);
-
-/* artifact.c */
-extern void one_high_resistance(object_type *o_ptr);
-extern void one_lordly_high_resistance(object_type *o_ptr);
-extern void one_ele_resistance(object_type *o_ptr);
-extern void one_dragon_ele_resistance(object_type *o_ptr);
-extern void one_low_esp(object_type *o_ptr);
-extern void one_resistance(object_type *o_ptr);
-extern void one_ability(object_type *o_ptr);
-extern void one_activation(object_type *o_ptr);
-extern bool create_artifact(object_type *o_ptr, bool a_scroll);
-extern int activation_index(object_type *o_ptr);
-extern const activation_type* find_activation_info(object_type *o_ptr);
-extern void random_artifact_resistance(object_type * o_ptr, artifact_type *a_ptr);
-extern bool create_named_art(ARTIFACT_IDX a_idx, POSITION y, POSITION x);
/* scores.c */
extern void display_scores_aux(int from, int to, int note, high_score *score);
/* wizard2.c */
extern void strip_name(char *buf, KIND_OBJECT_IDX k_idx);
-extern void do_cmd_rerate_aux(void);
-extern void do_cmd_rerate(bool display);
extern void cheat_death(player_type *creature_ptr);
-/* avatar.c */
-extern bool compare_virtue(int type, int num, int tekitou);
-extern int virtue_number(int type);
-extern concptr virtue[MAX_VIRTUE];
-extern void get_virtues(void);
-extern void chg_virtue(int virtue, int amount);
-extern void set_virtue(int virtue, int amount);
-extern void dump_virtues(FILE * OutFile);
#ifdef JP
/* japanese.c */
extern void do_cmd_snipe_browse(void);
extern int boost_concentration_damage(int tdam);
-/* hex.c */
-extern bool stop_hex_spell_all(void);
-extern bool stop_hex_spell(void);
-extern void check_hex(void);
-extern bool hex_spell_fully(void);
-extern void revenge_spell(void);
-extern void revenge_store(HIT_POINT dam);
-extern bool teleport_barrier(MONSTER_IDX m_idx);
-extern bool magic_barrier(MONSTER_IDX m_idx);
-extern bool multiply_barrier(MONSTER_IDX m_idx);
-
extern void kamaenaoshi(INVENTORY_IDX item);
extern bool ang_sort_comp_hook(vptr u, vptr v, int a, int b);
extern void ang_sort_swap_hook(vptr u, vptr v, int a, int b);
+