/*!
* @struct arena_type
- * @brief 闘技場のモンスターエントリー構造体 / A structure type for arena entry
+ * @brief 闘技場のモンスターエントリー構造体 / A structure type for on_defeat_arena_monster entry
*/
typedef struct arena_type {
MONRACE_IDX r_idx; /*!< 闘技場のモンスター種族ID(0ならば表彰式) / Monster (0 means victory prizing) */
#include "world/world.h"
/*!
- * @brief 闘技場用のアリーナ地形を作成する / Builds the arena after it is entered -KMW-
+ * @brief 闘技場用のアリーナ地形を作成する / Builds the on_defeat_arena_monster after it is entered -KMW-
* @param player_ptr プレーヤーへの参照ポインタ
* @return なし
*/
}
/*!
- * @brief 挑戦時闘技場への入場処理 / Town logic flow for generation of arena -KMW-
+ * @brief 挑戦時闘技場への入場処理 / Town logic flow for generation of on_defeat_arena_monster -KMW-
* @return なし
*/
static void generate_challenge_arena(player_type *challanger_ptr)
}
/*!
- * @brief モンスター闘技場のフロア生成 / Builds the arena after it is entered -KMW-
+ * @brief モンスター闘技場のフロア生成 / Builds the on_defeat_arena_monster after it is entered -KMW-
* @param player_ptr プレーヤーへの参照ポインタ
* @return なし
*/
}
/*!
- * @brief モンスター闘技場への導入処理 / Town logic flow for generation of arena -KMW-
+ * @brief モンスター闘技場への導入処理 / Town logic flow for generation of on_defeat_arena_monster -KMW-
* @return なし
*/
static void generate_gambling_arena(player_type *creature_ptr)
bool ironman_shops; /* Stores are permanently closed (*) */
bool ironman_small_levels; /* Always create unusually small dungeon levels (*) */
bool ironman_downward; /* Disable recall and use of up stairs (*) */
-bool ironman_empty_levels; /* Always create empty 'arena' levels (*) */
+bool ironman_empty_levels; /* Always create empty 'on_defeat_arena_monster' levels (*) */
bool ironman_rooms; /* Always generate very unusual rooms (*) */
bool ironman_nightmare; /* Nightmare mode(it isn't even remotely fair!)(*) */
bool left_hander; /* Left-Hander */
extern bool ironman_shops; /* Stores are permanently closed (*) */
extern bool ironman_small_levels; /* Always create unusually small dungeon levels (*) */
extern bool ironman_downward; /* Disable recall and use of up stairs (*) */
-extern bool ironman_empty_levels; /* Always create empty 'arena' levels (*) */
+extern bool ironman_empty_levels; /* Always create empty 'on_defeat_arena_monster' levels (*) */
extern bool ironman_rooms; /* Always generate very unusual rooms (*) */
extern bool ironman_nightmare; /* Nightmare mode(it isn't even remotely fair!)(*) */
extern bool left_hander; /* Left-Hander */
bool expand_list; /* Expand the power of the list commands */
bool small_levels; /* Allow unusually small dungeon levels */
bool always_small_levels; /* Always create unusually small dungeon levels */
-bool empty_levels; /* Allow empty 'arena' levels */
+bool empty_levels; /* Allow empty 'on_defeat_arena_monster' levels */
bool bound_walls_perm; /* Boundary walls become 'permanent wall' */
bool last_words; /* Leave last words when your character dies */
#ifdef WORLD_SCORE
extern bool expand_list; /* Expand the power of the list commands */
extern bool small_levels; /* Allow unusually small dungeon levels */
extern bool always_small_levels; /* Always create unusually small dungeon levels */
-extern bool empty_levels; /* Allow empty 'arena' levels */
+extern bool empty_levels; /* Allow empty 'on_defeat_arena_monster' levels */
extern bool bound_walls_perm; /* Boundary walls become 'permanent wall' */
extern bool last_words; /* Leave last words when your character dies */
#ifdef WORLD_SCORE
bool record_buy; /* Record purchased items */
bool record_sell; /* Record sold items */
bool record_danger; /* Record hitpoint warning */
-bool record_arena; /* Record arena victories */
+bool record_arena; /* Record on_defeat_arena_monster victories */
bool record_ident; /* Record first identified items */
bool record_named_pet; /* Record information about named pets */
char record_o_name[MAX_NLEN];
extern bool record_buy; /* Record purchased items */
extern bool record_sell; /* Record sold items */
extern bool record_danger; /* Record hitpoint warning */
-extern bool record_arena; /* Record arena victories */
+extern bool record_arena; /* Record on_defeat_arena_monster victories */
extern bool record_ident; /* Record first identified items */
extern bool record_named_pet; /* Record information about named pets */
}
/*!
- * @brief 闘技場に入るコマンドの処理 / arena commands
+ * @brief 闘技場に入るコマンドの処理 / on_defeat_arena_monster commands
* @param player_ptr プレーヤーへの参照ポインタ
* @param cmd 闘技場処理のID
* @return なし
case BACT_ARENA_RULES:
screen_save();
- /* Peruse the arena help file */
+ /* Peruse the on_defeat_arena_monster help file */
(void)show_file(player_ptr, TRUE, _("arena_j.txt", "arena.txt"), NULL, 0, 0);
screen_load();
break;
return a_idx;
}
+static void drop_artifact(player_type *player_ptr, monster_death_type *md_ptr)
+{
+ if (!md_ptr->drop_chosen_item)
+ return;
+
+ ARTIFACT_IDX a_idx = get_artifact_index(player_ptr, md_ptr);
+ if (((md_ptr->r_ptr->flags7 & RF7_GUARDIAN) == 0) || (d_info[player_ptr->dungeon_idx].final_guardian != md_ptr->m_ptr->r_idx))
+ return;
+
+ KIND_OBJECT_IDX k_idx
+ = d_info[player_ptr->dungeon_idx].final_object != 0 ? d_info[player_ptr->dungeon_idx].final_object : lookup_kind(TV_SCROLL, SV_SCROLL_ACQUIREMENT);
+ if (d_info[player_ptr->dungeon_idx].final_artifact != 0) {
+ a_idx = d_info[player_ptr->dungeon_idx].final_artifact;
+ artifact_type *a_ptr = &a_info[a_idx];
+ if (!a_ptr->cur_num) {
+ if (create_named_art(player_ptr, a_idx, md_ptr->md_y, md_ptr->md_x)) {
+ a_ptr->cur_num = 1;
+ if (current_world_ptr->character_dungeon)
+ a_ptr->floor_id = player_ptr->floor_id;
+ } else if (!preserve_mode) {
+ a_ptr->cur_num = 1;
+ }
+
+ if (!d_info[player_ptr->dungeon_idx].final_object)
+ k_idx = 0;
+ }
+ }
+
+ if (k_idx != 0) {
+ object_type forge;
+ object_type *q_ptr = &forge;
+ object_prep(player_ptr, q_ptr, k_idx);
+ apply_magic(player_ptr, q_ptr, player_ptr->current_floor_ptr->object_level, AM_NO_FIXED_ART | AM_GOOD);
+ (void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
+ }
+
+ msg_format(_("あなたは%sを制覇した!", "You have conquered %s!"), d_name + d_info[player_ptr->dungeon_idx].name);
+}
+
/*!
* @brief モンスターが死亡した時の処理 /
* Handle the "death" of a monster.
md_ptr->mo_mode |= AM_GREAT;
switch_special_death(player_ptr, md_ptr);
- if (md_ptr->drop_chosen_item) {
- ARTIFACT_IDX a_idx = get_artifact_index(player_ptr, md_ptr);
- if ((md_ptr->r_ptr->flags7 & RF7_GUARDIAN) && (d_info[player_ptr->dungeon_idx].final_guardian == md_ptr->m_ptr->r_idx)) {
- KIND_OBJECT_IDX k_idx = d_info[player_ptr->dungeon_idx].final_object != 0 ? d_info[player_ptr->dungeon_idx].final_object
- : lookup_kind(TV_SCROLL, SV_SCROLL_ACQUIREMENT);
-
- if (d_info[player_ptr->dungeon_idx].final_artifact != 0) {
- a_idx = d_info[player_ptr->dungeon_idx].final_artifact;
- artifact_type *a_ptr = &a_info[a_idx];
- if (!a_ptr->cur_num) {
- if (create_named_art(player_ptr, a_idx, md_ptr->md_y, md_ptr->md_x)) {
- a_ptr->cur_num = 1;
- if (current_world_ptr->character_dungeon)
- a_ptr->floor_id = player_ptr->floor_id;
- } else if (!preserve_mode) {
- a_ptr->cur_num = 1;
- }
-
- if (!d_info[player_ptr->dungeon_idx].final_object)
- k_idx = 0;
- }
- }
-
- if (k_idx != 0) {
- q_ptr = &forge;
- object_prep(player_ptr, q_ptr, k_idx);
- apply_magic(player_ptr, q_ptr, player_ptr->current_floor_ptr->object_level, AM_NO_FIXED_ART | AM_GOOD);
- (void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
- }
-
- msg_format(_("あなたは%sを制覇した!", "You have conquered %s!"), d_name + d_info[player_ptr->dungeon_idx].name);
- }
- }
-
+ drop_artifact(player_ptr, md_ptr);
int number = 0;
if ((md_ptr->r_ptr->flags1 & RF1_DROP_60) && (randint0(100) < 60))
number++;
if (md_ptr->cloned && !(md_ptr->r_ptr->flags1 & RF1_UNIQUE))
number = 0;
- if (is_pet(md_ptr->m_ptr) || player_ptr->phase_out || player_ptr->current_floor_ptr->inside_arena)
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ if (is_pet(md_ptr->m_ptr) || player_ptr->phase_out || floor_ptr->inside_arena)
number = 0;
if (!drop_item && (md_ptr->r_ptr->d_char != '$'))
PLAYER_LEVEL lev; /* Level */
TOWN_IDX town_num; /* Current town number */
- s16b arena_number; /* monster number in arena -KMW- */
+ s16b arena_number; /* monster number in on_defeat_arena_monster -KMW- */
bool phase_out; /*!< フェイズアウト状態(闘技場観戦状態などに利用、NPCの処理の対象にならず自身もほとんどの行動ができない) */
DUNGEON_IDX dungeon_idx; /* current dungeon index */
bool monk_notify_aux;
byte leave_bldg;
- byte exit_bldg; /* Goal obtained in arena? -KMW- */
+ byte exit_bldg; /* Goal obtained in on_defeat_arena_monster? -KMW- */
bool leaving_dungeon; /* True if player is leaving the dungeon */
bool teleport_town;
/* inside- so is floor */
place_bold(player_ptr, y, x, GB_FLOOR);
} else if (distance(y0, x0, y, x) <= rad + 1) {
- /* make granite outside so arena works */
+ /* make granite outside so on_defeat_arena_monster works */
place_bold(player_ptr, y, x, GB_EXTRA);
}
}
} else if (distance(y0, x0, y, x) < 3) {
place_bold(player_ptr, y, x, GB_FLOOR);
} else {
- /* make granite outside so arena works */
+ /* make granite outside so on_defeat_arena_monster works */
place_bold(player_ptr, y, x, GB_EXTRA);
}
- /* proper boundary for arena */
+ /* proper boundary for on_defeat_arena_monster */
if (((y + rad) == y0) || ((y - rad) == y0) || ((x + rad) == x0) || ((x - rad) == x0)) {
place_bold(player_ptr, y, x, GB_EXTRA);
}
msg_print_wizard(player_ptr, CHEAT_DUNGEON, _("部屋型ランダムVaultを生成しました。", "Room Vault."));
- /* fill area so don't get problems with arena levels */
+ /* fill area so don't get problems with on_defeat_arena_monster levels */
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (x1 = 0; x1 < xsize; x1++) {
POSITION x = x0 - xhsize + x1;
/* inside- so is floor */
place_bold(player_ptr, y, x, GB_FLOOR);
} else {
- /* make granite outside so arena works */
+ /* make granite outside so on_defeat_arena_monster works */
place_bold(player_ptr, y, x, GB_EXTRA);
}
- /* proper boundary for arena */
+ /* proper boundary for on_defeat_arena_monster */
if (((y + rad) == y0) || ((y - rad) == y0) || ((x + rad) == x0) || ((x - rad) == x0)) {
place_bold(player_ptr, y, x, GB_EXTRA);
}
bool monster_noise;
QUEST_IDX inside_quest; /* Inside quest level */
- bool inside_arena; /* Is character inside arena? */
+ bool inside_arena; /* Is character inside on_defeat_arena_monster? */
} floor_type;
#define SMALL_LEVEL 3 /*!< 小さいフロアの生成される基本確率(1/定数) / 1/chance of smaller size (3) */
#define EMPTY_LEVEL 24 /*!< アリーナレベル(外壁のないフロア)の生成される基本確率(1/定数) / 1/chance of being 'empty' (15) */
#define LAKE_LEVEL 24 /*!< 川や湖のあるフロアの生成される確率(1/定数) / 1/chance of being a lake on the level */
-#define DARK_EMPTY 5 /*!< フロア全体が暗い可能性の基本確率(1/定数) / 1/chance of arena level NOT being lit (2) */
+#define DARK_EMPTY 5 /*!< フロア全体が暗い可能性の基本確率(1/定数) / 1/chance of on_defeat_arena_monster level NOT being lit (2) */
#define DUN_CAVERN 20 /*!< 洞窟状のダンジョンが生成される基本確率(1/定数) / 1/chance of having a cavern level */
/*