* @brief 魔法系コマンドが制限されているかを返す。
* @return 魔法系コマンドを使用可能ならFALSE、不可能ならば理由をメッセージ表示してTRUEを返す。
*/
-bool cmd_limit_cast(player_type *player_ptr)
+bool cmd_limit_cast(PlayerType *player_ptr)
{
if (is_in_dungeon(player_ptr) && (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::NO_MAGIC))) {
msg_print(_("ダンジョンが魔法を吸収した!", "The dungeon absorbs all attempted magic!"));
return false;
}
-bool cmd_limit_confused(player_type *player_ptr)
+bool cmd_limit_confused(PlayerType *player_ptr)
{
if (player_ptr->confused) {
msg_print(_("混乱していてできない!", "You are too confused!"));
return false;
}
-bool cmd_limit_image(player_type *player_ptr)
+bool cmd_limit_image(PlayerType *player_ptr)
{
if (player_ptr->hallucinated) {
msg_print(_("幻覚が見えて集中できない!", "Your hallucinations prevent you from concentrating!"));
return false;
}
-bool cmd_limit_stun(player_type *player_ptr)
+bool cmd_limit_stun(PlayerType *player_ptr)
{
if (player_ptr->effects()->stun()->is_stunned()) {
msg_print(_("頭が朦朧としていて集中できない!", "You are too stunned!"));
return false;
}
-bool cmd_limit_arena(player_type *player_ptr)
+bool cmd_limit_arena(PlayerType *player_ptr)
{
if (player_ptr->current_floor_ptr->inside_arena) {
msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
return false;
}
-bool cmd_limit_blind(player_type *player_ptr)
+bool cmd_limit_blind(PlayerType *player_ptr)
{
if (player_ptr->blind) {
msg_print(_("目が見えない。", "You can't see anything."));
return false;
}
-bool cmd_limit_time_walk(player_type *player_ptr)
+bool cmd_limit_time_walk(PlayerType *player_ptr)
{
if (player_ptr->timewalk) {
if (flush_failure)
* @brief プレイヤーの行動制約判定ヘッダ
*/
-struct player_type;
-bool cmd_limit_cast(player_type *player_ptr);
-bool cmd_limit_arena(player_type *player_ptr);
-bool cmd_limit_time_walk(player_type *player_ptr);
-bool cmd_limit_blind(player_type *player_ptr);
-bool cmd_limit_confused(player_type *player_ptr);
-bool cmd_limit_image(player_type *player_ptr);
-bool cmd_limit_stun(player_type *player_ptr);
+class PlayerType;
+bool cmd_limit_cast(PlayerType *player_ptr);
+bool cmd_limit_arena(PlayerType *player_ptr);
+bool cmd_limit_time_walk(PlayerType *player_ptr);
+bool cmd_limit_blind(PlayerType *player_ptr);
+bool cmd_limit_confused(PlayerType *player_ptr);
+bool cmd_limit_image(PlayerType *player_ptr);
+bool cmd_limit_stun(PlayerType *player_ptr);
ae_ptr->lev = e_info[ae_ptr->o_ptr->name2].level;
}
-static void decide_chance_fail(player_type *player_ptr, ae_type *ae_ptr)
+static void decide_chance_fail(PlayerType *player_ptr, ae_type *ae_ptr)
{
ae_ptr->chance = player_ptr->skill_dev;
if (player_ptr->confused)
ae_ptr->chance = USE_DEVICE;
}
-static void decide_activation_success(player_type *player_ptr, ae_type *ae_ptr)
+static void decide_activation_success(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (player_ptr->pclass == PlayerClassType::BERSERKER) {
ae_ptr->success = false;
return false;
}
-static bool check_activation_conditions(player_type *player_ptr, ae_type *ae_ptr)
+static bool check_activation_conditions(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (!check_activation_success(ae_ptr))
return false;
* @param o_ptr 対象のオブジェクト構造体ポインタ
* @return 発動実行の是非を返す。
*/
-static bool activate_artifact(player_type *player_ptr, object_type *o_ptr)
+static bool activate_artifact(PlayerType *player_ptr, object_type *o_ptr)
{
concptr name = k_info[o_ptr->k_idx].name.c_str();
auto tmp_act_ptr = find_activation_info(o_ptr);
}
}
-static bool activate_whistle(player_type *player_ptr, ae_type *ae_ptr)
+static bool activate_whistle(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != ItemKindType::WHISTLE)
return false;
* the user hits "escape" at the "direction" prompt.
* </pre>
*/
-void exe_activate(player_type *player_ptr, INVENTORY_IDX item)
+void exe_activate(PlayerType *player_ptr, INVENTORY_IDX item)
{
PlayerEnergy(player_ptr).set_player_turn_energy(100);
ae_type tmp_ae;
#include "system/angband.h"
-struct player_type;
-void exe_activate(player_type *player_ptr, INVENTORY_IDX item);
+class PlayerType;
+void exe_activate(PlayerType *player_ptr, INVENTORY_IDX item);
* any monster which might be in the destination grid. Previously,\n
* moving into walls was "free" and did NOT hit invisible monsters.\n
*/
-void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool break_trap)
+void exe_movement(PlayerType *player_ptr, DIRECTION dir, bool do_pickup, bool break_trap)
{
POSITION y = player_ptr->y + ddy[dir];
POSITION x = player_ptr->x + ddx[dir];
#include "system/angband.h"
-struct player_type;
-void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool break_trap);
+class PlayerType;
+void exe_movement(PlayerType *player_ptr, DIRECTION dir, bool do_pickup, bool break_trap);
* @param power 発動させる突然変異レイシャルのID
* @return レイシャルを実行した場合TRUE、キャンセルした場合FALSEを返す
*/
-bool exe_mutation_power(player_type *player_ptr, PlayerMutationType power)
+bool exe_mutation_power(PlayerType *player_ptr, PlayerMutationType power)
{
DIRECTION dir = 0;
PLAYER_LEVEL lvl = player_ptr->lev;
*/
enum class PlayerMutationType;
-struct player_type;
-bool exe_mutation_power(player_type *player_ptr, PlayerMutationType power);
+class PlayerType;
+bool exe_mutation_power(PlayerType *player_ptr, PlayerMutationType power);
* @param x 対象を行うマスのX座標
* @return 連続でコマンドを実行する時のみTRUE、1回きりの時はFALSE
*/
-bool exe_open(player_type *player_ptr, POSITION y, POSITION x)
+bool exe_open(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[g_ptr->feat];
* Returns TRUE if repeated commands may continue
* @todo 常にFALSEを返している
*/
-bool exe_close(player_type *player_ptr, POSITION y, POSITION x)
+bool exe_close(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
FEAT_IDX old_feat = g_ptr->feat;
* do_cmd_open_test() and exe_open().
* </pre>
*/
-bool easy_open_door(player_type *player_ptr, POSITION y, POSITION x)
+bool easy_open_door(PlayerType *player_ptr, POSITION y, POSITION x)
{
int i, j;
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
* Returns TRUE if repeated commands may continue
* </pre>
*/
-bool exe_disarm_chest(player_type *player_ptr, POSITION y, POSITION x, OBJECT_IDX o_idx)
+bool exe_disarm_chest(PlayerType *player_ptr, POSITION y, POSITION x, OBJECT_IDX o_idx)
{
bool more = false;
object_type *o_ptr = &player_ptr->current_floor_ptr->o_list[o_idx];
* </pre>
*/
-bool exe_disarm(player_type *player_ptr, POSITION y, POSITION x, DIRECTION dir)
+bool exe_disarm(PlayerType *player_ptr, POSITION y, POSITION x, DIRECTION dir)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[g_ptr->feat];
* Returns TRUE if repeated commands may continue
* </pre>
*/
-bool exe_bash(player_type *player_ptr, POSITION y, POSITION x, DIRECTION dir)
+bool exe_bash(PlayerType *player_ptr, POSITION y, POSITION x, DIRECTION dir)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[g_ptr->feat];
#include "system/angband.h"
-struct player_type;
-bool exe_open(player_type *player_ptr, POSITION y, POSITION x);
-bool exe_close(player_type *player_ptr, POSITION y, POSITION x);
-bool easy_open_door(player_type *player_ptr, POSITION y, POSITION x);
-bool exe_disarm(player_type *player_ptr, POSITION y, POSITION x, DIRECTION dir);
-bool exe_disarm_chest(player_type *player_ptr, POSITION y, POSITION x, OBJECT_IDX o_idx);
-bool exe_bash(player_type *player_ptr, POSITION y, POSITION x, DIRECTION dir);
+class PlayerType;
+bool exe_open(PlayerType *player_ptr, POSITION y, POSITION x);
+bool exe_close(PlayerType *player_ptr, POSITION y, POSITION x);
+bool easy_open_door(PlayerType *player_ptr, POSITION y, POSITION x);
+bool exe_disarm(PlayerType *player_ptr, POSITION y, POSITION x, DIRECTION dir);
+bool exe_disarm_chest(PlayerType *player_ptr, POSITION y, POSITION x, OBJECT_IDX o_idx);
+bool exe_bash(PlayerType *player_ptr, POSITION y, POSITION x, DIRECTION dir);
* @details
* If requested, count only trapped chests.
*/
-int count_chests(player_type *player_ptr, POSITION *y, POSITION *x, bool trapped)
+int count_chests(PlayerType *player_ptr, POSITION *y, POSITION *x, bool trapped)
{
int count = 0;
for (DIRECTION d = 0; d < 9; d++) {
#include "system/angband.h"
struct floor_type;
-struct player_type;
+class PlayerType;
OBJECT_IDX chest_check(floor_type *floor_ptr, POSITION y, POSITION x, bool trapped);
-int count_chests(player_type *player_ptr, POSITION *y, POSITION *x, bool trapped);
+int count_chests(PlayerType *player_ptr, POSITION *y, POSITION *x, bool trapped);
* @param command 発動するレイシャルのID
* @return 処理を実際に実行した場合はTRUE、キャンセルした場合FALSEを返す。
*/
-bool exe_racial_power(player_type *player_ptr, const int32_t command)
+bool exe_racial_power(PlayerType *player_ptr, const int32_t command)
{
if (command <= -3)
return switch_class_racial_execution(player_ptr, command);
* @param rpi_ptr 発動したいレイシャル・パワー情報の構造体参照ポインタ
* @return 成功率(%)を返す
*/
-PERCENTAGE racial_chance(player_type *player_ptr, rpi_type *rpi_ptr)
+PERCENTAGE racial_chance(PlayerType *player_ptr, rpi_type *rpi_ptr)
{
if ((player_ptr->lev < rpi_ptr->min_level) || player_ptr->confused)
return 0;
return ((sum * 100) / difficulty) / stat;
}
-static void adjust_racial_power_difficulty(player_type *player_ptr, rpi_type *rpi_ptr, int *difficulty)
+static void adjust_racial_power_difficulty(PlayerType *player_ptr, rpi_type *rpi_ptr, int *difficulty)
{
if (*difficulty == 0)
return;
* @param rpi_ptr 発動したいレイシャル・パワー情報の構造体参照ポインタ
* @return racial_level_check_result
*/
-racial_level_check_result check_racial_level(player_type *player_ptr, rpi_type *rpi_ptr)
+racial_level_check_result check_racial_level(PlayerType *player_ptr, rpi_type *rpi_ptr)
{
PLAYER_LEVEL min_level = rpi_ptr->min_level;
int use_stat = rpi_ptr->stat;
};
struct rpi_type;
-struct player_type;
-PERCENTAGE racial_chance(player_type *player_ptr, rpi_type *rpi_ptr);
-racial_level_check_result check_racial_level(player_type *player_ptr, rpi_type *rpi_ptr);
-bool exe_racial_power(player_type *player_ptr, const int32_t command);
+class PlayerType;
+PERCENTAGE racial_chance(PlayerType *player_ptr, rpi_type *rpi_ptr);
+racial_level_check_result check_racial_level(PlayerType *player_ptr, rpi_type *rpi_ptr);
+bool exe_racial_power(PlayerType *player_ptr, const int32_t command);
* @param x 移動元のX座標
* @return 移動先が既知の壁ならばTRUE
*/
-static bool see_wall(player_type *player_ptr, DIRECTION dir, POSITION y, POSITION x)
+static bool see_wall(PlayerType *player_ptr, DIRECTION dir, POSITION y, POSITION x)
{
y += ddy[dir];
x += ddx[dir];
* \#x\# \@x\#\n
* \@\@p. p\n
*/
-static void run_init(player_type *player_ptr, DIRECTION dir)
+static void run_init(PlayerType *player_ptr, DIRECTION dir)
{
find_current = dir;
find_prevdir = dir;
* @param x 移動元のX座標
* @return 移動先が未知の地形ならばTRUE
*/
-static bool see_nothing(player_type *player_ptr, DIRECTION dir, POSITION y, POSITION x)
+static bool see_nothing(PlayerType *player_ptr, DIRECTION dir, POSITION y, POSITION x)
{
y += ddy[dir];
x += ddx[dir];
* ダッシュ移動が継続できるならばTRUEを返す。
* Return TRUE if the running should be stopped
*/
-static bool run_test(player_type *player_ptr)
+static bool run_test(PlayerType *player_ptr)
{
DIRECTION prev_dir = find_prevdir;
int max = (prev_dir & 0x01) + 1;
* @param player_ptr プレイヤーへの参照ポインタ
* @param dir 移動を試みる方向ID
*/
-void run_step(player_type *player_ptr, DIRECTION dir)
+void run_step(PlayerType *player_ptr, DIRECTION dir)
{
if (dir) {
ignore_avoid_run = true;
extern byte cycle[MAX_RUN_CYCLES];
extern byte chome[MAX_RUN_CHOME];
-struct player_type;
-void run_step(player_type *player_ptr, DIRECTION dir);
+class PlayerType;
+void run_step(PlayerType *player_ptr, DIRECTION dir);
* @param prev_dir 前回移動を行った元の方角ID
* @return 次の方向
*/
-static DIRECTION travel_test(player_type *player_ptr, DIRECTION prev_dir)
+static DIRECTION travel_test(PlayerType *player_ptr, DIRECTION prev_dir)
{
if (player_ptr->blind || no_lite(player_ptr)) {
msg_print(_("目が見えない!", "You cannot see!"));
* Travel command
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void travel_step(player_type *player_ptr)
+void travel_step(PlayerType *player_ptr)
{
travel.dir = travel_test(player_ptr, travel.dir);
if (!travel.dir) {
extern travel_type travel;
struct floor_type;
-struct player_type;
-void travel_step(player_type *player_ptr);
+class PlayerType;
+void travel_step(PlayerType *player_ptr);
void forget_travel_flow(floor_type *floor_ptr);
* Do not use twall anymore
* Returns TRUE if repeated commands may continue
*/
-bool exe_tunnel(player_type *player_ptr, POSITION y, POSITION x)
+bool exe_tunnel(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr;
feature_type *f_ptr, *mimic_f_ptr;
#include "system/angband.h"
-struct player_type;
-bool exe_tunnel(player_type *player_ptr, POSITION y, POSITION x);
+class PlayerType;
+bool exe_tunnel(PlayerType *player_ptr, POSITION y, POSITION x);
* @param player_ptr プレイヤーへの参照ポインタ
* @param item 持ち替えを行いたい装備部位ID
*/
-void verify_equip_slot(player_type *player_ptr, INVENTORY_IDX item)
+void verify_equip_slot(PlayerType *player_ptr, INVENTORY_IDX item)
{
object_type *o_ptr, *new_o_ptr;
GAME_TEXT o_name[MAX_NLEN];
#include "system/angband.h"
-struct player_type;
-void verify_equip_slot(player_type *player_ptr, INVENTORY_IDX item);
+class PlayerType;
+void verify_equip_slot(PlayerType *player_ptr, INVENTORY_IDX item);
* 純戦士系職業は追加能力/耐性がもらえる。
* それ以外では、反感、太古の怨念、呪いが付き追加能力/耐性はもらえない。
*/
-static bool invest_terror_mask(player_type *player_ptr, object_type *o_ptr)
+static bool invest_terror_mask(PlayerType *player_ptr, object_type *o_ptr)
{
if (o_ptr->name1 != ART_TERROR)
return false;
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr 対象のオブジェクト構造体への参照ポインタ
*/
-static void milim_swimsuit(player_type *player_ptr, object_type *o_ptr)
+static void milim_swimsuit(PlayerType *player_ptr, object_type *o_ptr)
{
if ((o_ptr->name1 != ART_MILIM) || (player_ptr->ppersonality != PERSONALITY_SEXY))
return;
* @details
* 対象は村正、ロビントンのハープ、龍争虎鬪、ブラッディムーン、羽衣、天女の羽衣、ミリム
*/
-static void invest_special_artifact_abilities(player_type *player_ptr, object_type *o_ptr)
+static void invest_special_artifact_abilities(PlayerType *player_ptr, object_type *o_ptr)
{
switch (o_ptr->name1) {
case ART_MURAMASA:
* @param a_ptr 固定アーティファクト情報への参照ポインタ
* @param q_ptr オブジェクト情報への参照ポインタ
*/
-static void fixed_artifact_random_abilities(player_type *player_ptr, artifact_type *a_ptr, object_type *o_ptr)
+static void fixed_artifact_random_abilities(PlayerType *player_ptr, artifact_type *a_ptr, object_type *o_ptr)
{
auto give_power = false;
auto give_resistance = false;
* @param o_ptr 生成に割り当てたいオブジェクトの構造体参照ポインタ
* @return 適用したアーティファクト情報への参照ポインタ
*/
-artifact_type *apply_artifact(player_type *player_ptr, object_type *o_ptr)
+artifact_type *apply_artifact(PlayerType *player_ptr, object_type *o_ptr)
{
auto a_ptr = &a_info[o_ptr->name1];
o_ptr->pval = a_ptr->pval;
* 仮に2個以上存在可能かつ装備品以外の固定アーティファクトが作成されれば
* drop_near()関数の返り値は信用できなくなる.
*/
-bool create_named_art(player_type *player_ptr, ARTIFACT_IDX a_idx, POSITION y, POSITION x)
+bool create_named_art(PlayerType *player_ptr, ARTIFACT_IDX a_idx, POSITION y, POSITION x)
{
auto a_ptr = &a_info[a_idx];
if (a_ptr->name.empty())
* This routine should only be called by "apply_magic()"\n
* Note -- see "make_artifact_special()" and "apply_magic()"\n
*/
-bool make_artifact(player_type *player_ptr, object_type *o_ptr)
+bool make_artifact(PlayerType *player_ptr, object_type *o_ptr)
{
auto floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->dun_level == 0)
*\n
* Note -- see "make_artifact()" and "apply_magic()"\n
*/
-bool make_artifact_special(player_type *player_ptr, object_type *o_ptr)
+bool make_artifact_special(PlayerType *player_ptr, object_type *o_ptr)
{
KIND_OBJECT_IDX k_idx = 0;
typedef struct artifact_type artifact_type;
struct object_type;
-struct player_type;
-bool create_named_art(player_type *player_ptr, ARTIFACT_IDX a_idx, POSITION y, POSITION x);
-bool make_artifact(player_type *player_ptr, object_type *o_ptr);
-artifact_type *apply_artifact(player_type *player_ptr, object_type *o_ptr);
-bool make_artifact_special(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool create_named_art(PlayerType *player_ptr, ARTIFACT_IDX a_idx, POSITION y, POSITION x);
+bool make_artifact(PlayerType *player_ptr, object_type *o_ptr);
+artifact_type *apply_artifact(PlayerType *player_ptr, object_type *o_ptr);
+bool make_artifact_special(PlayerType *player_ptr, object_type *o_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr 対象のオブジェクト構造体ポインタ
*/
-void curse_artifact(player_type *player_ptr, object_type *o_ptr)
+void curse_artifact(PlayerType *player_ptr, object_type *o_ptr)
{
pval_subtraction(o_ptr);
o_ptr->curse_flags.set({ CurseTraitType::HEAVY_CURSE, CurseTraitType::CURSED });
}
/*対邪平均ダメージの計算処理*/
-static HIT_POINT calc_arm_avgdamage(player_type *player_ptr, object_type *o_ptr)
+static HIT_POINT calc_arm_avgdamage(PlayerType *player_ptr, object_type *o_ptr)
{
auto flgs = object_flags(o_ptr);
HIT_POINT base, forced, vorpal;
return dam;
}
-bool has_extreme_damage_rate(player_type *player_ptr, object_type *o_ptr)
+bool has_extreme_damage_rate(PlayerType *player_ptr, object_type *o_ptr)
{
auto flgs = object_flags(o_ptr);
if (flgs.has(TR_VAMPIRIC)) {
*/
struct object_type;
-struct player_type;
-void curse_artifact(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+void curse_artifact(PlayerType *player_ptr, object_type *o_ptr);
void get_random_name(object_type *o_ptr, char *return_name, bool armour, int power);
-bool has_extreme_damage_rate(player_type *player_ptr, object_type *o_ptr);
+bool has_extreme_damage_rate(PlayerType *player_ptr, object_type *o_ptr);
return false;
}
-static void set_artifact_bias(player_type *player_ptr, object_type *o_ptr, int *warrior_artifact_bias)
+static void set_artifact_bias(PlayerType *player_ptr, object_type *o_ptr, int *warrior_artifact_bias)
{
switch (player_ptr->pclass) {
case PlayerClassType::WARRIOR:
}
}
-static void decide_warrior_bias(player_type *player_ptr, object_type *o_ptr, const bool a_scroll)
+static void decide_warrior_bias(PlayerType *player_ptr, object_type *o_ptr, const bool a_scroll)
{
int warrior_artifact_bias = 0;
if (a_scroll && one_in_(4))
return powers;
}
-static void invest_powers(player_type *player_ptr, object_type *o_ptr, int *powers, bool *has_pval, const bool a_cursed)
+static void invest_powers(PlayerType *player_ptr, object_type *o_ptr, int *powers, bool *has_pval, const bool a_cursed)
{
int max_type = o_ptr->is_weapon_ammo() ? 7 : 5;
while ((*powers)--) {
return 3;
}
-static void name_unnatural_random_artifact(player_type *player_ptr, object_type *o_ptr, const bool a_scroll, const int power_level, GAME_TEXT *new_name)
+static void name_unnatural_random_artifact(PlayerType *player_ptr, object_type *o_ptr, const bool a_scroll, const int power_level, GAME_TEXT *new_name)
{
if (!a_scroll) {
get_random_name(o_ptr, new_name, o_ptr->is_armour(), power_level);
}
static void generate_unnatural_random_artifact(
- player_type *player_ptr, object_type *o_ptr, const bool a_scroll, const int power_level, const int max_powers, const int total_flags)
+ PlayerType *player_ptr, object_type *o_ptr, const bool a_scroll, const int power_level, const int max_powers, const int total_flags)
{
GAME_TEXT new_name[1024];
strcpy(new_name, "");
* @param a_scroll アーティファクト生成の巻物上の処理。呪いのアーティファクトが生成対象外となる。
* @return 常にTRUE(1)を返す
*/
-bool become_random_artifact(player_type *player_ptr, object_type *o_ptr, bool a_scroll)
+bool become_random_artifact(PlayerType *player_ptr, object_type *o_ptr, bool a_scroll)
{
o_ptr->artifact_bias = 0;
o_ptr->name1 = 0;
*/
struct object_type;
-struct player_type;
-bool become_random_artifact(player_type *player_ptr, object_type *o_ptr, bool a_scroll);
+class PlayerType;
+bool become_random_artifact(PlayerType *player_ptr, object_type *o_ptr, bool a_scroll);
* @attention オブジェクトのtval、svalに依存したハードコーディング処理がある。
* @param o_ptr 対象のオブジェクト構造体ポインタ
*/
-void random_misc(player_type *player_ptr, object_type *o_ptr)
+void random_misc(PlayerType *player_ptr, object_type *o_ptr)
{
if (switch_misc_bias(o_ptr))
return;
*/
struct object_type;
-struct player_type;
-void random_misc(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+void random_misc(PlayerType *player_ptr, object_type *o_ptr);
* @param o_ptr アイテムへの参照ポインタ
* @return 特別なクラス、かつそのクラス特有のアイテムであればFALSE、それ以外はTRUE
*/
-static bool is_leave_special_item(player_type *player_ptr, object_type *o_ptr)
+static bool is_leave_special_item(PlayerType *player_ptr, object_type *o_ptr)
{
if (!leave_special)
return true;
/*!
* @brief Automatically destroy items in this grid.
*/
-static bool is_opt_confirm_destroy(player_type *player_ptr, object_type *o_ptr)
+static bool is_opt_confirm_destroy(PlayerType *player_ptr, object_type *o_ptr)
{
if (!destroy_items)
return false;
return true;
}
-void auto_destroy_item(player_type *player_ptr, object_type *o_ptr, int autopick_idx)
+void auto_destroy_item(PlayerType *player_ptr, object_type *o_ptr, int autopick_idx)
{
bool destroy = false;
if (is_opt_confirm_destroy(player_ptr, o_ptr))
#pragma once
struct object_type;
-struct player_type;
-void auto_destroy_item(player_type *player_ptr, object_type *o_ptr, int autopick_idx);
+class PlayerType;
+void auto_destroy_item(PlayerType *player_ptr, object_type *o_ptr, int autopick_idx);
#define DESCRIPT_HGT 3
-static void process_dirty_expression(player_type *player_ptr, text_body_type *tb)
+static void process_dirty_expression(PlayerType *player_ptr, text_body_type *tb)
{
if ((tb->dirty_flags & DIRTY_EXPRESSION) == 0)
return;
/*!
* @brief Draw text
*/
-void draw_text_editor(player_type *player_ptr, text_body_type *tb)
+void draw_text_editor(PlayerType *player_ptr, text_body_type *tb)
{
int by1 = 0, by2 = 0;
#pragma once
struct text_body_type;
-struct player_type;
-void draw_text_editor(player_type *player_ptr, text_body_type *tb);
+class PlayerType;
+void draw_text_editor(PlayerType *player_ptr, text_body_type *tb);
* @return
* @details Execute a single editor command
*/
-ape_quittance do_editor_command(player_type *player_ptr, text_body_type *tb, int com_id)
+ape_quittance do_editor_command(PlayerType *player_ptr, text_body_type *tb, int com_id)
{
switch (com_id) {
case EC_QUIT: {
APE_QUIT_AND_SAVE = 2
};
-struct player_type;
+class PlayerType;
struct text_body_type;
-ape_quittance do_editor_command(player_type *player_ptr, text_body_type *tb, int com_id);
+ape_quittance do_editor_command(PlayerType *player_ptr, text_body_type *tb, int com_id);
/*!
* @brief Get auto-picker entry from o_ptr.
*/
-void autopick_entry_from_object(player_type *player_ptr, autopick_type *entry, object_type *o_ptr)
+void autopick_entry_from_object(PlayerType *player_ptr, autopick_type *entry, object_type *o_ptr)
{
/* Assume that object name is to be added */
bool name = true;
/*!
* @brief Choose an item and get auto-picker entry from it.
*/
-bool entry_from_choosed_object(player_type *player_ptr, autopick_type *entry)
+bool entry_from_choosed_object(PlayerType *player_ptr, autopick_type *entry)
{
concptr q = _("どのアイテムを登録しますか? ", "Enter which item? ");
concptr s = _("アイテムを持っていない。", "You have nothing to enter.");
typedef struct autopick_type autopick_type;
struct object_type;
-struct player_type;
+class PlayerType;
bool autopick_new_entry(autopick_type *entry, concptr str, bool allow_default);
-void autopick_entry_from_object(player_type *player_ptr, autopick_type *entry, object_type *o_ptr);
+void autopick_entry_from_object(PlayerType *player_ptr, autopick_type *entry, object_type *o_ptr);
concptr autopick_line_from_entry(autopick_type *entry);
concptr autopick_line_from_entry_kill(autopick_type *entry);
-bool entry_from_choosed_object(player_type *player_ptr, autopick_type *entry);
+bool entry_from_choosed_object(PlayerType *player_ptr, autopick_type *entry);
* A function for Auto-picker/destroyer
* Examine whether the object matches to the list of keywords or not.
*/
-int find_autopick_list(player_type *player_ptr, object_type *o_ptr)
+int find_autopick_list(PlayerType *player_ptr, object_type *o_ptr)
{
GAME_TEXT o_name[MAX_NLEN];
if (o_ptr->tval == ItemKindType::GOLD)
/*!
* @brief Choose an item for search
*/
-bool get_object_for_search(player_type *player_ptr, object_type **o_handle, concptr *search_strp)
+bool get_object_for_search(PlayerType *player_ptr, object_type **o_handle, concptr *search_strp)
{
concptr q = _("どのアイテムを検索しますか? ", "Enter which item? ");
concptr s = _("アイテムを持っていない。", "You have nothing to enter.");
/*!
* @brief Prepare for search by destroyed object
*/
-bool get_destroyed_object_for_search(player_type *player_ptr, object_type **o_handle, concptr *search_strp)
+bool get_destroyed_object_for_search(PlayerType *player_ptr, object_type **o_handle, concptr *search_strp)
{
if (!autopick_last_destroyed_object.k_idx)
return false;
* TERM_YELLOW : Overwrite mode
* TERM_WHITE : Insert mode
*/
-byte get_string_for_search(player_type *player_ptr, object_type **o_handle, concptr *search_strp)
+byte get_string_for_search(PlayerType *player_ptr, object_type **o_handle, concptr *search_strp)
{
byte color = TERM_YELLOW;
char buf[MAX_NLEN + 20];
/*!
* @brief Search next line matches for o_ptr
*/
-void search_for_object(player_type *player_ptr, text_body_type *tb, object_type *o_ptr, bool forward)
+void search_for_object(PlayerType *player_ptr, text_body_type *tb, object_type *o_ptr, bool forward)
{
autopick_type an_entry, *entry = &an_entry;
GAME_TEXT o_name[MAX_NLEN];
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
struct text_body_type;
-int find_autopick_list(player_type *player_ptr, object_type *o_ptr);
-bool get_object_for_search(player_type *player_ptr, object_type **o_handle, concptr *search_strp);
-bool get_destroyed_object_for_search(player_type *player_ptr, object_type **o_handle, concptr *search_strp);
-byte get_string_for_search(player_type *player_ptr, object_type **o_handle, concptr *search_strp);
-void search_for_object(player_type *player_ptr, text_body_type *tb, object_type *o_ptr, bool forward);
+int find_autopick_list(PlayerType *player_ptr, object_type *o_ptr);
+bool get_object_for_search(PlayerType *player_ptr, object_type **o_handle, concptr *search_strp);
+bool get_destroyed_object_for_search(PlayerType *player_ptr, object_type **o_handle, concptr *search_strp);
+byte get_string_for_search(PlayerType *player_ptr, object_type **o_handle, concptr *search_strp);
+void search_for_object(PlayerType *player_ptr, text_body_type *tb, object_type *o_ptr, bool forward);
void search_for_string(text_body_type *tb, concptr search_str, bool forward);
/*!
* @brief A function for Auto-picker/destroyer Examine whether the object matches to the entry
*/
-bool is_autopick_match(player_type *player_ptr, object_type *o_ptr, autopick_type *entry, concptr o_name)
+bool is_autopick_match(PlayerType *player_ptr, object_type *o_ptr, autopick_type *entry, concptr o_name)
{
concptr ptr = entry->name.c_str();
if (IS_FLG(FLG_UNAWARE) && o_ptr->is_aware())
typedef struct autopick_type autopick_type;
struct object_type;
-struct player_type;
-bool is_autopick_match(player_type *player_ptr, object_type *o_ptr, autopick_type *entry, concptr o_name);
+class PlayerType;
+bool is_autopick_match(PlayerType *player_ptr, object_type *o_ptr, autopick_type *entry, concptr o_name);
/*!
* @brief Load an autopick preference file
*/
-void autopick_load_pref(player_type *player_ptr, bool disp_mes)
+void autopick_load_pref(PlayerType *player_ptr, bool disp_mes)
{
GAME_TEXT buf[80];
init_autopick();
/*!
* @brief Get file name for autopick preference
*/
-concptr pickpref_filename(player_type *player_ptr, int filename_mode)
+concptr pickpref_filename(PlayerType *player_ptr, int filename_mode)
{
static const char namebase[] = _("picktype", "pickpref");
/*!
* @brief Copy the default autopick file to the user directory
*/
-static void prepare_default_pickpref(player_type *player_ptr)
+static void prepare_default_pickpref(PlayerType *player_ptr)
{
const concptr messages[] = { _("あなたは「自動拾いエディタ」を初めて起動しました。", "You have activated the Auto-Picker Editor for the first time."),
_("自動拾いのユーザー設定ファイルがまだ書かれていないので、", "Since user pref file for autopick is not yet created,"),
* @brief Read an autopick prefence file to memory
* Prepare default if no user file is found
*/
-std::vector<concptr> read_pickpref_text_lines(player_type *player_ptr, int *filename_mode_p)
+std::vector<concptr> read_pickpref_text_lines(PlayerType *player_ptr, int *filename_mode_p)
{
/* Try a filename with player name */
*filename_mode_p = PT_WITH_PNAME;
#include <vector>
-struct player_type;
-void autopick_load_pref(player_type *player_ptr, bool disp_mes);
-std::vector<concptr> read_pickpref_text_lines(player_type *player_ptr, int *filename_mode_p);
+class PlayerType;
+void autopick_load_pref(PlayerType *player_ptr, bool disp_mes);
+std::vector<concptr> read_pickpref_text_lines(PlayerType *player_ptr, int *filename_mode_p);
bool write_text_lines(concptr filename, concptr *lines_list);
-concptr pickpref_filename(player_type *player_ptr, int filename_mode);
+concptr pickpref_filename(PlayerType *player_ptr, int filename_mode);
/*!
* @brief Clear auto registered lines in the picktype.prf .
*/
-static bool clear_auto_register(player_type *player_ptr)
+static bool clear_auto_register(PlayerType *player_ptr)
{
char pref_file[1024];
path_build(pref_file, sizeof(pref_file), ANGBAND_DIR_USER, pickpref_filename(player_ptr, PT_WITH_PNAME));
/*!
* @brief Automatically register an auto-destroy preference line
*/
-bool autopick_autoregister(player_type *player_ptr, object_type *o_ptr)
+bool autopick_autoregister(PlayerType *player_ptr, object_type *o_ptr)
{
autopick_type an_entry, *entry = &an_entry;
int autopick_registered = find_autopick_list(player_ptr, o_ptr);
#pragma once
struct object_type;
-struct player_type;
-bool autopick_autoregister(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool autopick_autoregister(PlayerType *player_ptr, object_type *o_ptr);
/*!
* @brief Auto inscription
*/
-void auto_inscribe_item(player_type *player_ptr, object_type *o_ptr, int idx)
+void auto_inscribe_item(PlayerType *player_ptr, object_type *o_ptr, int idx)
{
if (idx < 0 || autopick_list[idx].insc.empty())
return;
extern std::vector<autopick_type> autopick_list;
extern object_type autopick_last_destroyed_object;
-struct player_type;
+class PlayerType;
void free_text_lines(std::vector<concptr> &lines_list);
int get_com_id(char key);
-void auto_inscribe_item(player_type *player_ptr, object_type *o_ptr, int idx);
+void auto_inscribe_item(PlayerType *player_ptr, object_type *o_ptr, int idx);
int count_line(text_body_type *tb);
/*!
/*!
* @brief Auto-destroy marked item
*/
-static void autopick_delayed_alter_aux(player_type *player_ptr, INVENTORY_IDX item)
+static void autopick_delayed_alter_aux(PlayerType *player_ptr, INVENTORY_IDX item)
{
object_type *o_ptr;
o_ptr = ref_item(player_ptr, item);
* Scan inventry in reverse order to prevent
* skipping after inven_item_optimize()
*/
-void autopick_delayed_alter(player_type *player_ptr)
+void autopick_delayed_alter(PlayerType *player_ptr)
{
for (INVENTORY_IDX item = INVEN_TOTAL - 1; item >= 0; item--)
autopick_delayed_alter_aux(player_ptr, item);
* Auto-destroyer works only on inventory or on floor stack only when
* requested.
*/
-void autopick_alter_item(player_type *player_ptr, INVENTORY_IDX item, bool destroy)
+void autopick_alter_item(PlayerType *player_ptr, INVENTORY_IDX item, bool destroy)
{
object_type *o_ptr;
o_ptr = ref_item(player_ptr, item);
/*!
* @brief Automatically pickup/destroy items in this grid.
*/
-void autopick_pickup_items(player_type *player_ptr, grid_type *g_ptr)
+void autopick_pickup_items(PlayerType *player_ptr, grid_type *g_ptr)
{
for (auto it = g_ptr->o_idx_list.begin(); it != g_ptr->o_idx_list.end();) {
OBJECT_IDX this_o_idx = *it++;
#include "system/angband.h"
struct grid_type;;
-struct player_type;
-void autopick_alter_item(player_type *player_ptr, INVENTORY_IDX item, bool destroy);
-void autopick_delayed_alter(player_type *player_ptr);
-void autopick_pickup_items(player_type *player_ptr, grid_type *g_ptr);
+class PlayerType;
+void autopick_alter_item(PlayerType *player_ptr, INVENTORY_IDX item, bool destroy);
+void autopick_delayed_alter(PlayerType *player_ptr);
+void autopick_pickup_items(PlayerType *player_ptr, grid_type *g_ptr);
/*!
* @brief AvaterChangerコンストラクタ
*/
-AvatarChanger::AvatarChanger(player_type *player_ptr, monster_type *m_ptr)
+AvatarChanger::AvatarChanger(PlayerType *player_ptr, monster_type *m_ptr)
: player_ptr(player_ptr)
, m_ptr(m_ptr)
{
#include "system/angband.h"
struct monster_type;
-struct player_type;
+class PlayerType;
class AvatarChanger {
public:
- AvatarChanger(player_type *player_ptr, monster_type *m_ptr);
+ AvatarChanger(PlayerType *player_ptr, monster_type *m_ptr);
virtual ~AvatarChanger() = default;
void change_virtue();
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
monster_type *m_ptr;
void change_virtue_non_beginner();
void change_virtue_unique();
* @return 比較の真偽値を返す
* @todo 引数名を直しておく
*/
-bool compare_virtue(player_type *player_ptr, int type, int num, int tekitou)
+bool compare_virtue(PlayerType *player_ptr, int type, int num, int tekitou)
{
int vir = virtue_number(player_ptr, type) ? player_ptr->virtues[virtue_number(player_ptr, type) - 1] : 0;
switch (tekitou) {
* @param type 確認したい徳のID
* @return スロットがあるならばスロットのID(0~7)+1、ない場合は0を返す。
*/
-int virtue_number(player_type *player_ptr, int type)
+int virtue_number(PlayerType *player_ptr, int type)
{
for (int i = 0; i < 8; i++)
if (player_ptr->vir_types[i] == type)
* @brief プレイヤーの職業や種族に依存しないランダムな徳を取得する / Aux function
* @param which 確認したい徳のID
*/
-static void get_random_virtue(player_type *player_ptr, int which)
+static void get_random_virtue(PlayerType *player_ptr, int which)
{
int type = 0;
while (!(type) || virtue_number(player_ptr, type)) {
* @param realm 魔法領域のID
* @return 対応する徳のID
*/
-static enum virtue_idx get_realm_virtues(player_type *player_ptr, int16_t realm)
+static enum virtue_idx get_realm_virtues(PlayerType *player_ptr, int16_t realm)
{
switch (realm) {
case REALM_LIFE:
* @brief 作成中のプレイヤーキャラクターに徳8種類を与える。 / Select virtues & reset values for a new character
* @details 職業に応じて1~4種が固定、種族に応じて1種類が与えられ、後は重複なくランダムに選択される。
*/
-void initialize_virtues(player_type *player_ptr)
+void initialize_virtues(PlayerType *player_ptr)
{
int i = 0, j = 0;
int16_t tmp_vir;
* @param virtue 徳のID
* @param amount 加減量
*/
-void chg_virtue(player_type *player_ptr, int virtue_id, int amount)
+void chg_virtue(PlayerType *player_ptr, int virtue_id, int amount)
{
for (int i = 0; i < 8; i++) {
if (player_ptr->vir_types[i] != virtue_id)
* @param virtue 徳のID
* @param amount セットしたい値
*/
-void set_virtue(player_type *player_ptr, int virtue_id, int amount)
+void set_virtue(PlayerType *player_ptr, int virtue_id, int amount)
{
for (int i = 0; i < 8; i++)
if (player_ptr->vir_types[i] == virtue_id) {
* @brief 徳のダンプ表示を行う
* @param out_file ファイルポインタ
*/
-void dump_virtues(player_type *player_ptr, FILE *out_file)
+void dump_virtues(PlayerType *player_ptr, FILE *out_file)
{
if (!out_file)
return;
#define VIRTUE_LARGE 1
#define VIRTUE_SMALL 2
-struct player_type;
-bool compare_virtue(player_type *player_ptr, int type, int num, int tekitou);
-int virtue_number(player_type *player_ptr, int type);
+class PlayerType;
+bool compare_virtue(PlayerType *player_ptr, int type, int num, int tekitou);
+int virtue_number(PlayerType *player_ptr, int type);
extern concptr virtue[MAX_VIRTUE];
-void initialize_virtues(player_type *player_ptr);
-void chg_virtue(player_type *player_ptr, int virtue, int amount);
-void set_virtue(player_type *player_ptr, int virtue, int amount);
-void dump_virtues(player_type *player_ptr, FILE *OutFile);
+void initialize_virtues(PlayerType *player_ptr);
+void chg_virtue(PlayerType *player_ptr, int virtue, int amount);
+void set_virtue(PlayerType *player_ptr, int virtue, int amount);
+void dump_virtues(PlayerType *player_ptr, FILE *OutFile);
* 純メイジ系は耐と魔法の能力が17で腕器16。
* デュアルかどうかは最大攻撃回数で決定。(4回以上)
*/
-static void decide_initial_stat(player_type *player_ptr, int *cval)
+static void decide_initial_stat(PlayerType *player_ptr, int *cval)
{
auto pclass = enum2i(player_ptr->pclass);
auto &class_ptr = class_info[pclass];
* @brief オートローラで得たい能力値の基準を決める。
* @param player_ptr プレイヤーへの参照ポインタ
*/
-bool get_stat_limits(player_type *player_ptr)
+bool get_stat_limits(PlayerType *player_ptr)
{
clear_from(10);
put_str(_("能力値を抽選します。最低限得たい能力値を設定して下さい。", "Set minimum stats for picking up your charactor."), 10, 10);
/*!
* @brief オートローラで得たい年齢、身長、体重、社会的地位の基準を決める。
*/
-bool get_chara_limits(player_type *player_ptr, chara_limit_type *chara_limit_ptr)
+bool get_chara_limits(PlayerType *player_ptr, chara_limit_type *chara_limit_ptr)
{
#define MAXITEMS 8
extern int32_t auto_upper_round;
extern int32_t autoroll_chance;
-struct player_type;
-bool get_stat_limits(player_type *player_ptr);
+class PlayerType;
+bool get_stat_limits(PlayerType *player_ptr);
void initialize_chara_limit(chara_limit_type *chara_limit_ptr);
-bool get_chara_limits(player_type *player_ptr, chara_limit_type *chara_limit_ptr);
+bool get_chara_limits(PlayerType *player_ptr, chara_limit_type *chara_limit_ptr);
/*!
* @brief プレイヤーの身長体重を決める / Get character's height and weight
*/
-void get_height_weight(player_type *player_ptr)
+void get_height_weight(PlayerType *player_ptr)
{
int deviation;
switch (player_ptr->psex) {
* @brief プレイヤーの年齢を決める。 / Computes character's age, height, and weight by henkma
* @details 内部でget_height_weight()も呼び出している。
*/
-void get_ahw(player_type *player_ptr)
+void get_ahw(PlayerType *player_ptr)
{
player_ptr->age = rp_ptr->b_age + randint1(rp_ptr->m_age);
get_height_weight(player_ptr);
* @brief プレイヤーの初期所持金を決める。 / Get the player's starting money
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void get_money(player_type *player_ptr)
+void get_money(PlayerType *player_ptr)
{
int gold = (player_ptr->sc * 6) + randint1(100) + 300;
if (player_ptr->pclass == PlayerClassType::TOURIST)
#pragma once
-struct player_type;
-void get_height_weight(player_type *player_ptr);
-void get_ahw(player_type *player_ptr);
-void get_money(player_type *player_ptr);
+class PlayerType;
+void get_height_weight(PlayerType *player_ptr);
+void get_ahw(PlayerType *player_ptr);
+void get_money(PlayerType *player_ptr);
}
}
-static bool select_class(player_type *player_ptr, char *cur, char *sym, int *k)
+static bool select_class(PlayerType *player_ptr, char *cur, char *sym, int *k)
{
auto cs = player_ptr->pclass;
auto os = PlayerClassType::MAX;
/*!
* @brief プレイヤーの職業選択を行う / Player class
*/
-bool get_player_class(player_type *player_ptr)
+bool get_player_class(PlayerType *player_ptr)
{
clear_from(10);
put_str(
#pragma once
-struct player_type;
-bool get_player_class(player_type *player_ptr);
+class PlayerType;
+bool get_player_class(PlayerType *player_ptr);
static const char p2 = ')';
-static void enumerate_personality_list(player_type *player_ptr, concptr *str, char *sym)
+static void enumerate_personality_list(PlayerType *player_ptr, concptr *str, char *sym)
{
char buf[80];
for (int n = 0; n < MAX_PERSONALITIES; n++) {
*os = cs;
}
-static void interpret_personality_select_key_move(player_type *player_ptr, char c, int *cs)
+static void interpret_personality_select_key_move(PlayerType *player_ptr, char c, int *cs)
{
if (c == '8') {
if (*cs >= 4)
}
}
-static bool select_personality(player_type *player_ptr, int *k, concptr *str, char *sym)
+static bool select_personality(PlayerType *player_ptr, int *k, concptr *str, char *sym)
{
char cur[80];
sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
/*!
* @brief プレイヤーの性格選択を行う / Select player's personality
*/
-bool get_player_personality(player_type *player_ptr)
+bool get_player_personality(PlayerType *player_ptr)
{
clear_from(10);
put_str(_("注意:《性格》によってキャラクターの能力やボーナスが変化します。", "Note: Your personality determines various intrinsic abilities and bonuses."),
#pragma once
-struct player_type;
-bool get_player_personality(player_type *player_ptr);
+class PlayerType;
+bool get_player_personality(PlayerType *player_ptr);
}
}
-static bool select_race(player_type *player_ptr, char *sym, int *k)
+static bool select_race(PlayerType *player_ptr, char *sym, int *k)
{
char cur[80];
sprintf(cur, "%c%c%s", '*', p2, _("ランダム", "Random"));
/*!
* @brief プレイヤーの種族選択を行う / Player race
*/
-bool get_player_race(player_type *player_ptr)
+bool get_player_race(PlayerType *player_ptr)
{
clear_from(10);
put_str(
#pragma once
-struct player_type;
-bool get_player_race(player_type *player_ptr);
+class PlayerType;
+bool get_player_race(PlayerType *player_ptr);
return birth_realm_ptr;
}
-static void impose_first_realm(const player_type *player_ptr, uint32_t *choices)
+static void impose_first_realm(const PlayerType *player_ptr, uint32_t *choices)
{
if (player_ptr->realm2 == REALM_SELECT_CANCEL)
return;
}
}
-static void analyze_realms(const player_type *player_ptr, const uint32_t choices, birth_realm_type *birth_realm_ptr)
+static void analyze_realms(const PlayerType *player_ptr, const uint32_t choices, birth_realm_type *birth_realm_ptr)
{
for (int i = 0; i < 32; i++) {
if ((choices & (1UL << i)) == 0)
}
}
-static bool get_a_realm(player_type *player_ptr, birth_realm_type *birth_realm_ptr)
+static bool get_a_realm(PlayerType *player_ptr, birth_realm_type *birth_realm_ptr)
{
birth_realm_ptr->os = birth_realm_ptr->n;
while (true) {
* @return 選択した魔法領域のID
* @details 領域数が0 (戦士等)or 1 (観光客等)なら自動での値を返す
*/
-static byte select_realm(player_type *player_ptr, uint32_t choices, int *count)
+static byte select_realm(PlayerType *player_ptr, uint32_t choices, int *count)
{
byte auto_select = count_realm_selection(choices, count);
clear_from(10);
* @param count 魔法領域の数
* @return 選んだ魔法領域で良ければTRUE、再選択ならばFALSE
*/
-static bool check_realm_selection(player_type *player_ptr, int count)
+static bool check_realm_selection(PlayerType *player_ptr, int count)
{
if (count < 2) {
prt(_("何かキーを押してください", "Hit any key."), 0, 0);
* @brief 選択した魔法領域の解説を表示する / Choose the magical realms
* @return ユーザが魔法領域の確定を選んだらTRUEを返す。
*/
-bool get_player_realms(player_type *player_ptr)
+bool get_player_realms(PlayerType *player_ptr)
{
/* Clean up infomation of modifications */
put_str(" ", 3, 40);
#pragma once
-struct player_type;
-bool get_player_realms(player_type *player_ptr);
+class PlayerType;
+bool get_player_realms(PlayerType *player_ptr);
* calc_bonuses()による、独立ステータスからの副次ステータス算出も行っている。
* For efficiency, we include a chunk of "calc_bonuses()".\n
*/
-void get_stats(player_type *player_ptr)
+void get_stats(PlayerType *player_ptr)
{
while (true) {
int sum = 0;
/*!
* @brief 経験値修正の合計値を計算
*/
-uint16_t get_expfact(player_type *player_ptr)
+uint16_t get_expfact(PlayerType *player_ptr)
{
uint16_t expfact = rp_ptr->r_exp;
/*!
* @brief その他「オートローラ中は算出の対象にしない」副次ステータスを処理する / Roll for some info that the auto-roller ignores
*/
-void get_extra(player_type *player_ptr, bool roll_hitdie)
+void get_extra(PlayerType *player_ptr, bool roll_hitdie)
{
player_ptr->expfact = get_expfact(player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @details 新生の薬やステータスシャッフルでもこの関数が呼ばれる
*/
-void get_max_stats(player_type *player_ptr)
+void get_max_stats(PlayerType *player_ptr)
{
int dice[6];
while (true) {
#include "system/angband.h"
-struct player_type;
+class PlayerType;
int adjust_stat(int value, int amount);
-void get_stats(player_type* player_ptr);
-uint16_t get_expfact(player_type *player_ptr);
-void get_extra(player_type *player_ptr, bool roll_hitdie);
+void get_stats(PlayerType* player_ptr);
+uint16_t get_expfact(PlayerType *player_ptr);
+void get_extra(PlayerType *player_ptr, bool roll_hitdie);
-void get_max_stats(player_type* player_ptr);
+void get_max_stats(PlayerType* player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param helpfile ファイル名
*/
-void show_help(player_type* player_ptr, concptr helpfile)
+void show_help(PlayerType* player_ptr, concptr helpfile)
{
screen_save();
(void)show_file(player_ptr, true, helpfile, nullptr, 0, 0);
screen_load();
}
-void birth_help_option(player_type *player_ptr, char c, birth_kind bk)
+void birth_help_option(PlayerType *player_ptr, char c, birth_kind bk)
{
concptr help_file;
switch (bk) {
BK_AUTO_ROLLER,
};
-struct player_type;
+class PlayerType;
void birth_quit(void);
-void show_help(player_type* player_ptr, concptr helpfile);
-void birth_help_option(player_type *player_ptr, char c, birth_kind bk);
+void show_help(PlayerType* player_ptr, concptr helpfile);
+void birth_help_option(PlayerType *player_ptr, char c, birth_kind bk);
*/
#define AUTOROLLER_STEP 54321L
-static void display_initial_birth_message(player_type *player_ptr)
+static void display_initial_birth_message(PlayerType *player_ptr)
{
term_clear();
put_str(_("名前 :", "Name :"), 1, 26);
* @param c 入力したコマンド
* @details 他の関数名と被りそうだったので少し眺め
*/
-static void display_help_on_sex_select(player_type *player_ptr, char c)
+static void display_help_on_sex_select(PlayerType *player_ptr, char c)
{
if (c == '?')
do_cmd_help(player_ptr);
* @buf 表示用バッファ
* @return やり直すならFALSE、それ以外はTRUE
*/
-static bool get_player_sex(player_type *player_ptr, char *buf)
+static bool get_player_sex(PlayerType *player_ptr, char *buf)
{
const char p2 = ')';
char cur[80];
return true;
}
-static bool let_player_select_race(player_type *player_ptr)
+static bool let_player_select_race(PlayerType *player_ptr)
{
clear_from(10);
player_ptr->prace = PlayerRaceType::HUMAN;
return true;
}
-static bool let_player_select_class(player_type *player_ptr)
+static bool let_player_select_class(PlayerType *player_ptr)
{
clear_from(10);
player_ptr->pclass = PlayerClassType::WARRIOR;
return true;
}
-static bool let_player_select_personality(player_type *player_ptr)
+static bool let_player_select_personality(PlayerType *player_ptr)
{
player_ptr->ppersonality = PERSONALITY_ORDINARY;
while (true) {
return true;
}
-static bool let_player_build_character(player_type *player_ptr)
+static bool let_player_build_character(PlayerType *player_ptr)
{
char buf[80];
if (!get_player_sex(player_ptr, buf))
return true;
}
-static void display_initial_options(player_type *player_ptr)
+static void display_initial_options(PlayerType *player_ptr)
{
uint16_t expfact = get_expfact(player_ptr) - 100;
int16_t adj[A_MAX];
auto_upper_round++;
}
-static bool decide_initial_stat(player_type *player_ptr)
+static bool decide_initial_stat(PlayerType *player_ptr)
{
if (!autoroller)
return true;
return accept;
}
-static bool decide_body_spec(player_type *player_ptr, chara_limit_type chara_limit, bool *accept)
+static bool decide_body_spec(PlayerType *player_ptr, chara_limit_type chara_limit, bool *accept)
{
if (!*accept)
return false;
return *accept;
}
-static bool display_auto_roller_count(player_type *player_ptr, const int col)
+static bool display_auto_roller_count(PlayerType *player_ptr, const int col)
{
if ((auto_round % AUTOROLLER_STEP) != 0)
return false;
return false;
}
-static void exe_auto_roller(player_type *player_ptr, chara_limit_type chara_limit, const int col)
+static void exe_auto_roller(PlayerType *player_ptr, chara_limit_type chara_limit, const int col)
{
while (autoroller || autochara) {
get_stats(player_ptr);
}
}
-static bool display_auto_roller_result(player_type *player_ptr, bool prev, char *c)
+static bool display_auto_roller_result(PlayerType *player_ptr, bool prev, char *c)
{
BIT_FLAGS mode = 0;
while (true) {
* @param chara_limit 社会的地位の要求水準
* @details 2つめの結果以降は、'p'キーで1つ前のロール結果に戻せる。
*/
-static bool display_auto_roller(player_type *player_ptr, chara_limit_type chara_limit)
+static bool display_auto_roller(PlayerType *player_ptr, chara_limit_type chara_limit)
{
bool prev = false;
* @param player_ptr プレイヤーへの参照ポインタ
* @details ついでにステータス限界もここで決めている
*/
-static void set_name_history(player_type *player_ptr)
+static void set_name_history(PlayerType *player_ptr)
{
clear_from(23);
get_name(player_ptr);
* from continuously rolling up characters, which can be VERY
* expensive CPU wise. And it cuts down on player stupidity.
*/
-bool player_birth_wizard(player_type *player_ptr)
+bool player_birth_wizard(PlayerType *player_ptr)
{
display_initial_birth_message(player_ptr);
const char p2 = ')';
#pragma once
-struct player_type;
-bool player_birth_wizard(player_type *player_ptr);
+class PlayerType;
+bool player_birth_wizard(PlayerType *player_ptr);
* @brief プレイヤーキャラの作成結果を日記に書く
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void write_birth_diary(player_type *player_ptr)
+static void write_birth_diary(PlayerType *player_ptr)
{
concptr indent = " ";
* Note that we may be called with "junk" leftover in the various
* fields, so we must be sure to clear them first.
*/
-void player_birth(player_type *player_ptr)
+void player_birth(PlayerType *player_ptr)
{
w_ptr->play_time = 0;
wipe_monsters_list(player_ptr);
#pragma once
-struct player_type;
-void player_birth(player_type *player_ptr);
+class PlayerType;
+void player_birth(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @details 少し長いが、これ1つで処理が完結しているので分割は見送る
*/
-void player_wipe_without_name(player_type *player_ptr)
+void player_wipe_without_name(PlayerType *player_ptr)
{
#ifdef SET_UID
int uid = player_ptr->player_uid;
* @brief ダンジョン内部のクエストを初期化する / Initialize random quests and final quests
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void init_dungeon_quests(player_type *player_ptr)
+void init_dungeon_quests(PlayerType *player_ptr)
{
int number_of_quests = MAX_RANDOM_QUEST - MIN_RANDOM_QUEST + 1;
init_flags = INIT_ASSIGN;
* @details アンデッド系種族は開始時刻を夜からにする / Undead start just sunset
* @details
*/
-void init_turn(player_type *player_ptr)
+void init_turn(PlayerType *player_ptr)
{
if (PlayerRace(player_ptr).life() == PlayerRaceLifeType::UNDEAD) {
w_ptr->game_turn = (TURNS_PER_TICK * 3 * TOWN_DAWN) / 4 + 1;
#pragma once
-struct player_type;
-void player_wipe_without_name(player_type *player_ptr);
-void init_dungeon_quests(player_type *player_ptr);
-void init_turn(player_type *player_ptr);
+class PlayerType;
+void player_wipe_without_name(PlayerType *player_ptr);
+void init_dungeon_quests(PlayerType *player_ptr);
+void init_turn(PlayerType *player_ptr);
* @brief 生い立ちメッセージを編集する。/Character background edit-mode
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void edit_history(player_type *player_ptr)
+void edit_history(PlayerType *player_ptr)
{
char old_history[4][60];
for (int i = 0; i < 4; i++) {
#pragma once
-struct player_type;
-void edit_history(player_type *player_ptr);
+class PlayerType;
+void edit_history(PlayerType *player_ptr);
#include "system/player-type-definition.h"
#include "util/buffer-shaper.h"
-static int get_history_chart(player_type *player_ptr)
+static int get_history_chart(PlayerType *player_ptr)
{
switch (player_ptr->prace) {
case PlayerRaceType::AMBERITE:
* @param buf 生い立ち情報のバッファ
* @details 画面表示と社会的地位の決定が密結合していて分離できない
*/
-static void decide_social_class(player_type *player_ptr, char *buf)
+static void decide_social_class(PlayerType *player_ptr, char *buf)
{
int social_class = randint1(4);
int chart = get_history_chart(player_ptr);
/*!
* @brief プレイヤーの生い立ちの自動生成を行う。 / Get the racial history, and social class, using the "history charts".
*/
-void get_history(player_type *player_ptr)
+void get_history(PlayerType *player_ptr)
{
for (int i = 0; i < 4; i++)
player_ptr->history[i][0] = '\0';
#pragma once
-struct player_type;
-void get_history(player_type *player_ptr);
+class PlayerType;
+void get_history(PlayerType *player_ptr);
/*!
* @brief 所持状態にあるアイテムの中から一部枠の装備可能なものを装備させる。
*/
-void wield_all(player_type *player_ptr)
+void wield_all(PlayerType *player_ptr)
{
object_type object_type_body;
for (INVENTORY_IDX item = INVEN_PACK - 1; item >= 0; item--) {
* @details アイテムを既知のものとした上でwield_all()関数により装備させる。
* @param o_ptr 処理したいオブジェクト構造体の参照ポインタ
*/
-void add_outfit(player_type *player_ptr, object_type *o_ptr)
+void add_outfit(PlayerType *player_ptr, object_type *o_ptr)
{
object_aware(player_ptr, o_ptr);
object_known(o_ptr);
wield_all(player_ptr);
}
-static void decide_initial_items(player_type *player_ptr, object_type *q_ptr)
+static void decide_initial_items(PlayerType *player_ptr, object_type *q_ptr)
{
switch (player_ptr->prace) {
case PlayerRaceType::VAMPIRE:
* @brief 種族/職業/性格などに基づき初期所持アイテムを設定するメインセット関数。 / Init players with some belongings
* @details Having an item makes the player "aware" of its purpose.
*/
-void player_outfit(player_type *player_ptr)
+void player_outfit(PlayerType *player_ptr)
{
object_type *q_ptr;
object_type forge;
#pragma once
struct object_type;
-struct player_type;
-void wield_all(player_type *player_ptr);
-void add_outfit(player_type *player_ptr, object_type *o_ptr);
-void player_outfit(player_type *player_ptr);
+class PlayerType;
+void wield_all(PlayerType *player_ptr);
+void add_outfit(PlayerType *player_ptr, object_type *o_ptr);
+void player_outfit(PlayerType *player_ptr);
/*!
* @brief クイックスタート処理の問い合わせと実行を行う。/Ask whether the player use Quick Start or not.
*/
-bool ask_quick_start(player_type *player_ptr)
+bool ask_quick_start(PlayerType *player_ptr)
{
if (!previous_char.quick_ok)
return false;
* @param birther_ptr クイックスタート構造体の参照ポインタ
* @return なし。
*/
-void save_prev_data(player_type *player_ptr, birther *birther_ptr)
+void save_prev_data(PlayerType *player_ptr, birther *birther_ptr)
{
birther_ptr->psex = player_ptr->psex;
birther_ptr->prace = player_ptr->prace;
* @param swap TRUEならば現在のプレイヤー構造体上との内容をスワップする形で読み込む。
* @return なし。
*/
-void load_prev_data(player_type *player_ptr, bool swap)
+void load_prev_data(PlayerType *player_ptr, bool swap)
{
birther temp;
if (swap)
extern birther previous_char;
-struct player_type;
-bool ask_quick_start(player_type *player_ptr);
-void save_prev_data(player_type *player_ptr, birther *birther_ptr);
-void load_prev_data(player_type *player_ptr, bool swap);
+class PlayerType;
+bool ask_quick_start(PlayerType *player_ptr);
+void save_prev_data(PlayerType *player_ptr, birther *birther_ptr);
+void load_prev_data(PlayerType *player_ptr, bool swap);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool cast_blue_ball_acid(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_acid(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_elec(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_elec(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_fire(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_fire(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_cold(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_cold(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_pois(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_pois(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_nuke(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_nuke(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_nether(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_nether(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_chaos(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_chaos(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
* @param bmc_ptr 青魔法詠唱への参照ポインタ
* @details All my worries are blown away.
*/
-bool cast_blue_ball_water(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_water(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_star_burst(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_star_burst(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_dark_storm(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_dark_storm(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_ball_mana_storm(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_ball_mana_storm(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_acid(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_acid(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_elec(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_elec(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_fire(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_fire(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_cold(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_cold(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_nether(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_nether(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_water(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_water(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_mana(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_mana(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_plasma(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_plasma(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_icee(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_icee(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_bolt_missile(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_bolt_missile(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
*/
struct bmc_type;
-struct player_type;
-bool cast_blue_ball_acid(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_elec(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_fire(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_cold(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_pois(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_nuke(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_nether(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_chaos(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_water(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_star_burst(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_dark_storm(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_ball_mana_storm(player_type *player_ptr, bmc_type *bmc_ptr);
+class PlayerType;
+bool cast_blue_ball_acid(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_elec(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_fire(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_cold(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_pois(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_nuke(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_nether(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_chaos(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_water(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_star_burst(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_dark_storm(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_ball_mana_storm(PlayerType *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_acid(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_elec(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_fire(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_cold(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_nether(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_water(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_mana(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_plasma(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_icee(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_bolt_missile(player_type *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_acid(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_elec(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_fire(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_cold(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_nether(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_water(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_mana(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_plasma(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_icee(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_bolt_missile(PlayerType *player_ptr, bmc_type *bmc_ptr);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool cast_blue_breath_acid(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_acid(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_elec(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_elec(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_fire(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_fire(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_cold(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_cold(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_pois(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_pois(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_nether(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_nether(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_lite(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_lite(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_dark(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_dark(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_conf(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_conf(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_sound(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_sound(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_chaos(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_chaos(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_disenchant(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_disenchant(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_nexus(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_nexus(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_time(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_time(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_inertia(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_inertia(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_gravity(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_gravity(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_shards(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_shards(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_plasma(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_plasma(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_force(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_force(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_mana(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_mana(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_breath_nuke(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_nuke(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
* @param bmc_ptr 青魔法詠唱への参照ポインタ
* @details 永久の刻は過ぎ去れリ.
*/
-bool cast_blue_breath_disintegration(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_breath_disintegration(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
*/
struct bmc_type;
-struct player_type;
-bool cast_blue_breath_acid(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_elec(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_fire(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_cold(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_pois(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_nether(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_lite(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_dark(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_conf(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_sound(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_chaos(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_disenchant(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_nexus(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_time(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_inertia(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_gravity(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_shards(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_plasma(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_force(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_mana(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_nuke(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_breath_disintegration(player_type *player_ptr, bmc_type *bmc_ptr);
+class PlayerType;
+bool cast_blue_breath_acid(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_elec(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_fire(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_cold(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_pois(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_nether(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_lite(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_dark(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_conf(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_sound(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_chaos(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_disenchant(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_nexus(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_time(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_inertia(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_gravity(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_shards(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_plasma(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_force(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_mana(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_nuke(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_breath_disintegration(PlayerType *player_ptr, bmc_type *bmc_ptr);
#include "target/target-types.h"
#include "view/display-messages.h"
-static bool cast_blue_dispel(player_type *player_ptr)
+static bool cast_blue_dispel(PlayerType *player_ptr)
{
if (!target_set(player_ptr, TARGET_KILL))
return false;
return true;
}
-static bool cast_blue_rocket(player_type *player_ptr, bmc_type *bmc_ptr)
+static bool cast_blue_rocket(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-static bool cast_blue_shoot(player_type *player_ptr, bmc_type *bmc_ptr)
+static bool cast_blue_shoot(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-static bool cast_blue_hand_doom(player_type *player_ptr, bmc_type *bmc_ptr)
+static bool cast_blue_hand_doom(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-static bool exe_blue_teleport_back(player_type *player_ptr, GAME_TEXT *m_name)
+static bool exe_blue_teleport_back(PlayerType *player_ptr, GAME_TEXT *m_name)
{
monster_type *m_ptr;
monster_race *r_ptr;
return true;
}
-static bool cast_blue_teleport_back(player_type *player_ptr)
+static bool cast_blue_teleport_back(PlayerType *player_ptr)
{
if (!target_set(player_ptr, TARGET_KILL))
return false;
return true;
}
-static bool cast_blue_teleport_away(player_type *player_ptr, bmc_type *bmc_ptr)
+static bool cast_blue_teleport_away(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-static bool cast_blue_psy_spear(player_type *player_ptr, bmc_type *bmc_ptr)
+static bool cast_blue_psy_spear(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-static bool cast_blue_make_trap(player_type *player_ptr)
+static bool cast_blue_make_trap(PlayerType *player_ptr)
{
if (!target_set(player_ptr, TARGET_KILL))
return false;
return true;
}
-static bool switch_cast_blue_magic(player_type *player_ptr, bmc_type *bmc_ptr, MonsterAbilityType spell)
+static bool switch_cast_blue_magic(PlayerType *player_ptr, bmc_type *bmc_ptr, MonsterAbilityType spell)
{
switch (spell) {
case MonsterAbilityType::SHRIEK:
* @param success TRUEは成功時、FALSEは失敗時の処理を行う
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-bool cast_learned_spell(player_type *player_ptr, MonsterAbilityType spell, const bool success)
+bool cast_learned_spell(PlayerType *player_ptr, MonsterAbilityType spell, const bool success)
{
bmc_type tmp_bm;
bmc_type *bmc_ptr = initialize_blue_magic_type(player_ptr, &tmp_bm, success, get_pseudo_monstetr_level);
enum class MonsterAbilityType;
-struct player_type;
-bool cast_learned_spell(player_type *player_ptr, MonsterAbilityType spell, const bool success);
+class PlayerType;
+bool cast_learned_spell(PlayerType *player_ptr, MonsterAbilityType spell, const bool success);
* @brief 青魔法のラーニング判定と成功した場合のラーニング処理
* @param monspell ラーニングを試みるモンスター攻撃のID
*/
-void learn_spell(player_type *player_ptr, MonsterAbilityType monspell)
+void learn_spell(PlayerType *player_ptr, MonsterAbilityType monspell)
{
if (player_ptr->action != ACTION_LEARN)
return;
enum class BlueMagicType;
-struct player_type;
-void learn_spell(player_type *player_ptr, MonsterAbilityType monspell);
+class PlayerType;
+void learn_spell(PlayerType *player_ptr, MonsterAbilityType monspell);
void set_rf_masks(EnumClassFlagGroup<MonsterAbilityType> &ability_flags, BlueMagicType type);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool cast_blue_drain_mana(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_drain_mana(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_mind_blast(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_mind_blast(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_brain_smash(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_brain_smash(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_curse_1(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_curse_1(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_curse_2(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_curse_2(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_curse_3(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_curse_3(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_curse_4(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_curse_4(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
*/
struct bmc_type;
-struct player_type;
-bool cast_blue_drain_mana(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_mind_blast(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_brain_smash(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_curse_1(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_curse_2(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_curse_3(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_curse_4(player_type *player_ptr, bmc_type *bmc_ptr);
+class PlayerType;
+bool cast_blue_drain_mana(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_mind_blast(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_brain_smash(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_curse_1(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_curse_2(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_curse_3(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_curse_4(PlayerType *player_ptr, bmc_type *bmc_ptr);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool cast_blue_scare(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_scare(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_blind(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_blind(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_confusion(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_confusion(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_slow(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_slow(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
return true;
}
-bool cast_blue_sleep(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_sleep(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
if (!get_aim_dir(player_ptr, &bmc_ptr->dir))
return false;
*/
struct bmc_type;
-struct player_type;
-bool cast_blue_scare(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_blind(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_confusion(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_slow(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_sleep(player_type *player_ptr, bmc_type *bmc_ptr);
+class PlayerType;
+bool cast_blue_scare(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_blind(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_confusion(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_slow(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_sleep(PlayerType *player_ptr, bmc_type *bmc_ptr);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-bool cast_blue_summon_kin(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_kin(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("援軍を召喚した。", "You summon one of your kin."));
for (int k = 0; k < 1; k++) {
return true;
}
-bool cast_blue_summon_cyber(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_cyber(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("サイバーデーモンを召喚した!", "You summon a Cyberdemon!"));
for (int k = 0; k < 1; k++) {
return true;
}
-bool cast_blue_summon_monster(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_monster(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("仲間を召喚した。", "You summon help."));
for (int k = 0; k < 1; k++) {
return true;
}
-bool cast_blue_summon_monsters(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_monsters(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("モンスターを召喚した!", "You summon monsters!"));
for (int k = 0; k < bmc_ptr->plev / 15 + 2; k++) {
return true;
}
-bool cast_blue_summon_ant(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_ant(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("アリを召喚した。", "You summon ants."));
if (summon_specific(
return true;
}
-bool cast_blue_summon_spider(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_spider(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
if (summon_specific(
return true;
}
-bool cast_blue_summon_hound(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_hound(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("ハウンドを召喚した。", "You summon hounds."));
if (summon_specific(
return true;
}
-bool cast_blue_summon_hydra(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_hydra(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("ヒドラを召喚した。", "You summon a hydras."));
if (summon_specific(
return true;
}
-bool cast_blue_summon_angel(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_angel(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("天使を召喚した!", "You summon an angel!"));
if (summon_specific(
return true;
}
-bool cast_blue_summon_demon(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_demon(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
if (summon_specific(
return true;
}
-bool cast_blue_summon_undead(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_undead(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
if (summon_specific(
return true;
}
-bool cast_blue_summon_dragon(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_dragon(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("ドラゴンを召喚した!", "You summon a dragon!"));
if (summon_specific(
return true;
}
-bool cast_blue_summon_high_undead(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_high_undead(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("強力なアンデッドを召喚した!", "You summon a greater undead!"));
if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_HI_UNDEAD,
return true;
}
-bool cast_blue_summon_high_dragon(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_high_dragon(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("古代ドラゴンを召喚した!", "You summon an ancient dragon!"));
if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_HI_DRAGON,
return true;
}
-bool cast_blue_summon_amberite(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_amberite(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
msg_print(_("アンバーの王族を召喚した!", "You summon a Lord of Amber!"));
if (summon_specific(player_ptr, (bmc_ptr->pet ? -1 : 0), player_ptr->y, player_ptr->x, bmc_ptr->summon_lev, SUMMON_AMBERITES,
return true;
}
-bool cast_blue_summon_unique(player_type *player_ptr, bmc_type *bmc_ptr)
+bool cast_blue_summon_unique(PlayerType *player_ptr, bmc_type *bmc_ptr)
{
int count = 0;
msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
*/
struct bmc_type;
-struct player_type;
-bool cast_blue_summon_kin(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_cyber(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_monster(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_monsters(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_ant(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_spider(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_hound(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_hydra(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_angel(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_demon(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_undead(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_dragon(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_high_undead(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_high_dragon(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_amberite(player_type *player_ptr, bmc_type *bmc_ptr);
-bool cast_blue_summon_unique(player_type *player_ptr, bmc_type *bmc_ptr);
+class PlayerType;
+bool cast_blue_summon_kin(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_cyber(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_monster(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_monsters(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_ant(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_spider(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_hound(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_hydra(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_angel(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_demon(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_undead(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_dragon(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_high_undead(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_high_dragon(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_amberite(PlayerType *player_ptr, bmc_type *bmc_ptr);
+bool cast_blue_summon_unique(PlayerType *player_ptr, bmc_type *bmc_ptr);
#include "system/player-type-definition.h"
bmc_type *initialize_blue_magic_type(
- player_type *player_ptr, bmc_type *bmc_ptr, const bool success, get_pseudo_monstetr_level_pf get_pseudo_monstetr_level)
+ PlayerType *player_ptr, bmc_type *bmc_ptr, const bool success, get_pseudo_monstetr_level_pf get_pseudo_monstetr_level)
{
bmc_ptr->plev = (*get_pseudo_monstetr_level)(player_ptr);
bmc_ptr->summon_lev = player_ptr->lev * 2 / 3 + randint1(player_ptr->lev / 2);
BIT_FLAGS g_mode;
} bmc_type;
-struct player_type;
-typedef PLAYER_LEVEL (*get_pseudo_monstetr_level_pf)(player_type *player_ptr);
+class PlayerType;
+typedef PLAYER_LEVEL (*get_pseudo_monstetr_level_pf)(PlayerType *player_ptr);
bmc_type *initialize_blue_magic_type(
- player_type *player_ptr, bmc_type *bmc_ptr, const bool success, get_pseudo_monstetr_level_pf get_pseudo_monstetr_level);
+ PlayerType *player_ptr, bmc_type *bmc_ptr, const bool success, get_pseudo_monstetr_level_pf get_pseudo_monstetr_level);
* @param player_ptr プレイヤーへの参照ポインタ
* @param 換算レベル
*/
-PLAYER_LEVEL get_pseudo_monstetr_level(player_type *player_ptr)
+PLAYER_LEVEL get_pseudo_monstetr_level(PlayerType *player_ptr)
{
PLAYER_LEVEL monster_level = player_ptr->lev + 40;
return (monster_level * monster_level - 1550) / 130;
* @param msg 表示する文字列
* @param tmp 返すメッセージを格納する配列
*/
-static void set_bluemage_damage(player_type *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, concptr msg, char *tmp)
+static void set_bluemage_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, concptr msg, char *tmp)
{
int base_damage = monspell_bluemage_damage(player_ptr, ms_type, plev, BASE_DAM);
int dice_num = monspell_bluemage_damage(player_ptr, ms_type, plev, DICE_NUM);
* @param p 情報を返す文字列参照ポインタ
* @param power モンスター魔法のID
*/
-void learnt_info(player_type *player_ptr, char *p, MonsterAbilityType power)
+void learnt_info(PlayerType *player_ptr, char *p, MonsterAbilityType power)
{
PLAYER_LEVEL plev = get_pseudo_monstetr_level(player_ptr);
enum class MonsterAbilityType;
-struct player_type;
-PLAYER_LEVEL get_pseudo_monstetr_level(player_type *player_ptr);
-void learnt_info(player_type *player_ptr, char *p, MonsterAbilityType power);
+class PlayerType;
+PLAYER_LEVEL get_pseudo_monstetr_level(PlayerType *player_ptr);
+void learnt_info(PlayerType *player_ptr, char *p, MonsterAbilityType power);
* @param need_mana 青魔法を使うのに必要なMP
* @return int 失敗率(%)を返す
*/
-int calculate_blue_magic_failure_probability(player_type *player_ptr, const monster_power &mp, int need_mana)
+int calculate_blue_magic_failure_probability(PlayerType *player_ptr, const monster_power &mp, int need_mana)
{
auto chance = mp.fail;
if (player_ptr->lev > mp.level) {
* @param bluemage_data 青魔道士の固有データへの参照
* @param blue_magics 青魔法のリスト(覚えていないものも含まれているが、覚えていないものは表示をスキップする)
*/
-static void describe_blue_magic_name(player_type *player_ptr, int menu_line, const bluemage_data_type &bluemage_data, const std::vector<MonsterAbilityType> &blue_magics)
+static void describe_blue_magic_name(PlayerType *player_ptr, int menu_line, const bluemage_data_type &bluemage_data, const std::vector<MonsterAbilityType> &blue_magics)
{
constexpr TERM_LEN y_base = 1;
constexpr TERM_LEN x_base = 18;
* @param blue_magics 青魔法のリスト(覚えていないものも含まれているが、覚えていない物は候補に出ず選択できない)
* @return 選択した青魔法。選択をキャンセルした場合は std::nullopt
*/
-static std::optional<MonsterAbilityType> select_learnt_spells_by_symbol(player_type *player_ptr, const bluemage_data_type &bluemage_data, std::vector<MonsterAbilityType> spells)
+static std::optional<MonsterAbilityType> select_learnt_spells_by_symbol(PlayerType *player_ptr, const bluemage_data_type &bluemage_data, std::vector<MonsterAbilityType> spells)
{
char out_val[80];
(void)strnfmt(out_val, sizeof(out_val), _("(%c-%c, '*'で一覧, ESC) どの%sを唱えますか?", "(%c-%c, *=List, ESC=exit) Use which %s? "),
* @param blue_magics 青魔法のリスト(覚えていないものも含まれているが、覚えていない物は候補に出ず選択できない)
* @return 選択した青魔法。選択をキャンセルした場合は std::nullopt
*/
-static std::optional<MonsterAbilityType> select_learnt_spells_by_menu(player_type *player_ptr, const bluemage_data_type &bluemage_data, std::vector<MonsterAbilityType> spells)
+static std::optional<MonsterAbilityType> select_learnt_spells_by_menu(PlayerType *player_ptr, const bluemage_data_type &bluemage_data, std::vector<MonsterAbilityType> spells)
{
char out_val[80];
angband_strcpy(out_val, _("(ESC=中断) どの魔法を唱えますか?", "(ESC=exit) Use which magic? "), sizeof(out_val));
* when you run it. It's probably easy to fix but I haven't tried,\n
* sorry.\n
*/
-std::optional<MonsterAbilityType> get_learned_power(player_type *player_ptr)
+std::optional<MonsterAbilityType> get_learned_power(PlayerType *player_ptr)
{
auto bluemage_data = PlayerClass(player_ptr).get_specific_data<bluemage_data_type>();
if (!bluemage_data) {
#include <optional>
enum class MonsterAbilityType;
-struct player_type;
+class PlayerType;
struct monster_power;
-int calculate_blue_magic_failure_probability(player_type *player_ptr, const monster_power &mp, int need_mana);
-std::optional<MonsterAbilityType> get_learned_power(player_type *player_ptr);
+int calculate_blue_magic_failure_probability(PlayerType *player_ptr, const monster_power &mp, int need_mana);
+std::optional<MonsterAbilityType> get_learned_power(PlayerType *player_ptr);
* @param fear 攻撃を受けたモンスターが恐慌状態に陥ったかを返す参照ポインタ
* @param mdeath 攻撃を受けたモンスターが死亡したかを返す参照ポインタ
*/
-static void natural_attack(player_type *player_ptr, MONSTER_IDX m_idx, PlayerMutationType attack, bool *fear, bool *mdeath)
+static void natural_attack(PlayerType *player_ptr, MONSTER_IDX m_idx, PlayerMutationType attack, bool *fear, bool *mdeath)
{
WEIGHT n_weight = 0;
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
* @details
* If no "weapon" is available, then "punch" the monster one time.
*/
-bool do_cmd_attack(player_type *player_ptr, POSITION y, POSITION x, combat_options mode)
+bool do_cmd_attack(PlayerType *player_ptr, POSITION y, POSITION x, combat_options mode)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
#include "combat/combat-options-type.h"
#include "system/angband.h"
-struct player_type;
-bool do_cmd_attack(player_type *player_ptr, POSITION y, POSITION x, combat_options mode);
+class PlayerType;
+bool do_cmd_attack(PlayerType *player_ptr, POSITION y, POSITION x, combat_options mode);
* when you run it. It's probably easy to fix but I haven't tried,\n
* sorry.\n
*/
-static int get_hissatsu_power(player_type *player_ptr, SPELL_IDX *sn)
+static int get_hissatsu_power(PlayerType *player_ptr, SPELL_IDX *sn)
{
SPELL_IDX i;
int j = 0;
/*!
* @brief 剣術コマンドのメインルーチン
*/
-void do_cmd_hissatsu(player_type *player_ptr)
+void do_cmd_hissatsu(PlayerType *player_ptr)
{
SPELL_IDX n = 0;
magic_type spell;
/*!
* @brief 剣術コマンドの学習
*/
-void do_cmd_gain_hissatsu(player_type *player_ptr)
+void do_cmd_gain_hissatsu(PlayerType *player_ptr)
{
OBJECT_IDX item;
int i, j;
#pragma once
-struct player_type;
-void do_cmd_hissatsu(player_type *player_ptr);
-void do_cmd_gain_hissatsu(player_type *player_ptr);
+class PlayerType;
+void do_cmd_hissatsu(PlayerType *player_ptr);
+void do_cmd_gain_hissatsu(PlayerType *player_ptr);
* @param power ものまねの効力の種類
* @param dam ものまねの威力
*/
-static void mane_info(player_type *player_ptr, char *p, MonsterAbilityType power, HIT_POINT dam)
+static void mane_info(PlayerType *player_ptr, char *p, MonsterAbilityType power, HIT_POINT dam)
{
PLAYER_LEVEL plev = player_ptr->lev;
* when you run it. It's probably easy to fix but I haven't tried,
* sorry.
*/
-static int get_mane_power(player_type *player_ptr, int *sn, bool baigaesi)
+static int get_mane_power(PlayerType *player_ptr, int *sn, bool baigaesi)
{
int i = 0;
int num = 0;
* @param spell 発動するモンスター攻撃のID
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-static bool use_mane(player_type *player_ptr, MonsterAbilityType spell)
+static bool use_mane(PlayerType *player_ptr, MonsterAbilityType spell)
{
DIRECTION dir;
PLAYER_LEVEL plev = player_ptr->lev;
* when you run it. It's probably easy to fix but I haven't tried,
* sorry.
*/
-bool do_cmd_mane(player_type *player_ptr, bool baigaesi)
+bool do_cmd_mane(PlayerType *player_ptr, bool baigaesi)
{
int n = 0;
PERCENTAGE chance;
#pragma once
-struct player_type;
-bool do_cmd_mane(player_type *player_ptr, bool baigaesi);
+class PlayerType;
+bool do_cmd_mane(PlayerType *player_ptr, bool baigaesi);
/*!
* @brief 職業技能処理構造体の初期化
*/
-static cm_type *initialize_cm_type(player_type *player_ptr, cm_type *cm_ptr)
+static cm_type *initialize_cm_type(PlayerType *player_ptr, cm_type *cm_ptr)
{
cm_ptr->n = 0;
cm_ptr->b = 0;
/*!
* @brief 職業別の行使可能な技能種別を構造体に付加する
*/
-static void switch_mind_kind(player_type *player_ptr, cm_type *cm_ptr)
+static void switch_mind_kind(PlayerType *player_ptr, cm_type *cm_ptr)
{
switch (player_ptr->pclass) {
case PlayerClassType::MINDCRAFTER:
}
}
-static void decide_mind_ki_chance(player_type *player_ptr, cm_type *cm_ptr)
+static void decide_mind_ki_chance(PlayerType *player_ptr, cm_type *cm_ptr)
{
if (cm_ptr->use_mind != MindKindType::KI)
return;
cm_ptr->mana_cost += (j + 1) * 3 / 2;
}
-static bool check_mind_hp_mp_sufficiency(player_type *player_ptr, cm_type *cm_ptr)
+static bool check_mind_hp_mp_sufficiency(PlayerType *player_ptr, cm_type *cm_ptr)
{
if ((cm_ptr->use_mind == MindKindType::BERSERKER) || (cm_ptr->use_mind == MindKindType::NINJUTSU)) {
if (cm_ptr->mana_cost > player_ptr->chp) {
return get_check(_("それでも挑戦しますか? ", "Attempt it anyway? "));
}
-static void decide_mind_chance(player_type *player_ptr, cm_type *cm_ptr)
+static void decide_mind_chance(PlayerType *player_ptr, cm_type *cm_ptr)
{
if (cm_ptr->chance == 0)
return;
cm_ptr->chance += 5;
}
-static void check_mind_mindcrafter(player_type *player_ptr, cm_type *cm_ptr)
+static void check_mind_mindcrafter(PlayerType *player_ptr, cm_type *cm_ptr)
{
if (cm_ptr->use_mind != MindKindType::MINDCRAFTER)
return;
player_ptr->csp = std::max(0, player_ptr->csp - cm_ptr->plev * std::max(1, cm_ptr->plev / 10));
}
-static void check_mind_mirror_master(player_type *player_ptr, cm_type *cm_ptr)
+static void check_mind_mirror_master(PlayerType *player_ptr, cm_type *cm_ptr)
{
if (cm_ptr->use_mind != MindKindType::MIRROR_MASTER)
return;
player_ptr->csp = std::max(0, player_ptr->csp - cm_ptr->plev * std::max(1, cm_ptr->plev / 10));
}
-static void check_mind_class(player_type *player_ptr, cm_type *cm_ptr)
+static void check_mind_class(PlayerType *player_ptr, cm_type *cm_ptr)
{
if ((cm_ptr->use_mind == MindKindType::BERSERKER) || (cm_ptr->use_mind == MindKindType::NINJUTSU))
return;
check_mind_mirror_master(player_ptr, cm_ptr);
}
-static bool switch_mind_class(player_type *player_ptr, cm_type *cm_ptr)
+static bool switch_mind_class(PlayerType *player_ptr, cm_type *cm_ptr)
{
switch (cm_ptr->use_mind) {
case MindKindType::MINDCRAFTER:
}
}
-static void mind_turn_passing(player_type *player_ptr, cm_type *cm_ptr)
+static void mind_turn_passing(PlayerType *player_ptr, cm_type *cm_ptr)
{
PlayerEnergy energy(player_ptr);
if (cm_ptr->on_mirror && (player_ptr->pclass == PlayerClassType::MIRROR_MASTER)) {
energy.set_player_turn_energy(100);
}
-static bool judge_mind_chance(player_type *player_ptr, cm_type *cm_ptr)
+static bool judge_mind_chance(PlayerType *player_ptr, cm_type *cm_ptr)
{
if (randint0(100) >= cm_ptr->chance) {
sound(SOUND_ZAP);
return true;
}
-static void mind_reflection(player_type *player_ptr, cm_type *cm_ptr)
+static void mind_reflection(PlayerType *player_ptr, cm_type *cm_ptr)
{
int oops = cm_ptr->mana_cost - cm_ptr->old_csp;
if ((player_ptr->csp - cm_ptr->mana_cost) < 0)
(void)dec_stat(player_ptr, A_WIS, 15 + randint1(10), perm);
}
-static void process_hard_concentration(player_type *player_ptr, cm_type *cm_ptr)
+static void process_hard_concentration(PlayerType *player_ptr, cm_type *cm_ptr)
{
if ((cm_ptr->use_mind == MindKindType::BERSERKER) || (cm_ptr->use_mind == MindKindType::NINJUTSU)) {
take_hit(player_ptr, DAMAGE_USELIFE, cm_ptr->mana_cost, _("過度の集中", "concentrating too hard"));
/*!
* @brief 特殊技能コマンドのメインルーチン /
*/
-void do_cmd_mind(player_type *player_ptr)
+void do_cmd_mind(PlayerType *player_ptr)
{
cm_type tmp_cm;
cm_type *cm_ptr = initialize_cm_type(player_ptr, &tmp_cm);
player_ptr->window_flags |= PW_SPELL;
}
-static MindKindType decide_use_mind_browse(player_type *player_ptr)
+static MindKindType decide_use_mind_browse(PlayerType *player_ptr)
{
switch (player_ptr->pclass) {
case PlayerClassType::MINDCRAFTER:
/*!
* @brief 現在プレイヤーが使用可能な特殊技能の一覧表示 /
*/
-void do_cmd_mind_browse(player_type *player_ptr)
+void do_cmd_mind_browse(PlayerType *player_ptr)
{
SPELL_IDX n = 0;
char temp[62 * 5];
#pragma once
-struct player_type;
-void do_cmd_mind(player_type *player_ptr);
-void do_cmd_mind_browse(player_type *player_ptr);
-void do_cmd_mind_browse(player_type *player_ptr);
+class PlayerType;
+void do_cmd_mind(PlayerType *player_ptr);
+void do_cmd_mind_browse(PlayerType *player_ptr);
+void do_cmd_mind_browse(PlayerType *player_ptr);
* @param down_stair TRUEならば階段を降りる処理、FALSEなら階段を昇る処理による内容
* @return フロア移動を実際に行うならTRUE、キャンセルする場合はFALSE
*/
-static bool confirm_leave_level(player_type *player_ptr, bool down_stair)
+static bool confirm_leave_level(PlayerType *player_ptr, bool down_stair)
{
quest_type *q_ptr = &quest[player_ptr->current_floor_ptr->inside_quest];
if (confirm_quest && player_ptr->current_floor_ptr->inside_quest
/*!
* @brief 階段を使って階層を昇る処理 / Go up one level
*/
-void do_cmd_go_up(player_type *player_ptr)
+void do_cmd_go_up(PlayerType *player_ptr)
{
bool go_up = false;
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x];
* @brief 階段を使って階層を降りる処理 / Go down one level
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_go_down(player_type *player_ptr)
+void do_cmd_go_down(PlayerType *player_ptr)
{
bool fall_trap = false;
int down_num = 0;
* @param player_ptr プレイヤーへの参照ポインタ
* @param pickup アイテムの自動拾いを行うならTRUE
*/
-void do_cmd_walk(player_type *player_ptr, bool pickup)
+void do_cmd_walk(PlayerType *player_ptr, bool pickup)
{
if (command_arg) {
command_rep = command_arg - 1;
* Start running.
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_run(player_type *player_ptr)
+void do_cmd_run(PlayerType *player_ptr)
{
DIRECTION dir;
if (cmd_limit_confused(player_ptr))
* @param player_ptr プレイヤーへの参照ポインタ
* @param pickup アイテムの自動拾いを行うならTRUE
*/
-void do_cmd_stay(player_type *player_ptr, bool pickup)
+void do_cmd_stay(PlayerType *player_ptr, bool pickup)
{
uint32_t mpe_mode = MPE_STAYING | MPE_ENERGY_USE;
if (command_arg) {
* Resting allows a player to safely restore his hp -RAK-
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_rest(player_type *player_ptr)
+void do_cmd_rest(PlayerType *player_ptr)
{
set_action(player_ptr, ACTION_NONE);
if ((player_ptr->pclass == PlayerClassType::BARD) && ((get_singing_song_effect(player_ptr) != 0) || (get_interrupting_song_effect(player_ptr) != 0)))
#pragma once
-struct player_type;
-void do_cmd_go_up(player_type *player_ptr);
-void do_cmd_go_down(player_type *player_ptr);
-void do_cmd_walk(player_type *player_ptr, bool pickup);
-void do_cmd_run(player_type *player_ptr);
-void do_cmd_stay(player_type *player_ptr, bool pickup);
-void do_cmd_rest(player_type *player_ptr);
+class PlayerType;
+void do_cmd_go_up(PlayerType *player_ptr);
+void do_cmd_go_down(PlayerType *player_ptr);
+void do_cmd_walk(PlayerType *player_ptr, bool pickup);
+void do_cmd_run(PlayerType *player_ptr);
+void do_cmd_stay(PlayerType *player_ptr, bool pickup);
+void do_cmd_rest(PlayerType *player_ptr);
* @details
* Assume there is no monster blocking the destination
*/
-static bool exe_open_chest(player_type *player_ptr, POSITION y, POSITION x, OBJECT_IDX o_idx)
+static bool exe_open_chest(PlayerType *player_ptr, POSITION y, POSITION x, OBJECT_IDX o_idx)
{
bool flag = true;
bool more = false;
* @details
* Unlocking a locked door/chest is worth one experience point.
*/
-void do_cmd_open(player_type *player_ptr)
+void do_cmd_open(PlayerType *player_ptr)
{
POSITION y, x;
DIRECTION dir;
* @details
* Unlocking a locked door/chest is worth one experience point.
*/
-void do_cmd_close(player_type *player_ptr)
+void do_cmd_close(PlayerType *player_ptr)
{
POSITION y, x;
DIRECTION dir;
* @brief 箱、床のトラップ解除処理双方の統合メインルーチン /
* Disarms a trap, or chest
*/
-void do_cmd_disarm(player_type *player_ptr)
+void do_cmd_disarm(PlayerType *player_ptr)
{
POSITION y, x;
DIRECTION dir;
* Creatures can also open or bash doors, see elsewhere.
* </pre>
*/
-void do_cmd_bash(player_type *player_ptr)
+void do_cmd_bash(PlayerType *player_ptr)
{
POSITION y, x;
DIRECTION dir;
* Let user choose a pile of spikes, perhaps?
* </pre>
*/
-static bool get_spike(player_type *player_ptr, INVENTORY_IDX *ip)
+static bool get_spike(PlayerType *player_ptr, INVENTORY_IDX *ip)
{
for (INVENTORY_IDX i = 0; i < INVEN_PACK; i++) {
object_type *o_ptr = &player_ptr->inventory_list[i];
* This command may NOT be repeated
* </pre>
*/
-void do_cmd_spike(player_type *player_ptr)
+void do_cmd_spike(PlayerType *player_ptr)
{
DIRECTION dir;
if (player_ptr->wild_mode)
#pragma once
-struct player_type;
-void do_cmd_open(player_type *player_ptr);
-void do_cmd_close(player_type *player_ptr);
-void do_cmd_disarm(player_type *player_ptr);
-void do_cmd_bash(player_type *player_ptr);
-void do_cmd_spike(player_type *player_ptr);
+class PlayerType;
+void do_cmd_open(PlayerType *player_ptr);
+void do_cmd_close(PlayerType *player_ptr);
+void do_cmd_disarm(PlayerType *player_ptr);
+void do_cmd_bash(PlayerType *player_ptr);
+void do_cmd_spike(PlayerType *player_ptr);
/*!
* @brief 探索コマンドのメインルーチン / Simple command to "search" for one turn
*/
-void do_cmd_search(player_type *player_ptr)
+void do_cmd_search(PlayerType *player_ptr)
{
if (command_arg) {
command_rep = command_arg - 1;
search(player_ptr);
}
-static bool exe_alter(player_type *player_ptr)
+static bool exe_alter(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_rep_dir(player_ptr, &dir, true))
* @brief 特定のマスに影響を及ぼすための汎用的コマンド / Manipulate an adjacent grid in some way
* @details
*/
-void do_cmd_alter(player_type *player_ptr)
+void do_cmd_alter(PlayerType *player_ptr)
{
PlayerClass(player_ptr).break_samurai_stance({ SamuraiStanceType::MUSOU });
return i == '@';
}
-static void accept_winner_message(player_type *player_ptr)
+static void accept_winner_message(PlayerType *player_ptr)
{
if (!w_ptr->total_winner || !last_words)
return;
* commit suicide
* @details
*/
-void do_cmd_suicide(player_type *player_ptr)
+void do_cmd_suicide(PlayerType *player_ptr)
{
flush();
if (w_ptr->total_winner) {
#pragma once
-struct player_type;
-void do_cmd_search(player_type *player_ptr);
-void do_cmd_alter(player_type *player_ptr);
-void do_cmd_suicide(player_type *player_ptr);
+class PlayerType;
+void do_cmd_search(PlayerType *player_ptr);
+void do_cmd_alter(PlayerType *player_ptr);
+void do_cmd_suicide(PlayerType *player_ptr);
/*!
* @brief ペットを開放するコマンドのメインルーチン
*/
-void do_cmd_pet_dismiss(player_type *player_ptr)
+void do_cmd_pet_dismiss(PlayerType *player_ptr)
{
monster_type *m_ptr;
bool all_pets = false;
* @param force 強制的に騎乗/下馬するならばTRUE
* @return 騎乗/下馬できたらTRUE
*/
-bool do_cmd_riding(player_type *player_ptr, bool force)
+bool do_cmd_riding(PlayerType *player_ptr, bool force)
{
POSITION x, y;
DIRECTION dir = 0;
/*!
* @brief ペットに名前をつけるコマンドのメインルーチン
*/
-static void do_name_pet(player_type *player_ptr)
+static void do_name_pet(PlayerType *player_ptr)
{
monster_type *m_ptr;
char out_val[20];
* @brief ペットに関するコマンドリストのメインルーチン /
* Issue a pet command
*/
-void do_cmd_pet(player_type *player_ptr)
+void do_cmd_pet(PlayerType *player_ptr)
{
COMMAND_CODE i = 0;
int num;
#pragma once
-struct player_type;
-bool do_cmd_riding(player_type *player_ptr, bool force);
-void do_cmd_pet_dismiss(player_type *player_ptr);
-void do_cmd_pet(player_type *player_ptr);
+class PlayerType;
+bool do_cmd_riding(PlayerType *player_ptr, bool force);
+void do_cmd_pet_dismiss(PlayerType *player_ptr);
+void do_cmd_pet(PlayerType *player_ptr);
* @param rc_ptr レイシャルパワー情報への参照ポインタ
* @return キャンセルしたらRC_CANCEL、それ以外ならRC_CONTINUE
*/
-static void racial_power_display_list(player_type *player_ptr, rc_type *rc_ptr)
+static void racial_power_display_list(PlayerType *player_ptr, rc_type *rc_ptr)
{
TERM_LEN x = 11;
char dummy[256];
* @param rc_ptr レイシャルパワー情報への参照ポインタ
* @param i カーソル増分
*/
-static void racial_power_add_index(player_type *player_ptr, rc_type *rc_ptr, int i)
+static void racial_power_add_index(PlayerType *player_ptr, rc_type *rc_ptr, int i)
{
auto n = rc_ptr->menu_line + i;
if (i < -1 || i > 1) {
* @param rc_ptr レイシャルパワー情報への参照ポインタ
* @return キャンセルならRC_CANCEL、そうでないならRC_CONTINUE
*/
-static bool racial_power_interpret_menu_keys(player_type *player_ptr, rc_type *rc_ptr)
+static bool racial_power_interpret_menu_keys(PlayerType *player_ptr, rc_type *rc_ptr)
{
switch (rc_ptr->choice) {
case '0':
* @param rc_ptr レイシャルパワー情報への参照ポインタ
* @return キャンセルしたらRC_CANCEL、それ以外ならRC_CONTINUE
*/
-static bool racial_power_select_by_menu(player_type *player_ptr, rc_type *rc_ptr)
+static bool racial_power_select_by_menu(PlayerType *player_ptr, rc_type *rc_ptr)
{
if (!use_menu || rc_ptr->choice == ' ')
return RC_CONTINUE;
* @param rc_ptr レイシャルパワー情報への参照ポインタ
* @return コマンド選択していたらtrue、していなかったらfalse
*/
-static bool racial_power_interpret_choise(player_type *player_ptr, rc_type *rc_ptr)
+static bool racial_power_interpret_choise(PlayerType *player_ptr, rc_type *rc_ptr)
{
if (use_menu)
return false;
return get_check(tmp_val);
}
-static void racial_power_display_explanation(player_type *player_ptr, rc_type *rc_ptr)
+static void racial_power_display_explanation(PlayerType *player_ptr, rc_type *rc_ptr)
{
auto &rpi = rc_ptr->power_desc[rc_ptr->command_code];
char temp[62 * 5];
* @param rc_ptr レイシャルパワー情報への参照ポインタ
* @return コマンド選択したらRC_CONTINUE、キャンセルしたらRC_CANCEL
*/
-static bool racial_power_process_input(player_type *player_ptr, rc_type *rc_ptr)
+static bool racial_power_process_input(PlayerType *player_ptr, rc_type *rc_ptr)
{
rc_ptr->choice = (always_show_list || use_menu) ? ESCAPE : 1;
* @param rc_ptr レイシャルパワー情報への参照ポインタ
* @return コマンド選択したらRC_CONTINUE、キャンセルしたらRC_CANCEL
*/
-static bool racial_power_select_power(player_type *player_ptr, rc_type *rc_ptr)
+static bool racial_power_select_power(PlayerType *player_ptr, rc_type *rc_ptr)
{
if (repeat_pull(&rc_ptr->command_code) && rc_ptr->command_code >= 0 && rc_ptr->command_code < rc_ptr->power_count())
return RC_CONTINUE;
* @details
* 戻り値の代わりにrc_ptr->castに使用の有無を入れる。
*/
-static void racial_power_cast_power(player_type *player_ptr, rc_type *rc_ptr)
+static void racial_power_cast_power(PlayerType *player_ptr, rc_type *rc_ptr)
{
auto *rpi_ptr = &rc_ptr->power_desc[rc_ptr->command_code];
* MPが足りない場合はHPを減らす。
* 戻り値はHP/MPの再描画が必要か判定するのに使用。
*/
-static bool racial_power_reduce_mana(player_type *player_ptr, rc_type *rc_ptr)
+static bool racial_power_reduce_mana(PlayerType *player_ptr, rc_type *rc_ptr)
{
int racial_cost = rc_ptr->power_desc[rc_ptr->command_code].racial_cost;
if (racial_cost == 0)
* @brief レイシャル・パワーコマンドのメインルーチン / Allow user to choose a power (racial / mutation) to activate
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_racial_power(player_type *player_ptr)
+void do_cmd_racial_power(PlayerType *player_ptr)
{
if (player_ptr->wild_mode)
return;
#pragma once
-struct player_type;
-void do_cmd_racial_power(player_type *player_ptr);
+class PlayerType;
+void do_cmd_racial_power(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param snipe_type スナイパーの射撃術の種類
*/
-void do_cmd_fire(player_type *player_ptr, SPELL_IDX snipe_type)
+void do_cmd_fire(PlayerType *player_ptr, SPELL_IDX snipe_type)
{
OBJECT_IDX item;
object_type *j_ptr, *ammo_ptr;
#include "system/angband.h"
-struct player_type;
-void do_cmd_fire(player_type *player_ptr, SPELL_IDX snipe_type);
+class PlayerType;
+void do_cmd_fire(PlayerType *player_ptr, SPELL_IDX snipe_type);
* @param use_realm 魔法領域ID
* @return 失敗率(%)
*/
-static bool spell_okay(player_type *player_ptr, int spell, bool learned, bool study_pray, int use_realm)
+static bool spell_okay(PlayerType *player_ptr, int spell, bool learned, bool study_pray, int use_realm)
{
const magic_type *s_ptr;
* The "known" should be TRUE for cast/pray, FALSE for study
* </pre>
*/
-static int get_spell(player_type *player_ptr, SPELL_IDX *sn, concptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, int16_t use_realm)
+static int get_spell(PlayerType *player_ptr, SPELL_IDX *sn, concptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, int16_t use_realm)
{
int i;
SPELL_IDX spell = -1;
* @param browse_only 魔法と技能の閲覧を行うならばTRUE
* @return 魔道書を一冊も持っていないならTRUEを返す
*/
-static void confirm_use_force(player_type *player_ptr, bool browse_only)
+static void confirm_use_force(PlayerType *player_ptr, bool browse_only)
{
char which;
COMMAND_CODE code;
}
}
-static FuncItemTester get_castable_spellbook_tester(player_type *player_ptr)
+static FuncItemTester get_castable_spellbook_tester(PlayerType *player_ptr)
{
return FuncItemTester([](auto p_ptr, auto o_ptr) { return check_book_realm(p_ptr, o_ptr->tval, o_ptr->sval); }, player_ptr);
}
-static FuncItemTester get_learnable_spellbook_tester(player_type *player_ptr)
+static FuncItemTester get_learnable_spellbook_tester(PlayerType *player_ptr)
{
if (player_ptr->realm2 == REALM_NONE) {
return get_castable_spellbook_tester(player_ptr);
* and in the dark, primarily to allow browsing in stores.
* </pre>
*/
-void do_cmd_browse(player_type *player_ptr)
+void do_cmd_browse(PlayerType *player_ptr)
{
OBJECT_IDX item;
OBJECT_SUBTYPE_VALUE sval;
* @param player_ptr プレイヤーへの参照ポインタ
* @param next_realm 変更先の魔法領域ID
*/
-static void change_realm2(player_type *player_ptr, int16_t next_realm)
+static void change_realm2(PlayerType *player_ptr, int16_t next_realm)
{
int i, j = 0;
char tmp[80];
* @brief 魔法を学習するコマンドのメインルーチン /
* Study a book to gain a new spell/prayer
*/
-void do_cmd_study(player_type *player_ptr)
+void do_cmd_study(PlayerType *player_ptr)
{
int i;
OBJECT_IDX item;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 詠唱したらtrue
*/
-bool do_cmd_cast(player_type *player_ptr)
+bool do_cmd_cast(PlayerType *player_ptr)
{
OBJECT_IDX item;
OBJECT_SUBTYPE_VALUE sval;
concptr info_radius(POSITION rad);
concptr info_weight(WEIGHT weight);
-struct player_type;
-void do_cmd_browse(player_type *player_ptr);
-void do_cmd_study(player_type *player_ptr);
-bool do_cmd_cast(player_type *player_ptr);
+class PlayerType;
+void do_cmd_browse(PlayerType *player_ptr);
+void do_cmd_study(PlayerType *player_ptr);
+bool do_cmd_cast(PlayerType *player_ptr);
* @param x 該当地点のX座標
* @return コスト値
*/
-static int travel_flow_cost(player_type *player_ptr, POSITION y, POSITION x)
+static int travel_flow_cost(PlayerType *player_ptr, POSITION y, POSITION x)
{
int cost = 1;
auto *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
* @param n 現在のコスト
* @param wall プレイヤーが壁の中にいるならばTRUE
*/
-static void travel_flow_aux(player_type *player_ptr, POSITION y, POSITION x, int n, bool wall)
+static void travel_flow_aux(PlayerType *player_ptr, POSITION y, POSITION x, int n, bool wall)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
* @param ty 目標地点のY座標
* @param tx 目標地点のX座標
*/
-static void travel_flow(player_type *player_ptr, POSITION ty, POSITION tx)
+static void travel_flow(PlayerType *player_ptr, POSITION ty, POSITION tx)
{
flow_head = flow_tail = 0;
bool wall = false;
/*!
* @brief トラベル処理のメインルーチン
*/
-void do_cmd_travel(player_type *player_ptr)
+void do_cmd_travel(PlayerType *player_ptr)
{
POSITION x, y;
if ((travel.x != 0) && (travel.y != 0) && (travel.x != player_ptr->x) && (travel.y != player_ptr->y)
#pragma once
-struct player_type;
-void do_cmd_travel(player_type *player_ptr);
+class PlayerType;
+void do_cmd_travel(PlayerType *player_ptr);
* accomplished by strong players using heavy weapons.
* </pre>
*/
-void do_cmd_tunnel(player_type *player_ptr)
+void do_cmd_tunnel(PlayerType *player_ptr)
{
bool more = false;
PlayerClass(player_ptr).break_samurai_stance({ SamuraiStanceType::MUSOU });
#pragma once
-struct player_type;
-void do_cmd_tunnel(player_type *player_ptr);
+class PlayerType;
+void do_cmd_tunnel(PlayerType *player_ptr);
* @brief 町に関するヘルプを表示する / Display town history
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void town_history(player_type *player_ptr)
+static void town_history(PlayerType *player_ptr)
{
screen_save();
(void)show_file(player_ptr, true, _("jbldg.txt", "bldg.txt"), nullptr, 0, 0);
* @param bldg 施設構造体の参照ポインタ
* @param i 実行したい施設のサービステーブルの添字
*/
-static void bldg_process_command(player_type *player_ptr, building_type *bldg, int i)
+static void bldg_process_command(PlayerType *player_ptr, building_type *bldg, int i)
{
msg_flag = false;
msg_erase();
* @brief 施設入り口にプレイヤーが乗った際の処理 / Do building commands
* @param プレイヤーへの参照ポインタ
*/
-void do_cmd_building(player_type *player_ptr)
+void do_cmd_building(PlayerType *player_ptr)
{
if (player_ptr->wild_mode)
return;
extern PRICE kakekin;
extern int sel_monster;
-struct player_type;
-void do_cmd_building(player_type *player_ptr);
+class PlayerType;
+void do_cmd_building(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 満腹ならFALSE、そうでないならTRUE
*/
-static bool buy_food(player_type *player_ptr)
+static bool buy_food(PlayerType *player_ptr)
{
if (player_ptr->food >= PY_FOOD_FULL) {
msg_print(_("今は満腹だ。", "You are full now."));
* @param player_ptr プレイヤーへの参照ポインタ
* @return 毒でも切り傷でもないならTRUE、そうでないならFALSE
*/
-static bool is_healthy_stay(player_type *player_ptr)
+static bool is_healthy_stay(PlayerType *player_ptr)
{
if (!player_ptr->poisoned && !player_ptr->effects()->cut()->is_cut()) {
return true;
}
#ifdef JP
-static bool is_player_undead(player_type *player_ptr)
+static bool is_player_undead(PlayerType *player_ptr)
{
return PlayerRace(player_ptr, true).life() == PlayerRaceLifeType::UNDEAD;
}
* @param player_ptr プレイヤーへの参照ポインタ
* @param prev_hour 宿屋に入った直後のゲーム内時刻
*/
-static void write_diary_stay_inn(player_type *player_ptr, int prev_hour)
+static void write_diary_stay_inn(PlayerType *player_ptr, int prev_hour)
{
if ((prev_hour >= 6) && (prev_hour < 18)) {
concptr stay_message = _(is_player_undead(player_ptr) ? "宿屋に泊まった。" : "日が暮れるまで宿屋で過ごした。", "stayed during the day at the inn.");
* @param player_ptr プレイヤーへの参照ポインタ
* @return 悪夢モードならばTRUE
*/
-static bool has_a_nightmare(player_type *player_ptr)
+static bool has_a_nightmare(PlayerType *player_ptr)
{
if (!ironman_nightmare)
return false;
* @brief 体調を元に戻す
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void back_to_health(player_type *player_ptr)
+static void back_to_health(PlayerType *player_ptr)
{
BadStatusSetter bss(player_ptr);
(void)bss.blindness(0);
* @brief 魔道具術師の取り込んだ魔法をすべて完全に回復した状態にする
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void charge_magic_eating_energy(player_type *player_ptr)
+static void charge_magic_eating_energy(PlayerType *player_ptr)
{
auto magic_eater_data = PlayerClass(player_ptr).get_specific_data<magic_eater_data_type>();
if (!magic_eater_data) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param prev_hour 宿屋に入った直後のゲーム内時刻
*/
-static void display_stay_result(player_type *player_ptr, int prev_hour)
+static void display_stay_result(PlayerType *player_ptr, int prev_hour)
{
if ((prev_hour >= 6) && (prev_hour < 18)) {
#if JP
* @param player_ptr プレイヤーへの参照ポインタ
* @return 泊まれたらTRUE
*/
-static bool stay_inn(player_type *player_ptr)
+static bool stay_inn(PlayerType *player_ptr)
{
if (!is_healthy_stay(player_ptr))
return false;
* Resting at night is also a quick way to restock stores -KMW-
* @todo 悪夢を見る前後に全回復しているが、何か意図がある?
*/
-bool inn_comm(player_type *player_ptr, int cmd)
+bool inn_comm(PlayerType *player_ptr, int cmd)
{
switch (cmd) {
case BACT_FOOD:
#pragma once
-struct player_type;
-bool inn_comm(player_type *player_ptr, int cmd);
+class PlayerType;
+bool inn_comm(PlayerType *player_ptr, int cmd);
* In-game editor of Object Auto-picker/Destoryer
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_edit_autopick(player_type *player_ptr)
+void do_cmd_edit_autopick(PlayerType *player_ptr)
{
static int cx_save = 0;
static int cy_save = 0;
#pragma once
-struct player_type;
-void do_cmd_edit_autopick(player_type *player_ptr);
+class PlayerType;
+void do_cmd_edit_autopick(PlayerType *player_ptr);
* @brief 日記のタイトル表記と内容出力
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_diary(player_type *player_ptr)
+static void display_diary(PlayerType *player_ptr)
{
char diary_title[256];
GAME_TEXT file_name[MAX_NLEN];
/*!
* @brief 日記に任意の内容を表記するコマンドのメインルーチン /
*/
-static void add_diary_note(player_type *player_ptr)
+static void add_diary_note(PlayerType *player_ptr)
{
char tmp[80] = "\0";
char bunshou[80] = "\0";
/*!
* @brief 最後に取得したアイテムの情報を日記に追加するメインルーチン /
*/
-static void do_cmd_last_get(player_type *player_ptr)
+static void do_cmd_last_get(PlayerType *player_ptr)
{
if (record_o_name[0] == '\0')
return;
* @brief 日記コマンド
* @param crerature_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_diary(player_type *player_ptr)
+void do_cmd_diary(PlayerType *player_ptr)
{
screen_save();
while (true) {
#pragma once
-struct player_type;
-void do_cmd_diary(player_type *player_ptr);
+class PlayerType;
+void do_cmd_diary(PlayerType *player_ptr);
* @details
* Allow absolute file names?
*/
-void do_cmd_pref(player_type *player_ptr)
+void do_cmd_pref(PlayerType *player_ptr)
{
char buf[80];
strcpy(buf, "");
/*
* Interact with "colors"
*/
-void do_cmd_colors(player_type *player_ptr)
+void do_cmd_colors(PlayerType *player_ptr)
{
int i;
char tmp[160];
* Note that "feeling" is set to zero unless some time has passed.
* Note that this is done when the level is GENERATED, not entered.
*/
-void do_cmd_feeling(player_type *player_ptr)
+void do_cmd_feeling(PlayerType *player_ptr)
{
if (player_ptr->wild_mode)
return;
* Display the time and date
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_time(player_type *player_ptr)
+void do_cmd_time(PlayerType *player_ptr)
{
int day, hour, min;
extract_day_hour_min(player_ptr, &day, &hour, &min);
#pragma once
-struct player_type;
-void do_cmd_pref(player_type *player_ptr);
-void do_cmd_colors(player_type *player_ptr);
+class PlayerType;
+void do_cmd_pref(PlayerType *player_ptr);
+void do_cmd_colors(PlayerType *player_ptr);
void do_cmd_note(void);
void do_cmd_version(void);
-void do_cmd_feeling(player_type *player_ptr);
-void do_cmd_time(player_type *player_ptr);
+void do_cmd_feeling(PlayerType *player_ptr);
+void do_cmd_time(PlayerType *player_ptr);
* @brief ターゲットを設定するコマンドのメインルーチン
* Target command
*/
-void do_cmd_target(player_type *player_ptr)
+void do_cmd_target(PlayerType *player_ptr)
{
if (player_ptr->wild_mode)
return;
* @brief 周囲を見渡すコマンドのメインルーチン
* Look command
*/
-void do_cmd_look(player_type *player_ptr)
+void do_cmd_look(PlayerType *player_ptr)
{
set_bits(player_ptr->window_flags, PW_MONSTER_LIST | PW_FLOOR_ITEM_LIST);
handle_stuff(player_ptr);
* @brief 位置を確認するコマンドのメインルーチン
* Allow the player to examine other sectors on the map
*/
-void do_cmd_locate(player_type *player_ptr)
+void do_cmd_locate(PlayerType *player_ptr)
{
DIRECTION dir;
POSITION y1, x1;
#pragma once
-struct player_type;
-void do_cmd_target(player_type *player_ptr);
-void do_cmd_look(player_type *player_ptr);
-void do_cmd_locate(player_type *player_ptr);
+class PlayerType;
+void do_cmd_target(PlayerType *player_ptr);
+void do_cmd_look(PlayerType *player_ptr);
+void do_cmd_locate(PlayerType *player_ptr);
* @brief 自動セーブオプションを変更するコマンドのメインルーチン
* @param info 表示メッセージ
*/
-static void do_cmd_options_autosave(player_type *player_ptr, concptr info)
+static void do_cmd_options_autosave(PlayerType *player_ptr, concptr info)
{
char ch;
int i, k = 0, n = 2;
* @brief ウィンドウオプションを変更するコマンドのメインルーチン /
* Modify the "window" options
*/
-static void do_cmd_options_win(player_type *player_ptr)
+static void do_cmd_options_win(PlayerType *player_ptr)
{
int i, j, d;
TERM_LEN y = 0;
* Interact with some options for cheating
* @param info 表示メッセージ
*/
-static void do_cmd_options_cheat(player_type *player_ptr, concptr info)
+static void do_cmd_options_cheat(PlayerType *player_ptr, concptr info)
{
term_clear();
auto k = 0U;
* in any options which control "visual" aspects of the game.
* </pre>
*/
-void do_cmd_options(player_type *player_ptr)
+void do_cmd_options(PlayerType *player_ptr)
{
char k;
int d, skey;
* @param page オプションページ番号
* @param info 表示メッセージ
*/
-void do_cmd_options_aux(player_type *player_ptr, game_option_types page, concptr info)
+void do_cmd_options_aux(PlayerType *player_ptr, game_option_types page, concptr info)
{
char ch;
int i, k = 0, n = 0, l;
#include "system/angband.h"
#include "system/game-option-types.h"
-struct player_type;
+class PlayerType;
void extract_option_vars(void);
-void do_cmd_options_aux(player_type *player_ptr, game_option_types page, concptr info);
-void do_cmd_options(player_type *player_ptr);
+void do_cmd_options_aux(PlayerType *player_ptr, game_option_types page, concptr info);
+void do_cmd_options(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @details
*/
-void do_cmd_help(player_type *player_ptr)
+void do_cmd_help(PlayerType *player_ptr)
{
screen_save();
(void)show_file(player_ptr, true, _("jhelp.hlp", "help.hlp"), nullptr, 0, 0);
#pragma once
-struct player_type;
-void do_cmd_help(player_type *player_ptr);
+class PlayerType;
+void do_cmd_help(PlayerType *player_ptr);
/*
* Interact with "knowledge"
*/
-void do_cmd_knowledge(player_type *player_ptr)
+void do_cmd_knowledge(PlayerType *player_ptr)
{
int i, p = 0;
bool need_redraw = false;
#pragma once
-struct player_type;
-void do_cmd_knowledge(player_type *player_ptr);
+class PlayerType;
+void do_cmd_knowledge(PlayerType *player_ptr);
* Note that the player ghosts are ignored.
* </pre>
*/
-void do_cmd_query_symbol(player_type *player_ptr)
+void do_cmd_query_symbol(PlayerType *player_ptr)
{
char sym, query;
char buf[256];
#pragma once
-struct player_type;
-void do_cmd_query_symbol(player_type *player_ptr);
+class PlayerType;
+void do_cmd_query_symbol(PlayerType *player_ptr);
* Could use some helpful instructions on this page.
* </pre>
*/
-void do_cmd_macros(player_type *player_ptr)
+void do_cmd_macros(PlayerType *player_ptr)
{
char tmp[1024];
char buf[1024];
#pragma once
-struct player_type;
-void do_cmd_macros(player_type *player_ptr);
+class PlayerType;
+void do_cmd_macros(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 記念撮影直前のグラフィックオプション
*/
-static bool update_use_graphics(player_type *player_ptr)
+static bool update_use_graphics(PlayerType *player_ptr)
{
if (!use_graphics) return true;
* Save a screen dump to a file
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_save_screen(player_type *player_ptr)
+void do_cmd_save_screen(PlayerType *player_ptr)
{
prt(_("記念撮影しますか? [(y)es/(h)tml/(n)o] ", "Save screen dump? [(y)es/(h)tml/(n)o] "), 0, 0);
bool html_dump;
#pragma once
-struct player_type;
+class PlayerType;
void do_cmd_save_screen_html_aux(char *filename, int message);
-void do_cmd_save_screen(player_type *player_ptr);
+void do_cmd_save_screen(PlayerType *player_ptr);
void do_cmd_load_screen(void);
* @param is_autosave オートセーブ中の処理ならばTRUE
* @details
*/
-void do_cmd_save_game(player_type *player_ptr, int is_autosave)
+void do_cmd_save_game(PlayerType *player_ptr, int is_autosave)
{
if (is_autosave)
msg_print(_("自動セーブ中", "Autosaving the game..."));
* Save the game and exit
* @details
*/
-void do_cmd_save_and_exit(player_type *player_ptr)
+void do_cmd_save_and_exit(PlayerType *player_ptr)
{
player_ptr->playing = false;
player_ptr->leaving = true;
#pragma once
-struct player_type;
-void do_cmd_save_game(player_type *player_ptr, int is_autosave);
-void do_cmd_save_and_exit(player_type *player_ptr);
+class PlayerType;
+void do_cmd_save_game(PlayerType *player_ptr, int is_autosave);
+void do_cmd_save_and_exit(PlayerType *player_ptr);
return destroy_ptr;
}
-static bool check_destory_item(player_type *player_ptr, destroy_type *destroy_ptr)
+static bool check_destory_item(PlayerType *player_ptr, destroy_type *destroy_ptr)
{
if (destroy_ptr->force || (!confirm_destroy && (object_value(destroy_ptr->o_ptr) <= 0)))
return true;
}
}
-static bool select_destroying_item(player_type *player_ptr, destroy_type *destroy_ptr)
+static bool select_destroying_item(PlayerType *player_ptr, destroy_type *destroy_ptr)
{
concptr q = _("どのアイテムを壊しますか? ", "Destroy which item? ");
concptr s = _("壊せるアイテムを持っていない。", "You have nothing to destroy.");
* @param destory_ptr アイテム破壊構造体への参照ポインタ
* return 魔法書の破壊によって経験値が入るならばTRUE
*/
-static bool decide_magic_book_exp(player_type *player_ptr, destroy_type *destroy_ptr)
+static bool decide_magic_book_exp(PlayerType *player_ptr, destroy_type *destroy_ptr)
{
if (player_ptr->prace == PlayerRaceType::ANDROID)
return false;
return gain_expr;
}
-static void gain_exp_by_destroying_magic_book(player_type *player_ptr, destroy_type *destroy_ptr)
+static void gain_exp_by_destroying_magic_book(PlayerType *player_ptr, destroy_type *destroy_ptr)
{
bool gain_expr = decide_magic_book_exp(player_ptr, destroy_ptr);
if (!gain_expr || (player_ptr->exp >= PY_MAX_EXP))
gain_exp(player_ptr, tester_exp * destroy_ptr->amt);
}
-static void process_destroy_magic_book(player_type *player_ptr, destroy_type *destroy_ptr)
+static void process_destroy_magic_book(PlayerType *player_ptr, destroy_type *destroy_ptr)
{
if (!item_tester_high_level_book(destroy_ptr->q_ptr))
return;
chg_virtue(player_ptr, V_SACRIFICE, 1);
}
-static void exe_destroy_item(player_type *player_ptr, destroy_type *destroy_ptr)
+static void exe_destroy_item(PlayerType *player_ptr, destroy_type *destroy_ptr)
{
destroy_ptr->q_ptr->copy_from(destroy_ptr->o_ptr);
msg_format(_("%sを壊した。", "You destroy %s."), destroy_ptr->o_name);
* @brief アイテムを破壊するコマンドのメインルーチン / Destroy an item
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_destroy(player_type *player_ptr)
+void do_cmd_destroy(PlayerType *player_ptr)
{
PlayerClass(player_ptr).break_samurai_stance({ SamuraiStanceType::MUSOU });
#pragma once
-struct player_type;
-void do_cmd_destroy(player_type *player_ptr);
+class PlayerType;
+void do_cmd_destroy(PlayerType *player_ptr);
* @param o_ptr 食べるオブジェクト
* @return 鑑定されるならTRUE、されないならFALSE
*/
-bool exe_eat_food_type_object(player_type *player_ptr, object_type *o_ptr)
+bool exe_eat_food_type_object(PlayerType *player_ptr, object_type *o_ptr)
{
if (o_ptr->tval != ItemKindType::FOOD)
return false;
* @param item オブジェクトのインベントリ番号
* @return 食べようとしたらTRUE、しなかったらFALSE
*/
-bool exe_eat_charge_of_magic_device(player_type *player_ptr, object_type *o_ptr, INVENTORY_IDX item)
+bool exe_eat_charge_of_magic_device(PlayerType *player_ptr, object_type *o_ptr, INVENTORY_IDX item)
{
if (o_ptr->tval != ItemKindType::STAFF && o_ptr->tval != ItemKindType::WAND)
return false;
* @brief 食料を食べるコマンドのサブルーチン
* @param item 食べるオブジェクトの所持品ID
*/
-void exe_eat_food(player_type *player_ptr, INVENTORY_IDX item)
+void exe_eat_food(PlayerType *player_ptr, INVENTORY_IDX item)
{
if (music_singing_any(player_ptr))
stop_singing(player_ptr);
* @brief 食料を食べるコマンドのメインルーチン /
* Eat some food (from the pack or floor)
*/
-void do_cmd_eat_food(player_type *player_ptr)
+void do_cmd_eat_food(PlayerType *player_ptr)
{
OBJECT_IDX item;
concptr q, s;
#include "system/angband.h"
-struct player_type;
-void do_cmd_eat_food(player_type *player_ptr);
-void exe_eat_food(player_type *player_ptr, INVENTORY_IDX item);
+class PlayerType;
+void do_cmd_eat_food(PlayerType *player_ptr);
+void exe_eat_food(PlayerType *player_ptr, INVENTORY_IDX item);
/*!
* @brief 装備一覧を表示するコマンドのメインルーチン / Display equipment
*/
-void do_cmd_equip(player_type *player_ptr)
+void do_cmd_equip(PlayerType *player_ptr)
{
char out_val[160];
command_wrk = true;
* @brief 装備するコマンドのメインルーチン / Wield or wear a single item from the pack or floor
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_wield(player_type *player_ptr)
+void do_cmd_wield(PlayerType *player_ptr)
{
OBJECT_IDX item, slot;
object_type forge;
/*!
* @brief 装備を外すコマンドのメインルーチン / Take off an item
*/
-void do_cmd_takeoff(player_type *player_ptr)
+void do_cmd_takeoff(PlayerType *player_ptr)
{
OBJECT_IDX item;
object_type *o_ptr;
#pragma once
-struct player_type;
-void do_cmd_equip(player_type *player_ptr);
-void do_cmd_wield(player_type *player_ptr);
-void do_cmd_takeoff(player_type *player_ptr);
+class PlayerType;
+void do_cmd_equip(PlayerType *player_ptr);
+void do_cmd_wield(PlayerType *player_ptr);
+void do_cmd_takeoff(PlayerType *player_ptr);
/*!
* @brief 持ち物一覧を表示するコマンドのメインルーチン / Display inventory_list
*/
-void do_cmd_inven(player_type *player_ptr)
+void do_cmd_inven(PlayerType *player_ptr)
{
char out_val[160];
command_wrk = false;
/*!
* @brief アイテムを落とすコマンドのメインルーチン / Drop an item
*/
-void do_cmd_drop(player_type *player_ptr)
+void do_cmd_drop(PlayerType *player_ptr)
{
OBJECT_IDX item;
int amt = 1;
/*!
* @brief アイテムを調査するコマンドのメインルーチン / Observe an item which has been *identify*-ed
*/
-void do_cmd_observe(player_type *player_ptr)
+void do_cmd_observe(PlayerType *player_ptr)
{
OBJECT_IDX item;
object_type *o_ptr;
* @brief アイテムの銘を消すコマンドのメインルーチン
* Remove the inscription from an object XXX Mention item (when done)?
*/
-void do_cmd_uninscribe(player_type *player_ptr)
+void do_cmd_uninscribe(PlayerType *player_ptr)
{
OBJECT_IDX item;
object_type *o_ptr;
* @brief アイテムの銘を刻むコマンドのメインルーチン
* Inscribe an object with a comment
*/
-void do_cmd_inscribe(player_type *player_ptr)
+void do_cmd_inscribe(PlayerType *player_ptr)
{
OBJECT_IDX item;
object_type *o_ptr;
* @details
* XXX - Add actions for other item types
*/
-void do_cmd_use(player_type *player_ptr)
+void do_cmd_use(PlayerType *player_ptr)
{
OBJECT_IDX item;
object_type *o_ptr;
* @brief 装備を発動するコマンドのメインルーチン /
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_activate(player_type *player_ptr)
+void do_cmd_activate(PlayerType *player_ptr)
{
OBJECT_IDX item;
if (player_ptr->wild_mode || cmd_limit_arena(player_ptr))
#pragma once
-struct player_type;
-void do_cmd_inven(player_type *player_ptr);
-void do_cmd_drop(player_type *player_ptr);
-void do_cmd_observe(player_type *player_ptr);
-void do_cmd_uninscribe(player_type *player_ptr);
-void do_cmd_inscribe(player_type *player_ptr);
-void do_cmd_use(player_type *player_ptr);
-void do_cmd_activate(player_type *player_ptr);
+class PlayerType;
+void do_cmd_inven(PlayerType *player_ptr);
+void do_cmd_drop(PlayerType *player_ptr);
+void do_cmd_observe(PlayerType *player_ptr);
+void do_cmd_uninscribe(PlayerType *player_ptr);
+void do_cmd_inscribe(PlayerType *player_ptr);
+void do_cmd_use(PlayerType *player_ptr);
+void do_cmd_activate(PlayerType *player_ptr);
* @param only_browse 閲覧するだけならばTRUE
* @return 選択した魔力のID、キャンセルならば-1を返す
*/
-static std::optional<std::tuple<ItemKindType, OBJECT_SUBTYPE_VALUE>> select_magic_eater(player_type *player_ptr, bool only_browse)
+static std::optional<std::tuple<ItemKindType, OBJECT_SUBTYPE_VALUE>> select_magic_eater(PlayerType *player_ptr, bool only_browse)
{
char choice;
bool flag, request_list;
* @param powerful 強力発動中の処理ならばTRUE
* @return 実際にコマンドを実行したならばTRUEを返す。
*/
-bool do_cmd_magic_eater(player_type *player_ptr, bool only_browse, bool powerful)
+bool do_cmd_magic_eater(PlayerType *player_ptr, bool only_browse, bool powerful)
{
bool use_charge = true;
#pragma once
-struct player_type;
-bool do_cmd_magic_eater(player_type *player_ptr, bool only_browse, bool powerful);
+class PlayerType;
+bool do_cmd_magic_eater(PlayerType *player_ptr, bool only_browse, bool powerful);
* @brief 薬を飲むコマンドのメインルーチン /
* Quaff some potion (from the pack or floor)
*/
-void do_cmd_quaff_potion(player_type *player_ptr)
+void do_cmd_quaff_potion(PlayerType *player_ptr)
{
if (player_ptr->wild_mode)
return;
#pragma once
-struct player_type;
-void do_cmd_quaff_potion(player_type *player_ptr);
+class PlayerType;
+void do_cmd_quaff_potion(PlayerType *player_ptr);
* @brief 読むコマンドのメインルーチン /
* Eat some food (from the pack or floor)
*/
-void do_cmd_read_scroll(player_type *player_ptr)
+void do_cmd_read_scroll(PlayerType *player_ptr)
{
if (player_ptr->wild_mode || cmd_limit_arena(player_ptr))
return;
#pragma once
-struct player_type;
-void do_cmd_read_scroll(player_type *player_ptr);
+class PlayerType;
+void do_cmd_read_scroll(PlayerType *player_ptr);
* @brief ランタンに燃料を加えるコマンドのメインルーチン
* Refill the players lamp (from the pack or floor)
*/
-static void do_cmd_refill_lamp(player_type *player_ptr)
+static void do_cmd_refill_lamp(PlayerType *player_ptr)
{
OBJECT_IDX item;
object_type *o_ptr;
* @brief 松明を束ねるコマンドのメインルーチン
* Refuel the players torch (from the pack or floor)
*/
-static void do_cmd_refill_torch(player_type *player_ptr)
+static void do_cmd_refill_torch(PlayerType *player_ptr)
{
OBJECT_IDX item;
object_type *o_ptr;
* @brief 燃料を補充するコマンドのメインルーチン
* Refill the players lamp, or restock his torches
*/
-void do_cmd_refill(player_type *player_ptr)
+void do_cmd_refill(PlayerType *player_ptr)
{
object_type *o_ptr;
o_ptr = &player_ptr->inventory_list[INVEN_LITE];
#pragma once
-struct player_type;
-void do_cmd_refill(player_type *player_ptr);
+class PlayerType;
+void do_cmd_refill(PlayerType *player_ptr);
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
-ThrowCommand::ThrowCommand(player_type *player_ptr)
+ThrowCommand::ThrowCommand(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ThrowCommand {
public:
- ThrowCommand(player_type *player_ptr);
+ ThrowCommand(PlayerType *player_ptr);
virtual ~ThrowCommand() = default;
bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* @param known 判明済ならばTRUE
* @return 発動により効果内容が確定したならばTRUEを返す
*/
-int staff_effect(player_type *player_ptr, OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, bool magic, bool known)
+int staff_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, bool magic, bool known)
{
int k;
bool ident = false;
/*!
* @brief 杖を使うコマンドのメインルーチン /
*/
-void do_cmd_use_staff(player_type *player_ptr)
+void do_cmd_use_staff(PlayerType *player_ptr)
{
OBJECT_IDX item;
concptr q, s;
#include "system/angband.h"
-struct player_type;
-int staff_effect(player_type *player_ptr, OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, bool magic, bool known);
-void do_cmd_use_staff(player_type *player_ptr);
+class PlayerType;
+int staff_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, bool magic, bool known);
+void do_cmd_use_staff(PlayerType *player_ptr);
* @param powerful 強力発動上の処理ならばTRUE
* @return 発動により効果内容が確定したならばTRUEを返す
*/
-int rod_effect(player_type *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool *use_charge, bool powerful)
+int rod_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool *use_charge, bool powerful)
{
int ident = false;
PLAYER_LEVEL lev = powerful ? player_ptr->lev * 2 : player_ptr->lev;
* @brief ロッドを使うコマンドのメインルーチン /
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_zap_rod(player_type *player_ptr)
+void do_cmd_zap_rod(PlayerType *player_ptr)
{
if (player_ptr->wild_mode) {
return;
#include "system/angband.h"
-struct player_type;
-int rod_effect(player_type *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool *use_charge, bool powerful);
-void do_cmd_zap_rod(player_type *player_ptr);
+class PlayerType;
+int rod_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool *use_charge, bool powerful);
+void do_cmd_zap_rod(PlayerType *player_ptr);
* @param magic 魔道具術上の処理ならばTRUE
* @return 発動により効果内容が確定したならばTRUEを返す
*/
-bool wand_effect(player_type *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool powerful, bool magic)
+bool wand_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool powerful, bool magic)
{
bool ident = false;
PLAYER_LEVEL lev = powerful ? player_ptr->lev * 2 : player_ptr->lev;
/*!
* @brief 魔法棒を使うコマンドのメインルーチン /
*/
-void do_cmd_aim_wand(player_type *player_ptr)
+void do_cmd_aim_wand(PlayerType *player_ptr)
{
OBJECT_IDX item;
concptr q, s;
#include "system/angband.h"
-struct player_type;
-bool wand_effect(player_type *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool powerful, bool magic);
-void do_cmd_aim_wand(player_type *player_ptr);
+class PlayerType;
+bool wand_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool powerful, bool magic);
+void do_cmd_aim_wand(PlayerType *player_ptr);
* the "TERM_XTRA_REACT" hook before redrawing the windows.
* </pre>
*/
-void do_cmd_redraw(player_type *player_ptr)
+void do_cmd_redraw(PlayerType *player_ptr)
{
term_xtra(TERM_XTRA_REACT, 0);
/*!
* @brief プレイヤーのステータス表示
*/
-void do_cmd_player_status(player_type *player_ptr)
+void do_cmd_player_status(PlayerType *player_ptr)
{
int mode = 0;
char tmp[160];
#pragma once
-struct player_type;
-void do_cmd_redraw(player_type *player_ptr);
-void do_cmd_player_status(player_type *player_ptr);
+class PlayerType;
+void do_cmd_redraw(PlayerType *player_ptr);
+void do_cmd_player_status(PlayerType *player_ptr);
void do_cmd_message_one(void);
void do_cmd_messages(int num_now);
*
* Currently, the "player" is displayed on the map.
*/
-void do_cmd_view_map(player_type *player_ptr)
+void do_cmd_view_map(PlayerType *player_ptr)
{
screen_save();
prt(_("お待ち下さい...", "Please wait..."), 0, 0);
#pragma once
-struct player_type;
-void do_cmd_view_map(player_type *player_ptr);
+class PlayerType;
+void do_cmd_view_map(PlayerType *player_ptr);
/*
* Interact with "visuals"
*/
-void do_cmd_visuals(player_type *player_ptr)
+void do_cmd_visuals(PlayerType *player_ptr)
{
FILE *auto_dump_stream;
char tmp[160];
#pragma once
-struct player_type;
-void do_cmd_visuals(player_type *player_ptr);
+class PlayerType;
+void do_cmd_visuals(PlayerType *player_ptr);
* @return 命中と判定された場合TRUEを返す
* @note Always miss 5%, always hit 5%, otherwise random.
*/
-bool test_hit_norm(player_type *player_ptr, int chance, ARMOUR_CLASS ac, bool visible)
+bool test_hit_norm(PlayerType *player_ptr, int chance, ARMOUR_CLASS ac, bool visible)
{
if (!visible)
chance = (chance + 1) / 2;
* @param ac 敵AC
* @return 命中確率
*/
-PERCENTAGE hit_chance(player_type *player_ptr, int reli, ARMOUR_CLASS ac)
+PERCENTAGE hit_chance(PlayerType *player_ptr, int reli, ARMOUR_CLASS ac)
{
PERCENTAGE chance = 5, chance_left = 90;
if (reli <= 0)
* Always miss 5% of the time, Always hit 5% of the time.
* Otherwise, match monster power against player armor.
*/
-bool check_hit_from_monster_to_player(player_type *player_ptr, int power, DEPTH level, int stun)
+bool check_hit_from_monster_to_player(PlayerType *player_ptr, int power, DEPTH level, int stun)
{
int k = randint0(100);
if (stun && one_in_(2))
* @param pa_ptr 直接攻撃構造体への参照ポインタ
* @param chance 基本命中値
*/
-static bool decide_attack_hit(player_type *player_ptr, player_attack_type *pa_ptr, int chance)
+static bool decide_attack_hit(PlayerType *player_ptr, player_attack_type *pa_ptr, int chance)
{
bool success_hit = false;
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
* @param chance 基本命中値
* @return 当たればTRUE、外れればFALSE
*/
-bool process_attack_hit(player_type *player_ptr, player_attack_type *pa_ptr, int chance)
+bool process_attack_hit(PlayerType *player_ptr, player_attack_type *pa_ptr, int chance)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
if (decide_attack_hit(player_ptr, pa_ptr, chance))
#include "system/angband.h"
struct player_attack_type;
-struct player_type;
-bool test_hit_norm(player_type *player_ptr, int chance, ARMOUR_CLASS ac, bool visible);
-PERCENTAGE hit_chance(player_type *player_ptr, int chance, ARMOUR_CLASS ac);
-bool check_hit_from_monster_to_player(player_type *player_ptr, int power, DEPTH level, int stun);
+class PlayerType;
+bool test_hit_norm(PlayerType *player_ptr, int chance, ARMOUR_CLASS ac, bool visible);
+PERCENTAGE hit_chance(PlayerType *player_ptr, int chance, ARMOUR_CLASS ac);
+bool check_hit_from_monster_to_player(PlayerType *player_ptr, int power, DEPTH level, int stun);
bool check_hit_from_monster_to_monster(int power, DEPTH level, ARMOUR_CLASS ac, int stun);
-bool process_attack_hit(player_type *player_ptr, player_attack_type *pa_ptr, int chance);
+bool process_attack_hit(PlayerType *player_ptr, player_attack_type *pa_ptr, int chance);
* @param mode オプションフラグ
* @return クリティカル修正が入ったダメージ値
*/
-HIT_POINT critical_norm(player_type *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, combat_options mode, bool impact)
+HIT_POINT critical_norm(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, combat_options mode, bool impact)
{
/* Extract "blow" power */
int i = (weight + (meichuu * 3 + plus * 5) + player_ptr->skill_thn);
* チェックを通ったら、ユニークならば2倍ダメージ、それ以外は一撃死
* @todo 3つの処理をdetailsに書くよりは関数自体を分割すべきだが、一旦後回しにする。他の項目と一緒に処理する
*/
-static void ninja_critical(player_type *player_ptr, player_attack_type *pa_ptr)
+static void ninja_critical(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
int maxhp = pa_ptr->m_ptr->maxhp;
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-void critical_attack(player_type *player_ptr, player_attack_type *pa_ptr)
+void critical_attack(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
#include <tuple>
struct player_attack_type;
-struct player_type;
+class PlayerType;
std::tuple<HIT_POINT, concptr, sound_type> apply_critical_norm_damage(int k, HIT_POINT base_dam);
-HIT_POINT critical_norm(player_type *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, combat_options mode, bool impact = false);
-void critical_attack(player_type *player_ptr, player_attack_type *pa_ptr);
+HIT_POINT critical_norm(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, combat_options mode, bool impact = false);
+void critical_attack(PlayerType *player_ptr, player_attack_type *pa_ptr);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-static void aura_fire_by_monster_attack(player_type *player_ptr, monap_type *monap_ptr)
+static void aura_fire_by_monster_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!has_sh_fire(player_ptr) || !monap_ptr->alive || player_ptr->is_dead)
return;
}
}
-static void aura_elec_by_monster_attack(player_type *player_ptr, monap_type *monap_ptr)
+static void aura_elec_by_monster_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!has_sh_elec(player_ptr) || !monap_ptr->alive || player_ptr->is_dead)
return;
}
}
-static void aura_cold_by_monster_attack(player_type *player_ptr, monap_type *monap_ptr)
+static void aura_cold_by_monster_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!has_sh_cold(player_ptr) || !monap_ptr->alive || player_ptr->is_dead)
return;
}
}
-static void aura_shards_by_monster_attack(player_type *player_ptr, monap_type *monap_ptr)
+static void aura_shards_by_monster_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!player_ptr->dustrobe || !monap_ptr->alive || player_ptr->is_dead)
return;
teleport_player(player_ptr, 10, TELEPORT_SPONTANEOUS);
}
-static void aura_holy_by_monster_attack(player_type *player_ptr, monap_type *monap_ptr)
+static void aura_holy_by_monster_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!player_ptr->tim_sh_holy || !monap_ptr->alive || player_ptr->is_dead)
return;
r_ptr->r_flags3 |= RF3_EVIL;
}
-static void aura_force_by_monster_attack(player_type *player_ptr, monap_type *monap_ptr)
+static void aura_force_by_monster_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!player_ptr->tim_sh_touki || !monap_ptr->alive || player_ptr->is_dead)
return;
}
}
-static void aura_shadow_by_monster_attack(player_type *player_ptr, monap_type *monap_ptr)
+static void aura_shadow_by_monster_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!SpellHex(player_ptr).is_spelling_specific(HEX_SHADOW_CLOAK) || !monap_ptr->alive || player_ptr->is_dead)
return;
}
}
-void process_aura_counterattack(player_type *player_ptr, monap_type *monap_ptr)
+void process_aura_counterattack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!monap_ptr->touched)
return;
#pragma once
typedef struct monap_type monap_type;
-struct player_type;
-void process_aura_counterattack(player_type *player_ptr, monap_type *monap_ptr);
+class PlayerType;
+void process_aura_counterattack(PlayerType *player_ptr, monap_type *monap_ptr);
* @param arrow_ptr 矢弾のオブジェクト構造体参照ポインタ
* @return スナイパーの射撃属性、弓矢の属性を考慮する。デフォルトはGF_PLAYER_SHOOT。
*/
-AttributeFlags shot_attribute(player_type *player_ptr, object_type *bow_ptr, object_type *arrow_ptr, SPELL_IDX snipe_type)
+AttributeFlags shot_attribute(PlayerType *player_ptr, object_type *bow_ptr, object_type *arrow_ptr, SPELL_IDX snipe_type)
{
AttributeFlags attribute_flags{};
attribute_flags.set(AttributeType::PLAYER_SHOOT);
* @return スレイ倍率をかけたダメージ量
*/
static MULTIPLY calc_shot_damage_with_slay(
- player_type *player_ptr, object_type *bow_ptr, object_type *arrow_ptr, HIT_POINT tdam, monster_type *monster_ptr, SPELL_IDX snipe_type)
+ PlayerType *player_ptr, object_type *bow_ptr, object_type *arrow_ptr, HIT_POINT tdam, monster_type *monster_ptr, SPELL_IDX snipe_type)
{
MULTIPLY mult = 10;
* Note that Bows of "Extra Shots" give an extra shot.
* </pre>
*/
-void exe_fire(player_type *player_ptr, INVENTORY_IDX item, object_type *j_ptr, SPELL_IDX snipe_type)
+void exe_fire(PlayerType *player_ptr, INVENTORY_IDX item, object_type *j_ptr, SPELL_IDX snipe_type)
{
DIRECTION dir;
int i;
* @return 命中と判定された場合TRUEを返す
* @note Always miss 5%, always hit 5%, otherwise random.
*/
-bool test_hit_fire(player_type *player_ptr, int chance, monster_type *m_ptr, int vis, char *o_name)
+bool test_hit_fire(PlayerType *player_ptr, int chance, monster_type *m_ptr, int vis, char *o_name)
{
int k;
ARMOUR_CLASS ac;
* @param dam 現在算出中のダメージ値
* @return クリティカル修正が入ったダメージ値
*/
-HIT_POINT critical_shot(player_type *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam)
+HIT_POINT critical_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam)
{
int i, k;
object_type *j_ptr = &player_ptr->inventory_list[INVEN_BOW];
* @return ダメージ期待値
* @note 基本ダメージ量と重量はこの部位では計算に加わらない。
*/
-HIT_POINT calc_crit_ratio_shot(player_type *player_ptr, HIT_POINT plus_ammo, HIT_POINT plus_bow)
+HIT_POINT calc_crit_ratio_shot(PlayerType *player_ptr, HIT_POINT plus_ammo, HIT_POINT plus_bow)
{
HIT_POINT i;
object_type *j_ptr = &player_ptr->inventory_list[INVEN_BOW];
* @param dam 基本ダメージ量
* @return ダメージ期待値
*/
-HIT_POINT calc_expect_crit_shot(player_type *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam)
+HIT_POINT calc_expect_crit_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam)
{
uint32_t num;
int i, k, crit;
* @param impact 強撃かどうか
* @return ダメージ期待値
*/
-HIT_POINT calc_expect_crit(player_type *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, bool dokubari, bool impact)
+HIT_POINT calc_expect_crit(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, bool dokubari, bool impact)
{
if (dokubari)
return dam;
struct monster_type;
struct object_type;
-struct player_type;
-bool test_hit_fire(player_type *player_ptr, int chance, monster_type *m_ptr, int vis, char *o_name);
-HIT_POINT critical_shot(player_type *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam);
+class PlayerType;
+bool test_hit_fire(PlayerType *player_ptr, int chance, monster_type *m_ptr, int vis, char *o_name);
+HIT_POINT critical_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam);
ENERGY bow_energy(OBJECT_SUBTYPE_VALUE sval);
int bow_tmul(OBJECT_SUBTYPE_VALUE sval);
-HIT_POINT calc_crit_ratio_shot(player_type *player_ptr, HIT_POINT plus_ammo, HIT_POINT plus_bow);
-HIT_POINT calc_expect_crit_shot(player_type *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam);
-HIT_POINT calc_expect_crit(player_type *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, bool dokubari, bool impact);
-void exe_fire(player_type *player_ptr, INVENTORY_IDX item, object_type *j_ptr, SPELL_IDX snipe_type);
+HIT_POINT calc_crit_ratio_shot(PlayerType *player_ptr, HIT_POINT plus_ammo, HIT_POINT plus_bow);
+HIT_POINT calc_expect_crit_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam);
+HIT_POINT calc_expect_crit(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, bool dokubari, bool impact);
+void exe_fire(PlayerType *player_ptr, INVENTORY_IDX item, object_type *j_ptr, SPELL_IDX snipe_type);
* @param m_ptr 目標モンスターの構造体参照ポインタ
* @return スレイング加味後の倍率(/10倍)
*/
-MULTIPLY mult_slaying(player_type *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr)
+MULTIPLY mult_slaying(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr)
{
static const struct slay_table_t {
tr_type slay_flag;
* @param m_ptr 目標モンスターの構造体参照ポインタ
* @return スレイング加味後の倍率(/10倍)
*/
-MULTIPLY mult_brand(player_type *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr)
+MULTIPLY mult_brand(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr)
{
static const struct brand_table_t {
tr_type brand_flag;
* Note that most brands and slays are x3, except Slay Animal (x2),\n
* Slay Evil (x2), and Kill dragon (x5).\n
*/
-HIT_POINT calc_attack_damage_with_slay(player_type *player_ptr, object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, combat_options mode, bool thrown)
+HIT_POINT calc_attack_damage_with_slay(PlayerType *player_ptr, object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, combat_options mode, bool thrown)
{
auto flgs = object_flags(o_ptr);
torch_flags(o_ptr, flgs); /* torches has secret flags */
return (tdam * mult / 10);
}
-AttributeFlags melee_attribute(player_type *player_ptr, object_type *o_ptr, combat_options mode)
+AttributeFlags melee_attribute(PlayerType *player_ptr, object_type *o_ptr, combat_options mode)
{
AttributeFlags attribute_flags{};
attribute_flags.set(AttributeType::PLAYER_MELEE);
struct monster_type;
struct object_type;
-struct player_type;
-MULTIPLY mult_slaying(player_type *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr);
-MULTIPLY mult_brand(player_type *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr);
-HIT_POINT calc_attack_damage_with_slay(player_type *player_ptr, object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, combat_options mode, bool thrown);
-AttributeFlags melee_attribute(player_type *player_ptr, object_type *o_ptr, combat_options mode);
+class PlayerType;
+MULTIPLY mult_slaying(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr);
+MULTIPLY mult_brand(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr);
+HIT_POINT calc_attack_damage_with_slay(PlayerType *player_ptr, object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, combat_options mode, bool thrown);
+AttributeFlags melee_attribute(PlayerType *player_ptr, object_type *o_ptr, combat_options mode);
* mode & CHECK_NO_HISTORY : no message_add
* mode & CHECK_DEFAULT_Y : accept any key as y, except n and Esc.
*/
-bool get_check_strict(player_type *player_ptr, concptr prompt, BIT_FLAGS mode)
+bool get_check_strict(PlayerType *player_ptr, concptr prompt, BIT_FLAGS mode)
{
char buf[80];
if (!rogue_like_commands)
#define CHECK_NO_HISTORY 0x04
#define CHECK_DEFAULT_Y 0x08
-struct player_type;
+class PlayerType;
bool askfor_aux(char *buf, int len, bool numpad_cursor);
bool askfor(char *buf, int len);
bool get_string(concptr prompt, char *buf, int len);
bool get_check(concptr prompt);
-bool get_check_strict(player_type *player_ptr, concptr prompt, BIT_FLAGS mode);
+bool get_check_strict(PlayerType *player_ptr, concptr prompt, BIT_FLAGS mode);
bool get_com(concptr prompt, char *command, bool z_escape);
QUANTITY get_quantity(concptr prompt, QUANTITY max);
void pause_line(int row);
* The second arg is currently unused, but could induce output flush.
* All disturbance cancels repeated commands, resting, and running.
*/
-void disturb(player_type *player_ptr, bool stop_search, bool stop_travel)
+void disturb(PlayerType *player_ptr, bool stop_search, bool stop_travel)
{
if (command_rep) {
command_rep = 0;
#pragma once
-struct player_type;
-void disturb(player_type *player_ptr, bool stop_search, bool flush_output);
+class PlayerType;
+void disturb(PlayerType *player_ptr, bool stop_search, bool flush_output);
#include "view/display-scores.h"
#include "world/world.h"
-static void clear_floor(player_type *player_ptr)
+static void clear_floor(PlayerType *player_ptr)
{
(void)fd_close(highscore_fd);
highscore_fd = -1;
signals_handle_tstp();
}
-static void send_world_score_on_closing(player_type *player_ptr, bool do_send)
+static void send_world_score_on_closing(PlayerType *player_ptr, bool do_send)
{
if (send_world_score(player_ptr, do_send, display_player))
return;
* @param player_ptr プレイヤー構造体参照ポインタ。
* @return 死亡していればTRUE, まだ生きているならば各処理を済ませた上ででFALSE。
*/
-static bool check_death(player_type *player_ptr)
+static bool check_death(PlayerType *player_ptr)
{
if (player_ptr->is_dead)
return true;
* @brief 勝利者用の引退演出処理 /
* Change the player into a King! -RAK-
*/
-static void kingly(player_type *player_ptr)
+static void kingly(PlayerType *player_ptr)
{
bool seppuku = streq(player_ptr->died_from, "Seppuku");
player_ptr->current_floor_ptr->dun_level = 0;
* This function is called only from "main.c" and "signals.c".
* </pre>
*/
-void close_game(player_type *player_ptr)
+void close_game(PlayerType *player_ptr)
{
bool do_send = true;
handle_stuff(player_ptr);
* @date 2020/03/09
*/
-struct player_type;
-void close_game(player_type *player_ptr);
+class PlayerType;
+void close_game(PlayerType *player_ptr);
#include "wizard/wizard-special-process.h"
#include "world/world.h"
-static void restore_windows(player_type *player_ptr)
+static void restore_windows(PlayerType *player_ptr)
{
player_ptr->hack_mutation = false;
w_ptr->character_icky_depth = 1;
(void)term_set_cursor(0);
}
-static void send_waiting_record(player_type *player_ptr)
+static void send_waiting_record(PlayerType *player_ptr)
{
if (!player_ptr->wait_report_score)
return;
quit(0);
}
-static void init_random_seed(player_type *player_ptr, bool new_game)
+static void init_random_seed(PlayerType *player_ptr, bool new_game)
{
bool init_random_seed = false;
if (!w_ptr->character_loaded) {
Rand_state_init();
}
-static void init_world_floor_info(player_type *player_ptr)
+static void init_world_floor_info(PlayerType *player_ptr)
{
w_ptr->character_dungeon = false;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* 1.0.9 以前はセーブ前に player_ptr->riding = -1 としていたので、再設定が必要だった。
* もう不要だが、以前のセーブファイルとの互換のために残しておく。
*/
-static void restore_world_floor_info(player_type *player_ptr)
+static void restore_world_floor_info(PlayerType *player_ptr)
{
write_level = false;
exe_write_diary(player_ptr, DIARY_GAMESTART, 1, _(" ----ゲーム再開----", " --- Restarted Game ---"));
}
}
-static void reset_world_info(player_type *player_ptr)
+static void reset_world_info(PlayerType *player_ptr)
{
w_ptr->creating_savefile = false;
player_ptr->teleport_town = false;
record_o_name[0] = '\0';
}
-static void generate_wilderness(player_type *player_ptr)
+static void generate_wilderness(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if ((floor_ptr->dun_level == 0) && floor_ptr->inside_quest)
select_floor_music(player_ptr);
}
-static void change_floor_if_error(player_type *player_ptr)
+static void change_floor_if_error(PlayerType *player_ptr)
{
if (!w_ptr->character_dungeon) {
change_floor(player_ptr);
player_ptr->panic_save = 0;
}
-static void generate_world(player_type *player_ptr, bool new_game)
+static void generate_world(PlayerType *player_ptr, bool new_game)
{
reset_world_info(player_ptr);
floor_type *floor_ptr = player_ptr->current_floor_ptr;
exe_write_diary(player_ptr, DIARY_DESCRIPTION, 0, buf);
}
-static void init_io(player_type *player_ptr)
+static void init_io(PlayerType *player_ptr)
{
term_xtra(TERM_XTRA_REACT, 0);
player_ptr->window_flags = PW_ALL;
rogue_like_commands = true;
}
-static void init_riding_pet(player_type *player_ptr, bool new_game)
+static void init_riding_pet(PlayerType *player_ptr, bool new_game)
{
if (!new_game || ((player_ptr->pclass != PlayerClassType::CAVALRY) && (player_ptr->pclass != PlayerClassType::BEASTMASTER)))
return;
m_ptr->energy_need = ENERGY_NEED() + ENERGY_NEED();
}
-static void decide_arena_death(player_type *player_ptr)
+static void decide_arena_death(PlayerType *player_ptr)
{
if (!player_ptr->playing || !player_ptr->is_dead)
return;
leave_floor(player_ptr);
}
-static void process_game_turn(player_type *player_ptr)
+static void process_game_turn(PlayerType *player_ptr)
{
bool load_game = true;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* savefile, we will commit suicide, if necessary, to allow the
* player to start a new game.
*/
-void play_game(player_type *player_ptr, bool new_game, bool browsing_movie)
+void play_game(PlayerType *player_ptr, bool new_game, bool browsing_movie)
{
if (browsing_movie) {
reset_visuals(player_ptr);
#pragma once
-struct player_type;
-void play_game(player_type *player_ptr, bool new_game, bool browsing_movie);
+class PlayerType;
+void play_game(PlayerType *player_ptr, bool new_game, bool browsing_movie);
* @brief 10ゲームターンが進行するごとに魔法効果の残りターンを減らしていく処理
* / Handle timeout every 10 game turns
*/
-void reduce_magic_effects_timeout(player_type *player_ptr)
+void reduce_magic_effects_timeout(PlayerType *player_ptr)
{
if (player_ptr->tim_mimic) {
(void)set_mimic(player_ptr, player_ptr->tim_mimic - 1, player_ptr->mimic_form, true);
#pragma once
-struct player_type;
-void reduce_magic_effects_timeout(player_type *player_ptr);
+class PlayerType;
+void reduce_magic_effects_timeout(PlayerType *player_ptr);
* After "compacting" (if needed), we "reorder" the objects into a more\n
* compact order, and we reset the allocation info, and the "live" array.\n
*/
-void compact_objects(player_type *player_ptr, int size)
+void compact_objects(PlayerType *player_ptr, int size)
{
object_type *o_ptr;
if (size) {
#pragma once
-struct player_type;
-void compact_objects(player_type *player_ptr, int size);
+class PlayerType;
+void compact_objects(PlayerType *player_ptr, int size);
bool load = true;
bool can_save = false;
-static void process_fishing(player_type *player_ptr)
+static void process_fishing(PlayerType *player_ptr)
{
term_xtra(TERM_XTRA_DELAY, 10);
if (one_in_(1000)) {
}
}
-bool continuous_action_running(player_type *player_ptr)
+bool continuous_action_running(PlayerType *player_ptr)
{
return player_ptr->running || travel.run || command_rep || (player_ptr->action == ACTION_REST) || (player_ptr->action == ACTION_FISH);
}
* must come first just in case somebody manages to corrupt\n
* the savefiles by clever use of menu commands or something.\n
*/
-void process_player(player_type *player_ptr)
+void process_player(PlayerType *player_ptr)
{
if (player_ptr->hack_mutation) {
msg_print(_("何か変わった気がする!", "You feel different!"));
/*!
* @brief プレイヤーの行動エネルギーが充填される(=プレイヤーのターンが回る)毎に行われる処理 / process the effects per 100 energy at player speed.
*/
-void process_upkeep_with_speed(player_type *player_ptr)
+void process_upkeep_with_speed(PlayerType *player_ptr)
{
if (!load && player_ptr->enchant_energy_need > 0 && !player_ptr->leaving) {
player_ptr->enchant_energy_need -= SPEED_TO_ENERGY(player_ptr->pspeed);
extern bool load; /*!<ロード処理中の分岐フラグ*/
extern bool can_save;
-struct player_type;
-bool continuous_action_running(player_type *player_ptr);
-void process_player(player_type *player_ptr);
-void process_upkeep_with_speed(player_type *player_ptr);
+class PlayerType;
+bool continuous_action_running(PlayerType *player_ptr);
+void process_player(PlayerType *player_ptr);
+void process_upkeep_with_speed(PlayerType *player_ptr);
* @param do_send 実際に転送ア処置を行うか否か
* @return 転送が成功したらTRUEを返す
*/
-bool send_world_score(player_type *current_player_ptr, bool do_send, display_player_pf display_player)
+bool send_world_score(PlayerType *current_player_ptr, bool do_send, display_player_pf display_player)
{
#ifdef WORLD_SCORE
if (!send_score || !do_send) {
* @details
* Assumes "signals_ignore_tstp()" has been called.
*/
-errr top_twenty(player_type *current_player_ptr)
+errr top_twenty(PlayerType *current_player_ptr)
{
high_score the_score = {};
char buf[32];
* Predict the players location, and display it.
* @return エラーコード
*/
-errr predict_score(player_type *current_player_ptr)
+errr predict_score(PlayerType *current_player_ptr)
{
high_score the_score;
char buf[32];
* @brief スコアランキングの簡易表示 /
* show_highclass - selectively list highscores based on class -KMW-
*/
-void show_highclass(player_type *current_player_ptr)
+void show_highclass(PlayerType *current_player_ptr)
{
screen_save();
char buf[1024], out_val[256];
* Race Legends -KMW-
* @param race_num 種族ID
*/
-void race_score(player_type *current_player_ptr, int race_num)
+void race_score(PlayerType *current_player_ptr, int race_num)
{
int i = 0, j, m = 0;
int pr, clev, lastlev;
* @brief スコアランキングの簡易表示(種族毎)メインルーチン /
* Race Legends -KMW-
*/
-void race_legends(player_type *current_player_ptr)
+void race_legends(PlayerType *current_player_ptr)
{
for (int i = 0; i < MAX_RACES; i++) {
race_score(current_player_ptr, i);
* @brief スコアファイル出力
* Display some character info
*/
-bool check_score(player_type *current_player_ptr)
+bool check_score(PlayerType *current_player_ptr)
{
term_clear();
#include "io/files-util.h"
#include "system/angband.h"
-struct player_type;
-bool send_world_score(player_type *current_player_ptr, bool do_send, display_player_pf display_player);
-errr top_twenty(player_type *current_player_ptr);
-errr predict_score(player_type *current_player_ptr);
-void race_legends(player_type *current_player_ptr);
-void race_score(player_type *current_player_ptr, int race_num);
-void show_highclass(player_type *current_player_ptr);
-bool check_score(player_type *current_player_ptr);
+class PlayerType;
+bool send_world_score(PlayerType *current_player_ptr, bool do_send, display_player_pf display_player);
+errr top_twenty(PlayerType *current_player_ptr);
+errr predict_score(PlayerType *current_player_ptr);
+void race_legends(PlayerType *current_player_ptr);
+void race_score(PlayerType *current_player_ptr, int race_num);
+void show_highclass(PlayerType *current_player_ptr);
+bool check_score(PlayerType *current_player_ptr);
* </pre>
* @todo 表示とそれ以外を分割する
*/
-bool show_file(player_type *player_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode)
+bool show_file(PlayerType *player_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode)
{
int wid, hgt;
term_get_size(&wid, &hgt);
#include "system/angband.h"
-struct player_type;
-bool show_file(player_type *player_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode);
+class PlayerType;
+bool show_file(PlayerType *player_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode);
void str_tolower(char *str);
* @brief 全更新処理をチェックして処理していく
* Handle "player_ptr->update" and "player_ptr->redraw" and "player_ptr->window"
*/
-void handle_stuff(player_type* player_ptr)
+void handle_stuff(PlayerType* player_ptr)
{
if (player_ptr->update)
update_creature(player_ptr);
/*
* Track the given monster race
*/
-void monster_race_track(player_type *player_ptr, MONRACE_IDX r_idx)
+void monster_race_track(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
player_ptr->monster_race_idx = r_idx;
player_ptr->window_flags |= (PW_MONSTER);
/*
* Track the given object kind
*/
-void object_kind_track(player_type *player_ptr, KIND_OBJECT_IDX k_idx)
+void object_kind_track(PlayerType *player_ptr, KIND_OBJECT_IDX k_idx)
{
player_ptr->object_kind_idx = k_idx;
player_ptr->window_flags |= (PW_OBJECT);
* @param m_idx トラッキング対象のモンスターID。0の時キャンセル
* @param なし
*/
-void health_track(player_type *player_ptr, MONSTER_IDX m_idx)
+void health_track(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
if (m_idx && m_idx == player_ptr->riding)
return;
player_ptr->redraw |= (PR_HEALTH);
}
-bool update_player(player_type *player_ptr)
+bool update_player(PlayerType *player_ptr)
{
player_ptr->update |= PU_COMBINE | PU_REORDER;
player_ptr->window_flags |= PW_INVEN;
return true;
}
-bool redraw_player(player_type *player_ptr)
+bool redraw_player(PlayerType *player_ptr)
{
if (player_ptr->csp > player_ptr->msp) {
player_ptr->csp = player_ptr->msp;
#include "system/angband.h"
-struct player_type;
-void handle_stuff(player_type *player_ptr);
-void monster_race_track(player_type *player_ptr, MONRACE_IDX r_idx);
-void object_kind_track(player_type *player_ptr, KIND_OBJECT_IDX k_idx);
-void health_track(player_type *player_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+void handle_stuff(PlayerType *player_ptr);
+void monster_race_track(PlayerType *player_ptr, MONRACE_IDX r_idx);
+void object_kind_track(PlayerType *player_ptr, KIND_OBJECT_IDX k_idx);
+void health_track(PlayerType *player_ptr, MONSTER_IDX m_idx);
-bool update_player(player_type *player_ptr);
-bool redraw_player(player_type *player_ptr);
+bool update_player(PlayerType *player_ptr);
+bool redraw_player(PlayerType *player_ptr);
* @details アンデッド種族は18:00からゲームを開始するので、この修正を予め行う。
* @return 修正をかけた後のゲームターン
*/
-int32_t turn_real(player_type *player_ptr, int32_t hoge)
+int32_t turn_real(PlayerType *player_ptr, int32_t hoge)
{
switch (player_ptr->start_race) {
case PlayerRaceType::VAMPIRE:
* @details ターン及びターンを記録する変数をターンの限界の1日前まで巻き戻す.
* @return 修正をかけた後のゲームターン
*/
-void prevent_turn_overflow(player_type *player_ptr)
+void prevent_turn_overflow(PlayerType *player_ptr)
{
if (w_ptr->game_turn < w_ptr->game_turn_limit)
return;
#include "system/angband.h"
-struct player_type;
-int32_t turn_real(player_type *player_ptr, int32_t hoge);
-void prevent_turn_overflow(player_type* player_ptr);
+class PlayerType;
+int32_t turn_real(PlayerType *player_ptr, int32_t hoge);
+void prevent_turn_overflow(PlayerType* player_ptr);
* @brief オブジェクト、地形の表示シンボルなど初期化する / Reset the "visual" lists
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void reset_visuals(player_type *player_ptr)
+void reset_visuals(PlayerType *player_ptr)
{
for (auto &f_ref : f_info) {
for (int j = 0; j < F_LIT_MAX; j++) {
#pragma once
-struct player_type;
-void reset_visuals(player_type *player_ptr);
+class PlayerType;
+void reset_visuals(PlayerType *player_ptr);
/*!
* @brief コンソールを再描画する /
* Redraw a term when it is resized
- * @todo ここにplayer_type を追加するとz-termに影響が行くので保留
+ * @todo ここにPlayerType を追加するとz-termに影響が行くので保留
*/
void redraw_window(void)
{
* @brief 現在のマップ名を描画する / Print dungeon
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void print_dungeon(player_type *player_ptr)
+static void print_dungeon(PlayerType *player_ptr)
{
c_put_str(TERM_WHITE, " ", ROW_DUNGEON, COL_DUNGEON);
concptr dungeon_name = map_name(player_ptr);
* @brief redraw のフラグに応じた更新をまとめて行う / Handle "redraw"
* @details 更新処理の対象はゲーム中の全描画処理
*/
-void redraw_stuff(player_type *player_ptr)
+void redraw_stuff(PlayerType *player_ptr)
{
if (!player_ptr->redraw)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @details 更新処理の対象はサブウィンドウ全般
*/
-void window_stuff(player_type *player_ptr)
+void window_stuff(PlayerType *player_ptr)
{
if (!player_ptr->window_flags)
return;
};
// clang-format on
-struct player_type;
+class PlayerType;
void redraw_window(void);
-void window_stuff(player_type *player_ptr);
-void redraw_stuff(player_type *player_ptr);
+void window_stuff(PlayerType *player_ptr);
+void redraw_stuff(PlayerType *player_ptr);
* the user dies, or the game is terminated.\n
* </p>
*/
-void process_dungeon(player_type *player_ptr, bool load_game)
+void process_dungeon(PlayerType *player_ptr, bool load_game)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
floor_ptr->base_level = floor_ptr->dun_level;
#pragma once
-struct player_type;
-void process_dungeon(player_type *player_ptr, bool load_game);
+class PlayerType;
+void process_dungeon(PlayerType *player_ptr, bool load_game);
* @brief プレイヤーが現在ダンジョンに潜っているかどうかを返す。
* @memo 現在はdun_levelが0でないかそうでないかに限るが可読性を高めるため。
*/
-bool is_in_dungeon(player_type *player_ptr)
+bool is_in_dungeon(PlayerType *player_ptr)
{
return player_ptr->current_floor_ptr->dun_level > 0;
}
extern std::vector<DEPTH> max_dlv;
extern std::vector<dungeon_type> d_info;
-struct player_type;
+class PlayerType;
DUNGEON_IDX choose_dungeon(concptr note, POSITION y, POSITION x);
-bool is_in_dungeon(player_type *player_ptr);
+bool is_in_dungeon(PlayerType *player_ptr);
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
-QuestCompletionChecker::QuestCompletionChecker(player_type *player_ptr, monster_type *m_ptr)
+QuestCompletionChecker::QuestCompletionChecker(PlayerType *player_ptr, monster_type *m_ptr)
: player_ptr(player_ptr)
, m_ptr(m_ptr)
{
struct monster_type;
struct object_type;
-struct player_type;
+class PlayerType;
struct quest_type;
class QuestCompletionChecker {
public:
- QuestCompletionChecker(player_type *player_ptr, monster_type *m_ptr);
+ QuestCompletionChecker(PlayerType *player_ptr, monster_type *m_ptr);
virtual ~QuestCompletionChecker() = default;
void complete();
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
monster_type *m_ptr;
short quest_idx;
quest_type *q_ptr = nullptr;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 成功したならばTRUEを返す
*/
-bool place_quest_monsters(player_type *player_ptr)
+bool place_quest_monsters(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (int i = 0; i < max_q_idx; i++) {
#pragma once
-struct player_type;
-bool place_quest_monsters(player_type *player_ptr);
+class PlayerType;
+bool place_quest_monsters(PlayerType *player_ptr);
* @brief ランダムクエストの討伐ユニークを決める / Determine the random quest uniques
* @param q_ptr クエスト構造体の参照ポインタ
*/
-void determine_random_questor(player_type *player_ptr, quest_type *q_ptr)
+void determine_random_questor(PlayerType *player_ptr, quest_type *q_ptr)
{
get_mon_num_prep(player_ptr, mon_hook_quest, nullptr);
/*!
* @brief クエストの最終状態を記録する(成功or失敗、時間)
- * @param player_type プレイヤー情報への参照ポインタ
+ * @param PlayerType プレイヤー情報への参照ポインタ
* @param q_ptr クエスト情報への参照ポインタ
* @param stat ステータス(成功or失敗)
*/
* @param player_ptr プレイヤーへの参照ポインタ
* @param quest_num 達成状態にしたいクエストのID
*/
-void complete_quest(player_type *player_ptr, QUEST_IDX quest_num)
+void complete_quest(PlayerType *player_ptr, QUEST_IDX quest_num)
{
quest_type *const q_ptr = &quest[quest_num];
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr 入手したオブジェクトの構造体参照ポインタ
*/
-void check_find_art_quest_completion(player_type *player_ptr, object_type *o_ptr)
+void check_find_art_quest_completion(PlayerType *player_ptr, object_type *o_ptr)
{
/* Check if completed a quest */
for (QUEST_IDX i = 0; i < max_q_idx; i++) {
* @param level 検索対象になる階
* @return クエストIDを返す。該当がない場合0を返す。
*/
-QUEST_IDX quest_number(player_type *player_ptr, DEPTH level)
+QUEST_IDX quest_number(PlayerType *player_ptr, DEPTH level)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->inside_quest)
* @param level 検索対象になる階
* @return クエストIDを返す。該当がない場合0を返す。
*/
-QUEST_IDX random_quest_number(player_type *player_ptr, DEPTH level)
+QUEST_IDX random_quest_number(PlayerType *player_ptr, DEPTH level)
{
if (player_ptr->dungeon_idx != DUNGEON_ANGBAND)
return 0;
* @brief クエスト階層から離脱する際の処理
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void leave_quest_check(player_type *player_ptr)
+void leave_quest_check(PlayerType *player_ptr)
{
leaving_quest = player_ptr->current_floor_ptr->inside_quest;
if (!leaving_quest)
/*!
* @brief 「塔」クエストの各階層から離脱する際の処理
*/
-void leave_tower_check(player_type *player_ptr)
+void leave_tower_check(PlayerType *player_ptr)
{
leaving_quest = player_ptr->current_floor_ptr->inside_quest;
bool is_leaving_from_tower = leaving_quest != 0;
/*!
* @brief Player enters a new quest
*/
-void exe_enter_quest(player_type *player_ptr, QUEST_IDX quest_idx)
+void exe_enter_quest(PlayerType *player_ptr, QUEST_IDX quest_idx)
{
if (quest[quest_idx].type != QuestKindType::RANDOM)
player_ptr->current_floor_ptr->dun_level = 1;
* @brief クエスト入り口にプレイヤーが乗った際の処理 / Do building commands
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_quest(player_type *player_ptr)
+void do_cmd_quest(PlayerType *player_ptr)
{
if (player_ptr->wild_mode)
return;
extern int leaving_quest;
struct object_type;
-struct player_type;
-void determine_random_questor(player_type *player_ptr, quest_type *q_ptr);
+class PlayerType;
+void determine_random_questor(PlayerType *player_ptr, quest_type *q_ptr);
void record_quest_final_status(quest_type *q_ptr, PLAYER_LEVEL lev, QuestStatusType stat);
-void complete_quest(player_type *player_ptr, QUEST_IDX quest_num);
-void check_find_art_quest_completion(player_type *player_ptr, object_type *o_ptr);
+void complete_quest(PlayerType *player_ptr, QUEST_IDX quest_num);
+void check_find_art_quest_completion(PlayerType *player_ptr, object_type *o_ptr);
void quest_discovery(QUEST_IDX q_idx);
-QUEST_IDX quest_number(player_type *player_ptr, DEPTH level);
-QUEST_IDX random_quest_number(player_type *player_ptr, DEPTH level);
-void leave_quest_check(player_type *player_ptr);
-void leave_tower_check(player_type *player_ptr);
-void exe_enter_quest(player_type *player_ptr, QUEST_IDX quest_idx);
-void do_cmd_quest(player_type *player_ptr);
+QUEST_IDX quest_number(PlayerType *player_ptr, DEPTH level);
+QUEST_IDX random_quest_number(PlayerType *player_ptr, DEPTH level);
+void leave_quest_check(PlayerType *player_ptr);
+void leave_tower_check(PlayerType *player_ptr);
+void exe_enter_quest(PlayerType *player_ptr, QUEST_IDX quest_idx);
+void do_cmd_quest(PlayerType *player_ptr);
* Line 2 -- forbid monsters
* Line 3 -- forbid the player
*/
-static bool cave_naked_bold(player_type *player_ptr, POSITION y, POSITION x)
+static bool cave_naked_bold(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
return cave_clean_bold(floor_ptr, y, x) && (floor_ptr->grid_array[y][x].m_idx == 0) && !player_bold(player_ptr, y, x);
* Perhaps we should affect doors?
* </pre>
*/
-bool affect_feature(player_type *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ)
+bool affect_feature(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
#include "system/angband.h"
#include "effect/attribute-types.h"
-struct player_type;
-bool affect_feature(player_type *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ);
+class PlayerType;
+bool affect_feature(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ);
* @param typ 効果属性 / Type of damage to apply to monsters (and objects)
* @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
*/
-bool affect_item(player_type *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ)
+bool affect_item(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
#include "system/angband.h"
#include "effect/attribute-types.h"
-struct player_type;
-bool affect_item(player_type *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ);
+class PlayerType;
+bool affect_item(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ);
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
-static void effect_monster_charm_resist(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_charm_resist(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (common_saving_throw_charm(player_ptr, em_ptr->dam, em_ptr->m_ptr)) {
em_ptr->note = _("には効果がなかった。", " is unaffected.");
}
}
-process_result effect_monster_charm(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_charm(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
int vir = virtue_number(player_ptr, V_HARMONY);
if (vir) {
return PROCESS_CONTINUE;
}
-process_result effect_monster_control_undead(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_control_undead(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_control_demon(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_control_demon(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_control_animal(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_control_animal(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_charm_living(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_charm_living(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
int vir = virtue_number(player_ptr, V_UNLIFE);
if (em_ptr->seen)
return PROCESS_CONTINUE;
}
-static void effect_monster_domination_corrupted_addition(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_domination_corrupted_addition(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
BadStatusSetter bss(player_ptr);
switch (randint1(4)) {
}
// Powerful demons & undead can turn a mindcrafter's attacks back on them.
-static void effect_monster_domination_corrupted(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_domination_corrupted(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
bool is_corrupted = ((em_ptr->r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) != 0) && (em_ptr->r_ptr->level > player_ptr->lev / 2) && (one_in_(2));
if (!is_corrupted) {
}
}
-process_result effect_monster_domination(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_domination(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!is_hostile(em_ptr->m_ptr))
return PROCESS_CONTINUE;
return PROCESS_CONTINUE;
}
-static bool effect_monster_crusade_domination(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool effect_monster_crusade_domination(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (((em_ptr->r_ptr->flags3 & RF3_GOOD) == 0) || player_ptr->current_floor_ptr->inside_arena)
return false;
return true;
}
-process_result effect_monster_crusade(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_crusade(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
* @param hp 計算対象のHP
* @return 捕まえられる最大HP
*/
-static HIT_POINT calcutate_capturable_hp(player_type *player_ptr, monster_type *m_ptr, HIT_POINT hp)
+static HIT_POINT calcutate_capturable_hp(PlayerType *player_ptr, monster_type *m_ptr, HIT_POINT hp)
{
if (is_pet(m_ptr))
return hp * 4L;
* @param player_ptr プレイヤー情報への参照ポインタ
* @param em_ptr 効果情報への参照ポインタ
*/
-static void effect_monster_captured(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_captured(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->m_ptr->mflag2.has(MonsterConstantFlagType::CHAMELEON))
choose_new_monster(player_ptr, em_ptr->g_ptr->m_idx, false, MON_CHAMELEON);
* @param em_ptr 効果情報への参照ポインタ
* @return 効果発動結果
*/
-process_result effect_monster_capture(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_capture(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if ((floor_ptr->inside_quest && (quest[floor_ptr->inside_quest].type == QuestKindType::KILL_ALL) && !is_pet(em_ptr->m_ptr))
enum process_result;
struct effect_monster_type;
-struct player_type;
-process_result effect_monster_charm(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_control_undead(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_control_demon(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_control_animal(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_charm_living(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_domination(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_crusade(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_capture(player_type *player_ptr, effect_monster_type *em_ptr);
+class PlayerType;
+process_result effect_monster_charm(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_control_undead(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_control_demon(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_control_animal(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_charm_living(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_domination(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_crusade(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_capture(PlayerType *player_ptr, effect_monster_type *em_ptr);
#include "system/monster-type-definition.h"
#include "system/player-type-definition.h"
-static bool effect_monster_away_resist(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool effect_monster_away_resist(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flagsr & RFR_RES_TELE) == 0) return false;
}
-process_result effect_monster_away_undead(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_away_undead(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_UNDEAD)) == 0)
{
}
-process_result effect_monster_away_evil(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_away_evil(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_EVIL)) == 0)
{
}
-process_result effect_monster_away_all(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_away_all(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
bool resists_tele = effect_monster_away_resist(player_ptr, em_ptr);
if (!resists_tele)
}
-process_result effect_monster_turn_undead(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_turn_undead(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_UNDEAD)) == 0)
{
}
-process_result effect_monster_turn_evil(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_turn_evil(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_EVIL)) == 0)
{
}
-process_result effect_monster_disp_undead(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_disp_undead(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_UNDEAD)) == 0)
{
}
-process_result effect_monster_disp_evil(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_disp_evil(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_EVIL)) == 0)
{
}
-process_result effect_monster_disp_good(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_disp_good(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_GOOD)) == 0)
{
}
-process_result effect_monster_disp_demon(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_disp_demon(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_DEMON)) == 0)
{
#include "system/angband.h"
struct effect_monster_type;
-struct player_type;
-process_result effect_monster_away_undead(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_away_evil(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_away_all(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_turn_undead(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_turn_evil(player_type *player_ptr, effect_monster_type *em_ptr);
+class PlayerType;
+process_result effect_monster_away_undead(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_away_evil(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_away_all(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_turn_undead(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_turn_evil(PlayerType *player_ptr, effect_monster_type *em_ptr);
process_result effect_monster_turn_all(effect_monster_type *em_ptr);
-process_result effect_monster_disp_undead(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_disp_evil(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_disp_good(player_type *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_disp_undead(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_disp_evil(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_disp_good(PlayerType *player_ptr, effect_monster_type *em_ptr);
process_result effect_monster_disp_living(effect_monster_type *em_ptr);
-process_result effect_monster_disp_demon(player_type *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_disp_demon(PlayerType *player_ptr, effect_monster_type *em_ptr);
process_result effect_monster_disp_all(effect_monster_type *em_ptr);
#include "system/monster-race-definition.h"
#include "system/player-type-definition.h"
-process_result effect_monster_lite_weak(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_lite_weak(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!em_ptr->dam)
{
}
-process_result effect_monster_lite(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_lite(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen) em_ptr->obvious = true;
}
-process_result effect_monster_dark(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_dark(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen) em_ptr->obvious = true;
#include "system/angband.h"
struct effect_monster_type;
-struct player_type;
-process_result effect_monster_lite_weak(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_lite(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_dark(player_type *player_ptr, effect_monster_type *em_ptr);
+class PlayerType;
+process_result effect_monster_lite_weak(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_lite(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_dark(PlayerType *player_ptr, effect_monster_type *em_ptr);
return PROCESS_CONTINUE;
}
-process_result effect_monster_old_clone(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_old_clone(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_star_heal(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_star_heal(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
}
// who == 0ならばプレイヤーなので、それの判定.
-static void effect_monster_old_heal_check_player(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_old_heal_check_player(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->who != 0)
return;
chg_virtue(player_ptr, V_NATURE, 1);
}
-static void effect_monster_old_heal_recovery(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_old_heal_recovery(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (monster_stunned_remaining(em_ptr->m_ptr)) {
if (em_ptr->seen_msg)
}
}
-process_result effect_monster_old_heal(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_old_heal(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_old_speed(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_old_speed(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_old_slow(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_old_slow(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
* @todo 「ユニークは (魔法では)常に眠らない」はr_infoの趣旨に反すると思われる
* 眠る確率を半分にするとかしておいた方が良さそう
*/
-process_result effect_monster_old_sleep(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_old_sleep(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
* @todo 「ユニークは (魔法では)常に混乱しない」はr_infoの趣旨に反すると思われる
* 眠る確率を半分にするとかしておいた方が良さそう
*/
-process_result effect_monster_old_conf(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_old_conf(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
#include "system/angband.h"
struct effect_monster_type;
-struct player_type;
+class PlayerType;
process_result effect_monster_old_poly(effect_monster_type *em_ptr);
-process_result effect_monster_old_clone(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_star_heal(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_old_heal(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_old_speed(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_old_slow(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_old_sleep(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_old_conf(player_type *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_old_clone(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_star_heal(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_old_heal(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_old_speed(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_old_slow(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_old_sleep(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_old_conf(PlayerType *player_ptr, effect_monster_type *em_ptr);
process_result effect_monster_stasis(effect_monster_type *em_ptr, bool to_evil);
process_result effect_monster_stun(effect_monster_type *em_ptr);
* @param em_ptr モンスター効果への参照ポインタ
* @return 完全な耐性を発動した場合TRUE、そうでなければFALSE
*/
-static bool resisted_psi_because_empty_mind(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool resisted_psi_because_empty_mind(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (none_bits(em_ptr->r_ptr->flags2, RF2_EMPTY_MIND))
return false;
* 1) UNDEADまたはDEMONである
* 2) レベルが詠唱者の レベル/2 より大きい
*/
-static bool reflects_psi_with_currupted_mind(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool reflects_psi_with_currupted_mind(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
bool is_corrupted = any_bits(em_ptr->r_ptr->flags3, RF3_UNDEAD | RF3_DEMON) && (em_ptr->r_ptr->level > player_ptr->lev / 2) && one_in_(2);
if (!is_corrupted)
* 効果は、混乱、朦朧、恐怖、麻痺
* 3/4の確率または影分身時はダメージ及び追加効果はない。
*/
-static void effect_monster_psi_reflect_extra_effect(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_psi_reflect_extra_effect(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!one_in_(4) || check_multishadow(player_ptr)) {
return;
* @details
* 耐性を発動した精神の堕落したモンスターは効力を跳ね返すことがある。
*/
-static void effect_monster_psi_resist(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_psi_resist(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (resisted_psi_because_empty_mind(player_ptr, em_ptr))
return;
* 視界による影響を発動する。
* モンスターの耐性とそれに不随した効果を発動する。
*/
-process_result effect_monster_psi(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_psi(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
* @details
* 耐性を発動した精神の堕落したモンスターは効力を跳ね返すことがある。
*/
-static void effect_monster_psi_drain_resist(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_psi_drain_resist(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (resisted_psi_because_empty_mind(player_ptr, em_ptr))
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果への参照ポインタ
*/
-static void effect_monster_psi_drain_change_power(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_psi_drain_change_power(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
int b = damroll(5, em_ptr->dam) / 4;
concptr str = (player_ptr->pclass == PlayerClassType::MINDCRAFTER) ? _("超能力パワー", "psychic energy") : _("魔力", "mana");
* @details
* ダメージがないか3/4の確率で追加効果なし
*/
-process_result effect_monster_psi_drain(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_psi_drain(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
* @details
* 朦朧+ショートテレポートアウェイ
*/
-process_result effect_monster_telekinesis(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_telekinesis(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
#include "system/angband.h"
struct effect_monster_type;
-struct player_type;
-process_result effect_monster_psi(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_psi_drain(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_telekinesis(player_type *player_ptr, effect_monster_type *em_ptr);
+class PlayerType;
+process_result effect_monster_psi(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_psi_drain(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_telekinesis(PlayerType *player_ptr, effect_monster_type *em_ptr);
return PROCESS_CONTINUE;
}
-process_result effect_monster_acid(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_acid(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_elec(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_elec(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_fire(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_fire(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_cold(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_cold(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_pois(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_pois(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_nuke(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_nuke(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_hell_fire(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_hell_fire(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_holy_fire(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_holy_fire(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_plasma(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_plasma(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-static bool effect_monster_nether_resist(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool effect_monster_nether_resist(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flagsr & RFR_RES_NETH) == 0)
return false;
return true;
}
-process_result effect_monster_nether(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_nether(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_water(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_water(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_chaos(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_chaos(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_shards(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_shards(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_rocket(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_rocket(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_sound(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_sound(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_confusion(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_confusion(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_disenchant(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_disenchant(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_nexus(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_nexus(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_force(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_force(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
}
// Powerful monsters can resists and normal monsters slow down.
-process_result effect_monster_inertial(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_inertial(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_time(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_time(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-static bool effect_monster_gravity_resist_teleport(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool effect_monster_gravity_resist_teleport(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return true;
}
-static void effect_monster_gravity_slow(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_monster_gravity_slow(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags1 & (RF1_UNIQUE)) || (em_ptr->r_ptr->level > randint1((em_ptr->dam - 10) < 1 ? 1 : (em_ptr->dam - 10)) + 10))
em_ptr->obvious = false;
* Powerful monsters can resist and normal monsters slow down
* Furthermore, this magic can make non-unique monsters slow/stun.
*/
-process_result effect_monster_gravity(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_gravity(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
em_ptr->do_dist = effect_monster_gravity_resist_teleport(player_ptr, em_ptr) ? 0 : 10;
if (player_ptr->riding && (em_ptr->g_ptr->m_idx == player_ptr->riding))
return PROCESS_CONTINUE;
}
-process_result effect_monster_disintegration(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_disintegration(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_icee_bolt(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_icee_bolt(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
* @details
* 量子生物に倍打、壁抜けに1.5倍打、テレポート耐性が耐性
*/
-process_result effect_monster_void(player_type* player_ptr, effect_monster_type* em_ptr)
+process_result effect_monster_void(PlayerType* player_ptr, effect_monster_type* em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
* 飛ばないテレポート耐性に1.25倍打、暗黒耐性が耐性
* 1/3で追加に混乱か恐怖
*/
-process_result effect_monster_abyss(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_abyss(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
#include "system/angband.h"
struct effect_monster_type;
-struct player_type;
+class PlayerType;
process_result effect_monster_nothing(effect_monster_type *em_ptr);
-process_result effect_monster_acid(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_elec(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_fire(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_cold(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_pois(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_nuke(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_hell_fire(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_holy_fire(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_plasma(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_nether(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_water(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_chaos(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_shards(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_rocket(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_sound(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_confusion(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_disenchant(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_nexus(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_force(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_inertial(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_time(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_gravity(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_disintegration(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_icee_bolt(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_void(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_abyss(player_type *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_acid(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_elec(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_fire(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_cold(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_pois(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_nuke(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_hell_fire(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_holy_fire(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_plasma(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_nether(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_water(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_chaos(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_shards(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_rocket(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_sound(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_confusion(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_disenchant(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_nexus(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_force(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_inertial(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_time(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_gravity(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_disintegration(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_icee_bolt(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_void(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_abyss(PlayerType *player_ptr, effect_monster_type *em_ptr);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-process_result effect_monster_drain_mana(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_drain_mana(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_mind_blast(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_mind_blast(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_brain_smash(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_brain_smash(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
#include "system/angband.h"
struct effect_monster_type;
-struct player_type;
-process_result effect_monster_drain_mana(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_mind_blast(player_type *player_ptr, effect_monster_type *em_ptr);
-process_result effect_monster_brain_smash(player_type *player_ptr, effect_monster_type *em_ptr);
+class PlayerType;
+process_result effect_monster_drain_mana(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_mind_blast(PlayerType *player_ptr, effect_monster_type *em_ptr);
+process_result effect_monster_brain_smash(PlayerType *player_ptr, effect_monster_type *em_ptr);
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
-process_result effect_monster_hypodynamia(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_hypodynamia(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
/*!
* @todo リファクタリング前のコード時点で、単に耐性があるだけでもダメージ0だった.
*/
-process_result effect_monster_death_ray(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_death_ray(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_kill_wall(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_kill_wall(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags3 & (RF3_HURT_ROCK)) == 0) {
em_ptr->dam = 0;
* 寝た場合は試行終了。
* 与える効果は減速、朦朧、混乱、睡眠。
*/
-process_result effect_monster_engetsu(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_engetsu(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_genocide(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_genocide(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->seen)
em_ptr->obvious = true;
return PROCESS_CONTINUE;
}
-process_result effect_monster_photo(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_photo(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!em_ptr->who)
msg_format(_("%sを写真に撮った。", "You take a photograph of %s."), em_ptr->m_name);
* @param em_ptr モンスター効果構造体への参照ポインタ
* @return ここのスイッチングで終るならTRUEかFALSE、後続処理を実行するならCONTINUE
*/
-process_result switch_effects_monster(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result switch_effects_monster(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
switch (em_ptr->attribute) {
case AttributeType::PSY_SPEAR:
#include "system/angband.h"
struct effect_monster_type;
-struct player_type;
-process_result switch_effects_monster(player_type *player_ptr, effect_monster_type *em_ptr);
+class PlayerType;
+process_result switch_effects_monster(PlayerType *player_ptr, effect_monster_type *em_ptr);
* @param flag 効果フラグ
* @param see_s_msg TRUEならばメッセージを表示する
*/
-effect_monster_type *initialize_effect_monster(player_type *player_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
+effect_monster_type *initialize_effect_monster(PlayerType *player_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
{
substitute_effect_monster(em_ptr, who, r, y, x, dam, attribute, flag, see_s_msg);
bool see_s_msg;
} effect_monster_type;
-struct player_type;
-effect_monster_type *initialize_effect_monster(player_type *player_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x,
+class PlayerType;
+effect_monster_type *initialize_effect_monster(PlayerType *player_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x,
HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg);
* @param em_ptr モンスター効果構造体への参照ポインタ
* @return 効果が何もないならFALSE、何かあるならTRUE
*/
-static process_result is_affective(player_type *player_ptr, effect_monster_type *em_ptr)
+static process_result is_affective(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!em_ptr->g_ptr->m_idx)
return PROCESS_FALSE;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void make_description_of_affecred_monster(player_type *player_ptr, effect_monster_type *em_ptr)
+static void make_description_of_affecred_monster(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
em_ptr->dam = (em_ptr->dam + em_ptr->r) / (em_ptr->r + 1);
monster_desc(player_ptr, em_ptr->m_name, em_ptr->m_ptr, 0);
* 完全な耐性を持っていたら、一部属性を除いて影響は及ぼさない
* 射撃属性 (デバッグ用)であれば貫通する
*/
-static process_result exe_affect_monster_by_effect(player_type *player_ptr, effect_monster_type *em_ptr)
+static process_result exe_affect_monster_by_effect(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
process_result result = is_affective(player_ptr, em_ptr);
if (result != PROCESS_TRUE) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void effect_damage_killed_pet(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_damage_killed_pet(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
bool sad = is_pet(em_ptr->m_ptr) && !(em_ptr->m_ptr->ml);
if (em_ptr->known && em_ptr->note) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void effect_damage_makes_sleep(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_damage_makes_sleep(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->note && em_ptr->seen_msg)
msg_format("%^s%s", em_ptr->m_name, em_ptr->note);
* @details
* モンスターIDがプレイヤー(0)の場合は処理しない。
*/
-static bool deal_effect_damage_from_monster(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool deal_effect_damage_from_monster(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->who <= 0)
return false;
* @param em_ptr モンスター効果構造体への参照ポインタ
* @return 大賞モンスターが不潔な病人だった場合はTRUE、それ以外はFALSE
*/
-static bool heal_leaper(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool heal_leaper(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!em_ptr->heal_leper)
return false;
* @details
* em_ptr->do_fearによる恐怖メッセージもここで表示。
*/
-static bool deal_effect_damage_from_player(player_type *player_ptr, effect_monster_type *em_ptr)
+static bool deal_effect_damage_from_player(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
bool fear = false;
MonsterDamageProcessor mdp(player_ptr, em_ptr->g_ptr->m_idx, em_ptr->dam, &fear, em_ptr->attribute);
* 3.プレイヤーによる効果ダメージの処理
* 4.睡眠する処理
*/
-static void deal_effect_damage_to_monster(player_type *player_ptr, effect_monster_type *em_ptr)
+static void deal_effect_damage_to_monster(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->attribute == AttributeType::DRAIN_MANA)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void effect_makes_change_virtues(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_makes_change_virtues(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->who > 0) || !em_ptr->slept)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void affected_monster_prevents_bad_status(player_type *player_ptr, effect_monster_type *em_ptr)
+static void affected_monster_prevents_bad_status(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->r_ptr->flags1 & RF1_UNIQUE) || (em_ptr->r_ptr->flags1 & RF1_QUESTOR) || (player_ptr->riding && (em_ptr->g_ptr->m_idx == player_ptr->riding)))
em_ptr->do_polymorph = false;
* @param em_ptr モンスター効果構造体への参照ポインタ
* @param stun_damage 朦朧値
*/
-static void effect_damage_piles_stun(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_damage_piles_stun(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->do_stun == 0) || (em_ptr->r_ptr->flagsr & (RFR_RES_SOUN | RFR_RES_WALL)) || (em_ptr->r_ptr->flags3 & RF3_NO_STUN))
return;
* @param em_ptr モンスター効果構造体への参照ポインタ
* @param stun_damage 混乱値
*/
-static void effect_damage_piles_confusion(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_damage_piles_confusion(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->do_conf == 0) || (em_ptr->r_ptr->flags3 & RF3_NO_CONF) || (em_ptr->r_ptr->flagsr & RFR_EFF_RES_CHAO_MASK))
return;
* @details
* 打撃ダメージによる恐怖もあるため、メッセージは後で表示。
*/
-static void effect_damage_piles_fear(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_damage_piles_fear(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->do_fear == 0 || any_bits(em_ptr->r_ptr->flags3, RF3_NO_FEAR))
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void effect_damage_makes_polymorph(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_damage_makes_polymorph(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!em_ptr->do_polymorph || (randint1(90) <= em_ptr->r_ptr->level))
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void effect_damage_makes_teleport(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_damage_makes_teleport(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->do_dist == 0)
return;
* 2.ダメージ量が現HPを上回る場合
* 3.通常時(デバフをかける)
*/
-static void effect_damage_gives_bad_status(player_type *player_ptr, effect_monster_type *em_ptr)
+static void effect_damage_gives_bad_status(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
int tmp_damage = em_ptr->dam;
em_ptr->dam = mon_damage_mod(player_ptr, em_ptr->m_ptr, em_ptr->dam, (bool)(em_ptr->attribute == AttributeType::PSY_SPEAR));
* 4.ダメージ処理及び恐怖メッセージ
* 5.悪魔領域血の呪いによる事後処理
*/
-static void exe_affect_monster_by_damage(player_type *player_ptr, effect_monster_type *em_ptr)
+static void exe_affect_monster_by_damage(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
effect_makes_change_virtues(player_ptr, em_ptr);
affected_monster_prevents_bad_status(player_ptr, em_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void update_phase_out_stat(player_type *player_ptr, effect_monster_type *em_ptr)
+static void update_phase_out_stat(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!player_ptr->phase_out)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void postprocess_by_effected_pet(player_type *player_ptr, effect_monster_type *em_ptr)
+static void postprocess_by_effected_pet(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if ((em_ptr->dam <= 0) || is_pet(em_ptr->m_ptr) || is_friendly(em_ptr->m_ptr))
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void postprocess_by_riding_pet_effected(player_type *player_ptr, effect_monster_type *em_ptr)
+static void postprocess_by_riding_pet_effected(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (!player_ptr->riding || (player_ptr->riding != em_ptr->g_ptr->m_idx) || (em_ptr->dam <= 0))
return;
* @param em_ptr モンスター効果構造体への参照ポインタ
* @details 写真のフラッシュは弱閃光属性
*/
-static void postprocess_by_taking_photo(player_type *player_ptr, effect_monster_type *em_ptr)
+static void postprocess_by_taking_photo(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
if (em_ptr->photo == 0)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr モンスター効果構造体への参照ポインタ
*/
-static void exe_affect_monster_postprocess(player_type *player_ptr, effect_monster_type *em_ptr)
+static void exe_affect_monster_postprocess(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
postprocess_by_effected_pet(player_ptr, em_ptr);
postprocess_by_riding_pet_effected(player_ptr, em_ptr);
* 3.ペット及び撮影による事後効果
*/
bool affect_monster(
- player_type *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
+ PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
{
effect_monster_type tmp_effect;
effect_monster_type *em_ptr = initialize_effect_monster(player_ptr, &tmp_effect, who, r, y, x, dam, attribute, flag, see_s_msg);
#include "system/angband.h"
#include "effect/attribute-types.h"
-struct player_type;
-bool affect_monster(player_type *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag, bool see_s_msg);
+class PlayerType;
+bool affect_monster(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag, bool see_s_msg);
#include "view/display-messages.h"
#include "world/world.h"
-void effect_player_curse_1(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_curse_1(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if ((randint0(100 + ep_ptr->rlev / 2) < player_ptr->skill_sav) && !check_multishadow(player_ptr)) {
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
}
}
-void effect_player_curse_2(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_curse_2(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if ((randint0(100 + ep_ptr->rlev / 2) < player_ptr->skill_sav) && !check_multishadow(player_ptr)) {
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
}
}
-void effect_player_curse_3(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_curse_3(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if ((randint0(100 + ep_ptr->rlev / 2) < player_ptr->skill_sav) && !check_multishadow(player_ptr)) {
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
}
}
-void effect_player_curse_4(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_curse_4(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if ((randint0(100 + ep_ptr->rlev / 2) < player_ptr->skill_sav) && (ep_ptr->m_ptr->r_idx != MON_KENSHIROU) && !check_multishadow(player_ptr)) {
msg_print(_("しかし秘孔を跳ね返した!", "You resist the effects!"));
#pragma once
struct effect_player_type;
-struct player_type;
-void effect_player_curse_1(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_curse_2(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_curse_3(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_curse_4(player_type *player_ptr, effect_player_type *ep_ptr);
+class PlayerType;
+void effect_player_curse_1(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_curse_2(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_curse_3(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_curse_4(PlayerType *player_ptr, effect_player_type *ep_ptr);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-void effect_player_old_heal(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_old_heal(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何らかの攻撃によって気分がよくなった。", "You are hit by something invigorating!"));
ep_ptr->dam = 0;
}
-void effect_player_old_speed(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_old_speed(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かで攻撃された!", "You are hit by something!"));
ep_ptr->dam = 0;
}
-void effect_player_old_slow(player_type *player_ptr)
+void effect_player_old_slow(PlayerType *player_ptr)
{
if (player_ptr->blind) {
msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
(void)BadStatusSetter(player_ptr).mod_slowness(randint0(4) + 4, false);
}
-void effect_player_old_sleep(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_old_sleep(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->free_act)
return;
#pragma once
struct effect_player_type;
-struct player_type;
-void effect_player_old_heal(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_old_speed(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_old_slow(player_type *player_ptr);
-void effect_player_old_sleep(player_type *player_ptr, effect_player_type *ep_ptr);
+class PlayerType;
+void effect_player_old_heal(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_old_speed(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_old_slow(PlayerType *player_ptr);
+void effect_player_old_sleep(PlayerType *player_ptr, effect_player_type *ep_ptr);
// 毒を除く4元素.
void effect_player_elements(
- player_type *player_ptr, effect_player_type *ep_ptr, concptr attack_message, HIT_POINT (*damage_func)(player_type *, HIT_POINT, concptr, bool))
+ PlayerType *player_ptr, effect_player_type *ep_ptr, concptr attack_message, HIT_POINT (*damage_func)(PlayerType *, HIT_POINT, concptr, bool))
{
if (player_ptr->blind)
msg_print(attack_message);
ep_ptr->get_damage = (*damage_func)(player_ptr, ep_ptr->dam, ep_ptr->killer, false);
}
-void effect_player_poison(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_poison(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
bool double_resist = is_oppose_pois(player_ptr);
if (player_ptr->blind)
}
}
-void effect_player_nuke(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_nuke(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
bool double_resist = is_oppose_pois(player_ptr);
if (player_ptr->blind)
inventory_damage(player_ptr, BreakerAcid(), 2);
}
-void effect_player_missile(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_missile(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かで攻撃された!", "You are hit by something!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_holy_fire(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_holy_fire(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かで攻撃された!", "You are hit by something!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_hell_fire(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_hell_fire(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かで攻撃された!", "You are hit by something!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_arrow(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_arrow(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind) {
sound(SOUND_SHOOT_HIT);
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_plasma(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_plasma(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かとても熱いもので攻撃された!", "You are hit by something *HOT*!"));
* 幽霊は回復する。追加効果で経験値吸収。
*/
-void effect_player_nether(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_nether(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("地獄の力で攻撃された!", "You are hit by nether forces!"));
* @details
* 追加効果で朦朧と混乱、冷気同様のインベントリ破壊。
*/
-void effect_player_water(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_water(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind) {
msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_chaos(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_chaos(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind) {
msg_print(_("無秩序の波動で攻撃された!", "You are hit by a wave of anarchy!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_shards(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_shards(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_sound(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_sound(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("轟音で攻撃された!", "You are hit by a loud noise!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_confusion(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_confusion(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind) {
msg_print(_("何か混乱するもので攻撃された!", "You are hit by something puzzling!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_disenchant(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_disenchant(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かさえないもので攻撃された!", "You are hit by something static!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_nexus(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_nexus(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何か奇妙なもので攻撃された!", "You are hit by something strange!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_force(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_force(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_rocket(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_rocket(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind) {
msg_print(_("爆発があった!", "There is an explosion!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_inertial(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_inertial(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind) {
msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_lite(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_lite(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かで攻撃された!", "You are hit by something!"));
player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON);
}
-void effect_player_dark(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_dark(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かで攻撃された!", "You are hit by something!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-static void effect_player_time_one_disability(player_type *player_ptr)
+static void effect_player_time_one_disability(PlayerType *player_ptr)
{
int k = 0;
concptr act = nullptr;
player_ptr->update |= (PU_BONUS);
}
-static void effect_player_time_all_disabilities(player_type *player_ptr)
+static void effect_player_time_all_disabilities(PlayerType *player_ptr)
{
msg_print(_("あなたは以前ほど力強くなくなってしまった...。", "You're not as powerful as you used to be..."));
for (int k = 0; k < A_MAX; k++) {
player_ptr->update |= (PU_BONUS);
}
-static void effect_player_time_addition(player_type *player_ptr)
+static void effect_player_time_addition(PlayerType *player_ptr)
{
switch (randint1(10)) {
case 1:
* @param player_ptr プレイヤー情報への参照ポインタ
* @param em_ptr プレイヤー効果情報への参照ポインタ
*/
-void effect_player_time(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_time(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("過去からの衝撃に攻撃された!", "You are hit by a blast from the past!"));
effect_player_time_addition(player_ptr);
}
-void effect_player_gravity(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_gravity(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind) {
msg_print(_("何か重いもので攻撃された!", "You are hit by something heavy!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_disintegration(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_disintegration(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("純粋なエネルギーで攻撃された!", "You are hit by pure energy!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_death_ray(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_death_ray(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何か非常に冷たいもので攻撃された!", "You are hit by something extremely cold!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_mana(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_mana(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("魔法のオーラで攻撃された!", "You are hit by an aura of magic!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_psy_spear(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_psy_spear(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("エネルギーの塊で攻撃された!", "You are hit by an energy!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_FORCE, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_meteor(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_meteor(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind)
msg_print(_("何かが空からあなたの頭上に落ちてきた!", "Something falls from the sky on you!"));
}
}
-void effect_player_icee(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_icee(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (player_ptr->blind) {
msg_print(_("何か鋭く冷たいもので攻撃された!", "You are hit by something sharp and cold!"));
}
}
-void effect_player_hand_doom(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_hand_doom(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if ((randint0(100 + ep_ptr->rlev / 2) < player_ptr->skill_sav) && !check_multishadow(player_ptr)) {
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
}
}
-void effect_player_void(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_void(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
auto effect_mes = player_ptr->blind ? _("何かに身体が引っ張りこまれる!", "Something absorbs you!")
: _("周辺の空間が歪んだ。", "Sight warps around you.");
}
}
-void effect_player_abyss(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_abyss(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
auto effect_mes = player_ptr->blind ? _("身体が沈み込む気がする!", "You feel you are sinking into something!")
: _("深淵があなたを誘い込んでいる!", "You are falling in abyss!");
#include "system/angband.h"
struct effect_player_type;
-struct player_type;
+class PlayerType;
void effect_player_elements(
- player_type *player_ptr, effect_player_type *ep_ptr, concptr attack_message, HIT_POINT (*damage_func)(player_type *, HIT_POINT, concptr, bool));
-void effect_player_poison(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_nuke(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_missile(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_holy_fire(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_hell_fire(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_arrow(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_plasma(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_nether(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_water(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_chaos(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_shards(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_sound(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_confusion(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_disenchant(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_nexus(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_force(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_rocket(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_inertial(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_lite(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_dark(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_time(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_gravity(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_disintegration(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_death_ray(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_mana(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_psy_spear(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_meteor(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_icee(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_hand_doom(player_type *player_ptr, effect_player_type *ep_ptr);
+ PlayerType *player_ptr, effect_player_type *ep_ptr, concptr attack_message, HIT_POINT (*damage_func)(PlayerType *, HIT_POINT, concptr, bool));
+void effect_player_poison(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_nuke(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_missile(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_holy_fire(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_hell_fire(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_arrow(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_plasma(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_nether(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_water(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_chaos(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_shards(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_sound(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_confusion(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_disenchant(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_nexus(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_force(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_rocket(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_inertial(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_lite(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_dark(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_time(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_gravity(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_disintegration(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_death_ray(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_mana(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_psy_spear(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_meteor(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_icee(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_hand_doom(PlayerType *player_ptr, effect_player_type *ep_ptr);
#include "view/display-messages.h"
#include "world/world.h"
-void effect_player_drain_mana(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_drain_mana(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if (check_multishadow(player_ptr)) {
msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, but you are unharmed!"));
ep_ptr->dam = 0;
}
-void effect_player_mind_blast(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_mind_blast(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if ((randint0(100 + ep_ptr->rlev / 2) < std::max<short>(5, player_ptr->skill_sav)) && !check_multishadow(player_ptr)) {
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}
-void effect_player_brain_smash(player_type *player_ptr, effect_player_type *ep_ptr)
+void effect_player_brain_smash(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
if ((randint0(100 + ep_ptr->rlev / 2) < std::max<short>(5, player_ptr->skill_sav)) && !check_multishadow(player_ptr)) {
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
#pragma once
struct effect_player_type;
-struct player_type;
-void effect_player_drain_mana(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_mind_blast(player_type *player_ptr, effect_player_type *ep_ptr);
-void effect_player_brain_smash(player_type *player_ptr, effect_player_type *ep_ptr);
+class PlayerType;
+void effect_player_drain_mana(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_mind_blast(PlayerType *player_ptr, effect_player_type *ep_ptr);
+void effect_player_brain_smash(PlayerType *player_ptr, effect_player_type *ep_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param em_ptr プレイヤー効果構造体への参照ポインタ
*/
-void switch_effects_player(player_type *player_ptr, effect_player_type *ep_ptr)
+void switch_effects_player(PlayerType *player_ptr, effect_player_type *ep_ptr)
{
switch (ep_ptr->attribute) {
case AttributeType::ACID:
#pragma once
struct effect_player_type;
-struct player_type;
-void switch_effects_player(player_type *player_ptr, effect_player_type *ep_ptr);
+class PlayerType;
+void switch_effects_player(PlayerType *player_ptr, effect_player_type *ep_ptr);
* @param ep_ptr プレイヤー効果構造体への参照ポインタ
* @return 当たったらFALSE、反射したらTRUE
*/
-static bool process_bolt_reflection(player_type *player_ptr, effect_player_type *ep_ptr, project_func project)
+static bool process_bolt_reflection(PlayerType *player_ptr, effect_player_type *ep_ptr, project_func project)
{
auto can_reflect = (has_reflect(player_ptr) != 0);
can_reflect &= any_bits(ep_ptr->flag, PROJECT_REFLECTABLE);
* @param x 目標X座標
* @return 当たらなかったらFALSE、反射したらTRUE、当たったらCONTINUE
*/
-static process_result check_continue_player_effect(player_type *player_ptr, effect_player_type *ep_ptr, POSITION y, POSITION x, project_func project)
+static process_result check_continue_player_effect(PlayerType *player_ptr, effect_player_type *ep_ptr, POSITION y, POSITION x, project_func project)
{
if (!player_bold(player_ptr, y, x)) {
return PROCESS_FALSE;
* @param ep_ptr プレイヤー効果構造体への参照ポインタ
* @param who_name モンスター名
*/
-static void describe_effect_source(player_type *player_ptr, effect_player_type *ep_ptr, concptr who_name)
+static void describe_effect_source(PlayerType *player_ptr, effect_player_type *ep_ptr, concptr who_name)
{
if (ep_ptr->who > 0) {
ep_ptr->m_ptr = &player_ptr->current_floor_ptr->m_list[ep_ptr->who];
* @param monspell 効果元のモンスター魔法ID
* @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
*/
-bool affect_player(MONSTER_IDX who, player_type *player_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute,
+bool affect_player(MONSTER_IDX who, PlayerType *player_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute,
BIT_FLAGS flag, project_func project)
{
effect_player_type tmp_effect;
struct ProjectResult;
-struct player_type;
+class PlayerType;
using project_func = ProjectResult (*)(
- player_type *player_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag);
+ PlayerType *player_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag);
-bool affect_player(MONSTER_IDX who, player_type *player_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag,
+bool affect_player(MONSTER_IDX who, PlayerType *player_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag,
project_func project);
* @param cury 現在の鏡のy座標
* @param curx 現在の鏡のx座標
*/
-static void next_mirror(player_type *player_ptr, POSITION *next_y, POSITION *next_x, POSITION cury, POSITION curx)
+static void next_mirror(PlayerType *player_ptr, POSITION *next_y, POSITION *next_x, POSITION cury, POSITION curx)
{
POSITION mirror_x[10], mirror_y[10]; /* 鏡はもっと少ない */
int mirror_num = 0; /* 鏡の数 */
* @todo 似たような処理が山ほど並んでいる、何とかならないものか
* @todo 引数にそのまま再代入していてカオスすぎる。直すのは簡単ではない
*/
-ProjectResult project(player_type *player_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam,
+ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam,
const AttributeType typ, BIT_FLAGS flag)
{
int dist;
};
struct effect_player_type;
-struct player_type;
+class PlayerType;
ProjectResult project(
- player_type *player_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam, const AttributeType typ,
+ PlayerType *player_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam, const AttributeType typ,
BIT_FLAGS flag);
flavor_ptr->show_armour = true;
}
-static void describe_weapon_dice(player_type *player_ptr, flavor_type *flavor_ptr)
+static void describe_weapon_dice(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
if (!flavor_ptr->known && object_is_quest_target(player_ptr->current_floor_ptr->inside_quest, flavor_ptr->o_ptr))
return;
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
}
-static void describe_bow(player_type *player_ptr, flavor_type *flavor_ptr)
+static void describe_bow(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
flavor_ptr->power = bow_tmul(flavor_ptr->o_ptr->sval);
if (flavor_ptr->tr_flags.has(TR_XTRA_MIGHT))
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
}
-static void describe_tval(player_type *player_ptr, flavor_type *flavor_ptr)
+static void describe_tval(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
switch (flavor_ptr->o_ptr->tval) {
case ItemKindType::SHOT:
}
}
-static void describe_fire_energy(player_type *player_ptr, flavor_type *flavor_ptr)
+static void describe_fire_energy(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
ENERGY energy_fire = bow_energy(flavor_ptr->bow_ptr->sval);
if (player_ptr->num_fire == 0) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, show_ammo_detail ? "% crit" : "%");
}
-static void describe_bow_power(player_type *player_ptr, flavor_type *flavor_ptr)
+static void describe_bow_power(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
flavor_ptr->avgdam = flavor_ptr->o_ptr->dd * (flavor_ptr->o_ptr->ds + 1) * 10 / 2;
int tmul = bow_tmul(flavor_ptr->bow_ptr->sval);
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
}
-static void describe_spike_power(player_type *player_ptr, flavor_type *flavor_ptr)
+static void describe_spike_power(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
int avgdam = player_ptr->mighty_throw ? (1 + 3) : 1;
int16_t energy_fire = 100 - player_ptr->lev;
* @param mode 表記に関するオプション指定
* @return 現在クエスト達成目的のアイテムならばTRUEを返す
*/
-void describe_flavor(player_type *player_ptr, char *buf, object_type *o_ptr, BIT_FLAGS mode)
+void describe_flavor(PlayerType *player_ptr, char *buf, object_type *o_ptr, BIT_FLAGS mode)
{
flavor_type tmp_flavor;
flavor_type *flavor_ptr = initialize_flavor_type(&tmp_flavor, buf, o_ptr, mode);
#include "system/angband.h"
struct object_type;
-struct player_type;
-void describe_flavor(player_type *player_ptr, char *buf, object_type *o_ptr, BIT_FLAGS mode);
+class PlayerType;
+void describe_flavor(PlayerType *player_ptr, char *buf, object_type *o_ptr, BIT_FLAGS mode);
int avgdam;
} flavor_type;
-struct player_type;
+class PlayerType;
flavor_type *initialize_flavor_type(flavor_type *flavor_ptr, char *buf, object_type *o_ptr, BIT_FLAGS mode);
char *object_desc_chr(char *t, char c);
char *object_desc_str(char *t, concptr s);
}
}
-void describe_named_item(player_type *player_ptr, flavor_type *flavor_ptr)
+void describe_named_item(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
check_object_known_aware(flavor_ptr);
switch_tval_description(flavor_ptr);
#pragma once
struct flavor_type;
-struct player_type;
-void describe_named_item(player_type *player_ptr, flavor_type *flavor_ptr);
+class PlayerType;
+void describe_named_item(PlayerType *player_ptr, flavor_type *flavor_ptr);
return dd_ptr;
}
-static void check_arena_floor(player_type *player_ptr, dun_data_type *dd_ptr)
+static void check_arena_floor(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!dd_ptr->empty_level) {
}
}
-static void place_cave_contents(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
+static void place_cave_contents(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->dun_level == 1)
}
}
-static bool decide_tunnel_planned_site(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr, dt_type *dt_ptr, int i)
+static bool decide_tunnel_planned_site(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr, dt_type *dt_ptr, int i)
{
dd_ptr->tunn_n = 0;
dd_ptr->wall_n = 0;
return true;
}
-static void make_tunnels(player_type *player_ptr, dun_data_type *dd_ptr)
+static void make_tunnels(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
for (int j = 0; j < dd_ptr->tunn_n; j++) {
grid_type *g_ptr;
}
}
-static void make_walls(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr, dt_type *dt_ptr)
+static void make_walls(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr, dt_type *dt_ptr)
{
for (int j = 0; j < dd_ptr->wall_n; j++) {
grid_type *g_ptr;
}
}
-static bool make_centers(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr, dt_type *dt_ptr)
+static bool make_centers(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr, dt_type *dt_ptr)
{
dd_ptr->tunnel_fail_count = 0;
dd_ptr->door_n = 0;
return true;
}
-static void make_doors(player_type *player_ptr, dun_data_type *dd_ptr, dt_type *dt_ptr)
+static void make_doors(PlayerType *player_ptr, dun_data_type *dd_ptr, dt_type *dt_ptr)
{
for (int i = 0; i < dd_ptr->door_n; i++) {
dd_ptr->tunnel_y = dd_ptr->door[i].y;
}
}
-static bool make_one_floor(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
+static bool make_one_floor(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
return true;
}
-static bool switch_making_floor(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
+static bool switch_making_floor(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
{
if (d_ptr->flags.has(DungeonFeatureType::MAZE)) {
floor_type *floor_ptr = player_ptr->current_floor_ptr;
return true;
}
-static void make_aqua_streams(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
+static void make_aqua_streams(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
{
if (dd_ptr->laketype != 0)
return;
* @brief マスにフロア端用の永久壁を配置する / Set boundary mimic and add "solid" perma-wall
* @param g_ptr 永久壁を配置したいマス構造体の参照ポインタ
*/
-static void place_bound_perm_wall(player_type *player_ptr, grid_type *g_ptr)
+static void place_bound_perm_wall(PlayerType *player_ptr, grid_type *g_ptr)
{
if (bound_walls_perm) {
g_ptr->mimic = 0;
place_grid(player_ptr, g_ptr, GB_SOLID_PERM);
}
-static void make_perm_walls(player_type *player_ptr)
+static void make_perm_walls(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (POSITION x = 0; x < floor_ptr->width; x++) {
}
}
-static bool check_place_necessary_objects(player_type *player_ptr, dun_data_type *dd_ptr)
+static bool check_place_necessary_objects(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
if (!new_player_spot(player_ptr)) {
*dd_ptr->why = _("プレイヤー配置に失敗", "Failed to place a player");
return true;
}
-static void decide_dungeon_data_allocation(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
+static void decide_dungeon_data_allocation(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
dd_ptr->alloc_object_num = floor_ptr->dun_level / 3;
dd_ptr->alloc_monster_num);
}
-static bool allocate_dungeon_data(player_type *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
+static bool allocate_dungeon_data(PlayerType *player_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
{
dd_ptr->alloc_monster_num += randint1(8);
for (dd_ptr->alloc_monster_num = dd_ptr->alloc_monster_num + dd_ptr->alloc_object_num; dd_ptr->alloc_monster_num > 0; dd_ptr->alloc_monster_num--)
* @param why エラー原因メッセージを返す
* @return ダンジョン生成が全て無事に成功したらTRUEを返す。
*/
-bool cave_gen(player_type *player_ptr, concptr *why)
+bool cave_gen(PlayerType *player_ptr, concptr *why)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
reset_lite_area(floor_ptr);
#include "system/angband.h"
-struct player_type;
-bool cave_gen(player_type *player_ptr, concptr *why);
+class PlayerType;
+bool cave_gen(PlayerType *player_ptr, concptr *why);
* Line 2 -- forbid normal monsters
* Line 3 -- forbid the player
*/
-bool is_cave_empty_bold(player_type *player_ptr, POSITION y, POSITION x)
+bool is_cave_empty_bold(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
bool is_empty_grid = cave_has_flag_bold(floor_ptr, y, x, FloorFeatureType::PLACE);
* Line 1 -- forbid non-empty grids
* Line 2 -- forbid trees while dungeon generation
*/
-bool is_cave_empty_bold2(player_type *player_ptr, POSITION y, POSITION x)
+bool is_cave_empty_bold2(PlayerType *player_ptr, POSITION y, POSITION x)
{
bool is_empty_grid = is_cave_empty_bold(player_ptr, y, x);
is_empty_grid &= w_ptr->character_dungeon || !cave_has_flag_bold(player_ptr->current_floor_ptr, y, x, FloorFeatureType::TREE);
/*
* Determine if a "legal" grid is within "los" of the player
*/
-bool player_has_los_bold(player_type *player_ptr, POSITION y, POSITION x)
+bool player_has_los_bold(PlayerType *player_ptr, POSITION y, POSITION x)
{
return ((player_ptr->current_floor_ptr->grid_array[y][x].info & CAVE_VIEW) != 0) || player_ptr->phase_out;
}
/*
* Determine if player is on this grid
*/
-bool player_bold(player_type *player_ptr, POSITION y, POSITION x) { return (y == player_ptr->y) && (x == player_ptr->x); }
+bool player_bold(PlayerType *player_ptr, POSITION y, POSITION x) { return (y == player_ptr->y) && (x == player_ptr->x); }
/*
* Does the grid stop disintegration?
struct floor_type;
struct grid_type;
-struct player_type;
+class PlayerType;
enum class FloorFeatureType;
bool in_bounds(floor_type *floor_ptr, POSITION y, POSITION x);
bool in_bounds2(floor_type *floor_ptr, POSITION y, POSITION x);
bool in_bounds2u(floor_type *floor_ptr, POSITION y, POSITION x);
-bool is_cave_empty_bold(player_type *player_ptr, POSITION x, POSITION y);
-bool is_cave_empty_bold2(player_type *player_ptr, POSITION x, POSITION y);
+bool is_cave_empty_bold(PlayerType *player_ptr, POSITION x, POSITION y);
+bool is_cave_empty_bold2(PlayerType *player_ptr, POSITION x, POSITION y);
bool cave_has_flag_bold(floor_type *floor_ptr, POSITION y, POSITION x, FloorFeatureType f_idx);
-bool player_has_los_bold(player_type *player_ptr, POSITION y, POSITION x);
-bool player_bold(player_type *player_ptr, POSITION y, POSITION x);
+bool player_has_los_bold(PlayerType *player_ptr, POSITION y, POSITION x);
+bool player_bold(PlayerType *player_ptr, POSITION y, POSITION x);
bool cave_stop_disintegration(floor_type *floor_ptr, POSITION y, POSITION x);
bool cave_los_bold(floor_type *floor_ptr, POSITION y, POSITION x);
bool feat_supports_los(FEAT_IDX f_idx);
g_ptr->o_idx_list.add(floor_ptr, o_idx);
}
-static void generate_artifact(player_type *player_ptr, qtwg_type *qtwg_ptr, const ARTIFACT_IDX artifact_index)
+static void generate_artifact(PlayerType *player_ptr, qtwg_type *qtwg_ptr, const ARTIFACT_IDX artifact_index)
{
if (artifact_index == 0)
return;
drop_here(player_ptr->current_floor_ptr, q_ptr, *qtwg_ptr->y, *qtwg_ptr->x);
}
-static void parse_qtw_D(player_type *player_ptr, qtwg_type *qtwg_ptr, char *s)
+static void parse_qtw_D(PlayerType *player_ptr, qtwg_type *qtwg_ptr, char *s)
{
*qtwg_ptr->x = qtwg_ptr->xmin;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
return PARSE_ERROR_GENERIC;
}
-static bool parse_qtw_P(player_type *player_ptr, qtwg_type *qtwg_ptr, char **zz)
+static bool parse_qtw_P(PlayerType *player_ptr, qtwg_type *qtwg_ptr, char **zz)
{
if (qtwg_ptr->buf[0] != 'P')
return false;
* @return エラーコード
* @todo クエスト情報のみを読み込む手段と実際にフロアデータまで読み込む処理は分離したい
*/
-parse_error_type generate_fixed_map_floor(player_type *player_ptr, qtwg_type *qtwg_ptr, process_dungeon_file_pf parse_fixed_map)
+parse_error_type generate_fixed_map_floor(PlayerType *player_ptr, qtwg_type *qtwg_ptr, process_dungeon_file_pf parse_fixed_map)
{
char *zz[33];
if (!qtwg_ptr->buf[0])
int *x;
} qtwg_type;
-struct player_type;
-typedef parse_error_type (*process_dungeon_file_pf)(player_type *, concptr, int, int, int, int);
+class PlayerType;
+typedef parse_error_type (*process_dungeon_file_pf)(PlayerType *, concptr, int, int, int, int);
qtwg_type *initialize_quest_generator_type(qtwg_type *qg_ptr, char *buf, int ymin, int xmin, int ymax, int xmax, int *y, int *x);
-parse_error_type generate_fixed_map_floor(player_type *player_ptr, qtwg_type *qg_ptr, process_dungeon_file_pf parse_fixed_map);
+parse_error_type generate_fixed_map_floor(PlayerType *player_ptr, qtwg_type *qg_ptr, process_dungeon_file_pf parse_fixed_map);
/*!
* @brief 階段移動先のフロアが生成できない時に簡単な行き止まりマップを作成する / Builds the dead end
*/
-static void build_dead_end(player_type *player_ptr)
+static void build_dead_end(PlayerType *player_ptr)
{
clear_cave(player_ptr);
player_ptr->x = player_ptr->y = 0;
wipe_generate_random_floor_flags(player_ptr->current_floor_ptr);
}
-static MONSTER_IDX decide_pet_index(player_type *player_ptr, const int current_monster, POSITION *cy, POSITION *cx)
+static MONSTER_IDX decide_pet_index(PlayerType *player_ptr, const int current_monster, POSITION *cy, POSITION *cx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (current_monster == 0) {
return (d == 6) ? 0 : m_pop(floor_ptr);
}
-static void set_pet_params(player_type *player_ptr, monster_race **r_ptr, const int current_monster, MONSTER_IDX m_idx, const POSITION cy, const POSITION cx)
+static void set_pet_params(PlayerType *player_ptr, monster_race **r_ptr, const int current_monster, MONSTER_IDX m_idx, const POSITION cy, const POSITION cx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
player_ptr->current_floor_ptr->grid_array[cy][cx].m_idx = m_idx;
* @brief 移動先のフロアに伴ったペットを配置する / Place preserved pet monsters on new floor
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void place_pet(player_type *player_ptr)
+static void place_pet(PlayerType *player_ptr)
{
int max_num = player_ptr->wild_mode ? 1 : MAX_PARTY_MON;
for (int current_monster = 0; current_monster < max_num; current_monster++) {
}
}
-static void check_visited_floor(player_type *player_ptr, saved_floor_type *sf_ptr, bool *loaded)
+static void check_visited_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr, bool *loaded)
{
if ((sf_ptr->last_visit == 0) || !load_floor(player_ptr, sf_ptr, 0))
return;
g_ptr->special = 0;
}
-static void update_floor_id(player_type *player_ptr, saved_floor_type *sf_ptr)
+static void update_floor_id(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
if (player_ptr->floor_id == 0) {
if (player_ptr->change_floor_mode & CFM_UP)
sf_ptr->upper_floor_id = player_ptr->floor_id;
}
-static void reset_unique_by_floor_change(player_type *player_ptr)
+static void reset_unique_by_floor_change(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (MONSTER_IDX i = 1; i < floor_ptr->m_max; i++) {
}
}
-static void new_floor_allocation(player_type *player_ptr, saved_floor_type *sf_ptr)
+static void new_floor_allocation(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
GAME_TURN tmp_last_visit = sf_ptr->last_visit;
int alloc_chance = d_info[player_ptr->dungeon_idx].max_m_alloc_chance;
(void)alloc_monster(player_ptr, 0, 0, summon_specific);
}
-static void check_dead_end(player_type *player_ptr, saved_floor_type *sf_ptr)
+static void check_dead_end(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
if (sf_ptr->last_visit == 0) {
generate_floor(player_ptr);
sf_ptr->lower_floor_id = 0;
}
-static void update_new_floor_feature(player_type *player_ptr, saved_floor_type *sf_ptr, const bool loaded)
+static void update_new_floor_feature(PlayerType *player_ptr, saved_floor_type *sf_ptr, const bool loaded)
{
if (loaded) {
new_floor_allocation(player_ptr, sf_ptr);
g_ptr->special = player_ptr->floor_id;
}
-static void cut_off_the_upstair(player_type *player_ptr)
+static void cut_off_the_upstair(PlayerType *player_ptr)
{
if (player_ptr->change_floor_mode & CFM_RAND_PLACE) {
(void)new_player_spot(player_ptr);
msg_print(_("ゴトゴトと何か音がした。", "You hear some noises."));
}
-static void update_floor(player_type *player_ptr)
+static void update_floor(PlayerType *player_ptr)
{
if (!(player_ptr->change_floor_mode & CFM_SAVE_FLOORS) && !(player_ptr->change_floor_mode & CFM_FIRST_FLOOR)) {
generate_floor(player_ptr);
* restored from the temporary file. If the floor is new one, new floor\n
* will be generated.\n
*/
-void change_floor(player_type *player_ptr)
+void change_floor(PlayerType *player_ptr)
{
w_ptr->character_dungeon = false;
player_ptr->dtrap = false;
#pragma once
-struct player_type;
-void change_floor(player_type *player_ptr);
+class PlayerType;
+void change_floor(PlayerType *player_ptr);
#include "view/display-messages.h"
#include "world/world.h"
-void day_break(player_type *player_ptr)
+void day_break(PlayerType *player_ptr)
{
msg_print(_("夜が明けた。", "The sun has risen."));
floor_type *floor_ptr = player_ptr->current_floor_ptr;
set_superstealth(player_ptr, false);
}
-void night_falls(player_type *player_ptr)
+void night_falls(PlayerType *player_ptr)
{
msg_print(_("日が沈んだ。", "The sun has fallen."));
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* / Examine all monsters and unidentified objects, and get the feeling of current dungeon floor
* @return 算出されたダンジョンの雰囲気ランク
*/
-static byte get_dungeon_feeling(player_type *player_ptr)
+static byte get_dungeon_feeling(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!floor_ptr->dun_level)
* @brief ダンジョンの雰囲気を更新し、変化があった場合メッセージを表示する
* / Update dungeon feeling, and announce it if changed
*/
-void update_dungeon_feeling(player_type *player_ptr)
+void update_dungeon_feeling(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!floor_ptr->dun_level)
/*
* Glow deep lava and building entrances in the floor
*/
-void glow_deep_lava_and_bldg(player_type *player_ptr)
+void glow_deep_lava_and_bldg(PlayerType *player_ptr)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
return;
#pragma once
-struct player_type;
+class PlayerType;
struct floor_type;
-void day_break(player_type *player_ptr);
-void night_falls(player_type *player_ptr);
-void update_dungeon_feeling(player_type *player_ptr);
-void glow_deep_lava_and_bldg(player_type *player_ptr);
+void day_break(PlayerType *player_ptr);
+void night_falls(PlayerType *player_ptr);
+void update_dungeon_feeling(PlayerType *player_ptr);
+void glow_deep_lava_and_bldg(PlayerType *player_ptr);
void forget_lite(floor_type *floor_ptr);
void forget_view(floor_type *floor_ptr);
* @brief 闘技場用のアリーナ地形を作成する / Builds the on_defeat_arena_monster after it is entered -KMW-
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void build_arena(player_type *player_ptr, POSITION *start_y, POSITION *start_x)
+static void build_arena(PlayerType *player_ptr, POSITION *start_y, POSITION *start_x)
{
POSITION yval = SCREEN_HGT / 2;
POSITION xval = SCREEN_WID / 2;
/*!
* @brief 挑戦時闘技場への入場処理 / Town logic flow for generation of on_defeat_arena_monster -KMW-
*/
-static void generate_challenge_arena(player_type *player_ptr)
+static void generate_challenge_arena(PlayerType *player_ptr)
{
POSITION qy = 0;
POSITION qx = 0;
* @brief モンスター闘技場のフロア生成 / Builds the on_defeat_arena_monster after it is entered -KMW-
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void build_battle(player_type *player_ptr, POSITION *y, POSITION *x)
+static void build_battle(PlayerType *player_ptr, POSITION *y, POSITION *x)
{
POSITION yval = SCREEN_HGT / 2;
POSITION xval = SCREEN_WID / 2;
/*!
* @brief モンスター闘技場への導入処理 / Town logic flow for generation of on_defeat_arena_monster -KMW-
*/
-static void generate_gambling_arena(player_type *player_ptr)
+static void generate_gambling_arena(PlayerType *player_ptr)
{
POSITION y, x;
POSITION qy = 0;
* @brief 固定マップクエストのフロア生成 / Generate a quest level
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void generate_fixed_floor(player_type *player_ptr)
+static void generate_fixed_floor(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (POSITION y = 0; y < floor_ptr->height; y++)
* @param concptr
* @return フロアの生成に成功したらTRUE
*/
-static bool level_gen(player_type *player_ptr, concptr *why)
+static bool level_gen(PlayerType *player_ptr, concptr *why)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
DUNGEON_IDX d_idx = floor_ptr->dungeon_idx;
* @brief フロアの全情報を初期化する / Clear and empty floor.
* @parama player_ptr プレイヤーへの参照ポインタ
*/
-void clear_cave(player_type *player_ptr)
+void clear_cave(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
std::fill_n(floor_ptr->o_list.begin(), floor_ptr->o_max, object_type{});
* @parama player_ptr プレイヤーへの参照ポインタ
* @note Hack -- regenerate any "overflow" levels
*/
-void generate_floor(player_type *player_ptr)
+void generate_floor(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
floor_ptr->dungeon_idx = player_ptr->dungeon_idx;
#pragma once
struct floor_type;
-struct player_type;
+class PlayerType;
void wipe_generate_random_floor_flags(floor_type *floor_ptr);
-void clear_cave(player_type *player_ptr);
-void generate_floor(player_type *player_ptr);
+void clear_cave(PlayerType *player_ptr);
+void generate_floor(PlayerType *player_ptr);
#include "view/display-messages.h"
#include "world/world.h"
-static void check_riding_preservation(player_type *player_ptr)
+static void check_riding_preservation(PlayerType *player_ptr)
{
if (!player_ptr->riding)
return;
}
}
-static bool check_pet_preservation_conditions(player_type *player_ptr, monster_type *m_ptr)
+static bool check_pet_preservation_conditions(PlayerType *player_ptr, monster_type *m_ptr)
{
if (reinit_wilderness)
return false;
return false;
}
-static void sweep_preserving_pet(player_type *player_ptr)
+static void sweep_preserving_pet(PlayerType *player_ptr)
{
if (player_ptr->wild_mode || player_ptr->current_floor_ptr->inside_arena || player_ptr->phase_out)
return;
}
}
-static void record_pet_diary(player_type *player_ptr)
+static void record_pet_diary(PlayerType *player_ptr)
{
if (!record_named_pet)
return;
* @brief フロア移動時のペット保存処理 / Preserve_pets
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void preserve_pet(player_type *player_ptr)
+static void preserve_pet(PlayerType *player_ptr)
{
for (MONSTER_IDX party_monster_num = 0; party_monster_num < MAX_PARTY_MON; party_monster_num++)
party_mon[party_monster_num].r_idx = 0;
* @brief 新フロアに移動元フロアに繋がる階段を配置する / Virtually teleport onto the stairs that is connecting between two floors.
* @param sf_ptr 移動元の保存フロア構造体参照ポインタ
*/
-static void locate_connected_stairs(player_type *player_ptr, floor_type *floor_ptr, saved_floor_type *sf_ptr, BIT_FLAGS floor_mode)
+static void locate_connected_stairs(PlayerType *player_ptr, floor_type *floor_ptr, saved_floor_type *sf_ptr, BIT_FLAGS floor_mode)
{
POSITION sx = 0;
POSITION sy = 0;
/*!
* @brief フロア移動時、プレイヤーの移動先モンスターが既にいた場合ランダムな近隣に移動させる / When a monster is at a place where player will return,
*/
-static void get_out_monster(player_type *player_ptr)
+static void get_out_monster(PlayerType *player_ptr)
{
int tries = 0;
POSITION dis = 1;
* @brief クエスト・フロア内のモンスター・インベントリ情報を保存する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void preserve_info(player_type *player_ptr)
+static void preserve_info(PlayerType *player_ptr)
{
MONRACE_IDX quest_r_idx = 0;
for (DUNGEON_IDX i = 0; i < max_q_idx; i++) {
}
}
-static void set_grid_by_leaving_floor(player_type *player_ptr, grid_type **g_ptr)
+static void set_grid_by_leaving_floor(PlayerType *player_ptr, grid_type **g_ptr)
{
if ((player_ptr->change_floor_mode & CFM_SAVE_FLOORS) == 0)
return;
prepare_change_floor_mode(player_ptr, CFM_SHAFT);
}
-static void jump_floors(player_type *player_ptr)
+static void jump_floors(PlayerType *player_ptr)
{
if (none_bits(player_ptr->change_floor_mode, CFM_DOWN | CFM_UP)) {
return;
player_ptr->current_floor_ptr->dun_level += move_num;
}
-static void exit_to_wilderness(player_type *player_ptr)
+static void exit_to_wilderness(PlayerType *player_ptr)
{
if (is_in_dungeon(player_ptr) || (player_ptr->dungeon_idx == 0))
return;
player_ptr->change_floor_mode &= ~CFM_SAVE_FLOORS; // TODO
}
-static void kill_saved_floors(player_type *player_ptr, saved_floor_type *sf_ptr)
+static void kill_saved_floors(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
if (!(player_ptr->change_floor_mode & CFM_SAVE_FLOORS)) {
for (DUNGEON_IDX i = 0; i < MAX_SAVED_FLOORS; i++)
kill_saved_floor(player_ptr, sf_ptr);
}
-static void refresh_new_floor_id(player_type *player_ptr, grid_type *g_ptr)
+static void refresh_new_floor_id(PlayerType *player_ptr, grid_type *g_ptr)
{
if (new_floor_id != 0)
return;
g_ptr->special = new_floor_id;
}
-static void update_upper_lower_or_floor_id(player_type *player_ptr, saved_floor_type *sf_ptr)
+static void update_upper_lower_or_floor_id(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
if ((player_ptr->change_floor_mode & CFM_RAND_CONNECT) == 0)
return;
sf_ptr->lower_floor_id = new_floor_id;
}
-static void exe_leave_floor(player_type *player_ptr, saved_floor_type *sf_ptr)
+static void exe_leave_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
grid_type *g_ptr = nullptr;
set_grid_by_leaving_floor(player_ptr, &g_ptr);
* / Maintain quest monsters, mark next floor_id at stairs, save current floor, and prepare to enter next floor.
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void leave_floor(player_type *player_ptr)
+void leave_floor(PlayerType *player_ptr)
{
preserve_pet(player_ptr);
remove_all_mirrors(player_ptr, false);
* @brief 任意のダンジョン及び階層に飛ぶ
* Go to any level
*/
-void jump_floor(player_type *player_ptr, DUNGEON_IDX dun_idx, DEPTH depth)
+void jump_floor(PlayerType *player_ptr, DUNGEON_IDX dun_idx, DEPTH depth)
{
player_ptr->dungeon_idx = dun_idx;
player_ptr->current_floor_ptr->dun_level = depth;
#pragma once
#include "system/angband.h"
-struct player_type;
-void leave_floor(player_type *player_ptr);
-void jump_floor(player_type *player_ptr, DUNGEON_IDX dun_idx, DEPTH depth);
+class PlayerType;
+void leave_floor(PlayerType *player_ptr);
+void jump_floor(PlayerType *player_ptr, DUNGEON_IDX dun_idx, DEPTH depth);
* @param player_ptr プレイヤーへの参照ポインタ
* @param mode 追加したい所持フラグ
*/
-void prepare_change_floor_mode(player_type *player_ptr, BIT_FLAGS mode) { player_ptr->change_floor_mode |= mode; }
+void prepare_change_floor_mode(PlayerType *player_ptr, BIT_FLAGS mode) { player_ptr->change_floor_mode |= mode; }
CFM_FIRST_FLOOR = 0x0200, /*!< ダンジョンに入った最初のフロアである / Create exit from the dungeon */
};
-struct player_type;
-void prepare_change_floor_mode(player_type *player_ptr, BIT_FLAGS mode);
+class PlayerType;
+void prepare_change_floor_mode(PlayerType *player_ptr, BIT_FLAGS mode);
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr デバッグ出力するオブジェクトの構造体参照ポインタ
*/
-static void object_mention(player_type *player_ptr, object_type *o_ptr)
+static void object_mention(PlayerType *player_ptr, object_type *o_ptr)
{
object_aware(player_ptr, o_ptr);
object_known(o_ptr);
* @param rq_mon_level ランダムクエスト討伐対象のレベル。ランダムクエスト以外の生成であれば無効値
* @return アイテムの生成成功可否
*/
-bool make_object(player_type *player_ptr, object_type *j_ptr, BIT_FLAGS mode, std::optional<int> rq_mon_level)
+bool make_object(PlayerType *player_ptr, object_type *j_ptr, BIT_FLAGS mode, std::optional<int> rq_mon_level)
{
auto *floor_ptr = player_ptr->current_floor_ptr;
auto prob = any_bits(mode, AM_GOOD) ? 10 : 1000;
* @details
* The location must be a legal, clean, floor grid.
*/
-bool make_gold(player_type *player_ptr, object_type *j_ptr)
+bool make_gold(PlayerType *player_ptr, object_type *j_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
int i = ((randint1(floor_ptr->object_level + 2) + 2) / 2) - 1;
* @param y 削除したフロアマスのY座標
* @param x 削除したフロアマスのX座標
*/
-void delete_all_items_from_floor(player_type *player_ptr, POSITION y, POSITION x)
+void delete_all_items_from_floor(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* @param item 増やしたいアイテムの所持スロット
* @param num 増やしたいアイテムの数
*/
-void floor_item_increase(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num)
+void floor_item_increase(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* @param player_ptr プレイヤーへの参照ポインタ
* @param item 消去したいアイテムの所持スロット
*/
-void floor_item_optimize(player_type *player_ptr, INVENTORY_IDX item)
+void floor_item_optimize(PlayerType *player_ptr, INVENTORY_IDX item)
{
object_type *o_ptr = &player_ptr->current_floor_ptr->o_list[item];
if (!o_ptr->k_idx)
* @details
* Handle "stacks" of objects correctly.
*/
-void delete_object_idx(player_type *player_ptr, OBJECT_IDX o_idx)
+void delete_object_idx(PlayerType *player_ptr, OBJECT_IDX o_idx)
{
object_type *j_ptr;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* the object can combine, stack, or be placed. Artifacts will try very\n
* hard to be placed, including "teleporting" to a useful grid if needed.\n
*/
-OBJECT_IDX drop_near(player_type *player_ptr, object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION x)
+OBJECT_IDX drop_near(PlayerType *player_ptr, object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION x)
{
int i, k, d, s;
POSITION dy, dx;
* @param floo_ptr 現在フロアへの参照ポインタ
* @param item メッセージの対象にしたいアイテム所持スロット
*/
-void floor_item_describe(player_type *player_ptr, INVENTORY_IDX item)
+void floor_item_describe(PlayerType *player_ptr, INVENTORY_IDX item)
{
object_type *o_ptr = &player_ptr->current_floor_ptr->o_list[item];
GAME_TEXT o_name[MAX_NLEN];
/*
* Choose an item and get auto-picker entry from it.
*/
-object_type *choose_object(player_type *player_ptr, OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option, const ItemTester& item_tester)
+object_type *choose_object(PlayerType *player_ptr, OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option, const ItemTester& item_tester)
{
OBJECT_IDX item;
struct floor_type;
struct object_type;
-struct player_type;
+class PlayerType;
class ItemTester;
-bool make_object(player_type *player_ptr, object_type *j_ptr, BIT_FLAGS mode, std::optional<int> rq_mon_level = std::nullopt);
-bool make_gold(player_type *player_ptr, object_type *j_ptr);
-void delete_all_items_from_floor(player_type *player_ptr, POSITION y, POSITION x);
-void floor_item_increase(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
-void floor_item_optimize(player_type *player_ptr, INVENTORY_IDX item);
-void delete_object_idx(player_type *player_ptr, OBJECT_IDX o_idx);
+bool make_object(PlayerType *player_ptr, object_type *j_ptr, BIT_FLAGS mode, std::optional<int> rq_mon_level = std::nullopt);
+bool make_gold(PlayerType *player_ptr, object_type *j_ptr);
+void delete_all_items_from_floor(PlayerType *player_ptr, POSITION y, POSITION x);
+void floor_item_increase(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
+void floor_item_optimize(PlayerType *player_ptr, INVENTORY_IDX item);
+void delete_object_idx(PlayerType *player_ptr, OBJECT_IDX o_idx);
void excise_object_idx(floor_type *floor_ptr, OBJECT_IDX o_idx);
ObjectIndexList &get_o_idx_list_contains(floor_type *floor_ptr, OBJECT_IDX o_idx);
-OBJECT_IDX drop_near(player_type *player_ptr, object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
+OBJECT_IDX drop_near(PlayerType *player_ptr, object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
void floor_item_charges(floor_type *player_ptr, INVENTORY_IDX item);
-void floor_item_describe(player_type *player_ptr, INVENTORY_IDX item);
-object_type *choose_object(player_type *player_ptr, OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option, const ItemTester& item_tester = AllMatchItemTester());
+void floor_item_describe(PlayerType *player_ptr, INVENTORY_IDX item);
+object_type *choose_object(PlayerType *player_ptr, OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option, const ItemTester& item_tester = AllMatchItemTester());
* @param force テンポラリファイルが残っていた場合も警告なしで強制的に削除するフラグ
* @details Make sure that old temporary files are not remaining as gurbages.
*/
-void init_saved_floors(player_type *player_ptr, bool force)
+void init_saved_floors(PlayerType *player_ptr, bool force)
{
char floor_savefile[sizeof(savefile) + 32];
int fd = -1;
* @details Should be called just before the game quit.
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void clear_saved_floor_files(player_type *player_ptr)
+void clear_saved_floor_files(PlayerType *player_ptr)
{
char floor_savefile[sizeof(savefile) + 32];
for (int i = 0; i < MAX_SAVED_FLOORS; i++) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param sf_ptr 保存フロアの参照ポインタ
*/
-void kill_saved_floor(player_type *player_ptr, saved_floor_type *sf_ptr)
+void kill_saved_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
char floor_savefile[sizeof(savefile) + 32];
if (!sf_ptr || (sf_ptr->floor_id == 0))
sf_ptr->floor_id = 0;
}
-static FLOOR_IDX find_oldest_floor_idx(player_type *player_ptr)
+static FLOOR_IDX find_oldest_floor_idx(PlayerType *player_ptr)
{
FLOOR_IDX oldest_floor_idx = 0;
uint32_t oldest_visit = 0xffffffffL;
* @details
* If number of saved floors are already MAX_SAVED_FLOORS, kill the oldest one.
*/
-FLOOR_IDX get_new_floor_id(player_type *player_ptr)
+FLOOR_IDX get_new_floor_id(PlayerType *player_ptr)
{
saved_floor_type *sf_ptr = nullptr;
FLOOR_IDX fl_idx;
* @details
* To prevent multiple generation of unique monster who is the minion of player
*/
-void precalc_cur_num_of_pet(player_type *player_ptr)
+void precalc_cur_num_of_pet(PlayerType *player_ptr)
{
monster_type *m_ptr;
int max_num = player_ptr->wild_mode ? 1 : MAX_PARTY_MON;
#include "system/angband.h"
-struct player_type;
+class PlayerType;
struct saved_floor_type;
-void init_saved_floors(player_type *player_ptr, bool force);
-void clear_saved_floor_files(player_type *player_ptr);
+void init_saved_floors(PlayerType *player_ptr, bool force);
+void clear_saved_floor_files(PlayerType *player_ptr);
saved_floor_type *get_sf_ptr(FLOOR_IDX floor_id);
-void kill_saved_floor(player_type *player_ptr, saved_floor_type *sf_ptr);
-FLOOR_IDX get_new_floor_id(player_type *player_ptr);
-void precalc_cur_num_of_pet(player_type *player_ptr);
+void kill_saved_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr);
+FLOOR_IDX get_new_floor_id(PlayerType *player_ptr);
+void precalc_cur_num_of_pet(PlayerType *player_ptr);
extern FLOOR_IDX max_floor_id;
* hidden gold types are currently unused.
* </pre>
*/
-void build_streamer(player_type *player_ptr, FEAT_IDX feat, int chance)
+void build_streamer(PlayerType *player_ptr, FEAT_IDX feat, int chance)
{
int i;
POSITION y, x, tx, ty;
* This happens in real world lava tubes.
* </pre>
*/
-void place_trees(player_type *player_ptr, POSITION x, POSITION y)
+void place_trees(PlayerType *player_ptr, POSITION x, POSITION y)
{
int i, j;
grid_type *g_ptr;
* @brief ダンジョンに*破壊*済み地形ランダムに施す /
* Build a destroyed level
*/
-void destroy_level(player_type *player_ptr)
+void destroy_level(PlayerType *player_ptr)
{
msg_print_wizard(player_ptr, CHEAT_DUNGEON, _("階に*破壊*の痕跡を生成しました。", "Destroyed Level."));
struct dun_data_type;
struct floor_type;
-struct player_type;
+class PlayerType;
void add_river(floor_type *floor_ptr, dun_data_type *dd_ptr);
-void build_streamer(player_type *player_ptr, FEAT_IDX feat, int chance);
-void place_trees(player_type *player_ptr, POSITION x, POSITION y);
-void destroy_level(player_type *player_ptr);
+void build_streamer(PlayerType *player_ptr, FEAT_IDX feat, int chance);
+void place_trees(PlayerType *player_ptr, POSITION x, POSITION y);
+void destroy_level(PlayerType *player_ptr);
* Whenever the age count loops, most of the scent trail is erased and
* the age of the remainder is recalculated.
*/
-void update_smell(floor_type *floor_ptr, player_type *player_ptr)
+void update_smell(floor_type *floor_ptr, PlayerType *player_ptr)
{
/* Create a table that controls the spread of scent */
const int scent_adjust[5][5] = {
*
* Currently the "m" parameter is unused.
*/
-void scatter(player_type *player_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode)
+void scatter(PlayerType *player_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
POSITION nx, ny;
* @param player_ptr プレイヤーへの参照ポインタ
* @return マップ名の文字列参照ポインタ
*/
-concptr map_name(player_type *player_ptr)
+concptr map_name(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->inside_quest && quest_type::is_fixed(floor_ptr->inside_quest) && (quest[floor_ptr->inside_quest].flags & QUEST_FLAG_PRESET))
struct floor_type;
extern floor_type floor_info;
-struct player_type;
-void update_smell(floor_type *floor_ptr, player_type *player_ptr);
+class PlayerType;
+void update_smell(floor_type *floor_ptr, PlayerType *player_ptr);
void forget_flow(floor_type *floor_ptr);
void wipe_o_list(floor_type *floor_ptr);
-void scatter(player_type *player_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
-concptr map_name(player_type *player_ptr);
+void scatter(PlayerType *player_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
+concptr map_name(PlayerType *player_ptr);
* @param x 方角を確認したX座標
* @return 方向ID
*/
-DIRECTION coords_to_dir(player_type *player_ptr, POSITION y, POSITION x)
+DIRECTION coords_to_dir(PlayerType *player_ptr, POSITION y, POSITION x)
{
DIRECTION d[3][3] = { { 7, 4, 1 }, { 8, 5, 2 }, { 9, 6, 3 } };
POSITION dy, dx;
* "glowing" grid. This prevents the player from being able to "see" the\n
* walls of illuminated rooms from a corridor outside the room.\n
*/
-bool player_can_see_bold(player_type *player_ptr, POSITION y, POSITION x)
+bool player_can_see_bold(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr;
* @return 個々のモンスターがプレイヤーが見えたらTRUE
* @todo is_seen() の関数マクロをバラそうとしたがインクルード関係のコンパイルエラーで失敗
*/
-bool is_seen(player_type *player_ptr, monster_type *m_ptr)
+bool is_seen(PlayerType *player_ptr, monster_type *m_ptr)
{
bool is_inside_view = !ignore_unview;
is_inside_view |= player_ptr->phase_out;
extern const POSITION ddx_cdd[8];
extern const POSITION ddy_cdd[8];
-struct player_type;
-DIRECTION coords_to_dir(player_type *player_ptr, POSITION y, POSITION x);
+class PlayerType;
+DIRECTION coords_to_dir(PlayerType *player_ptr, POSITION y, POSITION x);
POSITION distance(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
void mmove2(POSITION *y, POSITION *x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-bool player_can_see_bold(player_type *player_ptr, POSITION y, POSITION x);
+bool player_can_see_bold(PlayerType *player_ptr, POSITION y, POSITION x);
struct monster_type;
-bool is_seen(player_type *player_ptr, monster_type *m_ptr);
+bool is_seen(PlayerType *player_ptr, monster_type *m_ptr);
*\n
* Use the "update_view()" function to determine player line-of-sight.\n
*/
-bool los(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+bool los(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
POSITION dy = y2 - y1;
POSITION dx = x2 - x1;
#include "system/angband.h"
-struct player_type;
-bool los(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
+class PlayerType;
+bool los(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
* @param walls 最低減隣接させたい外壁の数
* @return 階段を生成して問題がないならばTRUEを返す。
*/
-static bool alloc_stairs_aux(player_type *player_ptr, POSITION y, POSITION x, int walls)
+static bool alloc_stairs_aux(PlayerType *player_ptr, POSITION y, POSITION x, int walls)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
* @param walls 最低減隣接させたい外壁の数
* @return 規定数通りに生成に成功したらTRUEを返す。
*/
-bool alloc_stairs(player_type *player_ptr, FEAT_IDX feat, int num, int walls)
+bool alloc_stairs(PlayerType *player_ptr, FEAT_IDX feat, int num, int walls)
{
int shaft_num = 0;
feature_type *f_ptr = &f_info[feat];
* @param num 配置したい数
* @return 規定数通りに生成に成功したらTRUEを返す。
*/
-void alloc_object(player_type *player_ptr, dap_type set, EFFECT_ID typ, int num)
+void alloc_object(PlayerType *player_ptr, dap_type set, EFFECT_ID typ, int num)
{
POSITION y = 0;
POSITION x = 0;
#include "effect/attribute-types.h"
enum dap_type : int;
-struct player_type;
-bool alloc_stairs(player_type *player_ptr, FEAT_IDX feat, int num, int walls);
-void alloc_object(player_type *player_ptr, dap_type set, EFFECT_ID typ, int num);
+class PlayerType;
+bool alloc_stairs(PlayerType *player_ptr, FEAT_IDX feat, int num, int walls);
+void alloc_object(PlayerType *player_ptr, dap_type set, EFFECT_ID typ, int num);
* mode & 0x02 -- Marked items only
* mode & 0x04 -- Stop after first
*/
-ITEM_NUMBER scan_floor_items(player_type *player_ptr, OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode, const ItemTester &item_tester)
+ITEM_NUMBER scan_floor_items(PlayerType *player_ptr, OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode, const ItemTester &item_tester)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!in_bounds(floor_ptr, y, x))
* @return 選択したアイテムの添え字
* @details
*/
-COMMAND_CODE show_floor_items(player_type *player_ptr, int target_item, POSITION y, POSITION x, TERM_LEN *min_width, const ItemTester &item_tester)
+COMMAND_CODE show_floor_items(PlayerType *player_ptr, int target_item, POSITION y, POSITION x, TERM_LEN *min_width, const ItemTester &item_tester)
{
COMMAND_CODE i, m;
int j, k, l;
SCAN_FLOOR_AT_MOST_ONE = 1U << 2, /*!< 高々1つのアイテムしか取得しない */
};
-struct player_type;
+class PlayerType;
class ItemTester;
-ITEM_NUMBER scan_floor_items(player_type *player_ptr, OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode, const ItemTester& item_tester);
-COMMAND_CODE show_floor_items(player_type *player_ptr, int target_item, POSITION y, POSITION x, TERM_LEN *min_width, const ItemTester& item_tester);
+ITEM_NUMBER scan_floor_items(PlayerType *player_ptr, OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode, const ItemTester& item_tester);
+COMMAND_CODE show_floor_items(PlayerType *player_ptr, int target_item, POSITION y, POSITION x, TERM_LEN *min_width, const ItemTester& item_tester);
* @brief パターン終点到達時のテレポート処理を行う
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void pattern_teleport(player_type *player_ptr)
+void pattern_teleport(PlayerType *player_ptr)
{
DEPTH min_level = 0;
DEPTH max_level = 99;
* @brief 各種パターン地形上の特別な処理 / Returns TRUE if we are on the Pattern...
* @return 実際にパターン地形上にプレイヤーが居た場合はTRUEを返す。
*/
-bool pattern_effect(player_type *player_ptr)
+bool pattern_effect(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!pattern_tile(floor_ptr, player_ptr->y, player_ptr->x))
* @param n_x プレイヤーの移動先X座標
* @return 移動処理が可能である場合(可能な場合に選択した場合)TRUEを返す。
*/
-bool pattern_seq(player_type *player_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x)
+bool pattern_seq(PlayerType *player_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x)
{
feature_type *cur_f_ptr = &f_info[player_ptr->current_floor_ptr->grid_array[c_y][c_x].feat];
feature_type *new_f_ptr = &f_info[player_ptr->current_floor_ptr->grid_array[n_y][n_x].feat];
#include "system/angband.h"
-struct player_type;
-bool pattern_effect(player_type *player_ptr);
-bool pattern_seq(player_type *player_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x);
-void pattern_teleport(player_type *player_ptr);
+class PlayerType;
+bool pattern_effect(PlayerType *player_ptr);
+bool pattern_seq(PlayerType *player_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x);
+void pattern_teleport(PlayerType *player_ptr);
* @param col2 終点X座標
* @return 生成に成功したらTRUEを返す
*/
-bool build_tunnel(player_type *player_ptr, dun_data_type *dd_ptr, dt_type *dt_ptr, POSITION row1, POSITION col1, POSITION row2, POSITION col2)
+bool build_tunnel(PlayerType *player_ptr, dun_data_type *dd_ptr, dt_type *dt_ptr, POSITION row1, POSITION col1, POSITION row2, POSITION col2)
{
POSITION tmp_row, tmp_col;
POSITION row_dir, col_dir;
* @param affectwall (調査中)
* @todo 特に詳細な処理の意味を調査すべし
*/
-static bool set_tunnel(player_type *player_ptr, dun_data_type *dd_ptr, POSITION *x, POSITION *y, bool affectwall)
+static bool set_tunnel(PlayerType *player_ptr, dun_data_type *dd_ptr, POSITION *x, POSITION *y, bool affectwall)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[*y][*x];
* @param x 基準点のX座標
* @param y 基準点のY座標
*/
-static void create_cata_tunnel(player_type *player_ptr, dun_data_type *dd_ptr, POSITION x, POSITION y)
+static void create_cata_tunnel(PlayerType *player_ptr, dun_data_type *dd_ptr, POSITION x, POSITION y)
{
POSITION x1 = x - 1;
POSITION y1 = y;
* @todo 詳細用調査
*/
static void short_seg_hack(
- player_type *player_ptr, dun_data_type *dd_ptr, const POSITION x1, const POSITION y1, const POSITION x2, const POSITION y2, int type, int count, bool *fail)
+ PlayerType *player_ptr, dun_data_type *dd_ptr, const POSITION x1, const POSITION y1, const POSITION x2, const POSITION y2, int type, int count, bool *fail)
{
if (!(*fail))
return;
* @brief 特定の壁(永久壁など)を避けながら部屋間の通路を作成する / This routine maps a path from (x1, y1) to (x2, y2) avoiding SOLID walls.
* @todo 詳細要調査
*/
-bool build_tunnel2(player_type *player_ptr, dun_data_type *dd_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff)
+bool build_tunnel2(PlayerType *player_ptr, dun_data_type *dd_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff)
{
POSITION x3, y3, dx, dy;
POSITION changex, changey;
struct dun_data_type;
struct dt_type;
-struct player_type;
-bool build_tunnel(player_type *player_ptr, dun_data_type *dd_ptr, dt_type *dt_ptr, POSITION row1, POSITION col1, POSITION row2, POSITION col2);
-bool build_tunnel2(player_type *player_ptr, dun_data_type *dd_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff);
+class PlayerType;
+bool build_tunnel(PlayerType *player_ptr, dun_data_type *dd_ptr, dt_type *dt_ptr, POSITION row1, POSITION col1, POSITION row2, POSITION col2);
+bool build_tunnel2(PlayerType *player_ptr, dun_data_type *dd_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff);
* If corner is set then only the corners of the area are needed.
* </pre>
*/
-static void generate_area(player_type *player_ptr, POSITION y, POSITION x, bool border, bool corner)
+static void generate_area(PlayerType *player_ptr, POSITION y, POSITION x, bool border, bool corner)
{
player_ptr->town_num = wilderness[y][x].town;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
/*!
* @brief 広域マップの生成 /
* Build the wilderness area outside of the town.
- * @todo 広域マップは恒常生成にする予定、player_typeによる処理分岐は最終的に排除する。
+ * @todo 広域マップは恒常生成にする予定、PlayerTypeによる処理分岐は最終的に排除する。
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void wilderness_gen(player_type *player_ptr)
+void wilderness_gen(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
floor_ptr->height = MAX_HGT;
* @brief 広域マップの生成(簡易処理版) /
* Build the wilderness area. -DG-
*/
-void wilderness_gen_small(player_type *player_ptr)
+void wilderness_gen_small(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (int i = 0; i < MAX_WID; i++)
* @param y 広域マップの高さを返す参照ポインタ
* @param x 広域マップの幅を返す参照ポインタ
*/
-parse_error_type parse_line_wilderness(player_type *player_ptr, char *buf, int xmin, int xmax, int *y, int *x)
+parse_error_type parse_line_wilderness(PlayerType *player_ptr, char *buf, int xmin, int xmax, int *y, int *x)
{
if (!(buf[0] == 'W'))
return (PARSE_ERROR_GENERIC);
* @param encount 襲撃時TRUE
* @return 切り替えが行われた場合はTRUEを返す。
*/
-bool change_wild_mode(player_type *player_ptr, bool encount)
+bool change_wild_mode(PlayerType *player_ptr, bool encount)
{
generate_encounter = encount;
if (player_ptr->leaving)
extern std::vector<std::vector<wilderness_type>> wilderness;
-struct player_type;
+class PlayerType;
void set_floor_and_wall(DUNGEON_IDX type);
-void wilderness_gen(player_type *player_ptr);
-void wilderness_gen_small(player_type *player_ptr);
+void wilderness_gen(PlayerType *player_ptr);
+void wilderness_gen_small(PlayerType *player_ptr);
errr init_wilderness(void);
void init_wilderness_terrains(void);
void seed_wilderness(void);
-parse_error_type parse_line_wilderness(player_type *player_ptr, char *buf, int xmin, int xmax, int *y, int *x);
-bool change_wild_mode(player_type *player_ptr, bool encount);
+parse_error_type parse_line_wilderness(PlayerType *player_ptr, char *buf, int xmin, int xmax, int *y, int *x);
+bool change_wild_mode(PlayerType *player_ptr, bool encount);
*
* The doors must be INSIDE the allocated region.
*/
-void add_door(player_type *player_ptr, POSITION x, POSITION y)
+void add_door(PlayerType *player_ptr, POSITION x, POSITION y)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!floor_ptr->grid_array[y][x].is_outer())
* @param x 配置したいフロアのX座標
* @param type DOOR_DEFAULT / DOOR_DOOR / DOOR_GLASS_DOOR / DOOR_CURTAIN のいずれか
*/
-void place_secret_door(player_type *player_ptr, POSITION y, POSITION x, int type)
+void place_secret_door(PlayerType *player_ptr, POSITION y, POSITION x, int type)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (d_info[floor_ptr->dungeon_idx].flags.has(DungeonFeatureType::NO_DOORS)) {
* @param y 配置したいフロアのY座標
* @param x 配置したいフロアのX座標
*/
-void place_locked_door(player_type *player_ptr, POSITION y, POSITION x)
+void place_locked_door(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (d_info[floor_ptr->dungeon_idx].flags.has(DungeonFeatureType::NO_DOORS)) {
* @param x ドアの配置を試みたいマスのX座標
* @param room 部屋に接している場合向けのドア生成か否か
*/
-void place_random_door(player_type *player_ptr, POSITION y, POSITION x, bool room)
+void place_random_door(PlayerType *player_ptr, POSITION y, POSITION x, bool room)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
* @param x ドアの配置を試みたいマスのX座標
* @param type ドアの地形ID
*/
-void place_closed_door(player_type *player_ptr, POSITION y, POSITION x, int type)
+void place_closed_door(PlayerType *player_ptr, POSITION y, POSITION x, int type)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (d_info[floor_ptr->dungeon_idx].flags.has(DungeonFeatureType::NO_DOORS)) {
#include "system/angband.h"
-struct player_type;
-void add_door(player_type *player_ptr, POSITION x, POSITION y);
-void place_secret_door(player_type *player_ptr, POSITION y, POSITION x, int type);
-void place_locked_door(player_type *player_ptr, POSITION y, POSITION x);
-void place_random_door(player_type *player_ptr, POSITION y, POSITION x, bool room);
-void place_closed_door(player_type *player_ptr, POSITION y, POSITION x, int type);
+class PlayerType;
+void add_door(PlayerType *player_ptr, POSITION x, POSITION y);
+void place_secret_door(PlayerType *player_ptr, POSITION y, POSITION x, int type);
+void place_locked_door(PlayerType *player_ptr, POSITION y, POSITION x);
+void place_random_door(PlayerType *player_ptr, POSITION y, POSITION x, bool room);
+void place_closed_door(PlayerType *player_ptr, POSITION y, POSITION x, int type);
* @brief フロアに洞窟や湖を配置する / Generate various caverns and lakes
* @details There were moved from cave_gen().
*/
-void gen_caverns_and_lakes(player_type *player_ptr, dungeon_type *dungeon_ptr, dun_data_type *dd_ptr)
+void gen_caverns_and_lakes(PlayerType *player_ptr, dungeon_type *dungeon_ptr, dun_data_type *dd_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if ((floor_ptr->dun_level > 30) && one_in_(DUN_DEST * 2) && small_levels && dungeon_ptr->flags.has(DungeonFeatureType::DESTROY)) {
* @param y 設置を行いたいマスのY座標
* @param x 設置を行いたいマスのX座標
*/
-void try_door(player_type *player_ptr, dt_type *dt_ptr, POSITION y, POSITION x)
+void try_door(PlayerType *player_ptr, dt_type *dt_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!in_bounds(floor_ptr, y, x) || cave_has_flag_bold(floor_ptr, y, x, FloorFeatureType::WALL) || floor_ptr->grid_array[y][x].is_room())
struct dungeon_type;
struct dun_data_type;
struct dt_type;
-struct player_type;
-void gen_caverns_and_lakes(player_type *player_ptr, dungeon_type *dungeon_ptr, dun_data_type *dd_ptr);
+class PlayerType;
+void gen_caverns_and_lakes(PlayerType *player_ptr, dungeon_type *dungeon_ptr, dun_data_type *dd_ptr);
bool has_river_flag(dungeon_type *dungeon_ptr);
-void try_door(player_type *player_ptr, dt_type *dt_ptr, POSITION y, POSITION x);
+void try_door(PlayerType *player_ptr, dt_type *dt_ptr, POSITION y, POSITION x);
* @param feat 地形情報のID
* @return 罠持ちの地形ならばTRUEを返す。
*/
-bool is_trap(player_type *player_ptr, FEAT_IDX feat)
+bool is_trap(PlayerType *player_ptr, FEAT_IDX feat)
{
/* 関数ポインタの都合 */
(void)player_ptr;
* @param feat 地形情報のID
* @return 閉じたドアのある地形ならばTRUEを返す。
*/
-bool is_closed_door(player_type *player_ptr, FEAT_IDX feat)
+bool is_closed_door(PlayerType *player_ptr, FEAT_IDX feat)
{
/* 関数ポインタの都合 */
(void)player_ptr;
/*
* Change the "feat" flag for a grid, and notice/redraw the grid
*/
-void cave_set_feat(player_type *player_ptr, POSITION y, POSITION x, FEAT_IDX feat)
+void cave_set_feat(PlayerType *player_ptr, POSITION y, POSITION x, FEAT_IDX feat)
{
auto *floor_ptr = player_ptr->current_floor_ptr;
auto *g_ptr = &floor_ptr->grid_array[y][x];
extern FEAT_IDX feat_wall_type[100];
struct floor_type;
-struct player_type;
-bool is_closed_door(player_type *player_ptr, FEAT_IDX feat);
-bool is_trap(player_type *player_ptr, FEAT_IDX feat);
+class PlayerType;
+bool is_closed_door(PlayerType *player_ptr, FEAT_IDX feat);
+bool is_trap(PlayerType *player_ptr, FEAT_IDX feat);
void apply_default_feat_lighting(TERM_COLOR *f_attr, SYMBOL_CODE *f_char);
bool is_ascii_graphics(char x);
bool permanent_wall(feature_type *f_ptr);
FEAT_IDX feat_locked_door_random(int door_type);
FEAT_IDX feat_jammed_door_random(int door_type);
-void cave_set_feat(player_type *player_ptr, POSITION y, POSITION x, FEAT_IDX feat);
+void cave_set_feat(PlayerType *player_ptr, POSITION y, POSITION x, FEAT_IDX feat);
FEAT_IDX conv_dungeon_feat(floor_type *floor_ptr, FEAT_IDX newfeat);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 配置に成功したらTRUEを返す
*/
-bool new_player_spot(player_type *player_ptr)
+bool new_player_spot(PlayerType *player_ptr)
{
POSITION y = 0, x = 0;
int max_attempts = 10000;
* @param g_ptr マス構造体の参照ポインタ
* @return 隠されたドアがあるならTRUEを返す。
*/
-bool is_hidden_door(player_type *player_ptr, grid_type *g_ptr)
+bool is_hidden_door(PlayerType *player_ptr, grid_type *g_ptr)
{
if ((g_ptr->mimic || g_ptr->cave_has_flag(FloorFeatureType::SECRET)) && is_closed_door(player_ptr, g_ptr->feat))
return true;
* @param x x座標
* @return 指定された座標に照明がかかっているならTRUEを返す。。
*/
-bool check_local_illumination(player_type *player_ptr, POSITION y, POSITION x)
+bool check_local_illumination(PlayerType *player_ptr, POSITION y, POSITION x)
{
/* Hack -- move towards player */
POSITION yy = (y < player_ptr->y) ? (y + 1) : (y > player_ptr->y) ? (y - 1) : y;
* @param y 視界先y座標
* @param x 視界先x座標
*/
-void update_local_illumination(player_type *player_ptr, POSITION y, POSITION x)
+void update_local_illumination(PlayerType *player_ptr, POSITION y, POSITION x)
{
int i;
POSITION yy, xx;
* @return 視覚に収められていないならTRUEを返す
* @details player_can_see_bold()関数の返り値の否定を返している。
*/
-bool no_lite(player_type *player_ptr)
+bool no_lite(PlayerType *player_ptr)
{
return (!player_can_see_bold(player_ptr, player_ptr->y, player_ptr->x));
}
/*
* Place an attr/char pair at the given map coordinate, if legal.
*/
-void print_rel(player_type *player_ptr, SYMBOL_CODE c, TERM_COLOR a, POSITION y, POSITION x)
+void print_rel(PlayerType *player_ptr, SYMBOL_CODE c, TERM_COLOR a, POSITION y, POSITION x)
{
/* Only do "legal" locations */
if (panel_contains(y, x)) {
}
/*!
- * @todo ここにplayer_type を追加した時のコンパイルエラーに対処できなかったので保留
+ * @todo ここにPlayerType を追加した時のコンパイルエラーに対処できなかったので保留
* Memorize interesting viewable object/features in the given grid
*
* This function should only be called on "legal" grids.
* optimized primarily for the most common cases, that is, for the
* non-marked floor grids.
*/
-void note_spot(player_type *player_ptr, POSITION y, POSITION x)
+void note_spot(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
*
* This function should only be called on "legal" grids
*/
-void lite_spot(player_type *player_ptr, POSITION y, POSITION x)
+void lite_spot(PlayerType *player_ptr, POSITION y, POSITION x)
{
/* Redraw if on screen */
if (panel_contains(y, x) && in_bounds2(player_ptr->current_floor_ptr, y, x)) {
* We do not need a priority queue because the cost from grid
* to grid is always "one" and we process them in order.
*/
-void update_flow(player_type *player_ptr)
+void update_flow(PlayerType *player_ptr)
{
POSITION x, y;
DIRECTION d;
* Takes a location and action and changes the feature at that
* location through applying the given action.
*/
-void cave_alter_feat(player_type *player_ptr, POSITION y, POSITION x, FloorFeatureType action)
+void cave_alter_feat(PlayerType *player_ptr, POSITION y, POSITION x, FloorFeatureType action)
{
/* Set old feature */
floor_type *floor_ptr = player_ptr->current_floor_ptr;
}
/* Remove a mirror */
-void remove_mirror(player_type *player_ptr, POSITION y, POSITION x)
+void remove_mirror(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
* @param mode オプション
* @return テレポート先として妥当ならばtrue
*/
-bool cave_monster_teleportable_bold(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, teleport_flags mode)
+bool cave_monster_teleportable_bold(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, teleport_flags mode)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
* @param mode オプション
* @return テレポート先として妥当ならばtrue
*/
-bool cave_player_teleportable_bold(player_type *player_ptr, POSITION y, POSITION x, teleport_flags mode)
+bool cave_player_teleportable_bold(PlayerType *player_ptr, POSITION y, POSITION x, teleport_flags mode)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[g_ptr->feat];
* @param feat 地形ID
* @return 開いた地形である場合TRUEを返す / Return TRUE if the given feature is an open door
*/
-bool is_open(player_type *player_ptr, FEAT_IDX feat)
+bool is_open(PlayerType *player_ptr, FEAT_IDX feat)
{
return f_info[feat].flags.has(FloorFeatureType::CLOSE) && (feat != feat_state(player_ptr->current_floor_ptr, feat, FloorFeatureType::CLOSE));
}
* @param mode 移動に関するオプションフラグ
* @return 移動可能ならばTRUEを返す
*/
-bool player_can_enter(player_type *player_ptr, FEAT_IDX feature, BIT_FLAGS16 mode)
+bool player_can_enter(PlayerType *player_ptr, FEAT_IDX feature, BIT_FLAGS16 mode)
{
feature_type *f_ptr = &f_info[feature];
return true;
}
-void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_bold_type gb_type)
+void place_grid(PlayerType *player_ptr, grid_type *g_ptr, grid_bold_type gb_type)
{
switch (gb_type) {
case GB_FLOOR: {
* @param g_ptr グリッドへの参照ポインタ
* @return 照明が消されている地形ならばTRUE
*/
-bool darkened_grid(player_type *player_ptr, grid_type *g_ptr)
+bool darkened_grid(PlayerType *player_ptr, grid_type *g_ptr)
{
return ((g_ptr->info & (CAVE_VIEW | CAVE_LITE | CAVE_MNLT | CAVE_MNDK)) == (CAVE_VIEW | CAVE_MNDK)) && !player_ptr->see_nocto;
}
-void place_bold(player_type *player_ptr, POSITION y, POSITION x, grid_bold_type gb_type)
+void place_bold(PlayerType *player_ptr, POSITION y, POSITION x, grid_bold_type gb_type)
{
grid_type *const g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
place_grid(player_ptr, g_ptr, gb_type);
* @details Return the number of features around (or under) the character.
* Usually look for doors and floor traps.
*/
-int count_dt(player_type *player_ptr, POSITION *y, POSITION *x, bool (*test)(player_type *, FEAT_IDX), bool under)
+int count_dt(PlayerType *player_ptr, POSITION *y, POSITION *x, bool (*test)(PlayerType *, FEAT_IDX), bool under)
{
int count = 0;
for (DIRECTION d = 0; d < 9; d++) {
struct floor_type;
struct grid_type;
-struct player_type;
+class PlayerType;
struct monster_race;
enum class FloorFeatureType;
-bool new_player_spot(player_type *player_ptr);
-bool is_hidden_door(player_type *player_ptr, grid_type *g_ptr);
-bool player_can_enter(player_type *player_ptr, FEAT_IDX feature, BIT_FLAGS16 mode);
+bool new_player_spot(PlayerType *player_ptr);
+bool is_hidden_door(PlayerType *player_ptr, grid_type *g_ptr);
+bool player_can_enter(PlayerType *player_ptr, FEAT_IDX feature, BIT_FLAGS16 mode);
bool feat_uses_special(FEAT_IDX f_idx);
-void update_local_illumination(player_type *player_ptr, POSITION y, POSITION x);
-bool no_lite(player_type *player_ptr);
-void print_rel(player_type *player_ptr, SYMBOL_CODE c, TERM_COLOR a, POSITION y, POSITION x);
-void note_spot(player_type *player_ptr, POSITION y, POSITION x);
-void lite_spot(player_type *player_ptr, POSITION y, POSITION x);
-void update_flow(player_type *player_ptr);
+void update_local_illumination(PlayerType *player_ptr, POSITION y, POSITION x);
+bool no_lite(PlayerType *player_ptr);
+void print_rel(PlayerType *player_ptr, SYMBOL_CODE c, TERM_COLOR a, POSITION y, POSITION x);
+void note_spot(PlayerType *player_ptr, POSITION y, POSITION x);
+void lite_spot(PlayerType *player_ptr, POSITION y, POSITION x);
+void update_flow(PlayerType *player_ptr);
FEAT_IDX feat_state(floor_type *floor_ptr, FEAT_IDX feat, FloorFeatureType action);
-void cave_alter_feat(player_type *player_ptr, POSITION y, POSITION x, FloorFeatureType action);
-void remove_mirror(player_type *player_ptr, POSITION y, POSITION x);
-bool is_open(player_type *player_ptr, FEAT_IDX feat);
-bool check_local_illumination(player_type *player_ptr, POSITION y, POSITION x);
-bool cave_monster_teleportable_bold(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, teleport_flags mode);
-bool cave_player_teleportable_bold(player_type *player_ptr, POSITION y, POSITION x, teleport_flags mode);
-void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_bold_type pg_type);
-bool darkened_grid(player_type *player_ptr, grid_type *g_ptr);
-void delete_monster(player_type *player_ptr, POSITION y, POSITION x);
-void place_bold(player_type *player_ptr, POSITION y, POSITION x, grid_bold_type gh_type);
+void cave_alter_feat(PlayerType *player_ptr, POSITION y, POSITION x, FloorFeatureType action);
+void remove_mirror(PlayerType *player_ptr, POSITION y, POSITION x);
+bool is_open(PlayerType *player_ptr, FEAT_IDX feat);
+bool check_local_illumination(PlayerType *player_ptr, POSITION y, POSITION x);
+bool cave_monster_teleportable_bold(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, teleport_flags mode);
+bool cave_player_teleportable_bold(PlayerType *player_ptr, POSITION y, POSITION x, teleport_flags mode);
+void place_grid(PlayerType *player_ptr, grid_type *g_ptr, grid_bold_type pg_type);
+bool darkened_grid(PlayerType *player_ptr, grid_type *g_ptr);
+void delete_monster(PlayerType *player_ptr, POSITION y, POSITION x);
+void place_bold(PlayerType *player_ptr, POSITION y, POSITION x, grid_bold_type gh_type);
void set_cave_feat(floor_type *floor_ptr, POSITION y, POSITION x, FEAT_IDX feature_idx);
-int count_dt(player_type *player_ptr, POSITION *y, POSITION *x, bool (*test)(player_type *, FEAT_IDX), bool under);
+int count_dt(PlayerType *player_ptr, POSITION *y, POSITION *x, bool (*test)(PlayerType *, FEAT_IDX), bool under);
void cave_lite_hack(floor_type *floor_ptr, POSITION y, POSITION x);
void cave_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x);
void cave_note_and_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x);
* @details
* The location must be a legal, clean, floor grid.
*/
-void place_gold(player_type *player_ptr, POSITION y, POSITION x)
+void place_gold(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
* This routine uses "object_level" for the "generation level".\n
* This routine requires a clean floor grid destination.\n
*/
-void place_object(player_type *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode)
+void place_object(PlayerType *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
#include "system/angband.h"
-struct player_type;
-void place_gold(player_type *player_ptr, POSITION y, POSITION x);
-void place_object(player_type *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
+class PlayerType;
+void place_gold(PlayerType *player_ptr, POSITION y, POSITION x);
+void place_object(PlayerType *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
* @param y 配置を試みたいマスのY座標
* @param x 配置を試みたいマスのX座標
*/
-void place_random_stairs(player_type *player_ptr, POSITION y, POSITION x)
+void place_random_stairs(PlayerType *player_ptr, POSITION y, POSITION x)
{
bool up_stairs = true;
bool down_stairs = true;
#include "system/angband.h"
struct floor_type;
-struct player_type;
-void place_random_stairs(player_type *player_ptr, POSITION y, POSITION x);
+class PlayerType;
+void place_random_stairs(PlayerType *player_ptr, POSITION y, POSITION x);
bool cave_valid_bold(floor_type *floor_ptr, POSITION y, POSITION x);
* Actually, it is not this routine, but the "trap instantiation"\n
* code, which should also check for "trap doors" on quest levels.\n
*/
-FEAT_IDX choose_random_trap(player_type *player_ptr)
+FEAT_IDX choose_random_trap(PlayerType *player_ptr)
{
FEAT_IDX feat;
* @param y 秘匿したいマスのY座標
* @param x 秘匿したいマスのX座標
*/
-void disclose_grid(player_type *player_ptr, POSITION y, POSITION x)
+void disclose_grid(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
* when they are "discovered" (by detecting them or setting them off),\n
* the trap is "instantiated" as a visible, "typed", trap.\n
*/
-void place_trap(player_type *player_ptr, POSITION y, POSITION x)
+void place_trap(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
* Always miss 5% of the time, Always hit 5% of the time.
* Otherwise, match trap power against player armor.
*/
-static int check_hit_from_monster_to_player(player_type *player_ptr, int power)
+static int check_hit_from_monster_to_player(PlayerType *player_ptr, int power)
{
int k;
ARMOUR_CLASS ac;
* @brief 落とし穴系トラップの判定とプレイヤーの被害処理
* @param trap_feat_type トラップの種別ID
*/
-static void hit_trap_pit(player_type *player_ptr, enum trap_type trap_feat_type)
+static void hit_trap_pit(PlayerType *player_ptr, enum trap_type trap_feat_type)
{
HIT_POINT dam;
concptr trap_name = "";
* @brief ダーツ系トラップ(通常ダメージ)の判定とプレイヤーの被害処理
* @return ダーツが命中した場合TRUEを返す
*/
-static bool hit_trap_dart(player_type *player_ptr)
+static bool hit_trap_dart(PlayerType *player_ptr)
{
bool hit = false;
* @brief ダーツ系トラップ(通常ダメージ+能力値減少)の判定とプレイヤーの被害処理
* @param stat 低下する能力値ID
*/
-static void hit_trap_lose_stat(player_type *player_ptr, int stat)
+static void hit_trap_lose_stat(PlayerType *player_ptr, int stat)
{
if (hit_trap_dart(player_ptr)) {
do_dec_stat(player_ptr, stat);
/*!
* @brief ダーツ系トラップ(通常ダメージ+減速)の判定とプレイヤーの被害処理
*/
-static void hit_trap_slow(player_type *player_ptr)
+static void hit_trap_slow(PlayerType *player_ptr)
{
if (hit_trap_dart(player_ptr)) {
(void)BadStatusSetter(player_ptr).mod_slowness(randint0(20) + 20, false);
* @param break_trap 作動後のトラップ破壊が確定しているならばTRUE
* @todo cmd-save.h への依存あり。コールバックで何とかしたい
*/
-void hit_trap(player_type *player_ptr, bool break_trap)
+void hit_trap(PlayerType *player_ptr, bool break_trap)
{
int i, num, dam;
POSITION x = player_ptr->x, y = player_ptr->y;
extern const std::vector<EnumClassFlagGroup<ChestTrapType>> chest_traps;
-struct player_type;
+class PlayerType;
void init_normal_traps(void);
-FEAT_IDX choose_random_trap(player_type *player_ptr);
-void disclose_grid(player_type *player_ptr, POSITION y, POSITION x);
-void place_trap(player_type *player_ptr, POSITION y, POSITION x);
-void hit_trap(player_type *player_ptr, bool break_trap);
+FEAT_IDX choose_random_trap(PlayerType *player_ptr);
+void disclose_grid(PlayerType *player_ptr, POSITION y, POSITION x);
+void place_trap(PlayerType *player_ptr, POSITION y, POSITION x);
+void hit_trap(PlayerType *player_ptr, bool break_trap);
* @details
* ダメージを受けた場合、自然回復できない。
*/
-static bool deal_damege_by_feat(player_type *player_ptr, grid_type *g_ptr, concptr msg_levitation, concptr msg_normal,
- std::function<PERCENTAGE(player_type *)> damage_rate, std::function<void(player_type *, int)> additional_effect)
+static bool deal_damege_by_feat(PlayerType *player_ptr, grid_type *g_ptr, concptr msg_levitation, concptr msg_normal,
+ std::function<PERCENTAGE(PlayerType *)> damage_rate, std::function<void(PlayerType *, int)> additional_effect)
{
feature_type *f_ptr = &f_info[g_ptr->feat];
int damage = 0;
* @brief 10ゲームターンが進行するごとにプレイヤーのHPとMPの増減処理を行う。
* / Handle timed damage and regeneration every 10 game turns
*/
-void process_player_hp_mp(player_type *player_ptr)
+void process_player_hp_mp(PlayerType *player_ptr)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x];
feature_type *f_ptr = &f_info[g_ptr->feat];
if (f_ptr->flags.has(FloorFeatureType::POISON_PUDDLE) && !is_invuln(player_ptr)) {
if (deal_damege_by_feat(player_ptr, g_ptr, _("毒気を吸い込んだ!", "The gas poisons you!"), _("に毒された!", "poisons you!"), calc_acid_damage_rate,
- [](player_type *player_ptr, int damage) {
+ [](PlayerType *player_ptr, int damage) {
if (!has_resist_pois(player_ptr))
(void)BadStatusSetter(player_ptr).mod_poison(static_cast<TIME_EFFECT>(damage));
})) {
/*
* Increase players hit points, notice effects
*/
-bool hp_player(player_type *player_ptr, int num)
+bool hp_player(PlayerType *player_ptr, int num)
{
int vir;
vir = virtue_number(player_ptr, V_VITALITY);
#pragma once
-struct player_type;
-void process_player_hp_mp(player_type *player_ptr);
-bool hp_player(player_type *player_ptr, int num);
+class PlayerType;
+void process_player_hp_mp(PlayerType *player_ptr);
+bool hp_player(PlayerType *player_ptr, int num);
* @brief プレイヤーのHP自然回復処理 / Regenerate hit points -RAK-
* @param percent 回復比率
*/
-void regenhp(player_type *player_ptr, int percent)
+void regenhp(PlayerType *player_ptr, int percent)
{
if (PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::KOUKIJIN))
return;
* @param upkeep_factor ペット維持によるMPコスト量
* @param regen_amount 回復量
*/
-void regenmana(player_type *player_ptr, MANA_POINT upkeep_factor, MANA_POINT regen_amount)
+void regenmana(PlayerType *player_ptr, MANA_POINT upkeep_factor, MANA_POINT regen_amount)
{
MANA_POINT old_csp = player_ptr->csp;
int32_t regen_rate = regen_amount * 100 - upkeep_factor * PY_REGEN_NORMAL;
* @brief 取り込んだ魔道具の自然回復処理 / Regenerate magic regen_amount: PY_REGEN_NORMAL * 2 (if resting) * 2 (if having regenarate)
* @param regen_amount 回復量
*/
-void regenmagic(player_type *player_ptr, int regen_amount)
+void regenmagic(PlayerType *player_ptr, int regen_amount)
{
auto magic_eater_data = PlayerClass(player_ptr).get_specific_data<magic_eater_data_type>();
if (!magic_eater_data) {
* @param player_ptr プレイヤーへの参照ポインタ
* @note Should probably be done during monster turns.
*/
-void regenerate_monsters(player_type *player_ptr)
+void regenerate_monsters(PlayerType *player_ptr)
{
for (int i = 1; i < player_ptr->current_floor_ptr->m_max; i++) {
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[i];
* @param player_ptr プレイヤーへの参照ポインタ
* @note Should probably be done during monster turns.
*/
-void regenerate_captured_monsters(player_type *player_ptr)
+void regenerate_captured_monsters(PlayerType *player_ptr)
{
bool heal = false;
for (int i = 0; i < INVEN_TOTAL; i++) {
extern int wild_regen;
-struct player_type;
-void regenhp(player_type *player_ptr, int percent);
-void regenmana(player_type *player_ptr, MANA_POINT upkeep_factor, MANA_POINT regen_amount);
-void regenmagic(player_type *player_ptr, int regen_amount);
-void regenerate_monsters(player_type *player_ptr);
-void regenerate_captured_monsters(player_type *player_ptr);
+class PlayerType;
+void regenhp(PlayerType *player_ptr, int percent);
+void regenmana(PlayerType *player_ptr, MANA_POINT upkeep_factor, MANA_POINT regen_amount);
+void regenmagic(PlayerType *player_ptr, int regen_amount);
+void regenerate_monsters(PlayerType *player_ptr);
+void regenerate_captured_monsters(PlayerType *player_ptr);
* @param fp
* @return エラーコード
*/
-static concptr parse_fixed_map_expression(player_type *player_ptr, char **sp, char *fp)
+static concptr parse_fixed_map_expression(PlayerType *player_ptr, char **sp, char *fp)
{
char b1 = '[';
char b2 = ']';
* @param xmax 詳細不明
* @return エラーコード
*/
-parse_error_type parse_fixed_map(player_type *player_ptr, concptr name, int ymin, int xmin, int ymax, int xmax)
+parse_error_type parse_fixed_map(PlayerType *player_ptr, concptr name, int ymin, int xmin, int ymax, int xmax)
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_EDIT, name);
#include "system/angband.h"
#include "info-reader/parse-error-types.h"
-struct player_type;
-parse_error_type parse_fixed_map(player_type *player_ptr, concptr name, int ymin, int xmin, int ymax, int xmax);
+class PlayerType;
+parse_error_type parse_fixed_map(PlayerType *player_ptr, concptr name, int ymin, int xmin, int ymax, int xmax);
* @return プレイヤーによりアイテムが選択されたならTRUEを返す
* @todo 適切な関数名をどうしても付けられなかったので暫定でauxとした
*/
-static bool check_floor_item_tag_aux(player_type *player_ptr, fis_type *fis_ptr, char *prev_tag, const ItemTester& item_tester)
+static bool check_floor_item_tag_aux(PlayerType *player_ptr, fis_type *fis_ptr, char *prev_tag, const ItemTester& item_tester)
{
if (!fis_ptr->floor || (*fis_ptr->cp >= 0))
return false;
* @param prev_tag 前回選択したアイテムのタグ (のはず)
* @return プレイヤーによりアイテムが選択されたならTRUEを返す
*/
-static bool get_floor_item_tag_inventory(player_type *player_ptr, fis_type *fis_ptr, char *prev_tag, const ItemTester& item_tester)
+static bool get_floor_item_tag_inventory(PlayerType *player_ptr, fis_type *fis_ptr, char *prev_tag, const ItemTester& item_tester)
{
bool flag = false;
item_use_flag use_flag = (*fis_ptr->cp >= INVEN_MAIN_HAND) ? USE_EQUIP : USE_INVEN;
* @param prev_tag 前回選択したアイテムのタグ (のはず)
* @return プレイヤーによりアイテムが選択されたならTRUEを返す
*/
-static bool check_floor_item_tag_inventory(player_type *player_ptr, fis_type *fis_ptr, char *prev_tag, const ItemTester& item_tester)
+static bool check_floor_item_tag_inventory(PlayerType *player_ptr, fis_type *fis_ptr, char *prev_tag, const ItemTester& item_tester)
{
if ((!fis_ptr->inven || (*fis_ptr->cp < 0) || (*fis_ptr->cp >= INVEN_PACK))
&& (!fis_ptr->equip || (*fis_ptr->cp < INVEN_MAIN_HAND) || (*fis_ptr->cp >= INVEN_TOTAL)))
* @param prev_tag 前回選択したアイテムのタグ (のはず)
* @return プレイヤーによりアイテムが選択されたならTRUEを返す
*/
-static bool check_floor_item_tag(player_type *player_ptr, fis_type *fis_ptr, char *prev_tag, const ItemTester& item_tester)
+static bool check_floor_item_tag(PlayerType *player_ptr, fis_type *fis_ptr, char *prev_tag, const ItemTester& item_tester)
{
if (!repeat_pull(fis_ptr->cp))
return false;
* @param player_ptr プレイヤーへの参照ポインタ
* @param fis_ptr 床上アイテムへの参照ポインタ
*/
-static void test_inventory_floor(player_type *player_ptr, fis_type *fis_ptr, const ItemTester& item_tester)
+static void test_inventory_floor(PlayerType *player_ptr, fis_type *fis_ptr, const ItemTester& item_tester)
{
if (!fis_ptr->inven) {
fis_ptr->i2 = -1;
* @param player_ptr プレイヤーへの参照ポインタ
* @param fis_ptr 床上アイテムへの参照ポインタ
*/
-static void test_equipment_floor(player_type *player_ptr, fis_type *fis_ptr, const ItemTester& item_tester)
+static void test_equipment_floor(PlayerType *player_ptr, fis_type *fis_ptr, const ItemTester& item_tester)
{
if (!fis_ptr->equip) {
fis_ptr->e2 = -1;
* @param mode オプションフラグ
* @return プレイヤーによりアイテムが選択されたならTRUEを返す。/
*/
-bool get_item_floor(player_type *player_ptr, COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, const ItemTester& item_tester)
+bool get_item_floor(PlayerType *player_ptr, COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, const ItemTester& item_tester)
{
fis_type tmp_fis;
fis_type *fis_ptr = initialize_fis_type(&tmp_fis, cp, mode);
#include "object/tval-types.h"
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ItemTester;
-bool get_item_floor(player_type *player_ptr, COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, const ItemTester& item_tester);
+bool get_item_floor(PlayerType *player_ptr, COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, const ItemTester& item_tester);
* @return 該当の呪いが一つでもあった場合にランダムに選ばれた装備品のオブジェクト構造体参照ポインタを返す。\n
* 呪いがない場合nullptrを返す。
*/
-object_type *choose_cursed_obj_name(player_type *player_ptr, CurseTraitType flag)
+object_type *choose_cursed_obj_name(PlayerType *player_ptr, CurseTraitType flag)
{
int choices[INVEN_TOTAL - INVEN_MAIN_HAND];
int number = 0;
* @brief 呪われている、トランプエゴ等による装備品由来のテレポートを実行する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void curse_teleport(player_type *player_ptr)
+static void curse_teleport(PlayerType *player_ptr)
{
if ((player_ptr->cursed_special.has_not(CurseSpecialTraitType::TELEPORT_SELF)) || !one_in_(200))
return;
/*!
* @details 元々呪い効果の発揮ルーチン中にいたので、整合性保持のためここに置いておく
*/
-static void occur_chainsword_effect(player_type *player_ptr)
+static void occur_chainsword_effect(PlayerType *player_ptr)
{
if ((player_ptr->cursed_special.has_not(CurseSpecialTraitType::CHAINSWORD)) || !one_in_(CHAINSWORD_NOISE))
return;
disturb(player_ptr, false, false);
}
-static void curse_drain_exp(player_type *player_ptr)
+static void curse_drain_exp(PlayerType *player_ptr)
{
if ((player_ptr->prace == PlayerRaceType::ANDROID) || (player_ptr->cursed.has_not(CurseTraitType::DRAIN_EXP)) || !one_in_(4))
return;
check_experience(player_ptr);
}
-static void multiply_low_curse(player_type *player_ptr)
+static void multiply_low_curse(PlayerType *player_ptr)
{
if ((player_ptr->cursed.has_not(CurseTraitType::ADD_L_CURSE)) || !one_in_(2000))
return;
player_ptr->update |= (PU_BONUS);
}
-static void multiply_high_curse(player_type *player_ptr)
+static void multiply_high_curse(PlayerType *player_ptr)
{
if ((player_ptr->cursed.has_not(CurseTraitType::ADD_H_CURSE)) || !one_in_(2000))
return;
player_ptr->update |= (PU_BONUS);
}
-static void curse_call_monster(player_type *player_ptr)
+static void curse_call_monster(PlayerType *player_ptr)
{
const int call_type = PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET;
const int obj_desc_type = OD_OMIT_PREFIX | OD_NAME_ONLY;
}
}
-static void curse_cowardice(player_type *player_ptr)
+static void curse_cowardice(PlayerType *player_ptr)
{
if ((player_ptr->cursed.has_not(CurseTraitType::COWARDICE)) || !one_in_(1500))
return;
* @brief 装備による狂戦士化の発作を引き起こす
* @param player_ptr プレイヤー情報への参照ポインタ
*/
-static void curse_berserk_rage(player_type *player_ptr)
+static void curse_berserk_rage(PlayerType *player_ptr)
{
if ((player_ptr->cursed.has_not(CurseTraitType::BERS_RAGE)) || !one_in_(1500))
return;
(void)BadStatusSetter(player_ptr).afraidness(0);
}
-static void curse_drain_hp(player_type *player_ptr)
+static void curse_drain_hp(PlayerType *player_ptr)
{
if ((player_ptr->cursed.has_not(CurseTraitType::DRAIN_HP)) || !one_in_(666))
return;
take_hit(player_ptr, DAMAGE_LOSELIFE, std::min(player_ptr->lev * 2, 100), o_name);
}
-static void curse_drain_mp(player_type *player_ptr)
+static void curse_drain_mp(PlayerType *player_ptr)
{
if ((player_ptr->cursed.has_not(CurseTraitType::DRAIN_MANA)) || (player_ptr->csp == 0) || !one_in_(666))
return;
player_ptr->redraw |= PR_MANA;
}
-static void occur_curse_effects(player_type *player_ptr)
+static void occur_curse_effects(PlayerType *player_ptr)
{
if ((player_ptr->cursed.has_none_of(TRC_P_FLAG_MASK) && player_ptr->cursed_special.has_none_of(TRCS_P_FLAG_MASK)) || player_ptr->phase_out
|| player_ptr->wild_mode)
* / Handle curse effects once every 10 game turns
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void execute_cursed_items_effect(player_type *player_ptr)
+void execute_cursed_items_effect(PlayerType *player_ptr)
{
occur_curse_effects(player_ptr);
if (!one_in_(999) || player_ptr->anti_magic || (one_in_(2) && has_resist_curse(player_ptr)))
#include "system/angband.h"
struct object_type;
-struct player_type;
-object_type *choose_cursed_obj_name(player_type *player_ptr, BIT_FLAGS flag);
-void execute_cursed_items_effect(player_type *player_ptr);
+class PlayerType;
+object_type *choose_cursed_obj_name(PlayerType *player_ptr, BIT_FLAGS flag);
+void execute_cursed_items_effect(PlayerType *player_ptr);
* Destruction taken from "melee.c" code for "stealing".
* New-style wands and rods handled correctly. -LM-
*/
-void inventory_damage(player_type *player_ptr, const ObjectBreaker& breaker, int perc)
+void inventory_damage(PlayerType *player_ptr, const ObjectBreaker& breaker, int perc)
{
INVENTORY_IDX i;
int j, amt;
* This seems like a pretty standard "typedef"
*/
struct object_type;
-struct player_type;
+class PlayerType;
-void inventory_damage(player_type *player_ptr, const ObjectBreaker& breaker, int perc);
+void inventory_damage(PlayerType *player_ptr, const ObjectBreaker& breaker, int perc);
* @param i 部位表現を求めるプレイヤーの所持/装備オブジェクトID
* @return 部位表現の文字列ポインタ
*/
-concptr mention_use(player_type *player_ptr, int i)
+concptr mention_use(PlayerType *player_ptr, int i)
{
concptr p;
* @details
* Currently, only used for items in the equipment, inventory.
*/
-concptr describe_use(player_type *player_ptr, int i)
+concptr describe_use(PlayerType *player_ptr, int i)
{
concptr p;
switch (i) {
#include "system/angband.h"
#include "system/player-type-definition.h"
-concptr mention_use(player_type *player_ptr, int i);
-concptr describe_use(player_type *player_ptr, int i);
+concptr mention_use(PlayerType *player_ptr, int i);
+concptr describe_use(PlayerType *player_ptr, int i);
#include "view/display-messages.h"
#include "view/object-describer.h"
-void vary_item(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num)
+void vary_item(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num)
{
if (item >= 0) {
inven_item_increase(player_ptr, item, num);
* @param item 所持数を増やしたいプレイヤーのアイテム所持スロット
* @param num 増やしたい量
*/
-void inven_item_increase(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num)
+void inven_item_increase(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num)
{
object_type *o_ptr = &player_ptr->inventory_list[item];
num += o_ptr->number;
* @param player_ptr プレイヤーへの参照ポインタ
* @param item 消去したいプレイヤーのアイテム所持スロット
*/
-void inven_item_optimize(player_type *player_ptr, INVENTORY_IDX item)
+void inven_item_optimize(PlayerType *player_ptr, INVENTORY_IDX item)
{
object_type *o_ptr = &player_ptr->inventory_list[item];
if (!o_ptr->k_idx)
* @details
* The object will be dropped "near" the current location
*/
-void drop_from_inventory(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER amt)
+void drop_from_inventory(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER amt)
{
object_type forge;
object_type *q_ptr;
* @details
* Note special handling of the "overflow" slot
*/
-void combine_pack(player_type *player_ptr)
+void combine_pack(PlayerType *player_ptr)
{
bool flag = false;
bool is_first_combination = true;
* @details
* Note special handling of the "overflow" slot
*/
-void reorder_pack(player_type *player_ptr)
+void reorder_pack(PlayerType *player_ptr)
{
int i, j, k;
int32_t o_value;
* Note that this code must remove any location/stack information\n
* from the object once it is placed into the inventory.\n
*/
-int16_t store_item_to_inventory(player_type *player_ptr, object_type *o_ptr)
+int16_t store_item_to_inventory(PlayerType *player_ptr, object_type *o_ptr)
{
INVENTORY_IDX i, j, k;
INVENTORY_IDX n = -1;
* @param o_ptr 拾いたいオブジェクトの構造体参照ポインタ
* @return 溢れずに済むならTRUEを返す
*/
-bool check_store_item_to_inventory(player_type *player_ptr, const object_type *o_ptr)
+bool check_store_item_to_inventory(PlayerType *player_ptr, const object_type *o_ptr)
{
if (player_ptr->inven_cnt < INVEN_PACK)
return true;
* to fall to the ground.\n
* Return the inventory slot into which the item is placed.\n
*/
-INVENTORY_IDX inven_takeoff(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER amt)
+INVENTORY_IDX inven_takeoff(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER amt)
{
INVENTORY_IDX slot;
object_type forge;
#include "system/angband.h"
struct object_type;
-struct player_type;
-void vary_item(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
-void inven_item_increase(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
-void inven_item_optimize(player_type *player_ptr, INVENTORY_IDX item);
-void drop_from_inventory(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER amt);
-void combine_pack(player_type *player_ptr);
-void reorder_pack(player_type *player_ptr);
-int16_t store_item_to_inventory(player_type *player_ptr, object_type *o_ptr);
-bool check_store_item_to_inventory(player_type *player_ptr, const object_type *o_ptr);
-INVENTORY_IDX inven_takeoff(player_type *player_ptr, INVENTORY_IDX item, ITEM_NUMBER amt);
+class PlayerType;
+void vary_item(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
+void inven_item_increase(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
+void inven_item_optimize(PlayerType *player_ptr, INVENTORY_IDX item);
+void drop_from_inventory(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER amt);
+void combine_pack(PlayerType *player_ptr);
+void reorder_pack(PlayerType *player_ptr);
+int16_t store_item_to_inventory(PlayerType *player_ptr, object_type *o_ptr);
+bool check_store_item_to_inventory(PlayerType *player_ptr, const object_type *o_ptr);
+INVENTORY_IDX inven_takeoff(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER amt);
* Also, the tag "@xn" will work as well, where "n" is a any tag-char,\n
* and "x" is the "current" command_cmd code.\n
*/
-bool get_tag(player_type *player_ptr, COMMAND_CODE *cp, char tag, BIT_FLAGS mode, const ItemTester& item_tester)
+bool get_tag(PlayerType *player_ptr, COMMAND_CODE *cp, char tag, BIT_FLAGS mode, const ItemTester& item_tester)
{
COMMAND_CODE start, end;
switch (mode) {
* @param i 選択アイテムID
* @return 正規のIDならばTRUEを返す。
*/
-bool get_item_okay(player_type *player_ptr, OBJECT_IDX i, const ItemTester& item_tester)
+bool get_item_okay(PlayerType *player_ptr, OBJECT_IDX i, const ItemTester& item_tester)
{
if ((i < 0) || (i >= INVEN_TOTAL))
return false;
* @details The item can be negative to mean "item on floor".
* Hack -- allow user to "prevent" certain choices
*/
-bool get_item_allow(player_type *player_ptr, INVENTORY_IDX item)
+bool get_item_allow(PlayerType *player_ptr, INVENTORY_IDX item)
{
if (!command_cmd)
return true;
* Convert a label into the index of a item in the "equip"
* @return 対応するID。該当スロットにオブジェクトが存在しなかった場合-1を返す / Return "-1" if the label does not indicate a real item
*/
-INVENTORY_IDX label_to_equipment(player_type *player_ptr, int c)
+INVENTORY_IDX label_to_equipment(PlayerType *player_ptr, int c)
{
INVENTORY_IDX i = (INVENTORY_IDX)(islower(c) ? A2I(c) : -1) + INVEN_MAIN_HAND;
* @return 対応するID。該当スロットにオブジェクトが存在しなかった場合-1を返す / Return "-1" if the label does not indicate a real item
* @details Note that the label does NOT distinguish inven/equip.
*/
-INVENTORY_IDX label_to_inventory(player_type *player_ptr, int c)
+INVENTORY_IDX label_to_inventory(PlayerType *player_ptr, int c)
{
INVENTORY_IDX i = (INVENTORY_IDX)(islower(c) ? A2I(c) : -1);
* @return 確認がYesならTRUEを返す。
* @details The item can be negative to mean "item on floor".
*/
-bool verify(player_type *player_ptr, concptr prompt, INVENTORY_IDX item)
+bool verify(PlayerType *player_ptr, concptr prompt, INVENTORY_IDX item)
{
GAME_TEXT o_name[MAX_NLEN];
char out_val[MAX_NLEN + 20];
* @param label ラベルリストを取得する文字列参照ポインタ
* @param mode 所持品リストか装備品リストかの切り替え
*/
-void prepare_label_string(player_type *player_ptr, char *label, BIT_FLAGS mode, const ItemTester& item_tester)
+void prepare_label_string(PlayerType *player_ptr, char *label, BIT_FLAGS mode, const ItemTester& item_tester)
{
concptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
int offset = (mode == USE_EQUIP) ? INVEN_MAIN_HAND : 0;
#include "system/angband.h"
struct floor_type;
-struct player_type;
+class PlayerType;
class ItemTester;
bool is_ring_slot(int i);
bool get_tag_floor(floor_type *floor_ptr, COMMAND_CODE *cp, char tag, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num);
-bool get_tag(player_type *player_ptr, COMMAND_CODE *cp, char tag, BIT_FLAGS mode, const ItemTester& item_tester);
-bool get_item_okay(player_type *player_ptr, OBJECT_IDX i, const ItemTester& item_tester);
-bool get_item_allow(player_type *player_ptr, INVENTORY_IDX item);
-INVENTORY_IDX label_to_equipment(player_type *player_ptr, int c);
-INVENTORY_IDX label_to_inventory(player_type *player_ptr, int c);
-bool verify(player_type *player_ptr, concptr prompt, INVENTORY_IDX item);
-void prepare_label_string(player_type *player_ptr, char *label, BIT_FLAGS mode, const ItemTester& item_tester);
+bool get_tag(PlayerType *player_ptr, COMMAND_CODE *cp, char tag, BIT_FLAGS mode, const ItemTester& item_tester);
+bool get_item_okay(PlayerType *player_ptr, OBJECT_IDX i, const ItemTester& item_tester);
+bool get_item_allow(PlayerType *player_ptr, INVENTORY_IDX item);
+INVENTORY_IDX label_to_equipment(PlayerType *player_ptr, int c);
+INVENTORY_IDX label_to_inventory(PlayerType *player_ptr, int c);
+bool verify(PlayerType *player_ptr, concptr prompt, INVENTORY_IDX item);
+void prepare_label_string(PlayerType *player_ptr, char *label, BIT_FLAGS mode, const ItemTester& item_tester);
* @return プレイヤーによりアイテムが選択されたならTRUEを返す
* @todo 適切な関数名をどうしても付けられなかったので暫定でauxとした
*/
-static bool check_item_tag_aux(player_type *player_ptr, item_selection_type *item_selection_ptr, const ItemTester& item_tester)
+static bool check_item_tag_aux(PlayerType *player_ptr, item_selection_type *item_selection_ptr, const ItemTester& item_tester)
{
if (!item_selection_ptr->floor || (*item_selection_ptr->cp >= 0))
return false;
* @param prev_tag 前回選択したアイテムのタグ (のはず)
* @return プレイヤーによりアイテムが選択されたならTRUEを返す
*/
-static bool check_item_tag_inventory(player_type *player_ptr, item_selection_type *item_selection_ptr, char *prev_tag, const ItemTester& item_tester)
+static bool check_item_tag_inventory(PlayerType *player_ptr, item_selection_type *item_selection_ptr, char *prev_tag, const ItemTester& item_tester)
{
if ((!item_selection_ptr->inven || (*item_selection_ptr->cp < 0) || (*item_selection_ptr->cp >= INVEN_PACK))
&& (!item_selection_ptr->equip || (*item_selection_ptr->cp < INVEN_MAIN_HAND) || (*item_selection_ptr->cp >= INVEN_TOTAL)))
* @param prev_tag 前回選択したアイテムのタグ (のはず)
* @return プレイヤーによりアイテムが選択されたならTRUEを返す
*/
-static bool check_item_tag(player_type *player_ptr, item_selection_type *item_selection_ptr, char *prev_tag, const ItemTester& item_tester)
+static bool check_item_tag(PlayerType *player_ptr, item_selection_type *item_selection_ptr, char *prev_tag, const ItemTester& item_tester)
{
if (!repeat_pull(item_selection_ptr->cp))
return false;
* @param player_ptr プレイヤーへの参照ポインタ
* @param fis_ptr アイテム選択への参照ポインタ
*/
-static void test_inventory(player_type *player_ptr, item_selection_type *item_selection_ptr, const ItemTester& item_tester)
+static void test_inventory(PlayerType *player_ptr, item_selection_type *item_selection_ptr, const ItemTester& item_tester)
{
if (!item_selection_ptr->inven) {
item_selection_ptr->i2 = -1;
* @param player_ptr プレイヤーへの参照ポインタ
* @param fis_ptr アイテム選択への参照ポインタ
*/
-static void test_equipment(player_type *player_ptr, item_selection_type *item_selection_ptr, const ItemTester& item_tester)
+static void test_equipment(PlayerType *player_ptr, item_selection_type *item_selection_ptr, const ItemTester& item_tester)
{
if (!item_selection_ptr->equip) {
item_selection_ptr->e2 = -1;
* @return プレイヤーによりアイテムが選択されたならTRUEを返す
* Return TRUE only if an acceptable item was chosen by the user
*/
-bool get_item(player_type *player_ptr, OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, const ItemTester& item_tester)
+bool get_item(PlayerType *player_ptr, OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, const ItemTester& item_tester)
{
static char prev_tag = '\0';
if (easy_floor || use_menu)
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ItemTester;
-bool get_item(player_type *player_ptr, OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, const ItemTester& item_tester);
+bool get_item(PlayerType *player_ptr, OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, const ItemTester& item_tester);
/*!
* @brief アイテムの所持種類数が超えた場合にアイテムを床に落とす処理
*/
-void pack_overflow(player_type *player_ptr)
+void pack_overflow(PlayerType *player_ptr)
{
if (player_ptr->inventory_list[INVEN_PACK].k_idx == 0)
return;
#pragma once
-struct player_type;
-void pack_overflow(player_type *player_ptr);
+class PlayerType;
+void pack_overflow(PlayerType *player_ptr);
* @return アイテムを拾えるならばTRUEを返す。
* @details assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
*/
-bool can_get_item(player_type *player_ptr, const ItemTester& item_tester)
+bool can_get_item(PlayerType *player_ptr, const ItemTester& item_tester)
{
for (int j = 0; j < INVEN_TOTAL; j++)
if (item_tester.okay(&player_ptr->inventory_list[j]))
* @brief 床上のアイテムを拾う選択用サブルーチン
* @return プレイヤーによりアイテムが選択されたならTRUEを返す。
*/
-static bool py_pickup_floor_aux(player_type *player_ptr)
+static bool py_pickup_floor_aux(PlayerType *player_ptr)
{
OBJECT_IDX this_o_idx;
OBJECT_IDX item;
* @details
* This is called by py_pickup() when easy_floor is TRUE.
*/
-void py_pickup_floor(player_type *player_ptr, bool pickup)
+void py_pickup_floor(PlayerType *player_ptr, bool pickup)
{
GAME_TEXT o_name[MAX_NLEN];
object_type *o_ptr;
* Add the given dungeon object to the character's inventory.\n
* Delete the object afterwards.\n
*/
-void describe_pickup_item(player_type *player_ptr, OBJECT_IDX o_idx)
+void describe_pickup_item(PlayerType *player_ptr, OBJECT_IDX o_idx)
{
#ifdef JP
GAME_TEXT o_name[MAX_NLEN];
* @param player_ptr プレイヤーへの参照ポインタ
* @param pickup 自動拾い処理を行うならばTRUEとする
*/
-void carry(player_type *player_ptr, bool pickup)
+void carry(PlayerType *player_ptr, bool pickup)
{
verify_panel(player_ptr);
player_ptr->update |= PU_MONSTERS;
#include "object/tval-types.h"
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ItemTester;
-bool can_get_item(player_type *player_ptr, const ItemTester& item_tester);
-void py_pickup_floor(player_type *player_ptr, bool pickup);
-void describe_pickup_item(player_type *player_ptr, OBJECT_IDX o_idx);
-void carry(player_type *player_ptr, bool pickup);
+bool can_get_item(PlayerType *player_ptr, const ItemTester& item_tester);
+void py_pickup_floor(PlayerType *player_ptr, bool pickup);
+void describe_pickup_item(PlayerType *player_ptr, OBJECT_IDX o_idx);
+void carry(PlayerType *player_ptr, bool pickup);
* If player has inscribed the object with "!!", let him know when it's recharged. -LM-
* @param o_ptr 対象オブジェクトの構造体参照ポインタ
*/
-static void recharged_notice(player_type *player_ptr, object_type *o_ptr)
+static void recharged_notice(PlayerType *player_ptr, object_type *o_ptr)
{
if (!o_ptr->inscription)
return;
* @brief 10ゲームターンが進行するごとに魔道具の自然充填を行う処理
* / Handle recharging objects once every 10 game turns
*/
-void recharge_magic_items(player_type *player_ptr)
+void recharge_magic_items(PlayerType *player_ptr)
{
int i;
bool changed;
#pragma once
-struct player_type;
-void recharge_magic_items(player_type *player_ptr);
+class PlayerType;
+void recharge_magic_items(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_pet(player_type *player_ptr, FILE *fff)
+static void dump_aux_pet(PlayerType *player_ptr, FILE *fff)
{
bool pet = false;
bool pet_settings = false;
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_quest(player_type *player_ptr, FILE *fff)
+static void dump_aux_quest(PlayerType *player_ptr, FILE *fff)
{
fprintf(fff, _("\n\n [クエスト情報]\n", "\n\n [Quest Information]\n"));
std::vector<QUEST_IDX> quest_num(max_q_idx);
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_last_message(player_type *player_ptr, FILE *fff)
+static void dump_aux_last_message(PlayerType *player_ptr, FILE *fff)
{
if (!player_ptr->is_dead)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_arena(player_type *player_ptr, FILE *fff)
+static void dump_aux_arena(PlayerType *player_ptr, FILE *fff)
{
if (lite_town || vanilla_town)
return;
* @brief 撃破モンスターの情報をファイルにダンプする
* @param fff ファイルポインタ
*/
-static void dump_aux_monsters(player_type *player_ptr, FILE *fff)
+static void dump_aux_monsters(PlayerType *player_ptr, FILE *fff)
{
fprintf(fff, _("\n [倒したモンスター]\n\n", "\n [Defeated Monsters]\n\n"));
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_race_history(player_type *player_ptr, FILE *fff)
+static void dump_aux_race_history(PlayerType *player_ptr, FILE *fff)
{
if (!player_ptr->old_race1 && !player_ptr->old_race2)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_realm_history(player_type *player_ptr, FILE *fff)
+static void dump_aux_realm_history(PlayerType *player_ptr, FILE *fff)
{
if (player_ptr->old_realm == 0)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_virtues(player_type *player_ptr, FILE *fff)
+static void dump_aux_virtues(PlayerType *player_ptr, FILE *fff)
{
fprintf(fff, _("\n\n [自分に関する情報]\n\n", "\n\n [HP-rate & Max stat & Virtues]\n\n"));
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_mutations(player_type *player_ptr, FILE *fff)
+static void dump_aux_mutations(PlayerType *player_ptr, FILE *fff)
{
if (player_ptr->muta.any()) {
fprintf(fff, _("\n\n [突然変異]\n\n", "\n\n [Mutations]\n\n"));
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_aux_equipment_inventory(player_type *player_ptr, FILE *fff)
+static void dump_aux_equipment_inventory(PlayerType *player_ptr, FILE *fff)
{
GAME_TEXT o_name[MAX_NLEN];
if (player_ptr->equip_cnt) {
* @brief 我が家と博物館のオブジェクト情報をファイルにダンプする
* @param fff ファイルポインタ
*/
-static void dump_aux_home_museum(player_type *player_ptr, FILE *fff)
+static void dump_aux_home_museum(PlayerType *player_ptr, FILE *fff)
{
store_type *store_ptr;
store_ptr = &town_info[1].store[enum2i(StoreSaleType::HOME)];
* @param fff ファイルポインタ
* @return エラーコード
*/
-void make_character_dump(player_type *player_ptr, FILE *fff, display_player_pf display_player)
+void make_character_dump(PlayerType *player_ptr, FILE *fff, display_player_pf display_player)
{
char title[127];
put_version(title);
#include "system/angband.h"
#include "io/files-util.h"
-struct player_type;
-void make_character_dump(player_type *player_ptr, FILE *fff, display_player_pf display_player);
+class PlayerType;
+void make_character_dump(PlayerType *player_ptr, FILE *fff, display_player_pf display_player);
* @param change_color バッファへ詰める文字の変更有無
*/
static void dump_player_status_with_screen_num(
- player_type *player_ptr, FILE *fff, display_player_pf display_player,
+ PlayerType *player_ptr, FILE *fff, display_player_pf display_player,
int screen_num, TERM_LEN start_y, TERM_LEN end_y, bool change_color)
{
TERM_COLOR a;
* @param fff ファイルポインタ
* @param display_player 画面表示へのコールバック
*/
-void dump_aux_player_status(player_type *player_ptr, FILE *fff, display_player_pf display_player)
+void dump_aux_player_status(PlayerType *player_ptr, FILE *fff, display_player_pf display_player)
{
dump_player_status_with_screen_num(player_ptr, fff, display_player, 0, 1, 22, false);
dump_player_status_with_screen_num(player_ptr, fff, display_player, 1, 10, 19, false);
#include "system/angband.h"
#include "io/files-util.h"
-struct player_type;
-void dump_aux_player_status(player_type *player_ptr, FILE *fff, display_player_pf display_player);
+class PlayerType;
+void dump_aux_player_status(PlayerType *player_ptr, FILE *fff, display_player_pf display_player);
* @param o_ptr ランダムアーティファクトのオブジェクト構造体参照ポインタ
* @param tval 出力したいランダムアーティファクトの種類
*/
-static void spoil_random_artifact_aux(player_type *player_ptr, object_type *o_ptr, ItemKindType tval)
+static void spoil_random_artifact_aux(PlayerType *player_ptr, object_type *o_ptr, ItemKindType tval)
{
obj_desc_list artifact;
if (!o_ptr->is_known() || !o_ptr->art_name || o_ptr->tval != tval)
* Create a list file for random artifacts
* @param fname 出力ファイル名
*/
-void spoil_random_artifact(player_type *player_ptr, concptr fname)
+void spoil_random_artifact(PlayerType *player_ptr, concptr fname)
{
store_type *store_ptr;
object_type *q_ptr;
#include "system/angband.h"
-struct player_type;
-void spoil_random_artifact(player_type *player_ptr, concptr fname);
+class PlayerType;
+void spoil_random_artifact(PlayerType *player_ptr, concptr fname);
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_magic_eater(player_type *player_ptr, FILE *fff)
+static void dump_magic_eater(PlayerType *player_ptr, FILE *fff)
{
auto magic_eater_data = PlayerClass(player_ptr).get_specific_data<magic_eater_data_type>();
if (!magic_eater_data) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_smith(player_type *player_ptr, FILE *fff)
+static void dump_smith(PlayerType *player_ptr, FILE *fff)
{
fprintf(fff, _("\n\n [手に入れたエッセンス]\n\n", "\n\n [Get Essence]\n\n"));
fprintf(fff, _("エッセンス 個数 エッセンス 個数 エッセンス 個数", "Essence Num Essence Num Essence Num "));
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_blue_mage(player_type *player_ptr, FILE *fff)
+static void dump_blue_mage(PlayerType *player_ptr, FILE *fff)
{
const auto bluemage_data = PlayerClass(player_ptr).get_specific_data<bluemage_data_type>();
if (!bluemage_data) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-void dump_aux_class_special(player_type *player_ptr, FILE *fff)
+void dump_aux_class_special(PlayerType *player_ptr, FILE *fff)
{
switch (player_ptr->pclass) {
case PlayerClassType::MAGIC_EATER: {
#include "system/angband.h"
-struct player_type;
-void dump_aux_class_special(player_type *player_ptr, FILE *fff);
+class PlayerType;
+void dump_aux_class_special(PlayerType *player_ptr, FILE *fff);
* @param y 目標地点のY座標
* @param x 目標地点のX座標
*/
-void print_path(player_type *player_ptr, POSITION y, POSITION x)
+void print_path(PlayerType *player_ptr, POSITION y, POSITION x)
{
uint16_t path_g[512];
byte default_color = TERM_SLATE;
* Also used in do_cmd_locate
* @return 実際に再描画が必要だった場合TRUEを返す
*/
-bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx)
+bool change_panel(PlayerType *player_ptr, POSITION dy, POSITION dx)
{
TERM_LEN wid, hgt;
get_screen_size(&wid, &hgt);
#include "system/angband.h"
-struct player_type;
+class PlayerType;
void move_cursor_relative(int row, int col);
-void print_path(player_type *player_ptr, POSITION y, POSITION x);
-bool change_panel(player_type *player_ptr, POSITION dy, POSITION dx);
+void print_path(PlayerType *player_ptr, POSITION y, POSITION x);
+bool change_panel(PlayerType *player_ptr, POSITION dy, POSITION dx);
void panel_bounds_center(void);
* This routine is called only in very rare situations, and only
* by certain visual systems, when they experience fatal errors.
*/
-void exit_game_panic(player_type *player_ptr)
+void exit_game_panic(PlayerType *player_ptr)
{
if (!w_ptr->character_generated || w_ptr->character_saved)
quit(_("緊急事態", "panic"));
#include "system/angband.h"
-struct player_type;
-void exit_game_panic(player_type *player_ptr);
+class PlayerType;
+void exit_game_panic(PlayerType *player_ptr);
* Allow the "full" flag to dump additional info,
* and trigger its usage from various places in the code.
*/
-errr file_character(player_type *player_ptr, concptr name, display_player_pf display_player)
+errr file_character(PlayerType *player_ptr, concptr name, display_player_pf display_player)
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
* @return エラーコード
* @details
*/
-static errr counts_seek(player_type *player_ptr, int fd, uint32_t where, bool flag)
+static errr counts_seek(PlayerType *player_ptr, int fd, uint32_t where, bool flag)
{
char temp1[128], temp2[128];
auto short_pclass = enum2i(player_ptr->pclass);
* @return エラーコード
* @details
*/
-uint32_t counts_read(player_type *player_ptr, int where)
+uint32_t counts_read(PlayerType *player_ptr, int where)
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_DATA, _("z_info_j.raw", "z_info.raw"));
* @return エラーコード
* @details
*/
-errr counts_write(player_type *player_ptr, int where, uint32_t count)
+errr counts_write(PlayerType *player_ptr, int where, uint32_t count)
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_DATA, _("z_info_j.raw", "z_info.raw"));
extern concptr ANGBAND_DIR_USER;
extern concptr ANGBAND_DIR_XTRA;
-struct player_type;
-typedef void (*display_player_pf)(player_type *, int);
+class PlayerType;
+typedef void (*display_player_pf)(PlayerType *, int);
typedef void(*update_playtime_pf)(void);
-extern errr file_character(player_type *player_ptr, concptr name, display_player_pf display_player);
+extern errr file_character(PlayerType *player_ptr, concptr name, display_player_pf display_player);
extern errr get_rnd_line(concptr file_name, int entry, char *output);
void read_dead_file(char* buf, size_t buf_size);
#ifdef JP
extern errr get_rnd_line_jonly(concptr file_name, int entry, char *output, int count);
#endif
-extern errr counts_write(player_type *player_ptr, int where, uint32_t count);
-extern uint32_t counts_read(player_type *player_ptr, int where);
+extern errr counts_write(PlayerType *player_ptr, int where, uint32_t count);
+extern uint32_t counts_read(PlayerType *player_ptr, int where);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 実際にデバッグコマンドへ移行したらTRUEを返す。
*/
-static bool enter_debug_mode(player_type *player_ptr)
+static bool enter_debug_mode(PlayerType *player_ptr)
{
if (!w_ptr->noscore) {
if (!allow_debug_options) {
* / Parse and execute the current command Give "Warning" on illegal commands.
* @todo Make some "blocks"
*/
-void process_command(player_type *player_ptr)
+void process_command(PlayerType *player_ptr)
{
COMMAND_CODE old_now_message = now_message;
repeat_check();
#pragma once
-struct player_type;
-void process_command(player_type* player_ptr);
+class PlayerType;
+void process_command(PlayerType* player_ptr);
*/
static char request_command_buffer[256];
-static char inkey_from_menu(player_type *player_ptr)
+static char inkey_from_menu(PlayerType *player_ptr)
{
char cmd;
int basey, basex;
*
* Note that "player_ptr->command_new" may not work any more.
*/
-void request_command(player_type *player_ptr, int shopping)
+void request_command(PlayerType *player_ptr, int shopping)
{
int16_t cmd;
int mode;
extern int16_t command_wrk;
extern int16_t command_new;
-struct player_type;
-void request_command(player_type *player_ptr, int shopping);
+class PlayerType;
+void request_command(PlayerType *player_ptr, int shopping);
* Process "X:<str>" -- turn option off
* Process "Y:<str>" -- turn option on
*/
-static errr interpret_xy_token(player_type *player_ptr, char *buf)
+static errr interpret_xy_token(PlayerType *player_ptr, char *buf)
{
for (int i = 0; option_info[i].o_desc; i++) {
bool is_option = option_info[i].o_var != nullptr;
* used for the "nothing" attr/char.
* </pre>
*/
-errr interpret_pref_file(player_type *player_ptr, char *buf)
+errr interpret_pref_file(PlayerType *player_ptr, char *buf)
{
if (buf[1] != ':')
return 1;
extern char *histpref_buf;
-struct player_type;
-errr interpret_pref_file(player_type *player_ptr, char *buf);
+class PlayerType;
+errr interpret_pref_file(PlayerType *player_ptr, char *buf);
void add_history_from_pref_line(concptr t);
* @brief ファイルポインタを通じて突然変異の一覧を出力する
* @param out_file 出力先ファイルポインタ
*/
-void dump_mutations(player_type *player_ptr, FILE *out_file)
+void dump_mutations(PlayerType *player_ptr, FILE *out_file)
{
if (!out_file)
return;
#include "system/angband.h"
-struct player_type;
-void dump_mutations(player_type *player_ptr, FILE *out_file);
+class PlayerType;
+void dump_mutations(PlayerType *player_ptr, FILE *out_file);
* result
* </pre>
*/
-concptr process_pref_file_expr(player_type *player_ptr, char **sp, char *fp)
+concptr process_pref_file_expr(PlayerType *player_ptr, char **sp, char *fp)
{
char *s;
s = (*sp);
#include "system/angband.h"
-struct player_type;
-concptr process_pref_file_expr(player_type *player_ptr, char **sp, char *fp);
+class PlayerType;
+concptr process_pref_file_expr(PlayerType *player_ptr, char **sp, char *fp);
* @return エラーコード
* @todo 関数名を変更する
*/
-static errr process_pref_file_aux(player_type *player_ptr, concptr name, int preftype)
+static errr process_pref_file_aux(PlayerType *player_ptr, concptr name, int preftype)
{
FILE *fp;
fp = angband_fopen(name, "r");
* allow conditional evaluation and filename inclusion.
* </pre>
*/
-errr process_pref_file(player_type *player_ptr, concptr name, bool only_user_dir)
+errr process_pref_file(PlayerType *player_ptr, concptr name, bool only_user_dir)
{
char buf[1024];
errr err1 = 0;
* @param name ファイル名
* @details
*/
-errr process_autopick_file(player_type *player_ptr, concptr name)
+errr process_autopick_file(PlayerType *player_ptr, concptr name)
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
* @return エラーコード
* @details
*/
-errr process_histpref_file(player_type *player_ptr, concptr name)
+errr process_histpref_file(PlayerType *player_ptr, concptr name)
{
bool old_character_xtra = w_ptr->character_xtra;
char buf[1024];
* Modified by Arcum Dagsson to support
* separate macro files for different realms.
*/
-void load_all_pref_files(player_type *player_ptr)
+void load_all_pref_files(PlayerType *player_ptr)
{
char buf[1024];
sprintf(buf, "user.prf");
/*!
* @brief 生い立ちメッセージをファイルからロードする。
*/
-bool read_histpref(player_type *player_ptr)
+bool read_histpref(PlayerType *player_ptr)
{
char buf[80];
errr err;
extern char auto_dump_header[];
extern char auto_dump_footer[];
-struct player_type;
-errr process_pref_file(player_type *player_ptr, concptr name, bool only_user_dir = false);
-errr process_autopick_file(player_type *player_ptr, concptr name);
-errr process_histpref_file(player_type *player_ptr, concptr name);
-bool read_histpref(player_type *player_ptr);
+class PlayerType;
+errr process_pref_file(PlayerType *player_ptr, concptr name, bool only_user_dir = false);
+errr process_autopick_file(PlayerType *player_ptr, concptr name);
+errr process_histpref_file(PlayerType *player_ptr, concptr name);
+bool read_histpref(PlayerType *player_ptr);
void auto_dump_printf(FILE *auto_dump_stream, concptr fmt, ...);
bool open_auto_dump(FILE **fpp, concptr buf, concptr mark);
void close_auto_dump(FILE **fpp, concptr auto_dump_mark);
-void load_all_pref_files(player_type* player_ptr);
+void load_all_pref_files(PlayerType* player_ptr);
/*
* Prepare z-term hooks to call send_*_to_chuukei_server()'s
*/
-void prepare_movie_hooks(player_type *player_ptr)
+void prepare_movie_hooks(PlayerType *player_ptr)
{
char buf[1024];
char tmp[80];
#include "system/angband.h"
-struct player_type;
-void prepare_movie_hooks(player_type *player_ptr);
+class PlayerType;
+void prepare_movie_hooks(PlayerType *player_ptr);
void prepare_browse_movie_without_path_build(concptr filename);
void browse_movie(void);
#ifndef WINDOWS
* @param dumpbuf 伝送内容バッファ
* @return エラーコード
*/
-static errr make_dump(player_type *player_ptr, BUF *dumpbuf, display_player_pf display_player)
+static errr make_dump(PlayerType *player_ptr, BUF *dumpbuf, display_player_pf display_player)
{
char buf[1024];
FILE *fff;
* @brief スクリーンダンプを作成する/ Make screen dump to buffer
* @return 作成したスクリーンダンプの参照ポインタ
*/
-concptr make_screen_dump(player_type *player_ptr)
+concptr make_screen_dump(PlayerType *player_ptr)
{
static concptr html_head[] = {
"<html>\n<body text=\"#ffffff\" bgcolor=\"#000000\">\n",
* @param player_ptr プレイヤーへの参照ポインタ
* @return 正常にスコアを送信できたらtrue、失敗時に送信を中止したらfalse
*/
-bool report_score(player_type *player_ptr, display_player_pf display_player)
+bool report_score(PlayerType *player_ptr, display_player_pf display_player)
{
auto *score = buf_new();
char personality_desc[128];
#ifdef WORLD_SCORE
#include "io/files-util.h"
-struct player_type;
-bool report_score(player_type *player_ptr, display_player_pf display_player);
-concptr make_screen_dump(player_type *player_ptr);
+class PlayerType;
+bool report_score(PlayerType *player_ptr, display_player_pf display_player);
+concptr make_screen_dump(PlayerType *player_ptr);
#endif
/*!
* @brief コンソールのリサイズに合わせてマップを再描画する /
* Map resizing whenever the main term changes size
- * @todo ここにplayer_type を追加するとz-termに影響が行くので保留
+ * @todo ここにPlayerType を追加するとz-termに影響が行くので保留
*/
void resize_map()
{
* To prevent messy accidents, we should reset this global variable
* whenever the user enters a keypress, or something like that.
* </pre>
- * @todo ここにplayer_typeを追加すると関数ポインタ周りの収拾がつかなくなるので保留
+ * @todo ここにPlayerTypeを追加すると関数ポインタ周りの収拾がつかなくなるので保留
*/
static void handle_signal_simple(int sig)
{
/*!
* @brief ファイルのグラブパーミッションチェック / Hack -- grab permissions
*/
-void safe_setuid_grab(player_type *player_ptr)
+void safe_setuid_grab(PlayerType *player_ptr)
{
#ifdef SET_UID
#ifdef SAFE_SETUID
#pragma once
-struct player_type;
+class PlayerType;
void safe_setuid_drop(void);
-void safe_setuid_grab(player_type *player_ptr);
+void safe_setuid_grab(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return クエストID
*/
-static QUEST_IDX write_floor(player_type *player_ptr, concptr *note_level, char *note_level_buf)
+static QUEST_IDX write_floor(PlayerType *player_ptr, concptr *note_level, char *note_level_buf)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
QUEST_IDX q_idx = quest_number(player_ptr, floor_ptr->dun_level);
* @param note 日記内容のIDに応じた文字列参照ポインタ
* @return エラーコード
*/
-errr exe_write_diary(player_type *player_ptr, int type, int num, concptr note)
+errr exe_write_diary(PlayerType *player_ptr, int type, int num, concptr note)
{
static bool disable_diary = false;
extern bool write_level;
-struct player_type;
+class PlayerType;
#ifdef JP
#else
concptr get_ordinal_number_suffix(int num);
#endif
-errr exe_write_diary(player_type *player_ptr, int type, int num, concptr note);
+errr exe_write_diary(PlayerType *player_ptr, int type, int num, concptr note);
* @brief 自動拾い設定ファイルをロードするコマンドのメインルーチン /
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_reload_autopick(player_type *player_ptr)
+void do_cmd_reload_autopick(PlayerType *player_ptr)
{
if (!get_check(_("自動拾い設定ファイルをロードしますか? ", "Reload auto-pick preference file? ")))
return;
/*
* Check the status of "autopick"
*/
-void do_cmd_knowledge_autopick(player_type *player_ptr)
+void do_cmd_knowledge_autopick(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
#pragma once
-struct player_type;
-void do_cmd_reload_autopick(player_type *player_ptr);
-void do_cmd_knowledge_autopick(player_type *player_ptr);
+class PlayerType;
+void do_cmd_reload_autopick(PlayerType *player_ptr);
+void do_cmd_knowledge_autopick(PlayerType *player_ptr);
/*
* Display weapon-exp
*/
-void do_cmd_knowledge_weapon_exp(player_type *player_ptr)
+void do_cmd_knowledge_weapon_exp(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
* @brief 魔法の経験値を表示するコマンドのメインルーチン
* Display spell-exp
*/
-void do_cmd_knowledge_spell_exp(player_type *player_ptr)
+void do_cmd_knowledge_spell_exp(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
* @brief スキル情報を表示するコマンドのメインルーチン /
* Display skill-exp
*/
-void do_cmd_knowledge_skill_exp(player_type *player_ptr)
+void do_cmd_knowledge_skill_exp(PlayerType *player_ptr)
{
FILE *fff = nullptr;
char file_name[FILE_NAME_SIZE];
#pragma once
-struct player_type;
-void do_cmd_knowledge_weapon_exp(player_type *player_ptr);
-void do_cmd_knowledge_spell_exp(player_type *player_ptr);
-void do_cmd_knowledge_skill_exp(player_type *player_ptr);
+class PlayerType;
+void do_cmd_knowledge_weapon_exp(PlayerType *player_ptr);
+void do_cmd_knowledge_spell_exp(PlayerType *player_ptr);
+void do_cmd_knowledge_skill_exp(PlayerType *player_ptr);
/*
* Dungeon
*/
-void do_cmd_knowledge_dungeon(player_type *player_ptr)
+void do_cmd_knowledge_dungeon(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
#include "system/angband.h"
-struct player_type;
+class PlayerType;
void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f_idx, IDX *lighting_level);
-void do_cmd_knowledge_dungeon(player_type *player_ptr);
+void do_cmd_knowledge_dungeon(PlayerType *player_ptr);
* @param o_ptr アイテムへの参照ポインタ
* @param where アイテムの場所 (手持ち、家等) を示す文字列への参照ポインタ
*/
-static void do_cmd_knowledge_inventory_aux(player_type *player_ptr, FILE *fff, object_type *o_ptr, char *where)
+static void do_cmd_knowledge_inventory_aux(PlayerType *player_ptr, FILE *fff, object_type *o_ptr, char *where)
{
int i = 0;
GAME_TEXT o_name[MAX_NLEN];
* @param label_number 現在の行数
* @param fff ファイルへの参照ポインタ
*/
-static void show_wearing_equipment_resistances(player_type *player_ptr, ItemKindType tval, int *label_number, FILE *fff)
+static void show_wearing_equipment_resistances(PlayerType *player_ptr, ItemKindType tval, int *label_number, FILE *fff)
{
char where[32];
strcpy(where, _("装", "E "));
* @param label_number 現在の行数
* @param fff ファイルへの参照ポインタ
*/
-static void show_holding_equipment_resistances(player_type *player_ptr, ItemKindType tval, int *label_number, FILE *fff)
+static void show_holding_equipment_resistances(PlayerType *player_ptr, ItemKindType tval, int *label_number, FILE *fff)
{
char where[32];
strcpy(where, _("持", "I "));
* @param label_number 現在の行数
* @param fff ファイルへの参照ポインタ
*/
-static void show_home_equipment_resistances(player_type *player_ptr, ItemKindType tval, int *label_number, FILE *fff)
+static void show_home_equipment_resistances(PlayerType *player_ptr, ItemKindType tval, int *label_number, FILE *fff)
{
store_type *store_ptr;
store_ptr = &town_info[1].store[enum2i(StoreSaleType::HOME)];
* @brief Display *ID* ed weapons/armors's resistances
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_knowledge_inventory(player_type *player_ptr)
+void do_cmd_knowledge_inventory(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
#pragma once
-struct player_type;
-void do_cmd_knowledge_inventory(player_type *player_ptr);
+class PlayerType;
+void do_cmd_knowledge_inventory(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @todo okay = 既知のアーティファクト? と思われるが確証がない分かりやすい変数名へ変更求む&万が一未知である旨の配列なら負論理なのでゴソッと差し替えるべき
*/
-void do_cmd_knowledge_artifacts(player_type *player_ptr)
+void do_cmd_knowledge_artifacts(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
/*
* Describe fake object
*/
-static void desc_obj_fake(player_type *player_ptr, KIND_OBJECT_IDX k_idx)
+static void desc_obj_fake(PlayerType *player_ptr, KIND_OBJECT_IDX k_idx)
{
object_type *o_ptr;
object_type object_type_body;
/**
* @brief Display known objects
*/
-void do_cmd_knowledge_objects(player_type *player_ptr, bool *need_redraw, bool visual_only, KIND_OBJECT_IDX direct_k_idx)
+void do_cmd_knowledge_objects(PlayerType *player_ptr, bool *need_redraw, bool visual_only, KIND_OBJECT_IDX direct_k_idx)
{
KIND_OBJECT_IDX object_old, object_top;
KIND_OBJECT_IDX grp_idx[100];
#include "system/angband.h"
-struct player_type;
-void do_cmd_knowledge_artifacts(player_type *player_ptr);
-void do_cmd_knowledge_objects(player_type *player_ptr, bool *need_redraw, bool visual_only, KIND_OBJECT_IDX direct_k_idx);
+class PlayerType;
+void do_cmd_knowledge_artifacts(PlayerType *player_ptr);
+void do_cmd_knowledge_objects(PlayerType *player_ptr, bool *need_redraw, bool visual_only, KIND_OBJECT_IDX direct_k_idx);
* @param mode 思い出の扱いに関するモード
* @return 得られたモンスターIDの数 / The number of monsters in the group
*/
-static IDX collect_monsters(player_type *player_ptr, IDX grp_cur, IDX mon_idx[], monster_lore_mode mode)
+static IDX collect_monsters(PlayerType *player_ptr, IDX grp_cur, IDX mon_idx[], monster_lore_mode mode)
{
concptr group_char = monster_group_char[grp_cur];
bool grp_unique = (monster_group_char[grp_cur] == (char *)-1L);
* Display current pets
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_knowledge_pets(player_type *player_ptr)
+void do_cmd_knowledge_pets(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
* Total kill count
* @note the player ghosts are ignored.
*/
-void do_cmd_knowledge_kill_count(player_type *player_ptr)
+void do_cmd_knowledge_kill_count(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
* @param direct_r_idx モンスターID
* @todo 引数の詳細について加筆求む
*/
-void do_cmd_knowledge_monsters(player_type *player_ptr, bool *need_redraw, bool visual_only, IDX direct_r_idx)
+void do_cmd_knowledge_monsters(PlayerType *player_ptr, bool *need_redraw, bool visual_only, IDX direct_r_idx)
{
TERM_LEN wid, hgt;
term_get_size(&wid, &hgt);
* List wanted monsters
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_knowledge_bounty(player_type *player_ptr)
+void do_cmd_knowledge_bounty(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
#include "system/angband.h"
-struct player_type;
-void do_cmd_knowledge_monsters(player_type *player_ptr, bool *need_redraw, bool visual_only, IDX direct_r_idx);
-void do_cmd_knowledge_pets(player_type *player_ptr);
-void do_cmd_knowledge_kill_count(player_type *player_ptr);
-void do_cmd_knowledge_bounty(player_type *player_ptr);
+class PlayerType;
+void do_cmd_knowledge_monsters(PlayerType *player_ptr, bool *need_redraw, bool visual_only, IDX direct_r_idx);
+void do_cmd_knowledge_pets(PlayerType *player_ptr);
+void do_cmd_knowledge_kill_count(PlayerType *player_ptr);
+void do_cmd_knowledge_bounty(PlayerType *player_ptr);
/*!
* @brief 突然変異表示コマンドの実装 / List mutations we have...
*/
-void do_cmd_knowledge_mutations(player_type *player_ptr)
+void do_cmd_knowledge_mutations(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
#pragma once
-struct player_type;
-void do_cmd_knowledge_mutations(player_type *player_ptr);
+class PlayerType;
+void do_cmd_knowledge_mutations(PlayerType *player_ptr);
* @brief Check on the status of an active quest
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_checkquest(player_type *player_ptr)
+void do_cmd_checkquest(PlayerType *player_ptr)
{
screen_save();
do_cmd_knowledge_quests(player_ptr);
/*!
* @brief Print all active quests
* @param player_ptr プレイヤーへの参照ポインタ
- * @todo player_typeではなくQUEST_IDXを引数にすべきかもしれない
+ * @todo PlayerTypeではなくQUEST_IDXを引数にすべきかもしれない
*/
-static void do_cmd_knowledge_quests_current(player_type *player_ptr, FILE *fff)
+static void do_cmd_knowledge_quests_current(PlayerType *player_ptr, FILE *fff)
{
char tmp_str[1024];
char rand_tmp_str[512] = "\0";
fprintf(fff, _(" なし\n", " Nothing.\n"));
}
-static bool do_cmd_knowledge_quests_aux(player_type *player_ptr, FILE *fff, IDX q_idx)
+static bool do_cmd_knowledge_quests_aux(PlayerType *player_ptr, FILE *fff, IDX q_idx)
{
char tmp_str[120];
char playtime_str[16];
* @param fff セーブファイル (展開済?)
* @param quest_num[] 受注したことのあるクエスト群
*/
-void do_cmd_knowledge_quests_completed(player_type *player_ptr, FILE *fff, QUEST_IDX quest_num[])
+void do_cmd_knowledge_quests_completed(PlayerType *player_ptr, FILE *fff, QUEST_IDX quest_num[])
{
fprintf(fff, _("《達成したクエスト》\n", "< Completed Quest >\n"));
QUEST_IDX total = 0;
* @param fff セーブファイル (展開済?)
* @param quest_num[] 受注したことのあるクエスト群
*/
-void do_cmd_knowledge_quests_failed(player_type *player_ptr, FILE *fff, QUEST_IDX quest_num[])
+void do_cmd_knowledge_quests_failed(PlayerType *player_ptr, FILE *fff, QUEST_IDX quest_num[])
{
fprintf(fff, _("《失敗したクエスト》\n", "< Failed Quest >\n"));
QUEST_IDX total = 0;
* Print quest status of all active quests
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_knowledge_quests(player_type *player_ptr)
+void do_cmd_knowledge_quests(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
#include "system/angband.h"
-struct player_type;
-void do_cmd_checkquest(player_type *player_ptr);
-void do_cmd_knowledge_quests_completed(player_type *player_ptr, FILE *fff, QUEST_IDX quest_num[]);
-void do_cmd_knowledge_quests_failed(player_type *player_ptr, FILE *fff, QUEST_IDX quest_num[]);
-void do_cmd_knowledge_quests(player_type *player_ptr);
+class PlayerType;
+void do_cmd_checkquest(PlayerType *player_ptr);
+void do_cmd_knowledge_quests_completed(PlayerType *player_ptr, FILE *fff, QUEST_IDX quest_num[]);
+void do_cmd_knowledge_quests_failed(PlayerType *player_ptr, FILE *fff, QUEST_IDX quest_num[]);
+void do_cmd_knowledge_quests(PlayerType *player_ptr);
/*
* List virtues & status
*/
-void do_cmd_knowledge_virtues(player_type *player_ptr)
+void do_cmd_knowledge_virtues(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
* @param player_ptr プレイヤーへの参照ポインタ
* @param fff ファイルポインタ
*/
-static void dump_yourself(player_type *player_ptr, FILE *fff)
+static void dump_yourself(PlayerType *player_ptr, FILE *fff)
{
if (!fff)
return;
* List virtues & status
*
*/
-void do_cmd_knowledge_stat(player_type *player_ptr)
+void do_cmd_knowledge_stat(PlayerType *player_ptr)
{
FILE *fff = nullptr;
GAME_TEXT file_name[FILE_NAME_SIZE];
* List my home
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void do_cmd_knowledge_home(player_type *player_ptr)
+void do_cmd_knowledge_home(PlayerType *player_ptr)
{
parse_fixed_map(player_ptr, "w_info.txt", 0, 0, w_ptr->max_wild_y, w_ptr->max_wild_x);
#pragma once
-struct player_type;
-void do_cmd_knowledge_virtues(player_type *player_ptr);
-void do_cmd_knowledge_stat(player_type *player_ptr);
-void do_cmd_knowledge_home(player_type *player_ptr);
+class PlayerType;
+void do_cmd_knowledge_virtues(PlayerType *player_ptr);
+void do_cmd_knowledge_stat(PlayerType *player_ptr);
+void do_cmd_knowledge_home(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param is_alive 生きているユニークのリストならばTRUE、撃破したユニークのリストならばFALSE
*/
-void do_cmd_knowledge_uniques(player_type *player_ptr, bool is_alive)
+void do_cmd_knowledge_uniques(PlayerType *player_ptr, bool is_alive)
{
unique_list_type tmp_list;
unique_list_type *unique_list_ptr = initialize_unique_lsit_type(&tmp_list, is_alive);
#pragma once
-struct player_type;
-void do_cmd_knowledge_uniques(player_type *player_ptr, bool is_alive);
+class PlayerType;
+void do_cmd_knowledge_uniques(PlayerType *player_ptr, bool is_alive);
* @param player_ptr プレイヤーへの参照ポインタ
* @details もはや何に使われていたのか不明
*/
-void rd_dummy_monsters(player_type *player_ptr)
+void rd_dummy_monsters(PlayerType *player_ptr)
{
if (h_older_than(1, 5, 0, 2))
return;
#pragma once
-struct player_type;
+class PlayerType;
void rd_dummy1(void);
void rd_dummy2(void);
-void rd_dummy_monsters(player_type *player_ptr);
+void rd_dummy_monsters(PlayerType *player_ptr);
void rd_ghost(void);
void rd_dummy3(void);
* The monsters/objects must be loaded in the same order
* that they were stored, since the actual indexes matter.
*/
-static errr rd_dungeon(player_type *player_ptr)
+static errr rd_dungeon(PlayerType *player_ptr)
{
init_saved_floors(player_ptr, false);
errr err = 0;
return err;
}
-errr restore_dungeon(player_type *player_ptr)
+errr restore_dungeon(PlayerType *player_ptr)
{
if (player_ptr->is_dead) {
for (int i = MIN_RANDOM_QUEST; i < MAX_RANDOM_QUEST + 1; i++)
#include "system/angband.h"
-struct player_type;
-errr restore_dungeon(player_type *player_ptr);
+class PlayerType;
+errr restore_dungeon(PlayerType *player_ptr);
* @brief その他の情報を読み込む / Read the "extra" information
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void rd_extra(player_type *player_ptr)
+void rd_extra(PlayerType *player_ptr)
{
if (h_older_than(0, 0, 7))
player_ptr->riding = 0;
#pragma once
-struct player_type;
-void rd_extra(player_type *player_ptr);
+class PlayerType;
+void rd_extra(PlayerType *player_ptr);
* The monsters/objects must be loaded in the same order
* that they were stored, since the actual indexes matter.
*/
-errr rd_saved_floor(player_type *player_ptr, saved_floor_type *sf_ptr)
+errr rd_saved_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
clear_cave(player_ptr);
* @param sf_ptr 保存フロア読み込み先
* @return 成功したらtrue
*/
-static bool load_floor_aux(player_type *player_ptr, saved_floor_type *sf_ptr)
+static bool load_floor_aux(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
load_xor_byte = 0;
strip_bytes(1);
* @param mode オプション
* @return 成功したらtrue
*/
-bool load_floor(player_type *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode)
+bool load_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode)
{
/*
* Temporary files are always written in system depended kanji
#include "system/angband.h"
-struct player_type;
+class PlayerType;
struct saved_floor_type;
-errr rd_saved_floor(player_type *player_ptr, saved_floor_type *sf_ptr);
-bool load_floor(player_type *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode);
+errr rd_saved_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr);
+bool load_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode);
*
* Note that the inventory is "re-sorted" later by "dungeon()".
*/
-static errr rd_inventory(player_type *player_ptr)
+static errr rd_inventory(PlayerType *player_ptr)
{
player_ptr->inven_cnt = 0;
player_ptr->equip_cnt = 0;
return 0;
}
-errr load_inventory(player_type *player_ptr)
+errr load_inventory(PlayerType *player_ptr)
{
for (int i = 0; i < 64; i++) {
player_ptr->spell_order[i] = rd_byte();
#include "system/angband.h"
-struct player_type;
-errr load_inventory(player_type *player_ptr);
+class PlayerType;
+errr load_inventory(PlayerType *player_ptr);
option_flag[5] |= (0x00000001U << 3);
}
-void set_zangband_realm(player_type *player_ptr)
+void set_zangband_realm(PlayerType *player_ptr)
{
if (player_ptr->realm1 == 9)
player_ptr->realm1 = REALM_MUSIC;
player_ptr->realm2 = REALM_HISSATSU;
}
-void set_zangband_skill(player_type *player_ptr)
+void set_zangband_skill(PlayerType *player_ptr)
{
if (player_ptr->pclass != PlayerClassType::BEASTMASTER)
player_ptr->skill_exp[PlayerSkillKindType::RIDING] /= 2;
player_ptr->skill_exp[PlayerSkillKindType::RIDING] = std::min(player_ptr->skill_exp[PlayerSkillKindType::RIDING], s_info[enum2i(player_ptr->pclass)].s_max[PlayerSkillKindType::RIDING]);
}
-void set_zangband_race(player_type *player_ptr)
+void set_zangband_race(PlayerType *player_ptr)
{
player_ptr->start_race = player_ptr->prace;
player_ptr->old_race1 = 0L;
player_ptr->old_realm = 0;
}
-void set_zangband_bounty_uniques(player_type *player_ptr)
+void set_zangband_bounty_uniques(PlayerType *player_ptr)
{
determine_bounty_uniques(player_ptr);
for (int i = 0; i < MAX_BOUNTY; i++) {
}
}
-void set_zangband_mimic(player_type *player_ptr)
+void set_zangband_mimic(PlayerType *player_ptr)
{
player_ptr->tim_res_time = 0;
player_ptr->mimic_form = 0;
player_ptr->tim_sh_fire = 0;
}
-void set_zangband_holy_aura(player_type *player_ptr)
+void set_zangband_holy_aura(PlayerType *player_ptr)
{
player_ptr->tim_sh_holy = 0;
player_ptr->tim_eyeeye = 0;
}
-void set_zangband_reflection(player_type *player_ptr)
+void set_zangband_reflection(PlayerType *player_ptr)
{
player_ptr->tim_reflect = 0;
player_ptr->multishadow = 0;
max_dlv[DUNGEON_ANGBAND] = rd_s16b();
}
-void set_zangband_game_turns(player_type *player_ptr)
+void set_zangband_game_turns(PlayerType *player_ptr)
{
player_ptr->current_floor_ptr->generated_turn /= 2;
player_ptr->feeling_turn /= 2;
mon_odds[i] = rd_s16b();
}
-void set_zangband_special_attack(player_type *player_ptr)
+void set_zangband_special_attack(PlayerType *player_ptr)
{
if (rd_byte() != 0)
player_ptr->special_attack = ATTACK_CONFUSE;
player_ptr->ele_attack = 0;
}
-void set_zangband_special_defense(player_type *player_ptr)
+void set_zangband_special_defense(PlayerType *player_ptr)
{
player_ptr->ele_immune = 0;
player_ptr->special_defense = 0;
}
-void set_zangband_action(player_type *player_ptr)
+void set_zangband_action(PlayerType *player_ptr)
{
if (rd_byte() != 0)
player_ptr->action = ACTION_LEARN;
}
-void set_zangband_visited_towns(player_type *player_ptr)
+void set_zangband_visited_towns(PlayerType *player_ptr)
{
strip_bytes(4);
player_ptr->visit = 1L;
}
-void set_zangband_quest(player_type *player_ptr, quest_type *const q_ptr, int loading_quest_index, const QUEST_IDX old_inside_quest)
+void set_zangband_quest(PlayerType *player_ptr, quest_type *const q_ptr, int loading_quest_index, const QUEST_IDX old_inside_quest)
{
if (q_ptr->flags & QUEST_FLAG_PRESET) {
q_ptr->dungeon = 0;
player_ptr->current_floor_ptr->inside_quest = old_inside_quest;
}
-void set_zangband_class(player_type *player_ptr)
+void set_zangband_class(PlayerType *player_ptr)
{
if (h_older_than(0, 2, 2) && (player_ptr->pclass == PlayerClassType::BEASTMASTER) && !player_ptr->is_dead) {
player_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
}
}
-void set_zangband_learnt_spells(player_type *player_ptr)
+void set_zangband_learnt_spells(PlayerType *player_ptr)
{
player_ptr->learned_spells = 0;
for (int i = 0; i < 64; i++)
player_ptr->learned_spells++;
}
-void set_zangband_pet(player_type *player_ptr)
+void set_zangband_pet(PlayerType *player_ptr)
{
player_ptr->pet_extra_flags = 0;
if (rd_byte() != 0)
#include "system/angband.h"
-struct player_type;
+class PlayerType;
typedef struct quest_type quest_type;
void load_zangband_options(void);
-void set_zangband_realm(player_type *player_ptr);
-void set_zangband_skill(player_type *player_ptr);
-void set_zangband_race(player_type *player_ptr);
-void set_zangband_bounty_uniques(player_type *player_ptr);
-void set_zangband_mimic(player_type *player_ptr);
-void set_zangband_holy_aura(player_type *player_ptr);
-void set_zangband_reflection(player_type *player_ptr);
+void set_zangband_realm(PlayerType *player_ptr);
+void set_zangband_skill(PlayerType *player_ptr);
+void set_zangband_race(PlayerType *player_ptr);
+void set_zangband_bounty_uniques(PlayerType *player_ptr);
+void set_zangband_mimic(PlayerType *player_ptr);
+void set_zangband_holy_aura(PlayerType *player_ptr);
+void set_zangband_reflection(PlayerType *player_ptr);
void rd_zangband_dungeon(void);
-void set_zangband_game_turns(player_type *player_ptr);
+void set_zangband_game_turns(PlayerType *player_ptr);
void set_zangband_gambling_monsters(int i);
-void set_zangband_special_attack(player_type *player_ptr);
-void set_zangband_special_defense(player_type *player_ptr);
-void set_zangband_action(player_type *player_ptr);
-void set_zangband_visited_towns(player_type *player_ptr);
-void set_zangband_quest(player_type *player_ptr, quest_type *const q_ptr, int loading_quest_index, const QUEST_IDX old_inside_quest);
-void set_zangband_class(player_type *player_ptr);
-void set_zangband_learnt_spells(player_type *player_ptr);
-void set_zangband_pet(player_type *player_ptr);
+void set_zangband_special_attack(PlayerType *player_ptr);
+void set_zangband_special_defense(PlayerType *player_ptr);
+void set_zangband_action(PlayerType *player_ptr);
+void set_zangband_visited_towns(PlayerType *player_ptr);
+void set_zangband_quest(PlayerType *player_ptr, quest_type *const q_ptr, int loading_quest_index, const QUEST_IDX old_inside_quest);
+void set_zangband_class(PlayerType *player_ptr);
+void set_zangband_learnt_spells(PlayerType *player_ptr);
+void set_zangband_pet(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return エラーコード
*/
-static errr load_town_quest(player_type *player_ptr)
+static errr load_town_quest(PlayerType *player_ptr)
{
if (h_older_than(2, 1, 3))
return 0;
rd_FlagGroup(w_ptr->sf_retired, rd_byte);
}
-static void load_player_world(player_type *player_ptr)
+static void load_player_world(PlayerType *player_ptr)
{
rd_total_play_time();
rd_winner_class();
load_note(_("特別情報をロードしました", "Loaded extra information"));
}
-static errr load_hp(player_type *player_ptr)
+static errr load_hp(PlayerType *player_ptr)
{
auto tmp16u = rd_u16b();
if (tmp16u > PY_MAX_LEVEL) {
return 0;
}
-static void load_spells(player_type *player_ptr)
+static void load_spells(PlayerType *player_ptr)
{
player_ptr->spell_learned1 = rd_u32b();
player_ptr->spell_learned2 = rd_u32b();
* @brief セーブファイル読み込み処理の実体 / Actually read the savefile
* @return エラーコード
*/
-static errr exe_reading_savefile(player_type *player_ptr)
+static errr exe_reading_savefile(PlayerType *player_ptr)
{
rd_version_info();
rd_dummy3();
* @param player_ptr プレイヤーへの参照ポインタ
* @return エラーコード
*/
-static errr rd_savefile(player_type *player_ptr)
+static errr rd_savefile(PlayerType *player_ptr)
{
safe_setuid_grab(player_ptr);
loading_savefile = angband_fopen(savefile, "rb");
* @param player_ptr プレイヤーへの参照ポインタ
* @return 引き継ぎ可能ならtrue、そうでなければfalseを返す
*/
-static bool can_takeover_savefile(const player_type *player_ptr)
+static bool can_takeover_savefile(const PlayerType *player_ptr)
{
if (loading_savefile_version_is_older_than(8) && player_ptr->pclass == PlayerClassType::SMITH) {
return false;
* @param new_game セーブデータの新規作成が必要か否か
* @return セーブデータが読み込めればtrue
*/
-bool load_savedata(player_type *player_ptr, bool *new_game)
+bool load_savedata(PlayerType *player_ptr, bool *new_game)
{
concptr what = "generic";
w_ptr->game_turn = 0;
#pragma once
-struct player_type;
-bool load_savedata(player_type *player_ptr, bool *new_game);
+class PlayerType;
+bool load_savedata(PlayerType *player_ptr, bool *new_game);
#pragma once
struct monster_type;
-struct player_type;
+class PlayerType;
class MonsterLoaderBase {
public:
virtual ~MonsterLoaderBase() = default;
* @details MonsterLoaderBaseは純粋仮想関数を含むので参照を返す必要がある.
* (値を返す設計はコンパイルエラー)
*/
-std::shared_ptr<MonsterLoaderBase> MonsterLoaderFactory::create_loader(player_type *player_ptr)
+std::shared_ptr<MonsterLoaderBase> MonsterLoaderFactory::create_loader(PlayerType *player_ptr)
{
auto version = get_version();
switch (version) {
#include <memory>
enum class MonsterLoaderVersionType;
-struct player_type;
+class PlayerType;
struct monster_type;
class MonsterLoaderBase;
class MonsterLoaderFactory {
public:
- static std::shared_ptr<MonsterLoaderBase> create_loader(player_type *player_ptr);
+ static std::shared_ptr<MonsterLoaderBase> create_loader(PlayerType *player_ptr);
private:
MonsterLoaderFactory() = delete;
* @param player_ptr プレイヤーへの参照ポインタ
* @param m_ptr モンスター保存先ポインタ
*/
-void rd_monster_old(player_type *player_ptr, monster_type *m_ptr)
+void rd_monster_old(PlayerType *player_ptr, monster_type *m_ptr)
{
m_ptr->r_idx = rd_s16b();
* The monsters/objects must be loaded in the same order
* that they were stored, since the actual indexes matter.
*/
-errr rd_dungeon_old(player_type *player_ptr)
+errr rd_dungeon_old(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
floor_ptr->dun_level = rd_s16b();
extern const int QUEST_ROYAL_CRYPT;
struct object_type;
-struct player_type;
+class PlayerType;
void rd_item_old(object_type *o_ptr);
-void rd_monster_old(player_type *player_ptr, monster_type *m_ptr);
+void rd_monster_old(PlayerType *player_ptr, monster_type *m_ptr);
void set_old_lore(monster_race *r_ptr, BIT_FLAGS f4, const MONRACE_IDX r_idx);
-errr rd_dungeon_old(player_type *player_ptr);
+errr rd_dungeon_old(PlayerType *player_ptr);
#include "system/floor-type-definition.h"
#include "system/player-type-definition.h"
-void set_hp_old(player_type *player_ptr)
+void set_hp_old(PlayerType *player_ptr)
{
player_ptr->mhp = rd_s16b();
player_ptr->chp_frac = rd_u16b();
}
-void set_mana_old(player_type *player_ptr)
+void set_mana_old(PlayerType *player_ptr)
{
player_ptr->msp = rd_s16b();
player_ptr->csp_frac = rd_u16b();
}
-void set_exp_frac_old(player_type *player_ptr)
+void set_exp_frac_old(PlayerType *player_ptr)
{
player_ptr->exp_frac = rd_u16b();
}
-void remove_water_cave(player_type *player_ptr)
+void remove_water_cave(PlayerType *player_ptr)
{
if (player_ptr->current_floor_ptr->inside_quest != OLD_QUEST_WATER_CAVE)
return;
#pragma once
-struct player_type;
-void set_hp_old(player_type *player_ptr);
-void set_mana_old(player_type *player_ptr);
-void set_exp_frac_old(player_type *player_ptr);
-void remove_water_cave(player_type *player_ptr);
+class PlayerType;
+void set_hp_old(PlayerType *player_ptr);
+void set_mana_old(PlayerType *player_ptr);
+void set_exp_frac_old(PlayerType *player_ptr);
+void remove_water_cave(PlayerType *player_ptr);
#include "util/enum-converter.h"
#include "util/quarks.h"
-MonsterLoader10::MonsterLoader10(player_type *player_ptr)
+MonsterLoader10::MonsterLoader10(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
#include "load/monster/monster-loader-base.h"
struct monster_type;
-struct player_type;
+class PlayerType;
class MonsterLoader10 : public MonsterLoaderBase {
public:
- MonsterLoader10(player_type *player_ptr);
+ MonsterLoader10(PlayerType *player_ptr);
void rd_monster(monster_type *m_ptr) override;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
monster_type *m_ptr = nullptr;
};
#include "player/special-defense-types.h"
#include "system/player-type-definition.h"
-void rd_special_attack(player_type *player_ptr)
+void rd_special_attack(PlayerType *player_ptr)
{
if (h_older_than(0, 0, 9)) {
set_zangband_special_attack(player_ptr);
player_ptr->special_attack = rd_u32b();
}
-void rd_special_action(player_type *player_ptr)
+void rd_special_action(PlayerType *player_ptr)
{
if (!PlayerClass(player_ptr).monk_stance_is(MonkStanceType::NONE)) {
player_ptr->action = ACTION_MONK_STANCE;
}
}
-void rd_special_defense(player_type *player_ptr)
+void rd_special_defense(PlayerType *player_ptr)
{
if (h_older_than(0, 0, 12)) {
set_zangband_special_defense(player_ptr);
player_ptr->special_defense = rd_u32b();
}
-void rd_action(player_type *player_ptr)
+void rd_action(PlayerType *player_ptr)
{
strip_bytes(1);
player_ptr->action = rd_byte();
#pragma once
-struct player_type;
-void rd_special_attack(player_type *player_ptr);
-void rd_special_action(player_type *player_ptr);
-void rd_special_defense(player_type *player_ptr);
-void rd_action(player_type *player_ptr);
+class PlayerType;
+void rd_special_attack(PlayerType *player_ptr);
+void rd_special_action(PlayerType *player_ptr);
+void rd_special_defense(PlayerType *player_ptr);
+void rd_action(PlayerType *player_ptr);
* @brief セーブデータから領域情報を読み込む / Read player realms
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void rd_realms(player_type *player_ptr)
+static void rd_realms(PlayerType *player_ptr)
{
if (player_ptr->pclass == PlayerClassType::ELEMENTALIST)
player_ptr->element = rd_byte();
* @brief セーブデータからプレイヤー基本情報を読み込む / Read player's basic info
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void rd_base_info(player_type *player_ptr)
+void rd_base_info(PlayerType *player_ptr)
{
rd_string(player_ptr->name, sizeof(player_ptr->name));
rd_string(player_ptr->died_from, sizeof(player_ptr->died_from));
player_ptr->wt = rd_s16b();
}
-void rd_experience(player_type *player_ptr)
+void rd_experience(PlayerType *player_ptr)
{
player_ptr->max_exp = rd_s32b();
if (h_older_than(1, 5, 4, 1))
strip_bytes(sizeof(int16_t) * (MAX_SKILLS - PLAYER_SKILL_KIND_TYPE_RANGE.size()));
}
-void rd_skills(player_type *player_ptr)
+void rd_skills(PlayerType *player_ptr)
{
if (h_older_than(0, 4, 1))
set_zangband_skill(player_ptr);
player_ptr->action = ACTION_SING;
}
-static void set_race(player_type *player_ptr)
+static void set_race(PlayerType *player_ptr)
{
player_ptr->start_race = i2enum<PlayerRaceType>(rd_byte());
player_ptr->old_race1 = rd_u32b();
player_ptr->old_realm = rd_s16b();
}
-void rd_race(player_type *player_ptr)
+void rd_race(PlayerType *player_ptr)
{
if (h_older_than(1, 0, 7)) {
set_zangband_race(player_ptr);
set_race(player_ptr);
}
-void rd_bounty_uniques(player_type *player_ptr)
+void rd_bounty_uniques(PlayerType *player_ptr)
{
if (h_older_than(0, 0, 3)) {
set_zangband_bounty_uniques(player_ptr);
* @brief 腕力などの基本ステータス情報を読み込む
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void rd_base_status(player_type *player_ptr)
+static void rd_base_status(PlayerType *player_ptr)
{
for (int i = 0; i < A_MAX; i++)
player_ptr->stat_max[i] = rd_s16b();
player_ptr->stat_cur[i] = rd_s16b();
}
-static void set_imitation(player_type *player_ptr)
+static void set_imitation(PlayerType *player_ptr)
{
if (h_older_than(0, 0, 1)) {
return;
}
}
-static void rd_phase_out(player_type *player_ptr)
+static void rd_phase_out(PlayerType *player_ptr)
{
player_ptr->current_floor_ptr->inside_arena = rd_s16b() != 0;
player_ptr->current_floor_ptr->inside_quest = rd_s16b();
}
}
-static void rd_arena(player_type *player_ptr)
+static void rd_arena(PlayerType *player_ptr)
{
if (h_older_than(0, 0, 3))
update_gambling_monsters(player_ptr);
* @brief プレイヤーの最大HP/現在HPを読み込む
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void rd_hp(player_type *player_ptr)
+static void rd_hp(PlayerType *player_ptr)
{
if (h_older_than(1, 7, 0, 3)) {
set_hp_old(player_ptr);
* @brief プレイヤーの最大MP/現在MPを読み込む
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void rd_mana(player_type *player_ptr)
+static void rd_mana(PlayerType *player_ptr)
{
if (h_older_than(1, 7, 0, 3)) {
set_mana_old(player_ptr);
* @brief プレイヤーのバッドステータス (と空腹)を読み込む
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void rd_bad_status(player_type *player_ptr)
+static void rd_bad_status(PlayerType *player_ptr)
{
strip_bytes(2); /* Old "rest" */
player_ptr->blind = rd_s16b();
strip_bytes(4); /* Old "food_digested" / "protection" */
}
-static void rd_energy(player_type *player_ptr)
+static void rd_energy(PlayerType *player_ptr)
{
player_ptr->energy_need = rd_s16b();
if (h_older_than(1, 0, 13))
* @param player_ptr プレイヤーへの参照ポインタ
* @todo 明らかに関数名がビッグワードだが他に思いつかなかった
*/
-static void rd_status(player_type *player_ptr)
+static void rd_status(PlayerType *player_ptr)
{
player_ptr->fast = rd_s16b();
player_ptr->slow = rd_s16b();
player_ptr->ult_res = rd_s16b();
}
-static void rd_tsuyoshi(player_type *player_ptr)
+static void rd_tsuyoshi(PlayerType *player_ptr)
{
if (h_older_than(0, 0, 2))
player_ptr->tsuyoshi = 0;
player_ptr->tsuyoshi = rd_s16b();
}
-static void set_timed_effects(player_type *player_ptr)
+static void set_timed_effects(PlayerType *player_ptr)
{
player_ptr->tim_esp = rd_s16b();
player_ptr->wraith_form = rd_s16b();
}
}
-static void set_mutations(player_type *player_ptr)
+static void set_mutations(PlayerType *player_ptr)
{
if (loading_savefile_version_is_older_than(2)) {
for (int i = 0; i < 3; i++) {
}
}
-static void set_virtues(player_type *player_ptr)
+static void set_virtues(PlayerType *player_ptr)
{
for (int i = 0; i < 8; i++)
player_ptr->virtues[i] = rd_s16b();
* @brief 各種時限効果を読み込む
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void rd_timed_effects(player_type *player_ptr)
+static void rd_timed_effects(PlayerType *player_ptr)
{
set_timed_effects(player_ptr);
player_ptr->chaos_patron = rd_s16b();
set_virtues(player_ptr);
}
-static void rd_player_status(player_type *player_ptr)
+static void rd_player_status(PlayerType *player_ptr)
{
rd_base_status(player_ptr);
strip_bytes(24);
player_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(player_ptr);
}
-void rd_player_info(player_type *player_ptr)
+void rd_player_info(PlayerType *player_ptr)
{
rd_player_status(player_ptr);
rd_special_attack(player_ptr);
#pragma once
-struct player_type;
-void rd_base_info(player_type *player_ptr);
-void rd_experience(player_type *player_ptr);
-void rd_skills(player_type *player_ptr);
-void rd_race(player_type *player_ptr);
-void rd_bounty_uniques(player_type *player_ptr);
-void rd_player_info(player_type *player_ptr);
+class PlayerType;
+void rd_base_info(PlayerType *player_ptr);
+void rd_experience(PlayerType *player_ptr);
+void rd_skills(PlayerType *player_ptr);
+void rd_race(PlayerType *player_ptr);
+void rd_bounty_uniques(PlayerType *player_ptr);
+void rd_player_info(PlayerType *player_ptr);
q_ptr->comptime = rd_u32b();
}
-static void load_quest_details(player_type *player_ptr, quest_type *q_ptr, int loading_quest_index)
+static void load_quest_details(PlayerType *player_ptr, quest_type *q_ptr, int loading_quest_index)
{
q_ptr->cur_num = rd_s16b();
q_ptr->max_num = rd_s16b();
q_ptr->flags = rd_byte();
}
-void analyze_quests(player_type *player_ptr, const uint16_t max_quests_load, const byte max_rquests_load)
+void analyze_quests(PlayerType *player_ptr, const uint16_t max_quests_load, const byte max_rquests_load)
{
QUEST_IDX old_inside_quest = player_ptr->current_floor_ptr->inside_quest;
for (int i = 0; i < max_quests_load; i++) {
#include "system/angband.h"
-struct player_type;
+class PlayerType;
errr load_town(void);
errr load_quest_info(uint16_t *max_quests_load, byte *max_rquests_load);
-void analyze_quests(player_type *player_ptr, const uint16_t max_quests_load, const byte max_rquests_load);
+void analyze_quests(PlayerType *player_ptr, const uint16_t max_quests_load, const byte max_rquests_load);
* Also note that it may not correctly "adapt" to "knowledge" bacoming
* known, the player may have to pick stuff up and drop it again.
*/
-static void home_carry_load(player_type *player_ptr, store_type *store_ptr, object_type *o_ptr)
+static void home_carry_load(PlayerType *player_ptr, store_type *store_ptr, object_type *o_ptr)
{
for (auto i = 0; i < store_ptr->stock_num; i++) {
auto *j_ptr = &store_ptr->stock[i];
* @param store_number 店舗ID
* @return エラーID
*/
-static void rd_store(player_type *player_ptr, int town_number, int store_number)
+static void rd_store(PlayerType *player_ptr, int town_number, int store_number)
{
store_type *store_ptr;
auto sort = false;
* @param player_ptr プレイヤー情報への参照ポインタ(未使用)
* @return 読み込み終わったら0、失敗したら22
*/
-void load_store(player_type *player_ptr)
+void load_store(PlayerType *player_ptr)
{
int16_t town_count = rd_u16b();
int16_t store_count = rd_u16b();
#pragma once
-struct player_type;
-void load_store(player_type *player_ptr);
+class PlayerType;
+void load_store(PlayerType *player_ptr);
}
}
-void rd_dungeons(player_type *player_ptr)
+void rd_dungeons(PlayerType *player_ptr)
{
if (h_older_than(0, 3, 8))
rd_zangband_dungeon();
* @brief 現実変容処理の有無及びその残りターン数を読み込む
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void rd_alter_reality(player_type *player_ptr)
+void rd_alter_reality(PlayerType *player_ptr)
{
if (h_older_than(0, 3, 8))
player_ptr->recall_dungeon = DUNGEON_ANGBAND;
/*!
* @details 自動拾い関係はこれしかないのでworldに突っ込むことにする。必要があれば再分割する
*/
-void rd_autopick(player_type *player_ptr)
+void rd_autopick(PlayerType *player_ptr)
{
player_ptr->autopick_autoregister = rd_byte() != 0;
}
-static void set_undead_turn_limit(player_type *player_ptr)
+static void set_undead_turn_limit(PlayerType *player_ptr)
{
switch (player_ptr->start_race) {
case PlayerRaceType::VAMPIRE:
}
}
-static void rd_world_info(player_type *player_ptr)
+static void rd_world_info(PlayerType *player_ptr)
{
set_undead_turn_limit(player_ptr);
w_ptr->dungeon_turn_limit = TURNS_PER_TICK * TOWN_DAWN * (MAX_DAYS - 1) + TURNS_PER_TICK * TOWN_DAWN * 3 / 4;
}
}
-void rd_visited_towns(player_type *player_ptr)
+void rd_visited_towns(PlayerType *player_ptr)
{
if (h_older_than(0, 3, 9)) {
player_ptr->visit = 1L;
player_ptr->visit = rd_u32b();
}
-void rd_global_configurations(player_type *player_ptr)
+void rd_global_configurations(PlayerType *player_ptr)
{
w_ptr->seed_flavor = rd_u32b();
w_ptr->seed_town = rd_u32b();
rd_world_info(player_ptr);
}
-void load_wilderness_info(player_type *player_ptr)
+void load_wilderness_info(PlayerType *player_ptr)
{
player_ptr->wilderness_x = rd_s32b();
player_ptr->wilderness_y = rd_s32b();
#include "system/angband.h"
-struct player_type;
-void rd_dungeons(player_type *player_ptr);
-void rd_alter_reality(player_type *player_ptr);
+class PlayerType;
+void rd_dungeons(PlayerType *player_ptr);
+void rd_alter_reality(PlayerType *player_ptr);
void set_gambling_monsters(void);
-void rd_autopick(player_type *player_ptr);
-void rd_visited_towns(player_type *player_ptr);
-void rd_global_configurations(player_type *player_ptr);
-void load_wilderness_info(player_type *player_ptr);
+void rd_autopick(PlayerType *player_ptr);
+void rd_visited_towns(PlayerType *player_ptr);
+void rd_global_configurations(PlayerType *player_ptr);
+void load_wilderness_info(PlayerType *player_ptr);
errr analyze_wilderness(void);
* @param SPELL_NUM 呪文番号
* @param msg 表示する文字列
*/
-void set_damage(player_type *player_ptr, lore_type *lore_ptr, MonsterAbilityType ms_type, concptr msg)
+void set_damage(PlayerType *player_ptr, lore_type *lore_ptr, MonsterAbilityType ms_type, concptr msg)
{
MONRACE_IDX r_idx = lore_ptr->r_idx;
int base_damage = monspell_race_damage(player_ptr, ms_type, r_idx, BASE_DAM);
enum class MonsterAbilityType;
struct lore_type;
-struct player_type;
+class PlayerType;
void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char *msg);
bool know_armour(MONRACE_IDX r_idx, const bool know_everything);
bool know_damage(MONRACE_IDX r_idx, int i);
-void set_damage(player_type *player_ptr, lore_type *lore_ptr, MonsterAbilityType ms_type, concptr msg);
+void set_damage(PlayerType *player_ptr, lore_type *lore_ptr, MonsterAbilityType ms_type, concptr msg);
void set_drop_flags(lore_type *lore_ptr);
* @details
* Return the number of new flags learnt. -Mogami-
*/
-int lore_do_probe(player_type *player_ptr, MONRACE_IDX r_idx)
+int lore_do_probe(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
int n = 0;
monster_race *r_ptr = &r_info[r_idx];
* @param num_item 手に入れたアイテム数
* @param num_gold 手に入れた財宝の単位数
*/
-void lore_treasure(player_type *player_ptr, MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold)
+void lore_treasure(PlayerType *player_ptr, MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
#include "system/angband.h"
-struct player_type;
-int lore_do_probe(player_type *player_ptr, MONRACE_IDX r_idx);
-void lore_treasure(player_type *player_ptr, MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
+class PlayerType;
+int lore_do_probe(PlayerType *player_ptr, MONRACE_IDX r_idx);
+void lore_treasure(PlayerType *player_ptr, MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
#include "system/player-type-definition.h"
#include "term/term-color-types.h"
-void set_breath_types(player_type *player_ptr, lore_type *lore_ptr)
+void set_breath_types(PlayerType *player_ptr, lore_type *lore_ptr)
{
lore_ptr->vn = 0;
if (lore_ptr->ability_flags.has(MonsterAbilityType::BR_ACID)) {
}
}
-void set_ball_types(player_type *player_ptr, lore_type *lore_ptr)
+void set_ball_types(PlayerType *player_ptr, lore_type *lore_ptr)
{
if (lore_ptr->ability_flags.has(MonsterAbilityType::BA_ACID)) {
set_damage(player_ptr, lore_ptr, MonsterAbilityType::BA_ACID, _("アシッド・ボール%s", "produce acid balls%s"));
}
}
-void set_particular_types(player_type *player_ptr, lore_type *lore_ptr)
+void set_particular_types(PlayerType *player_ptr, lore_type *lore_ptr)
{
if (lore_ptr->ability_flags.has(MonsterAbilityType::HAND_DOOM)) {
lore_ptr->vp[lore_ptr->vn] = _("破滅の手(40%-60%)", "invoke the Hand of Doom(40%-60%)");
}
}
-void set_bolt_types(player_type *player_ptr, lore_type *lore_ptr)
+void set_bolt_types(PlayerType *player_ptr, lore_type *lore_ptr)
{
if (lore_ptr->ability_flags.has(MonsterAbilityType::BO_ACID)) {
set_damage(player_ptr, lore_ptr, MonsterAbilityType::BO_ACID, _("アシッド・ボルト%s", "produce acid bolts%s"));
}
}
-void set_floor_types(player_type *player_ptr, lore_type *lore_ptr)
+void set_floor_types(PlayerType *player_ptr, lore_type *lore_ptr)
{
if (lore_ptr->ability_flags.has(MonsterAbilityType::DARKNESS)) {
if ((player_ptr->pclass != PlayerClassType::NINJA) || (lore_ptr->r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) || (lore_ptr->r_ptr->flags7 & RF7_DARK_MASK)) {
#pragma once
struct lore_type;
-struct player_type;
-void set_breath_types(player_type *player_ptr, lore_type *lore_ptr);
-void set_ball_types(player_type *player_ptr, lore_type *lore_ptr);
-void set_particular_types(player_type *player_ptr, lore_type *lore_ptr);
-void set_bolt_types(player_type *player_ptr, lore_type *lore_ptr);
+class PlayerType;
+void set_breath_types(PlayerType *player_ptr, lore_type *lore_ptr);
+void set_ball_types(PlayerType *player_ptr, lore_type *lore_ptr);
+void set_particular_types(PlayerType *player_ptr, lore_type *lore_ptr);
+void set_bolt_types(PlayerType *player_ptr, lore_type *lore_ptr);
void set_status_types(lore_type *lore_ptr);
void set_teleport_types(lore_type *lore_ptr);
-void set_floor_types(player_type *player_ptr, lore_type *lore_ptr);
+void set_floor_types(PlayerType *player_ptr, lore_type *lore_ptr);
void set_summon_types(lore_type *lore_ptr);
* left edge of the screen, on a cleared line, in which the recall is
* to take place. One extra blank line is left after the recall.
*/
-void process_monster_lore(player_type *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode)
+void process_monster_lore(PlayerType *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode)
{
lore_type tmp_lore;
lore_type *lore_ptr = initialize_lore_type(&tmp_lore, r_idx, mode);
#include "system/angband.h"
#include "lore/lore-util.h"
-struct player_type;
-void process_monster_lore(player_type *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode);
+class PlayerType;
+void process_monster_lore(PlayerType *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode);
/*!
* @brief React to global changes
*/
-static errr term_xtra_win_react(player_type *player_ptr)
+static errr term_xtra_win_react(PlayerType *player_ptr)
{
refresh_color_table();
/*!
* @brief Do a "special thing"
- * @todo z-termに影響があるのでplayer_typeの追加は保留
+ * @todo z-termに影響があるのでPlayerTypeの追加は保留
*/
static errr term_xtra_win(int n, int v)
{
/*!
* @brief Process a menu command
*/
-static void process_menus(player_type *player_ptr, WORD wCmd)
+static void process_menus(PlayerType *player_ptr, WORD wCmd)
{
if (!initialized) {
plog(_("まだ初期化中です...", "You cannot do that yet..."));
* @param no_term TRUEならゲーム画面無しの状態で初期化を行う。
* コマンドラインからスポイラーの出力のみを行う時の使用を想定する。
*/
-void init_angband(player_type *player_ptr, bool no_term)
+void init_angband(PlayerType *player_ptr, bool no_term)
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("news_j.txt", "news.txt"));
* are included in all such copies.
*/
-struct player_type;
-void init_angband(player_type *player_ptr, bool no_term);
+class PlayerType;
+void init_angband(PlayerType *player_ptr, bool no_term);
void init_file_paths(char *path, char *varpath);
* Initialize some other arrays
* @return エラーコード
*/
-void init_other(player_type *player_ptr)
+void init_other(PlayerType *player_ptr)
{
player_ptr->current_floor_ptr = &floor_info; // TODO:本当はこんなところで初期化したくない
auto *floor_ptr = player_ptr->current_floor_ptr;
#include "system/angband.h"
-struct player_type;
+class PlayerType;
void init_quests(void);
-void init_other(player_type *player_ptr);
+void init_other(PlayerType *player_ptr);
void init_alloc(void);
* @param player_ptr プレイヤーへの参照ポインタ
* @return エラーコード
*/
-errr init_misc(player_type *player_ptr)
+errr init_misc(PlayerType *player_ptr)
{
return parse_fixed_map(player_ptr, "misc.txt", 0, 0, 0, 0);
}
#include "system/angband.h"
-struct player_type;
-errr init_misc(player_type *player_ptr);
+class PlayerType;
+errr init_misc(PlayerType *player_ptr);
errr init_f_info();
errr init_k_info();
errr init_a_info();
#include "system/floor-type-definition.h"
#include "system/player-type-definition.h"
-using scene_feel_func = bool (*)(player_type *player_ptr, scene_type *value);
+using scene_feel_func = bool (*)(PlayerType *player_ptr, scene_type *value);
-static bool scene_basic(player_type *player_ptr, scene_type *value)
+static bool scene_basic(PlayerType *player_ptr, scene_type *value)
{
if (player_ptr->ambush_flag) {
value->type = TERM_XTRA_MUSIC_BASIC;
return false;
}
-static bool scene_quest(player_type *player_ptr, scene_type *value)
+static bool scene_quest(PlayerType *player_ptr, scene_type *value)
{
const QUEST_IDX quest_id = quest_number(player_ptr, player_ptr->current_floor_ptr->dun_level);
const bool enable = (quest_id > 0);
return enable;
}
-static bool scene_quest_basic(player_type *player_ptr, scene_type *value)
+static bool scene_quest_basic(PlayerType *player_ptr, scene_type *value)
{
const QUEST_IDX quest_id = quest_number(player_ptr, player_ptr->current_floor_ptr->dun_level);
const bool enable = (quest_id > 0);
return enable;
}
-static bool scene_town(player_type *player_ptr, scene_type *value)
+static bool scene_town(PlayerType *player_ptr, scene_type *value)
{
const bool enable = !is_in_dungeon(player_ptr) && (player_ptr->town_num > 0);
if (enable) {
return enable;
}
-static bool scene_town_basic(player_type *player_ptr, scene_type *value)
+static bool scene_town_basic(PlayerType *player_ptr, scene_type *value)
{
const bool enable = !is_in_dungeon(player_ptr) && (player_ptr->town_num > 0);
if (enable) {
return enable;
}
-static bool scene_field(player_type *player_ptr, scene_type *value)
+static bool scene_field(PlayerType *player_ptr, scene_type *value)
{
const bool enable = !is_in_dungeon(player_ptr);
if (enable) {
return enable;
}
-static bool scene_dungeon_feeling(player_type *player_ptr, scene_type *value)
+static bool scene_dungeon_feeling(PlayerType *player_ptr, scene_type *value)
{
const bool enable = (player_ptr->feeling >= 2) && (player_ptr->feeling <= 5);
if (enable) {
return enable;
}
-static bool scene_dungeon(player_type *player_ptr, scene_type *value)
+static bool scene_dungeon(PlayerType *player_ptr, scene_type *value)
{
const bool enable = (player_ptr->dungeon_idx > 0);
if (enable) {
return enable;
}
-static bool scene_dungeon_basic(player_type *player_ptr, scene_type *value)
+static bool scene_dungeon_basic(PlayerType *player_ptr, scene_type *value)
{
const bool enable = is_in_dungeon(player_ptr);
if (enable) {
return enable;
}
-static bool scene_mute(player_type *player_ptr, scene_type *value)
+static bool scene_mute(PlayerType *player_ptr, scene_type *value)
{
(void)player_ptr;
value->type = TERM_XTRA_MUSIC_MUTE;
* @param list BGM選曲リスト
* @param from_index リストの更新開始位置
*/
-void refresh_scene_floor(player_type *player_ptr, scene_type_list &list, int from_index)
+void refresh_scene_floor(PlayerType *player_ptr, scene_type_list &list, int from_index)
{
for (auto func : scene_floor_def_list) {
scene_type &item = list[from_index];
#include "system/angband.h"
int get_scene_floor_count();
-void refresh_scene_floor(player_type *player_ptr, scene_type_list &list, int start_index);
+void refresh_scene_floor(PlayerType *player_ptr, scene_type_list &list, int start_index);
* @retval true モンスターAが優先
* @retval false モンスターBが優先
*/
-static bool is_high_rate(player_type *player_ptr, MONSTER_IDX m_idx1, MONSTER_IDX m_idx2)
+static bool is_high_rate(PlayerType *player_ptr, MONSTER_IDX m_idx1, MONSTER_IDX m_idx2)
{
// FIXME 視界内モンスターリストの比較関数と同じ処理
auto floor_ptr = player_ptr->current_floor_ptr;
* @param player_ptr プレイヤーへの参照ポインタ
* @param m_idx BGM対象候補のモンスター
*/
-static void update_target_monster(player_type *player_ptr, MONSTER_IDX m_idx)
+static void update_target_monster(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
if (scene_target_monster.ap_r_ptr && (scene_target_monster.m_idx == m_idx)) {
// 同一モンスター。最後に見たゲームターンを更新。
}
}
-using scene_monster_func = bool (*)(player_type *player_ptr, scene_type *value);
+using scene_monster_func = bool (*)(PlayerType *player_ptr, scene_type *value);
-static bool scene_monster(player_type *player_ptr, scene_type *value)
+static bool scene_monster(PlayerType *player_ptr, scene_type *value)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[scene_target_monster.m_idx];
}
}
-static bool scene_unique(player_type *player_ptr, scene_type *value)
+static bool scene_unique(PlayerType *player_ptr, scene_type *value)
{
(void)player_ptr;
return false;
}
-static bool scene_unknown(player_type *player_ptr, scene_type *value)
+static bool scene_unknown(PlayerType *player_ptr, scene_type *value)
{
(void)player_ptr;
if (is_unknown_monster(scene_target_monster.ap_r_ptr)) {
return false;
}
-static bool scene_high_level(player_type *player_ptr, scene_type *value)
+static bool scene_high_level(PlayerType *player_ptr, scene_type *value)
{
if (!is_unknown_monster(scene_target_monster.ap_r_ptr) && (scene_target_monster.ap_r_ptr->level >= player_ptr->lev)) {
value->type = TERM_XTRA_MUSIC_BASIC;
* @param list BGM選曲リスト
* @param from_index リストの更新開始位置
*/
-void refresh_scene_monster(player_type *player_ptr, const std::vector<MONSTER_IDX> &monster_list, scene_type_list &list, int from_index)
+void refresh_scene_monster(PlayerType *player_ptr, const std::vector<MONSTER_IDX> &monster_list, scene_type_list &list, int from_index)
{
const bool mute = can_mute_scene_monster();
#include "main/scene-table.h"
#include "system/angband.h"
-struct player_type;
+class PlayerType;
void clear_scene_target_monster();
void set_temp_mute_scene_monster(int sec);
int get_scene_monster_count();
-void refresh_scene_monster(player_type *player_ptr, const std::vector<MONSTER_IDX> &monster_list, scene_type_list &list, int from_index);
+void refresh_scene_monster(PlayerType *player_ptr, const std::vector<MONSTER_IDX> &monster_list, scene_type_list &list, int from_index);
* @brief 現在のフロアに合ったBGM選曲
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void refresh_scene_table(player_type *player_ptr)
+void refresh_scene_table(PlayerType *player_ptr)
{
// clear interrupt_scene
interrupt_scene(0, 0);
* @param player_ptr プレイヤーへの参照ポインタ
* @param monster_list 視界内モンスターリスト
*/
-void refresh_scene_table(player_type *player_ptr, const std::vector<MONSTER_IDX> &monster_list)
+void refresh_scene_table(PlayerType *player_ptr, const std::vector<MONSTER_IDX> &monster_list)
{
resize_scene_list();
int index = 0;
using scene_type_list = std::vector<scene_type>;
-struct player_type;
+class PlayerType;
void interrupt_scene(int type, int val);
-void refresh_scene_table(player_type *player_ptr);
-void refresh_scene_table(player_type *player_ptr, const std::vector<MONSTER_IDX> &monster_list);
+void refresh_scene_table(PlayerType *player_ptr);
+void refresh_scene_table(PlayerType *player_ptr, const std::vector<MONSTER_IDX> &monster_list);
scene_type_list &get_scene_type_list(int val);
* @param player_ptr プレイヤーへの参照ポインタ
* @details 設定がない場合はミュートする。
*/
-void select_floor_music(player_type *player_ptr)
+void select_floor_music(PlayerType *player_ptr)
{
if (!use_music)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monster_list モンスターリスト
*/
-void select_monster_music(player_type *player_ptr, const std::vector<MONSTER_IDX> &monster_list)
+void select_monster_music(PlayerType *player_ptr, const std::vector<MONSTER_IDX> &monster_list)
{
if (!use_music)
return;
extern bool has_monster_music;
-struct player_type;
+class PlayerType;
void bell(void);
void sound(int num);
errr play_music(int type, int num);
-void select_floor_music(player_type *player_ptr);
-void select_monster_music(player_type *player_ptr, const std::vector<MONSTER_IDX> &monster_list);
+void select_floor_music(PlayerType *player_ptr);
+void select_monster_music(PlayerType *player_ptr, const std::vector<MONSTER_IDX> &monster_list);
* @param player_ptr プレイヤーへの参照ポインタ
* @return まだ優勝していないか、挑戦者モンスターとの戦いではFALSE
*/
-static bool process_ostensible_arena_victory(player_type *player_ptr)
+static bool process_ostensible_arena_victory(PlayerType *player_ptr)
{
if (player_ptr->arena_number != MAX_ARENA_MONS)
return false;
* @param player_ptr プレイヤーへの参照ポインタ
* @return まだパワー・ワイアーム以下を倒していないならFALSE、倒していたらTRUE
*/
-static bool battle_metal_babble(player_type *player_ptr)
+static bool battle_metal_babble(PlayerType *player_ptr)
{
if (player_ptr->arena_number <= MAX_ARENA_MONS)
return false;
return true;
}
-static void go_to_arena(player_type *player_ptr)
+static void go_to_arena(PlayerType *player_ptr)
{
if (process_ostensible_arena_victory(player_ptr))
return;
player_ptr->leave_bldg = true;
}
-static void see_arena_poster(player_type *player_ptr)
+static void see_arena_poster(PlayerType *player_ptr)
{
if (player_ptr->arena_number == MAX_ARENA_MONS) {
msg_print(_("あなたは勝利者だ。 アリーナでのセレモニーに参加しなさい。", "You are victorious. Enter the arena for the ceremony."));
* @param player_ptr プレイヤーへの参照ポインタ
* @param cmd 闘技場処理のID
*/
-void arena_comm(player_type *player_ptr, int cmd)
+void arena_comm(PlayerType *player_ptr, int cmd)
{
switch (cmd) {
case BACT_ARENA:
* @brief モンスター闘技場に参加するモンスターを更新する。
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void update_gambling_monsters(player_type *player_ptr)
+void update_gambling_monsters(PlayerType *player_ptr)
{
int total, i;
int max_dl = 0;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 賭けを開始したか否か
*/
-bool monster_arena_comm(player_type *player_ptr)
+bool monster_arena_comm(PlayerType *player_ptr)
{
PRICE maxbet;
PRICE wager;
#pragma once
-struct player_type;
-void arena_comm(player_type *player_ptr, int cmd);
-void update_gambling_monsters(player_type *player_ptr);
-bool monster_arena_comm(player_type *player_ptr);
+class PlayerType;
+void arena_comm(PlayerType *player_ptr, int cmd);
+void update_gambling_monsters(PlayerType *player_ptr);
+bool monster_arena_comm(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 各種賞金首のいずれかでも換金が行われたか否か。
*/
-bool exchange_cash(player_type *player_ptr)
+bool exchange_cash(PlayerType *player_ptr)
{
bool change = false;
GAME_TEXT o_name[MAX_NLEN];
* @brief 本日の賞金首情報を表示する。
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void today_target(player_type *player_ptr)
+void today_target(PlayerType *player_ptr)
{
char buf[160];
monster_race *r_ptr = &r_info[w_ptr->today_mon];
/*!
* @brief 今日の賞金首を確定する / Determine today's bounty monster
- * @param player_type プレイヤーへの参照ポインタ
+ * @param PlayerType プレイヤーへの参照ポインタ
* @note conv_old is used if loaded 0.0.3 or older save file
*/
-void determine_daily_bounty(player_type *player_ptr, bool conv_old)
+void determine_daily_bounty(PlayerType *player_ptr, bool conv_old)
{
int max_dl = 3;
if (!conv_old) {
* @brief 賞金首となるユニークを確定する / Determine bounty uniques
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void determine_bounty_uniques(player_type *player_ptr)
+void determine_bounty_uniques(PlayerType *player_ptr)
{
get_mon_num_prep_bounty(player_ptr);
#pragma once
-struct player_type;
-bool exchange_cash(player_type *player_ptr);
-void today_target(player_type *player_ptr);
+class PlayerType;
+bool exchange_cash(PlayerType *player_ptr);
+void today_target(PlayerType *player_ptr);
void tsuchinoko(void);
void show_bounty(void);
-void determine_daily_bounty(player_type *player_ptr, bool conv_old);
-void determine_bounty_uniques(player_type *player_ptr);
+void determine_daily_bounty(PlayerType *player_ptr, bool conv_old);
+void determine_bounty_uniques(PlayerType *player_ptr);
* @param bcost 基本修復費用
* @return 実際にかかった費用
*/
-static PRICE repair_broken_weapon_aux(player_type *player_ptr, PRICE bcost)
+static PRICE repair_broken_weapon_aux(PlayerType *player_ptr, PRICE bcost)
{
clear_bldg(0, 22);
int row = 7;
* @param bcost 基本鑑定費用
* @return 実際にかかった費用
*/
-int repair_broken_weapon(player_type *player_ptr, PRICE bcost)
+int repair_broken_weapon(PlayerType *player_ptr, PRICE bcost)
{
PRICE cost;
screen_save();
#include "system/angband.h"
-struct player_type;
-int repair_broken_weapon(player_type *player_ptr, PRICE bcost);
+class PlayerType;
+int repair_broken_weapon(PlayerType *player_ptr, PRICE bcost);
* @return ダメージ期待値
*/
static uint32_t calc_expect_dice(
- player_type *player_ptr, uint32_t dam, int mult, int div, bool force, WEIGHT weight, int plus, int16_t meichuu, bool dokubari, bool impact, int vorpal_mult, int vorpal_div)
+ PlayerType *player_ptr, uint32_t dam, int mult, int div, bool force, WEIGHT weight, int plus, int16_t meichuu, bool dokubari, bool impact, int vorpal_mult, int vorpal_div)
{
dam = calc_slaydam(dam, mult, div, force);
dam = calc_expect_crit(player_ptr, weight, plus, dam, meichuu, dokubari, impact);
* Only accurate for the current weapon, because it includes\n
* the current number of blows for the player.\n
*/
-static void compare_weapon_aux(player_type *player_ptr, object_type *o_ptr, int col, int r)
+static void compare_weapon_aux(PlayerType *player_ptr, object_type *o_ptr, int col, int r)
{
int blow = player_ptr->num_blow[0];
bool force = false;
/*!
* @brief 武器匠における武器一つ毎の完全情報を表示する。
- * @param player_type プレイヤーへの参照ポインタ
+ * @param PlayerType プレイヤーへの参照ポインタ
* @param o_ptr オブジェクトの構造体の参照ポインタ。
* @param row 表示する列の左端
* @param col 表示する行の上端
* Only accurate for the current weapon, because it includes
* various info about the player's +to_dam and number of blows.
*/
-static void list_weapon(player_type *player_ptr, object_type *o_ptr, TERM_LEN row, TERM_LEN col)
+static void list_weapon(PlayerType *player_ptr, object_type *o_ptr, TERM_LEN row, TERM_LEN col)
{
GAME_TEXT o_name[MAX_NLEN];
GAME_TEXT tmp_str[80];
* @param bcost 基本鑑定費用
* @return 最終的にかかった費用
*/
-PRICE compare_weapons(player_type *player_ptr, PRICE bcost)
+PRICE compare_weapons(PlayerType *player_ptr, PRICE bcost)
{
object_type *o_ptr[2];
object_type orig_weapon;
#include "system/angband.h"
-struct player_type;
-PRICE compare_weapons(player_type *player_ptr, PRICE bcost);
+class PlayerType;
+PRICE compare_weapons(PlayerType *player_ptr, PRICE bcost);
* @param to_ac ACをアップさせる量
* @return 実際に行ったらTRUE
*/
-bool enchant_item(player_type *player_ptr, PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac, const ItemTester& item_tester)
+bool enchant_item(PlayerType *player_ptr, PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac, const ItemTester& item_tester)
{
clear_bldg(4, 18);
int maxenchant = (player_ptr->lev / 5);
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ItemTester;
-bool enchant_item(player_type *player_ptr, PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac, const ItemTester &item_tester);
+bool enchant_item(PlayerType *player_ptr, PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac, const ItemTester &item_tester);
* @return 常にTRUEを返す。
* @todo 返り値が意味不明なので直した方が良いかもしれない。
*/
-bool research_mon(player_type *player_ptr)
+bool research_mon(PlayerType *player_ptr)
{
char buf[256];
bool notpicked;
#pragma once
-struct player_type;
-bool research_mon(player_type *player_ptr);
+class PlayerType;
+bool research_mon(PlayerType *player_ptr);
* @param questnum クエストのID
* @param do_init クエストの開始処理か(true)、結果処理か(FALSE)
*/
-static void get_questinfo(player_type *player_ptr, IDX questnum, bool do_init)
+static void get_questinfo(PlayerType *player_ptr, IDX questnum, bool do_init)
{
for (int i = 0; i < 10; i++) {
quest_text[i][0] = '\0';
* @param questnum クエストのID
* @param do_init クエストの開始処理か(true)、結果処理か(FALSE)
*/
-void print_questinfo(player_type *player_ptr, IDX questnum, bool do_init)
+void print_questinfo(PlayerType *player_ptr, IDX questnum, bool do_init)
{
get_questinfo(player_ptr, questnum, do_init);
* @brief クエスト処理のメインルーチン / Request a quest from the Lord.
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void castle_quest(player_type *player_ptr)
+void castle_quest(PlayerType *player_ptr)
{
clear_bldg(4, 18);
QUEST_IDX q_index = player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x].special;
#pragma once
-struct player_type;
-void castle_quest(player_type *player_ptr);
+class PlayerType;
+void castle_quest(PlayerType *player_ptr);
* the base-item.\n
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void building_recharge(player_type *player_ptr)
+void building_recharge(PlayerType *player_ptr)
{
msg_flag = false;
clear_bldg(4, 18);
* the base-item.\n
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void building_recharge_all(player_type *player_ptr)
+void building_recharge_all(PlayerType *player_ptr)
{
msg_flag = false;
clear_bldg(4, 18);
#pragma once
-struct player_type;
-void building_recharge(player_type *player_ptr);
-void building_recharge_all(player_type *player_ptr);
+class PlayerType;
+void building_recharge(PlayerType *player_ptr);
+void building_recharge_all(PlayerType *player_ptr);
* @param bldg 施設構造体の参照ポインタ
* @return 種族、職業、魔法領域のいずれかが一致しているかの是非。
*/
-bool is_owner(player_type *player_ptr, building_type *bldg)
+bool is_owner(PlayerType *player_ptr, building_type *bldg)
{
if (bldg->member_class[enum2i(player_ptr->pclass)] == BUILDING_OWNER) {
return true;
* @return 種族、職業、魔法領域のいずれかが一致しているかの是非。
* @todo is_owner()との実質的な多重実装なので、リファクタリングを行うべきである。
*/
-bool is_member(player_type *player_ptr, building_type *bldg)
+bool is_member(PlayerType *player_ptr, building_type *bldg)
{
if (static_cast<bool>(bldg->member_class[enum2i(player_ptr->pclass)])) {
return true;
* @param player_ptr プレイヤーへの参照ポインタ
* @param bldg 施設構造体の参照ポインタ
*/
-void display_buikding_service(player_type *player_ptr, building_type *bldg)
+void display_buikding_service(PlayerType *player_ptr, building_type *bldg)
{
char buff[20];
byte action_color;
#pragma once
typedef struct building_type building_type;
-struct player_type;
-bool is_owner(player_type *player_ptr, building_type *bldg);
-bool is_member(player_type *player_ptr, building_type *bldg);
-void display_buikding_service(player_type *player_ptr, building_type *bldg);
+class PlayerType;
+bool is_owner(PlayerType *player_ptr, building_type *bldg);
+bool is_member(PlayerType *player_ptr, building_type *bldg);
+void display_buikding_service(PlayerType *player_ptr, building_type *bldg);
* @brief 所持金を表示する。
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void building_prt_gold(player_type *player_ptr)
+void building_prt_gold(PlayerType *player_ptr)
{
char tmp_str[80];
prt(_("手持ちのお金: ", "Gold Remaining: "), 23, 53);
#pragma once
-struct player_type;
+class PlayerType;
void clear_bldg(int min_row, int max_row);
-void building_prt_gold(player_type *player_ptr);
+void building_prt_gold(PlayerType *player_ptr);
* @param cmd プレイするゲームID
* @return プレイ成立やルール説明のみ等ならTRUE、賭け金不足で不成立ならFALSE
*/
-bool gamble_comm(player_type *player_ptr, int cmd)
+bool gamble_comm(PlayerType *player_ptr, int cmd)
{
int i;
int roll1, roll2, roll3, choice, odds, win;
#pragma once
-struct player_type;
-bool gamble_comm(player_type *player_ptr, int cmd);
+class PlayerType;
+bool gamble_comm(PlayerType *player_ptr, int cmd);
} mam_pp_type;
mam_pp_type *initialize_mam_pp_type(
- player_type *player_ptr, mam_pp_type *mam_pp_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who)
+ PlayerType *player_ptr, mam_pp_type *mam_pp_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who)
{
mam_pp_ptr->m_idx = m_idx;
mam_pp_ptr->m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
return mam_pp_ptr;
}
-static void prepare_redraw(player_type *player_ptr, mam_pp_type *mam_pp_ptr)
+static void prepare_redraw(PlayerType *player_ptr, mam_pp_type *mam_pp_ptr)
{
if (!mam_pp_ptr->m_ptr->ml)
return;
* 見えない位置で死んだら何も表示しない
* 爆発して粉々になった等ならその旨を、残りは生命か無生命かで分岐
*/
-static void print_monster_dead_by_monster(player_type *player_ptr, mam_pp_type *mam_pp_ptr)
+static void print_monster_dead_by_monster(PlayerType *player_ptr, mam_pp_type *mam_pp_ptr)
{
if (!mam_pp_ptr->known)
return;
* @param mam_pp_ptr 標的モンスター構造体への参照ポインタ
* @return 生きていたらTRUE、それ以外 (ユニークは@以外の攻撃では死なない)はFALSE
*/
-static bool check_monster_hp(player_type *player_ptr, mam_pp_type *mam_pp_ptr)
+static bool check_monster_hp(PlayerType *player_ptr, mam_pp_type *mam_pp_ptr)
{
monster_race *r_ptr = &r_info[mam_pp_ptr->m_ptr->r_idx];
if (mam_pp_ptr->m_ptr->hp < 0)
* @param player_ptr プレイヤーへの参照ポインタ
* @param mam_pp_ptr 標的モンスター構造体への参照ポインタ
*/
-static void cancel_fear_by_pain(player_type *player_ptr, mam_pp_type *mam_pp_ptr)
+static void cancel_fear_by_pain(PlayerType *player_ptr, mam_pp_type *mam_pp_ptr)
{
if (!monster_fear_remaining(mam_pp_ptr->m_ptr) || (mam_pp_ptr->dam <= 0)
|| !set_monster_monfear(player_ptr, mam_pp_ptr->m_idx, monster_fear_remaining(mam_pp_ptr->m_ptr) - randint1(mam_pp_ptr->dam / 4)))
* @param player_ptr プレイヤーへの参照ポインタ
* @param mam_pp_ptr 標的モンスター構造体への参照ポインタ
*/
-static void make_monster_fear(player_type *player_ptr, mam_pp_type *mam_pp_ptr)
+static void make_monster_fear(PlayerType *player_ptr, mam_pp_type *mam_pp_ptr)
{
monster_race *r_ptr = &r_info[mam_pp_ptr->m_ptr->r_idx];
if (monster_fear_remaining(mam_pp_ptr->m_ptr) || ((r_ptr->flags3 & RF3_NO_FEAR) == 0))
* @param player_ptr プレイヤーへの参照ポインタ
* @param mam_pp_ptr 標的モンスター構造体への参照ポインタ
*/
-static void fall_off_horse_by_melee(player_type *player_ptr, mam_pp_type *mam_pp_ptr)
+static void fall_off_horse_by_melee(PlayerType *player_ptr, mam_pp_type *mam_pp_ptr)
{
if (!player_ptr->riding || (player_ptr->riding != mam_pp_ptr->m_idx) || (mam_pp_ptr->dam <= 0))
return;
* @param who 打撃を行ったモンスターの参照ID
* @todo 打撃が当たった時の後処理 (爆発持ちのモンスターを爆発させる等)なので、関数名を変更する必要あり
*/
-void mon_take_hit_mon(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who)
+void mon_take_hit_mon(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
#include "system/angband.h"
#include "combat/combat-options-type.h"
-struct player_type;
-void mon_take_hit_mon(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who);
+class PlayerType;
+void mon_take_hit_mon(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who);
#include <iterator>
-static void decide_melee_spell_target(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void decide_melee_spell_target(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if ((player_ptr->pet_t_m_idx == 0) || !ms_ptr->pet)
return;
ms_ptr->target_idx = 0;
}
-static void decide_indirection_melee_spell(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void decide_indirection_melee_spell(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if ((ms_ptr->target_idx != 0) || (ms_ptr->m_ptr->target_y == 0))
return;
ms_ptr->ability_flags &= RF_ABILITY_INDIRECT_MASK;
}
-static bool check_melee_spell_projection(player_type *player_ptr, melee_spell_type *ms_ptr)
+static bool check_melee_spell_projection(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (ms_ptr->target_idx != 0)
return true;
return false;
}
-static void check_darkness(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_darkness(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (ms_ptr->ability_flags.has_not(MonsterAbilityType::DARKNESS))
return;
ms_ptr->ability_flags &= RF_ABILITY_NOMAGIC_MASK;
}
-static void check_arena(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_arena(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (!player_ptr->current_floor_ptr->inside_arena && !player_ptr->phase_out)
return;
ms_ptr->ability_flags.reset(MonsterAbilityType::SPECIAL);
}
-static void check_melee_spell_distance(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_melee_spell_distance(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
auto ball_mask_except_rocket = RF_ABILITY_BALL_MASK;
ball_mask_except_rocket.reset(MonsterAbilityType::ROCKET);
ms_ptr->ability_flags.reset(RF_ABILITY_BIG_BALL_MASK);
}
-static void check_melee_spell_rocket(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_melee_spell_rocket(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (ms_ptr->ability_flags.has_not(MonsterAbilityType::ROCKET))
return;
ms_ptr->ability_flags.reset(MonsterAbilityType::ROCKET);
}
-static void check_melee_spell_beam(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_melee_spell_beam(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (ms_ptr->ability_flags.has_none_of(RF_ABILITY_BEAM_MASK)
|| direct_beam(player_ptr, ms_ptr->m_ptr->fy, ms_ptr->m_ptr->fx, ms_ptr->t_ptr->fy, ms_ptr->t_ptr->fx, ms_ptr->m_ptr))
ms_ptr->ability_flags.reset(RF_ABILITY_BEAM_MASK);
}
-static void check_melee_spell_breath(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_melee_spell_breath(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (ms_ptr->ability_flags.has_none_of(RF_ABILITY_BREATH_MASK))
return;
}
}
-static void check_melee_spell_special(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_melee_spell_special(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (ms_ptr->ability_flags.has_not(MonsterAbilityType::SPECIAL))
return;
ms_ptr->ability_flags.reset(MonsterAbilityType::SPECIAL);
}
-static void check_riding(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_riding(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (ms_ptr->m_idx != player_ptr->riding)
return;
ms_ptr->ability_flags.reset(RF_ABILITY_RIDING_MASK);
}
-static void check_pet(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_pet(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (!ms_ptr->pet)
return;
check_melee_spell_special(player_ptr, ms_ptr);
}
-static void check_non_stupid(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_non_stupid(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if ((ms_ptr->r_ptr->flags2 & RF2_STUPID) != 0)
return;
ms_ptr->ability_flags.reset(MonsterAbilityType::SPECIAL);
}
-static void check_smart(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void check_smart(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if ((ms_ptr->r_ptr->flags2 & RF2_SMART) == 0)
return;
ms_ptr->ability_flags.reset(MonsterAbilityType::TELE_LEVEL);
}
-static bool set_melee_spell_set(player_type *player_ptr, melee_spell_type *ms_ptr)
+static bool set_melee_spell_set(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (ms_ptr->ability_flags.none())
return false;
return !ms_ptr->spells.empty() && player_ptr->playing && !player_ptr->is_dead && !player_ptr->leaving;
}
-bool check_melee_spell_set(player_type *player_ptr, melee_spell_type *ms_ptr)
+bool check_melee_spell_set(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (monster_confused_remaining(ms_ptr->m_ptr))
return false;
#pragma once
typedef struct melee_spell_type melee_spell_type;
-struct player_type;
-bool check_melee_spell_set(player_type *player_ptr, melee_spell_type *ms_ptr);
+class PlayerType;
+bool check_melee_spell_set(PlayerType *player_ptr, melee_spell_type *ms_ptr);
#include "system/monster-type-definition.h"
#include "system/player-type-definition.h"
-melee_spell_type *initialize_melee_spell_type(player_type *player_ptr, melee_spell_type *ms_ptr, MONSTER_IDX m_idx)
+melee_spell_type *initialize_melee_spell_type(PlayerType *player_ptr, melee_spell_type *ms_ptr, MONSTER_IDX m_idx)
{
ms_ptr->m_idx = m_idx;
ms_ptr->y = 0;
EnumClassFlagGroup<MonsterAbilityType> ability_flags;
} melee_spell_type;
-struct player_type;
-melee_spell_type *initialize_melee_spell_type(player_type *player_ptr, melee_spell_type *ms_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+melee_spell_type *initialize_melee_spell_type(PlayerType *player_ptr, melee_spell_type *ms_ptr, MONSTER_IDX m_idx);
#define RF5_SPELL_SIZE 32
#define RF6_SPELL_SIZE 32
-static bool try_melee_spell(player_type *player_ptr, melee_spell_type *ms_ptr)
+static bool try_melee_spell(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (spell_is_inate(ms_ptr->thrown_spell) || (!ms_ptr->in_no_magic_dungeon && (!monster_stunned_remaining(ms_ptr->m_ptr) || one_in_(2))))
return false;
return true;
}
-static bool disturb_melee_spell(player_type *player_ptr, melee_spell_type *ms_ptr)
+static bool disturb_melee_spell(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
if (spell_is_inate(ms_ptr->thrown_spell) || !SpellHex(player_ptr).check_hex_barrier(ms_ptr->m_idx, HEX_ANTI_MAGIC))
return false;
return true;
}
-static void process_special_melee_spell(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void process_special_melee_spell(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
bool is_special_magic = ms_ptr->m_ptr->ml;
is_special_magic &= ms_ptr->maneable;
ms_ptr->r_ptr->r_cast_spell++;
}
-static void describe_melee_spell(player_type *player_ptr, melee_spell_type *ms_ptr)
+static void describe_melee_spell(PlayerType *player_ptr, melee_spell_type *ms_ptr)
{
/* Get the monster name (or "it") */
monster_desc(player_ptr, ms_ptr->m_name, ms_ptr->m_ptr, 0x00);
* @details
* The player is only disturbed if able to be affected by the spell.
*/
-bool monst_spell_monst(player_type *player_ptr, MONSTER_IDX m_idx)
+bool monst_spell_monst(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
melee_spell_type tmp_ms;
melee_spell_type *ms_ptr = initialize_melee_spell_type(player_ptr, &tmp_ms, m_idx);
#include "system/angband.h"
-struct player_type;
-bool monst_spell_monst(player_type *player_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+bool monst_spell_monst(PlayerType *player_ptr, MONSTER_IDX m_idx);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-void describe_melee_method(player_type *player_ptr, mam_type *mam_ptr)
+void describe_melee_method(PlayerType *player_ptr, mam_type *mam_ptr)
{
switch (mam_ptr->method) {
case RBM_HIT: {
}
}
-void decide_monster_attack_effect(player_type *player_ptr, mam_type *mam_ptr)
+void decide_monster_attack_effect(PlayerType *player_ptr, mam_type *mam_ptr)
{
switch (mam_ptr->effect) {
case RaceBlowEffectType::NONE:
}
}
-void describe_monster_missed_monster(player_type *player_ptr, mam_type *mam_ptr)
+void describe_monster_missed_monster(PlayerType *player_ptr, mam_type *mam_ptr)
{
switch (mam_ptr->method) {
case RBM_HIT:
};
typedef struct mam_type mam_type;
-struct player_type;
-void describe_melee_method(player_type *player_ptr, mam_type *mam_ptr);
-void decide_monster_attack_effect(player_type *player_ptr, mam_type *mam_ptr);
-void describe_monster_missed_monster(player_type *player_ptr, mam_type *mam_ptr);
+class PlayerType;
+void describe_melee_method(PlayerType *player_ptr, mam_type *mam_ptr);
+void decide_monster_attack_effect(PlayerType *player_ptr, mam_type *mam_ptr);
+void describe_monster_missed_monster(PlayerType *player_ptr, mam_type *mam_ptr);
#include "system/monster-type-definition.h"
#include "system/player-type-definition.h"
-mam_type *initialize_mam_type(player_type *player_ptr, mam_type *mam_ptr, MONRACE_IDX m_idx, MONRACE_IDX t_idx)
+mam_type *initialize_mam_type(PlayerType *player_ptr, mam_type *mam_ptr, MONRACE_IDX m_idx, MONRACE_IDX t_idx)
{
mam_ptr->attribute = 0;
mam_ptr->m_idx = m_idx;
bool dead;
} mam_type;
-struct player_type;
-mam_type *initialize_mam_type(player_type *player_ptr, mam_type *mam_ptr, MONRACE_IDX m_idx, MONRACE_IDX t_idx);
+class PlayerType;
+mam_type *initialize_mam_type(PlayerType *player_ptr, mam_type *mam_ptr, MONRACE_IDX m_idx, MONRACE_IDX t_idx);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-static void heal_monster_by_melee(player_type *player_ptr, mam_type *mam_ptr)
+static void heal_monster_by_melee(PlayerType *player_ptr, mam_type *mam_ptr)
{
if (!monster_living(mam_ptr->m_idx) || (mam_ptr->damage <= 2))
return;
msg_format(_("%sは体力を回復したようだ。", "%^s appears healthier."), mam_ptr->m_name);
}
-static void process_blow_effect(player_type *player_ptr, mam_type *mam_ptr)
+static void process_blow_effect(PlayerType *player_ptr, mam_type *mam_ptr)
{
monster_race *r_ptr = &r_info[mam_ptr->m_ptr->r_idx];
switch (mam_ptr->attribute) {
}
}
-static void aura_fire_by_melee(player_type *player_ptr, mam_type *mam_ptr)
+static void aura_fire_by_melee(PlayerType *player_ptr, mam_type *mam_ptr)
{
monster_race *r_ptr = &r_info[mam_ptr->m_ptr->r_idx];
monster_race *tr_ptr = &r_info[mam_ptr->t_ptr->r_idx];
PROJECT_KILL | PROJECT_STOP | PROJECT_AIMED);
}
-static void aura_cold_by_melee(player_type *player_ptr, mam_type *mam_ptr)
+static void aura_cold_by_melee(PlayerType *player_ptr, mam_type *mam_ptr)
{
monster_race *r_ptr = &r_info[mam_ptr->m_ptr->r_idx];
monster_race *tr_ptr = &r_info[mam_ptr->t_ptr->r_idx];
PROJECT_KILL | PROJECT_STOP | PROJECT_AIMED);
}
-static void aura_elec_by_melee(player_type *player_ptr, mam_type *mam_ptr)
+static void aura_elec_by_melee(PlayerType *player_ptr, mam_type *mam_ptr)
{
monster_race *r_ptr = &r_info[mam_ptr->m_ptr->r_idx];
monster_race *tr_ptr = &r_info[mam_ptr->t_ptr->r_idx];
PROJECT_KILL | PROJECT_STOP | PROJECT_AIMED);
}
-static bool check_same_monster(player_type *player_ptr, mam_type *mam_ptr)
+static bool check_same_monster(PlayerType *player_ptr, mam_type *mam_ptr)
{
if (mam_ptr->m_idx == mam_ptr->t_idx)
return false;
return true;
}
-static void redraw_health_bar(player_type *player_ptr, mam_type *mam_ptr)
+static void redraw_health_bar(PlayerType *player_ptr, mam_type *mam_ptr)
{
if (!mam_ptr->t_ptr->ml)
return;
#endif
}
-static void process_monster_attack_effect(player_type *player_ptr, mam_type *mam_ptr)
+static void process_monster_attack_effect(PlayerType *player_ptr, mam_type *mam_ptr)
{
if (mam_ptr->pt == AttributeType::NONE)
return;
aura_elec_by_melee(player_ptr, mam_ptr);
}
-static void process_melee(player_type *player_ptr, mam_type *mam_ptr)
+static void process_melee(PlayerType *player_ptr, mam_type *mam_ptr)
{
if (mam_ptr->effect != RaceBlowEffectType::NONE && !check_hit_from_monster_to_monster(mam_ptr->power, mam_ptr->rlev, mam_ptr->ac, monster_stunned_remaining(mam_ptr->m_ptr))) {
describe_monster_missed_monster(player_ptr, mam_ptr);
process_monster_attack_effect(player_ptr, mam_ptr);
}
-static void thief_runaway_by_melee(player_type *player_ptr, mam_type *mam_ptr)
+static void thief_runaway_by_melee(PlayerType *player_ptr, mam_type *mam_ptr)
{
if (SpellHex(player_ptr).check_hex_barrier(mam_ptr->m_idx, HEX_ANTI_TELE)) {
if (mam_ptr->see_m) {
}
}
-static void explode_monster_by_melee(player_type *player_ptr, mam_type *mam_ptr)
+static void explode_monster_by_melee(PlayerType *player_ptr, mam_type *mam_ptr)
{
if (!mam_ptr->explode)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param mam_ptr モンスター乱闘構造体への参照ポインタ
*/
-void repeat_melee(player_type *player_ptr, mam_type *mam_ptr)
+void repeat_melee(PlayerType *player_ptr, mam_type *mam_ptr)
{
monster_race *r_ptr = &r_info[mam_ptr->m_ptr->r_idx];
for (int ap_cnt = 0; ap_cnt < MAX_NUM_BLOWS; ap_cnt++) {
* @param t_idx 目標側モンスターの参照ID
* @return 実際に打撃処理が行われた場合TRUEを返す
*/
-bool monst_attack_monst(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx)
+bool monst_attack_monst(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx)
{
mam_type tmp_mam;
mam_type *mam_ptr = initialize_mam_type(player_ptr, &tmp_mam, m_idx, t_idx);
#include "system/angband.h"
-struct player_type;
-bool monst_attack_monst(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
+class PlayerType;
+bool monst_attack_monst(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
* Hook to determine if an object is contertible in an arrow/bolt
* @return 製造を実際に行ったらTRUE、キャンセルしたらFALSEを返す
*/
-bool create_ammo(player_type *player_ptr)
+bool create_ammo(PlayerType *player_ptr)
{
if (cmd_limit_confused(player_ptr) || cmd_limit_blind(player_ptr))
return false;
#pragma once
-struct player_type;
-bool create_ammo(player_type *player_ptr);
+class PlayerType;
+bool create_ammo(PlayerType *player_ptr);
* @param spell 発動する特殊技能のID
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-bool cast_berserk_spell(player_type *player_ptr, mind_berserker_type spell)
+bool cast_berserk_spell(PlayerType *player_ptr, mind_berserker_type spell)
{
POSITION y, x;
DIRECTION dir;
#pragma once
enum mind_berserker_type : int;
-struct player_type;
-bool cast_berserk_spell(player_type *player_ptr, mind_berserker_type spell);
+class PlayerType;
+bool cast_berserk_spell(PlayerType *player_ptr, mind_berserker_type spell);
* do_cmd_cast calls this function if the player's class is 'Blue-Mage'.
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-bool do_cmd_cast_learned(player_type *player_ptr)
+bool do_cmd_cast_learned(PlayerType *player_ptr)
{
if (cmd_limit_confused(player_ptr))
return false;
OTHER = 5,
};
-struct player_type;
-bool do_cmd_cast_learned(player_type *player_ptr);
+class PlayerType;
+bool do_cmd_cast_learned(PlayerType *player_ptr);
inline constexpr std::array BLUE_MAGIC_TYPE_LIST = {
BlueMagicType::BOLT,
* @param player_ptr プレイヤーへの参照ポインタ
* @return 結果はどうあれ騎乗したらTRUE
*/
-bool rodeo(player_type *player_ptr)
+bool rodeo(PlayerType *player_ptr)
{
GAME_TEXT m_name[MAX_NLEN];
monster_type *m_ptr;
#pragma once
-struct player_type;
-bool rodeo(player_type *player_ptr);
+class PlayerType;
+bool rodeo(PlayerType *player_ptr);
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
-void acquire_chaos_weapon(player_type *player_ptr)
+void acquire_chaos_weapon(PlayerType *player_ptr)
{
object_type forge;
object_type *q_ptr = &forge;
#pragma once
-struct player_type;
-void acquire_chaos_weapon(player_type *player_ptr);
+class PlayerType;
+void acquire_chaos_weapon(PlayerType *player_ptr);
* @param n 属性の何番目か
* @return 属性タイプ
*/
-static AttributeType get_element_spells_type(player_type *player_ptr, int n)
+static AttributeType get_element_spells_type(PlayerType *player_ptr, int n)
{
auto realm = element_types.at(i2enum<ElementRealmType>(player_ptr->element));
auto t = realm.type.at(n);
* @param spell_idx 呪文番号
* @return 説明文
*/
-static concptr get_element_tip(player_type *player_ptr, int spell_idx)
+static concptr get_element_tip(PlayerType *player_ptr, int spell_idx)
{
auto realm = i2enum<ElementRealmType>(player_ptr->element);
auto spell = i2enum<ElementSpells>(spell_idx);
* @param spell_idx 呪文番号
* @return 説明文
*/
-static int get_elemental_elem(player_type *player_ptr, int spell_idx)
+static int get_elemental_elem(PlayerType *player_ptr, int spell_idx)
{
(void)player_ptr;
auto spell = i2enum<ElementSpells>(spell_idx);
* @param spell_idx 呪文番号
* @return 説明文
*/
-static mind_type get_elemental_info(player_type *player_ptr, int spell_idx)
+static mind_type get_elemental_info(PlayerType *player_ptr, int spell_idx)
{
(void)player_ptr;
auto spell = i2enum<ElementSpells>(spell_idx);
* @param p バッファ
* @return なし(pを更新)
*/
-void get_element_effect_info(player_type *player_ptr, int spell_idx, char *p)
+void get_element_effect_info(PlayerType *player_ptr, int spell_idx, char *p)
{
PLAYER_LEVEL plev = player_ptr->lev;
auto spell = i2enum<ElementSpells>(spell_idx);
* @param spell_idx 呪文番号
* @return 実行したらTRUE、キャンセルならFALSE
*/
-static bool cast_element_spell(player_type *player_ptr, SPELL_IDX spell_idx)
+static bool cast_element_spell(PlayerType *player_ptr, SPELL_IDX spell_idx)
{
auto spell = i2enum<ElementSpells>(spell_idx);
auto power = element_powers.at(spell);
* @param spell_idx 呪文番号
* @return 失敗率
*/
-static PERCENTAGE decide_element_chance(player_type *player_ptr, mind_type spell)
+static PERCENTAGE decide_element_chance(PlayerType *player_ptr, mind_type spell)
{
PERCENTAGE chance = spell.fail;
* @param spell_idx 呪文番号
* @return 消費MP
*/
-static MANA_POINT decide_element_mana_cost(player_type *player_ptr, mind_type spell)
+static MANA_POINT decide_element_mana_cost(PlayerType *player_ptr, mind_type spell)
{
(void)player_ptr;
return spell.mana_cost;
* @param only_browse 閲覧モードかどうか
* @return 選んだらTRUE、選ばなかったらFALSE
*/
-bool get_element_power(player_type *player_ptr, SPELL_IDX *sn, bool only_browse)
+bool get_element_power(PlayerType *player_ptr, SPELL_IDX *sn, bool only_browse)
{
SPELL_IDX i;
int num = 0;
* @param mana_cost 消費MP
* @return 詠唱するならTRUE、しないならFALSE
*/
-static bool check_element_mp_sufficiency(player_type *player_ptr, int mana_cost)
+static bool check_element_mp_sufficiency(PlayerType *player_ptr, int mana_cost)
{
if (mana_cost <= player_ptr->csp)
return true;
* @param chance 失敗率
* @return 詠唱して実行したらTRUE、されなかったらFALSE
*/
-static bool try_cast_element_spell(player_type *player_ptr, SPELL_IDX spell_idx, PERCENTAGE chance)
+static bool try_cast_element_spell(PlayerType *player_ptr, SPELL_IDX spell_idx, PERCENTAGE chance)
{
if (randint0(100) >= chance) {
sound(SOUND_ZAP);
* @brief 元素魔法コマンドのメインルーチン
* @param player_ptr プレイヤー情報への参照ポインタ
*/
-void do_cmd_element(player_type *player_ptr)
+void do_cmd_element(PlayerType *player_ptr)
{
SPELL_IDX i;
if (cmd_limit_confused(player_ptr) || !get_element_power(player_ptr, &i, false))
* @brief 現在プレイヤーが使用可能な元素魔法の一覧表示
* @param player_ptr プレイヤー情報への参照ポインタ
*/
-void do_cmd_element_browse(player_type *player_ptr)
+void do_cmd_element_browse(PlayerType *player_ptr)
{
SPELL_IDX n = 0;
char temp[62 * 5];
* @param em_ptr 魔法効果情報への参照ポインタ
* @return 効果処理を続けるかどうか
*/
-process_result effect_monster_elemental_genocide(player_type *player_ptr, effect_monster_type *em_ptr)
+process_result effect_monster_elemental_genocide(PlayerType *player_ptr, effect_monster_type *em_ptr)
{
auto type = get_element_type(player_ptr->element, 0);
auto name = get_element_name(player_ptr->element, 0);
* @details
* レベルに応じて取得する耐性などの判定に使用する
*/
-bool has_element_resist(player_type *player_ptr, ElementRealmType realm, PLAYER_LEVEL lev)
+bool has_element_resist(PlayerType *player_ptr, ElementRealmType realm, PLAYER_LEVEL lev)
{
if (player_ptr->pclass != PlayerClassType::ELEMENTALIST)
return false;
* @param n 最後尾の位置
* @return 領域番号
*/
-static int get_element_realm(player_type *player_ptr, int is, int n)
+static int get_element_realm(PlayerType *player_ptr, int is, int n)
{
int cs = std::max(0, is);
int os = cs;
* @param player_ptr プレイヤー情報への参照ポインタ
* @return 領域番号
*/
-byte select_element_realm(player_type *player_ptr)
+byte select_element_realm(PlayerType *player_ptr)
{
clear_from(10);
* @param player_ptr プレイヤー情報への参照ポインタ
* @param rc_ptr レイシャルパワー情報への参照ポインタ
*/
-void switch_element_racial(player_type *player_ptr, rc_type *rc_ptr)
+void switch_element_racial(PlayerType *player_ptr, rc_type *rc_ptr)
{
auto plev = player_ptr->lev;
auto realm = i2enum<ElementRealmType>(player_ptr->element);
/*!
* @todo 宣言だけ。後日適切な場所に移動
*/
-static bool door_to_darkness(player_type *player_ptr, POSITION dist);
+static bool door_to_darkness(PlayerType *player_ptr, POSITION dist);
/*!
* @brief クラスパワーを実行
* @param player_ptr プレイヤー情報への参照ポインタ
* @return 実行したらTRUE、しなかったらFALSE
*/
-bool switch_element_execution(player_type *player_ptr)
+bool switch_element_execution(PlayerType *player_ptr)
{
auto realm = i2enum<ElementRealmType>(player_ptr->element);
PLAYER_LEVEL plev = player_ptr->lev;
* @breif 暗いところ限定での次元の扉
* @param player_ptr プレイヤー情報への参照ポインタ
*/
-static bool door_to_darkness(player_type *player_ptr, POSITION dist)
+static bool door_to_darkness(PlayerType *player_ptr, POSITION dist)
{
POSITION y = player_ptr->y;
POSITION x = player_ptr->x;
MAX
};
-struct player_type;
+class PlayerType;
struct effect_monster_type;
struct rc_type;
concptr get_element_title(int realm_idx);
AttributeType get_element_type(int realm_idx, int n);
concptr get_element_name(int realm_idx, int n);
-void do_cmd_element(player_type *player_ptr);
-void do_cmd_element_browse(player_type *player_ptr);
-process_result effect_monster_elemental_genocide(player_type *player_ptr, effect_monster_type *em_ptr);
-bool has_element_resist(player_type *player_ptr, ElementRealmType realm, PLAYER_LEVEL lev);
-byte select_element_realm(player_type *player_ptr);
-void switch_element_racial(player_type *player_ptr, rc_type *rc_ptr);
-bool switch_element_execution(player_type *player_ptr);
+void do_cmd_element(PlayerType *player_ptr);
+void do_cmd_element_browse(PlayerType *player_ptr);
+process_result effect_monster_elemental_genocide(PlayerType *player_ptr, effect_monster_type *em_ptr);
+bool has_element_resist(PlayerType *player_ptr, ElementRealmType realm, PLAYER_LEVEL lev);
+byte select_element_realm(PlayerType *player_ptr);
+void switch_element_racial(PlayerType *player_ptr, rc_type *rc_ptr);
+bool switch_element_execution(PlayerType *player_ptr);
* @param player_ptr プレイヤーの参照ポインタ
* @return 現在溜まっている気の量
*/
-int32_t get_current_ki(player_type *player_ptr)
+int32_t get_current_ki(PlayerType *player_ptr)
{
auto data = PlayerClass(player_ptr).get_specific_data<force_trainer_data_type>();
* @param is_reset TRUEなら気の量をkiにセットし、FALSEなら加減算を行う
* @param ki 気の量
*/
-void set_current_ki(player_type *player_ptr, bool is_reset, int32_t ki)
+void set_current_ki(PlayerType *player_ptr, bool is_reset, int32_t ki)
{
auto data = PlayerClass(player_ptr).get_specific_data<force_trainer_data_type>();
if (!data) {
data->ki += ki;
}
-bool clear_mind(player_type *player_ptr)
+bool clear_mind(PlayerType *player_ptr)
{
if (total_friends) {
msg_print(_("今はペットを操ることに集中していないと。", "Your pets demand all of your attention."));
* @param v 継続時間
* @param do_dec 現在の継続時間より長い値のみ上書きする
*/
-void set_lightspeed(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+void set_lightspeed(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_sh_force(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_sh_force(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 命中したらTRUE
*/
-bool shock_power(player_type *player_ptr)
+bool shock_power(PlayerType *player_ptr)
{
int boost = get_current_ki(player_ptr);
if (heavy_armor(player_ptr))
* @param spell 発動する特殊技能のID
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-bool cast_force_spell(player_type *player_ptr, mind_force_trainer_type spell)
+bool cast_force_spell(PlayerType *player_ptr, mind_force_trainer_type spell)
{
DIRECTION dir;
PLAYER_LEVEL plev = player_ptr->lev;
#include "system/angband.h"
-struct player_type;
-int32_t get_current_ki(player_type *player_ptr);
-void set_current_ki(player_type *player_ptr, bool is_reset, int32_t ki);
-bool clear_mind(player_type *player_ptr);
-void set_lightspeed(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_sh_force(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool shock_power(player_type *player_ptr);
+class PlayerType;
+int32_t get_current_ki(PlayerType *player_ptr);
+void set_current_ki(PlayerType *player_ptr, bool is_reset, int32_t ki);
+bool clear_mind(PlayerType *player_ptr);
+void set_lightspeed(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_sh_force(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool shock_power(PlayerType *player_ptr);
enum mind_force_trainer_type : int;
-bool cast_force_spell(player_type *player_ptr, mind_force_trainer_type spell);
+bool cast_force_spell(PlayerType *player_ptr, mind_force_trainer_type spell);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-bool create_ration(player_type *player_ptr)
+bool create_ration(PlayerType *player_ptr)
{
object_type forge;
object_type *q_ptr = &forge;
#pragma once
-struct player_type;
-bool create_ration(player_type *player_ptr);
+class PlayerType;
+bool create_ration(PlayerType *player_ptr);
#include "player-info/equipment-info.h"
#include "system/player-type-definition.h"
-static void switch_mind_mindcrafter(player_type *player_ptr, const PLAYER_LEVEL plev, const int power, char *p)
+static void switch_mind_mindcrafter(PlayerType *player_ptr, const PLAYER_LEVEL plev, const int power, char *p)
{
switch (power) {
case 0:
}
}
-static void switch_mind_ki(player_type *player_ptr, const PLAYER_LEVEL plev, const int power, char *p)
+static void switch_mind_ki(PlayerType *player_ptr, const PLAYER_LEVEL plev, const int power, char *p)
{
int boost = get_current_ki(player_ptr);
if (heavy_armor(player_ptr))
* @param use_mind 職業毎の特殊技能ID
* @param power モンスター魔法のID
*/
-void mindcraft_info(player_type *player_ptr, char *p, MindKindType use_mind, int power)
+void mindcraft_info(PlayerType *player_ptr, char *p, MindKindType use_mind, int power)
{
const PLAYER_LEVEL plev = player_ptr->lev;
strcpy(p, "");
#pragma once
-struct player_type;
+class PlayerType;
enum class MindKindType;
-void mindcraft_info(player_type *player_ptr, char *p, MindKindType use_mind, int power);
+void mindcraft_info(PlayerType *player_ptr, char *p, MindKindType use_mind, int power);
* @param power 基本効力
* @return ターンを消費した場合TRUEを返す
*/
-bool eat_magic(player_type *player_ptr, int power)
+bool eat_magic(PlayerType *player_ptr, int power)
{
byte fail_type = 1;
GAME_TEXT o_name[MAX_NLEN];
#pragma once
-struct player_type;
-bool eat_magic(player_type *player_ptr, int power);
+class PlayerType;
+bool eat_magic(PlayerType *player_ptr, int power);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 取り込みを実行したらTRUE、キャンセルしたらFALSEを返す
*/
-bool import_magic_device(player_type *player_ptr)
+bool import_magic_device(PlayerType *player_ptr)
{
concptr q = _("どのアイテムの魔力を取り込みますか? ", "Gain power of which item? ");
concptr s = _("魔力を取り込めるアイテムがない。", "There's nothing with power to absorb.");
#pragma once
-struct player_type;
-bool import_magic_device(player_type *player_ptr);
+class PlayerType;
+bool import_magic_device(PlayerType *player_ptr);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_resist_magic(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_resist_magic(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
#include "system/angband.h"
-struct player_type;
-bool set_resist_magic(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+bool set_resist_magic(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
* good (Cure Light Wounds, Restore Strength, etc) or
* bad (Poison, Weakness etc) or 'useless' (Slime Mold Juice, etc).
*/
-bool psychometry(player_type *player_ptr)
+bool psychometry(PlayerType *player_ptr)
{
concptr q = _("どのアイテムを調べますか?", "Meditate on which item? ");
concptr s = _("調べるアイテムがありません。", "You have nothing appropriate.");
* @param spell 発動する特殊技能のID
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-bool cast_mindcrafter_spell(player_type *player_ptr, mind_mindcrafter_type spell)
+bool cast_mindcrafter_spell(PlayerType *player_ptr, mind_mindcrafter_type spell)
{
bool b = false;
int dam = 0;
#pragma once
-struct player_type;
-bool psychometry(player_type *player_ptr);
+class PlayerType;
+bool psychometry(PlayerType *player_ptr);
enum mind_mindcrafter_type : int;
-bool cast_mindcrafter_spell(player_type *player_ptr, mind_mindcrafter_type spell);
+bool cast_mindcrafter_spell(PlayerType *player_ptr, mind_mindcrafter_type spell);
/*
* @brief Multishadow effects is determined by turn
*/
-bool check_multishadow(player_type *player_ptr) { return (player_ptr->multishadow != 0) && ((w_ptr->game_turn & 1) != 0); }
+bool check_multishadow(PlayerType *player_ptr) { return (player_ptr->multishadow != 0) && ((w_ptr->game_turn & 1) != 0); }
/*!
* 静水
* @param player_ptr プレイヤーへの参照ポインタ
* @return ペットを操っている場合を除きTRUE
*/
-bool mirror_concentration(player_type *player_ptr)
+bool mirror_concentration(PlayerType *player_ptr)
{
if (total_friends) {
msg_print(_("今はペットを操ることに集中していないと。", "Your pets demand all of your attention."));
* @param player_ptr プレイヤーへの参照ポインタ
* @param explode 爆発処理を伴うならばTRUE
*/
-void remove_all_mirrors(player_type *player_ptr, bool explode)
+void remove_all_mirrors(PlayerType *player_ptr, bool explode)
{
for (POSITION x = 0; x < player_ptr->current_floor_ptr->width; x++) {
for (POSITION y = 0; y < player_ptr->current_floor_ptr->height; y++) {
* @param dam ダメージ量
* @return 効果があったらTRUEを返す
*/
-bool binding_field(player_type *player_ptr, HIT_POINT dam)
+bool binding_field(PlayerType *player_ptr, HIT_POINT dam)
{
POSITION mirror_x[10], mirror_y[10]; /* 鏡はもっと少ない */
int mirror_num = 0; /* 鏡の数 */
* @param dam ダメージ量
* @return 効果があったらTRUEを返す
*/
-void seal_of_mirror(player_type *player_ptr, HIT_POINT dam)
+void seal_of_mirror(PlayerType *player_ptr, HIT_POINT dam)
{
for (POSITION x = 0; x < player_ptr->current_floor_ptr->width; x++) {
for (POSITION y = 0; y < player_ptr->current_floor_ptr->height; y++) {
* @param player_ptr プレイヤーへの参照ポインタ
* @return 常にTRUE
*/
-bool confusing_light(player_type *player_ptr)
+bool confusing_light(PlayerType *player_ptr)
{
msg_print(_("辺りを睨んだ...", "You glare at nearby monsters..."));
slow_monsters(player_ptr, player_ptr->lev);
* @brief 鏡設置処理
* @return 実際に設置が行われた場合TRUEを返す
*/
-bool place_mirror(player_type *player_ptr)
+bool place_mirror(PlayerType *player_ptr)
{
if (!cave_clean_bold(player_ptr->current_floor_ptr, player_ptr->y, player_ptr->x)) {
msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
* @param player_ptr プレイヤーへの参照ポインタ
* @return ターンを消費した場合TRUEを返す
*/
-bool mirror_tunnel(player_type *player_ptr)
+bool mirror_tunnel(PlayerType *player_ptr)
{
POSITION x = 0, y = 0;
if (!tgt_pt(player_ptr, &x, &y))
/*
* Set "multishadow", notice observable changes
*/
-bool set_multishadow(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_multishadow(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_dustrobe(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_dustrobe(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param spell 発動する特殊技能のID
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-bool cast_mirror_spell(player_type *player_ptr, mind_mirror_master_type spell)
+bool cast_mirror_spell(PlayerType *player_ptr, mind_mirror_master_type spell)
{
DIRECTION dir;
PLAYER_LEVEL plev = player_ptr->lev;
#include "system/angband.h"
-struct player_type;
-bool check_multishadow(player_type *player_ptr);
-bool mirror_concentration(player_type *player_ptr);
-void remove_all_mirrors(player_type *player_ptr, bool explode);
-bool binding_field(player_type *player_ptr, HIT_POINT dam);
-void seal_of_mirror(player_type *player_ptr, HIT_POINT dam);
-bool confusing_light(player_type *player_ptr);
-bool place_mirror(player_type *player_ptr);
-bool mirror_tunnel(player_type *player_ptr);
-bool set_multishadow(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_dustrobe(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+bool check_multishadow(PlayerType *player_ptr);
+bool mirror_concentration(PlayerType *player_ptr);
+void remove_all_mirrors(PlayerType *player_ptr, bool explode);
+bool binding_field(PlayerType *player_ptr, HIT_POINT dam);
+void seal_of_mirror(PlayerType *player_ptr, HIT_POINT dam);
+bool confusing_light(PlayerType *player_ptr);
+bool place_mirror(PlayerType *player_ptr);
+bool mirror_tunnel(PlayerType *player_ptr);
+bool set_multishadow(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_dustrobe(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
enum mind_mirror_master_type : int;
-bool cast_mirror_spell(player_type *player_ptr, mind_mirror_master_type spell);
+bool cast_mirror_spell(PlayerType *player_ptr, mind_mirror_master_type spell);
#include "util/int-char-converter.h"
#include "view/display-messages.h"
-static void set_stance(player_type *player_ptr, const MonkStanceType new_stance)
+static void set_stance(PlayerType *player_ptr, const MonkStanceType new_stance)
{
set_action(player_ptr, ACTION_MONK_STANCE);
PlayerClass pc(player_ptr);
* @brief 修行僧の構え設定処理
* @return 構えを変化させたらTRUE、構え不能かキャンセルしたらFALSEを返す。
*/
-bool choose_monk_stance(player_type *player_ptr)
+bool choose_monk_stance(PlayerType *player_ptr)
{
if (cmd_limit_confused(player_ptr))
return false;
#pragma once
-struct player_type;
-bool choose_monk_stance(player_type *player_ptr);
+class PlayerType;
+bool choose_monk_stance(PlayerType *player_ptr);
* @param success 判定成功上の処理ならばTRUE
* @return 作用が実際にあった場合TRUEを返す
*/
-bool kawarimi(player_type *player_ptr, bool success)
+bool kawarimi(PlayerType *player_ptr, bool success)
{
auto ninja_data = PlayerClass(player_ptr).get_specific_data<ninja_data_type>();
if (!ninja_data || !ninja_data->kawarimi) {
* @param mdeath 目標モンスターが死亡したかを返す
* @return 作用が実際にあった場合TRUEを返す / Return value is for checking "done"
*/
-bool rush_attack(player_type *player_ptr, bool *mdeath)
+bool rush_attack(PlayerType *player_ptr, bool *mdeath)
{
if (mdeath)
*mdeath = false;
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-void process_surprise_attack(player_type *player_ptr, player_attack_type *pa_ptr)
+void process_surprise_attack(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
if (!has_melee_weapon(player_ptr, INVEN_MAIN_HAND + pa_ptr->hand) || player_ptr->is_icky_wield[pa_ptr->hand])
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-void calc_surprise_attack_damage(player_type *player_ptr, player_attack_type *pa_ptr)
+void calc_surprise_attack_damage(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
if (pa_ptr->backstab) {
pa_ptr->attack_damage *= (3 + (player_ptr->lev / 20));
* @param player_ptr プレイヤーへの参照ポインタ
* @return 常にTRUE
*/
-bool hayagake(player_type *player_ptr)
+bool hayagake(PlayerType *player_ptr)
{
PlayerEnergy energy(player_ptr);
if (player_ptr->action == ACTION_HAYAGAKE) {
* @param set TRUEならば超隠密状態になる。
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_superstealth(player_type *player_ptr, bool set)
+bool set_superstealth(PlayerType *player_ptr, bool set)
{
bool notice = false;
* @param spell 発動する特殊技能のID
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-bool cast_ninja_spell(player_type *player_ptr, mind_ninja_type spell)
+bool cast_ninja_spell(PlayerType *player_ptr, mind_ninja_type spell)
{
POSITION x = 0, y = 0;
DIRECTION dir;
#pragma once
struct player_attack_type;
-struct player_type;
-bool kawarimi(player_type *player_ptr, bool success);
-bool rush_attack(player_type *player_ptr, bool *mdeath);
-void process_surprise_attack(player_type *player_ptr, player_attack_type *pa_ptr);
+class PlayerType;
+bool kawarimi(PlayerType *player_ptr, bool success);
+bool rush_attack(PlayerType *player_ptr, bool *mdeath);
+void process_surprise_attack(PlayerType *player_ptr, player_attack_type *pa_ptr);
void print_surprise_attack(player_attack_type *pa_ptr);
-void calc_surprise_attack_damage(player_type *player_ptr, player_attack_type *pa_ptr);
-bool hayagake(player_type *player_ptr);
-bool set_superstealth(player_type *player_ptr, bool set);
+void calc_surprise_attack_damage(PlayerType *player_ptr, player_attack_type *pa_ptr);
+bool hayagake(PlayerType *player_ptr);
+bool set_superstealth(PlayerType *player_ptr, bool set);
enum mind_ninja_type : int;
-bool cast_ninja_spell(player_type *player_ptr, mind_ninja_type spell);
+bool cast_ninja_spell(PlayerType *player_ptr, mind_ninja_type spell);
#include "util/enum-converter.h"
#include "util/int-char-converter.h"
-MindPowerGetter::MindPowerGetter(player_type *player_ptr)
+MindPowerGetter::MindPowerGetter(PlayerType *player_ptr)
: player_ptr(player_ptr)
, menu_line(use_menu ? 1 : 0)
{
struct mind_power;
struct mind_type;
-struct player_type;
+class PlayerType;
class MindPowerGetter {
public:
- MindPowerGetter(player_type *player_ptr);
+ MindPowerGetter(PlayerType *player_ptr);
virtual ~MindPowerGetter() = default;
bool get_mind_power(SPELL_IDX *sn, bool only_browse);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
SPELL_IDX index = 0;
int num = 0;
TERM_LEN y = 1;
* Bless a weapon
* @return ターン消費を要する処理を行ったならばTRUEを返す
*/
-bool bless_weapon(player_type *player_ptr)
+bool bless_weapon(PlayerType *player_ptr)
{
concptr q = _("どのアイテムを祝福しますか?", "Bless which weapon? ");
concptr s = _("祝福できる武器がありません。", "You have weapon to bless.");
#pragma once
-struct player_type;
-bool bless_weapon(player_type *player_ptr);
+class PlayerType;
+bool bless_weapon(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param samurai_slaying_ptr スレイ計算に必要なパラメータ群への参照ポインタ
*/
-static void hissatsu_burning_strike(player_type *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
+static void hissatsu_burning_strike(PlayerType *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
{
if (samurai_slaying_ptr->mode != HISSATSU_FIRE)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param samurai_slaying_ptr スレイ計算に必要なパラメータ群への参照ポインタ
*/
-static void hissatsu_serpent_tongue(player_type *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
+static void hissatsu_serpent_tongue(PlayerType *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
{
if (samurai_slaying_ptr->mode != HISSATSU_POISON)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param samurai_slaying_ptr スレイ計算に必要なパラメータ群への参照ポインタ
*/
-static void hissatsu_rock_smash(player_type *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
+static void hissatsu_rock_smash(PlayerType *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
{
if (samurai_slaying_ptr->mode != HISSATSU_HAGAN)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param samurai_slaying_ptr スレイ計算に必要なパラメータ群への参照ポインタ
*/
-static void hissatsu_midare_setsugetsuka(player_type *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
+static void hissatsu_midare_setsugetsuka(PlayerType *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
{
if (samurai_slaying_ptr->mode != HISSATSU_COLD)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param samurai_slaying_ptr スレイ計算に必要なパラメータ群への参照ポインタ
*/
-static void hissatsu_lightning_eagle(player_type *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
+static void hissatsu_lightning_eagle(PlayerType *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
{
if (samurai_slaying_ptr->mode != HISSATSU_ELEC)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param samurai_slaying_ptr スレイ計算に必要なパラメータ群への参照ポインタ
*/
-static void hissatsu_bloody_maelstroem(player_type *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
+static void hissatsu_bloody_maelstroem(PlayerType *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
{
auto player_cut = player_ptr->effects()->cut();
if ((samurai_slaying_ptr->mode == HISSATSU_SEKIRYUKA) && player_cut->is_cut() && monster_living(samurai_slaying_ptr->m_ptr->r_idx)) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param samurai_slaying_ptr スレイ計算に必要なパラメータ群への参照ポインタ
*/
-static void hissatsu_keiun_kininken(player_type *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
+static void hissatsu_keiun_kininken(PlayerType *player_ptr, samurai_slaying_type *samurai_slaying_ptr)
{
if (samurai_slaying_ptr->mode != HISSATSU_UNDEAD)
return;
* @param mode 剣術のスレイ型ID
* @return スレイの倍率(/10倍)
*/
-MULTIPLY mult_hissatsu(player_type *player_ptr, MULTIPLY mult, const TrFlags &flags, monster_type *m_ptr, combat_options mode)
+MULTIPLY mult_hissatsu(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flags, monster_type *m_ptr, combat_options mode)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
samurai_slaying_type tmp_slaying;
return samurai_slaying_ptr->mult;
}
-void concentration(player_type *player_ptr)
+void concentration(PlayerType *player_ptr)
{
int max_csp = std::max(player_ptr->msp * 4, player_ptr->lev * 5 + 5);
* @brief 剣術家の型設定処理
* @return 型を変化させたらTRUE、型の構え不能かキャンセルしたらFALSEを返す。
*/
-bool choose_samurai_stance(player_type *player_ptr)
+bool choose_samurai_stance(PlayerType *player_ptr)
{
char choice;
char buf[80];
* @param pa_ptr 直接攻撃構造体への参照ポインタ
* @return 上昇後の命中率
*/
-int calc_attack_quality(player_type *player_ptr, player_attack_type *pa_ptr)
+int calc_attack_quality(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
int bonus = player_ptr->to_h[pa_ptr->hand] + o_ptr->to_h;
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-void mineuchi(player_type *player_ptr, player_attack_type *pa_ptr)
+void mineuchi(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
if (pa_ptr->mode != HISSATSU_MINEUCHI)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-void musou_counterattack(player_type *player_ptr, monap_type *monap_ptr)
+void musou_counterattack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if ((!player_ptr->counter && !PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::MUSOU)) || !monap_ptr->alive || player_ptr->is_dead || !monap_ptr->m_ptr->ml
|| (player_ptr->csp <= 7))
typedef struct monap_type monap_type;
struct monster_type;
struct player_attack_type;
-struct player_type;
-MULTIPLY mult_hissatsu(player_type *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr, combat_options mode);
-void concentration(player_type *player_ptr);
-bool choose_samurai_stance(player_type* player_ptr);
-int calc_attack_quality(player_type *player_ptr, player_attack_type *pa_ptr);
-void mineuchi(player_type *player_ptr, player_attack_type *pa_ptr);
-void musou_counterattack(player_type *player_ptr, monap_type *monap_ptr);
+class PlayerType;
+MULTIPLY mult_hissatsu(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr, combat_options mode);
+void concentration(PlayerType *player_ptr);
+bool choose_samurai_stance(PlayerType* player_ptr);
+int calc_attack_quality(PlayerType *player_ptr, player_attack_type *pa_ptr);
+void mineuchi(PlayerType *player_ptr, player_attack_type *pa_ptr);
+void musou_counterattack(PlayerType *player_ptr, monap_type *monap_ptr);
* @brief スナイパーの集中度加算
* @return 集中度を加算した場合は true、そうでなければ false
*/
-static bool snipe_concentrate(player_type *player_ptr)
+static bool snipe_concentrate(PlayerType *player_ptr)
{
auto sniper_data = PlayerClass(player_ptr).get_specific_data<sniper_data_type>();
if (!sniper_data) {
* スナイパーではない、もしくは集中度がすでに0であればなにもしない。
* @param msg TRUEならばメッセージを表示する
*/
-void reset_concentration(player_type *player_ptr, bool msg)
+void reset_concentration(PlayerType *player_ptr, bool msg)
{
auto sniper_data = PlayerClass(player_ptr).get_specific_data<sniper_data_type>();
if (!sniper_data) {
* @param tdam 算出中のダメージ
* @return 集中度修正を加えたダメージ
*/
-int boost_concentration_damage(player_type *player_ptr, int tdam)
+int boost_concentration_damage(PlayerType *player_ptr, int tdam)
{
auto sniper_data = PlayerClass(player_ptr).get_specific_data<sniper_data_type>();
const auto sniper_concent = sniper_data ? sniper_data->concent : 0;
/*!
* @brief スナイパーの技能リストを表示する
*/
-void display_snipe_list(player_type *player_ptr)
+void display_snipe_list(PlayerType *player_ptr)
{
int i;
TERM_LEN y = 1;
* when you run it. It's probably easy to fix but I haven't tried,\n
* sorry.\n
*/
-static int get_snipe_power(player_type *player_ptr, COMMAND_CODE *sn, bool only_browse)
+static int get_snipe_power(PlayerType *player_ptr, COMMAND_CODE *sn, bool only_browse)
{
COMMAND_CODE i;
int num = 0;
* @param m_ptr 目標となるモンスターの構造体参照ポインタ
* @return スレイの倍率(/10倍)
*/
-MULTIPLY calc_snipe_damage_with_slay(player_type *player_ptr, MULTIPLY mult, monster_type *m_ptr, SPELL_IDX snipe_type)
+MULTIPLY calc_snipe_damage_with_slay(PlayerType *player_ptr, MULTIPLY mult, monster_type *m_ptr, SPELL_IDX snipe_type)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
bool seen = is_seen(player_ptr, m_ptr);
* @param spell 発動する特殊技能のID
* @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
*/
-static bool cast_sniper_spell(player_type *player_ptr, int spell)
+static bool cast_sniper_spell(PlayerType *player_ptr, int spell)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_BOW];
SPELL_IDX snipe_type = SP_NONE;
/*!
* @brief スナイパー技能コマンドのメインルーチン /
*/
-void do_cmd_snipe(player_type *player_ptr)
+void do_cmd_snipe(PlayerType *player_ptr)
{
COMMAND_CODE n = 0;
bool cast;
/*!
* @brief スナイパー技能コマンドの表示 /
*/
-void do_cmd_snipe_browse(player_type *player_ptr)
+void do_cmd_snipe_browse(PlayerType *player_ptr)
{
COMMAND_CODE n = 0;
int j, line;
#include "system/angband.h"
struct monster_type;
-struct player_type;
-void reset_concentration(player_type *player_ptr, bool msg);
-void display_snipe_list(player_type *player_ptr);
-MULTIPLY calc_snipe_damage_with_slay(player_type *player_ptr, MULTIPLY mult, monster_type *m_ptr, SPELL_IDX snipe_type);
-void do_cmd_snipe(player_type *player_ptr);
-void do_cmd_snipe_browse(player_type *player_ptr);
-int boost_concentration_damage(player_type *player_ptr, int tdam);
+class PlayerType;
+void reset_concentration(PlayerType *player_ptr, bool msg);
+void display_snipe_list(PlayerType *player_ptr);
+MULTIPLY calc_snipe_damage_with_slay(PlayerType *player_ptr, MULTIPLY mult, monster_type *m_ptr, SPELL_IDX snipe_type);
+void do_cmd_snipe(PlayerType *player_ptr);
+void do_cmd_snipe_browse(PlayerType *player_ptr);
+int boost_concentration_damage(PlayerType *player_ptr, int tdam);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-bool comvert_hp_to_mp(player_type *player_ptr)
+bool comvert_hp_to_mp(PlayerType *player_ptr)
{
int gain_sp = take_hit(player_ptr, DAMAGE_USELIFE, player_ptr->lev, _("HPからMPへの無謀な変換", "thoughtless conversion from HP to SP")) / 5;
if (!gain_sp) {
return true;
}
-bool comvert_mp_to_hp(player_type *player_ptr)
+bool comvert_mp_to_hp(PlayerType *player_ptr)
{
if (player_ptr->csp >= player_ptr->lev / 5) {
player_ptr->csp -= player_ptr->lev / 5;
#pragma once
-struct player_type;
-bool comvert_hp_to_mp(player_type *player_ptr);
-bool comvert_mp_to_hp(player_type *player_ptr);
+class PlayerType;
+bool comvert_hp_to_mp(PlayerType *player_ptr);
+bool comvert_mp_to_hp(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return コマンドの入力先にモンスターがいたらTRUE
*/
-bool hit_and_away(player_type *player_ptr)
+bool hit_and_away(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_direction(player_ptr, &dir, false, false))
* @param player_ptr プレイヤーへの参照ポインタ
* @return 常にTRUE
*/
-bool sword_dancing(player_type *player_ptr)
+bool sword_dancing(PlayerType *player_ptr)
{
DIRECTION dir;
POSITION y = 0, x = 0;
#pragma once
-struct player_type;
-bool hit_and_away(player_type *player_ptr);
-bool sword_dancing(player_type *player_ptr);
+class PlayerType;
+bool hit_and_away(PlayerType *player_ptr);
+bool sword_dancing(PlayerType *player_ptr);
/*!
* @brief 所持しているエッセンス一覧を表示する
*/
-static void display_essence(player_type *player_ptr)
+static void display_essence(PlayerType *player_ptr)
{
constexpr auto row_count = 21U;
constexpr auto column_width = 22U;
* @brief エッセンスの抽出処理
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void drain_essence(player_type *player_ptr)
+static void drain_essence(PlayerType *player_ptr)
{
auto q = _("どのアイテムから抽出しますか?", "Extract from which item? ");
auto s = _("抽出できるアイテムがありません。", "You have nothing you can extract from.");
* @brief エッセンスを実際に付加する
* @param mode エッセンスの大別ID
*/
-static void add_essence(player_type *player_ptr, SmithCategoryType mode)
+static void add_essence(PlayerType *player_ptr, SmithCategoryType mode)
{
OBJECT_IDX item;
bool flag;
/*!
* @brief エッセンスを消去する
*/
-static void erase_essence(player_type *player_ptr)
+static void erase_essence(PlayerType *player_ptr)
{
OBJECT_IDX item;
concptr q, s;
* @brief 鍛冶コマンドのメインルーチン
* @param only_browse TRUEならばエッセンス一覧の表示のみを行う
*/
-void do_cmd_kaji(player_type *player_ptr, bool only_browse)
+void do_cmd_kaji(PlayerType *player_ptr, bool only_browse)
{
COMMAND_CODE mode = 0;
char choice;
// 最終的には鍛冶師ではリファクタリングの前後でのセーブファイル移行を不可にする
#define MIN_SPECIAL_ESSENCE 200
-struct player_type;
-void do_cmd_kaji(player_type *player_ptr, bool only_browse);
+class PlayerType;
+void do_cmd_kaji(PlayerType *player_ptr, bool only_browse);
* @return 技のランダム選択回数
* @details ランダム選択は一番強い技が最終的に選択されるので、回数が多いほど有利
*/
-static int calc_max_blow_selection_times(player_type *player_ptr)
+static int calc_max_blow_selection_times(PlayerType *player_ptr)
{
PlayerClass pc(player_ptr);
if (pc.monk_stance_is(MonkStanceType::BYAKKO))
* @return 技のランダム選択回数
* @return 技の行使に必要な最低レベル
*/
-static int select_blow(player_type *player_ptr, player_attack_type *pa_ptr, int max_blow_selection_times)
+static int select_blow(PlayerType *player_ptr, player_attack_type *pa_ptr, int max_blow_selection_times)
{
int min_level = 1;
const martial_arts *old_ptr = &ma_blows[0];
* @param player_ptr プレイヤーへの参照ポインタ
* @return 重さ
*/
-static WEIGHT calc_monk_attack_weight(player_type *player_ptr)
+static WEIGHT calc_monk_attack_weight(PlayerType *player_ptr)
{
WEIGHT weight = 8;
if (PlayerClass(player_ptr).monk_stance_is(MonkStanceType::SUZAKU))
* @param resist_stun 朦朧への抵抗値
* @param special_effect 技を繰り出した時の追加効果
*/
-static void process_attack_vital_spot(player_type *player_ptr, player_attack_type *pa_ptr, int *stun_effect, int *resist_stun, const int special_effect)
+static void process_attack_vital_spot(PlayerType *player_ptr, player_attack_type *pa_ptr, int *stun_effect, int *resist_stun, const int special_effect)
{
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
if ((special_effect == MA_KNEE) && ((pa_ptr->attack_damage + player_ptr->to_d[pa_ptr->hand]) < pa_ptr->m_ptr->hp)) {
* @param stun_effect 朦朧の残りターン
* @param resist_stun 朦朧への抵抗値
*/
-static void print_stun_effect(player_type *player_ptr, player_attack_type *pa_ptr, const int stun_effect, const int resist_stun)
+static void print_stun_effect(PlayerType *player_ptr, player_attack_type *pa_ptr, const int stun_effect, const int resist_stun)
{
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
if (stun_effect && ((pa_ptr->attack_damage + player_ptr->to_d[pa_ptr->hand]) < pa_ptr->m_ptr->hp)) {
* @param pa_ptr 直接攻撃構造体への参照ポインタ
* @param g_ptr グリッドへの参照ポインタ
*/
-void process_monk_attack(player_type *player_ptr, player_attack_type *pa_ptr)
+void process_monk_attack(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
int resist_stun = calc_stun_resistance(pa_ptr);
int max_blow_selection_times = calc_max_blow_selection_times(player_ptr);
print_stun_effect(player_ptr, pa_ptr, stun_effect, resist_stun);
}
-bool double_attack(player_type *player_ptr)
+bool double_attack(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_rep_dir(player_ptr, &dir, false))
#pragma once
struct player_attack_type;
-struct player_type;
-void process_monk_attack(player_type *player_ptr, player_attack_type *pa_ptr);
-bool double_attack(player_type *player_ptr);
+class PlayerType;
+void process_monk_attack(PlayerType *player_ptr, player_attack_type *pa_ptr);
+bool double_attack(PlayerType *player_ptr);
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
* @details 10% (毒の一次耐性があれば4%、二重耐性ならば1.6%)の確率で耐久が低下し、更に1/10の確率で永久低下する
*/
-void calc_blow_disease(player_type *player_ptr, monap_type *monap_ptr)
+void calc_blow_disease(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_resist_pois(player_ptr))
monap_ptr->damage = monap_ptr->damage * (randint1(4) + 4) / 9;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-void calc_blow_lose_strength(player_type *player_ptr, monap_type *monap_ptr)
+void calc_blow_lose_strength(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_sustain_str(player_ptr))
monap_ptr->get_damage = monap_ptr->get_damage * (randint1(4) + 4) / 9;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-void calc_blow_lose_intelligence(player_type *player_ptr, monap_type *monap_ptr)
+void calc_blow_lose_intelligence(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_sustain_int(player_ptr))
monap_ptr->get_damage = monap_ptr->get_damage * (randint1(4) + 4) / 9;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-void calc_blow_lose_wisdom(player_type *player_ptr, monap_type *monap_ptr)
+void calc_blow_lose_wisdom(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_sustain_wis(player_ptr))
monap_ptr->get_damage = monap_ptr->get_damage * (randint1(4) + 4) / 9;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-void calc_blow_lose_dexterity(player_type *player_ptr, monap_type *monap_ptr)
+void calc_blow_lose_dexterity(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_sustain_dex(player_ptr))
monap_ptr->get_damage = monap_ptr->get_damage * (randint1(4) + 4) / 9;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-void calc_blow_lose_constitution(player_type *player_ptr, monap_type *monap_ptr)
+void calc_blow_lose_constitution(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_sustain_con(player_ptr))
monap_ptr->get_damage = monap_ptr->get_damage * (randint1(4) + 4) / 9;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-void calc_blow_lose_charisma(player_type *player_ptr, monap_type *monap_ptr)
+void calc_blow_lose_charisma(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_sustain_chr(player_ptr))
monap_ptr->get_damage = monap_ptr->get_damage * (randint1(4) + 4) / 9;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-void calc_blow_lose_all(player_type *player_ptr, monap_type *monap_ptr)
+void calc_blow_lose_all(PlayerType *player_ptr, monap_type *monap_ptr)
{
int damage_ratio = 100;
if (has_sustain_str(player_ptr))
#pragma once
typedef struct monap_type monap_type;
-struct player_type;
-void calc_blow_disease(player_type *player_ptr, monap_type *monap_ptr);
-void calc_blow_lose_strength(player_type *player_ptr, monap_type *monap_ptr);
-void calc_blow_lose_intelligence(player_type *player_ptr, monap_type *monap_ptr);
-void calc_blow_lose_wisdom(player_type *player_ptr, monap_type *monap_ptr);
-void calc_blow_lose_dexterity(player_type *player_ptr, monap_type *monap_ptr);
-void calc_blow_lose_constitution(player_type *player_ptr, monap_type *monap_ptr);
-void calc_blow_lose_charisma(player_type *player_ptr, monap_type *monap_ptr);
-void calc_blow_lose_all(player_type *player_ptr, monap_type *monap_ptr);
+class PlayerType;
+void calc_blow_disease(PlayerType *player_ptr, monap_type *monap_ptr);
+void calc_blow_lose_strength(PlayerType *player_ptr, monap_type *monap_ptr);
+void calc_blow_lose_intelligence(PlayerType *player_ptr, monap_type *monap_ptr);
+void calc_blow_lose_wisdom(PlayerType *player_ptr, monap_type *monap_ptr);
+void calc_blow_lose_dexterity(PlayerType *player_ptr, monap_type *monap_ptr);
+void calc_blow_lose_constitution(PlayerType *player_ptr, monap_type *monap_ptr);
+void calc_blow_lose_charisma(PlayerType *player_ptr, monap_type *monap_ptr);
+void calc_blow_lose_all(PlayerType *player_ptr, monap_type *monap_ptr);
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
-static bool check_no_blow(player_type *player_ptr, monap_type *monap_ptr)
+static bool check_no_blow(PlayerType *player_ptr, monap_type *monap_ptr)
{
auto *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
if (any_bits(r_ptr->flags1, RF1_NEVER_BLOW)) {
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
* @return 攻撃続行ならばTRUE、打ち切りになったらFALSE
*/
-static bool check_monster_continuous_attack(player_type *player_ptr, monap_type *monap_ptr)
+static bool check_monster_continuous_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!monster_is_valid(monap_ptr->m_ptr) || (monap_ptr->method == RBM_NONE)) {
return false;
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
* @return briefに書いた条件+確率が満たされたらTRUE、それ以外はFALSE
*/
-static bool effect_protecion_from_evil(player_type *player_ptr, monap_type *monap_ptr)
+static bool effect_protecion_from_evil(PlayerType *player_ptr, monap_type *monap_ptr)
{
auto *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
if ((player_ptr->protevil <= 0) || none_bits(r_ptr->flags3, RF3_EVIL) || (player_ptr->lev < monap_ptr->rlev) || ((randint0(100) + player_ptr->lev) <= 50)) {
}
}
-static void calc_player_cut(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_player_cut(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (monap_ptr->do_cut == 0) {
return;
/*!
* @brief 能力値の実値を求める
- * @param raw player_typeに格納されている生値
+ * @param raw PlayerTypeに格納されている生値
* @return 実値
* @details AD&Dの記法に則り、19以上の値を取らなくしているので、格納方法が面倒
*/
* 2%の確率で朦朧蓄積ランクを1上げる.
* 肉体のパラメータが合計80を超える水準に強化されていたら朦朧蓄積ランクを1下げる.
*/
-static void process_player_stun(player_type *player_ptr, monap_type *monap_ptr)
+static void process_player_stun(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (monap_ptr->do_stun == 0) {
return;
}
}
-static void monster_explode(player_type *player_ptr, monap_type *monap_ptr)
+static void monster_explode(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!monap_ptr->explode) {
return;
}
}
-static void describe_attack_evasion(player_type *player_ptr, monap_type *monap_ptr)
+static void describe_attack_evasion(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!monap_ptr->m_ptr->ml) {
return;
#endif
}
-static void gain_armor_exp(player_type *player_ptr, monap_type *monap_ptr)
+static void gain_armor_exp(PlayerType *player_ptr, monap_type *monap_ptr)
{
const auto o_ptr_mh = &player_ptr->inventory_list[INVEN_MAIN_HAND];
const auto o_ptr_sh = &player_ptr->inventory_list[INVEN_SUB_HAND];
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
* @details 最大4 回/モンスター/ターン、このルーチンを通る
*/
-static bool process_monster_attack_hit(player_type *player_ptr, monap_type *monap_ptr)
+static bool process_monster_attack_hit(PlayerType *player_ptr, monap_type *monap_ptr)
{
disturb(player_ptr, true, true);
if (effect_protecion_from_evil(player_ptr, monap_ptr)) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void process_monster_attack_evasion(player_type *player_ptr, monap_type *monap_ptr)
+static void process_monster_attack_evasion(PlayerType *player_ptr, monap_type *monap_ptr)
{
switch (monap_ptr->method) {
case RBM_HIT:
* 非自明な類の打撃については、そのダメージが 0 ならば基本的に知識が増えない.
* 但し、既に一定以上の知識があれば常に知識が増える(何をされたのか察知できる).
*/
-static void increase_blow_type_seen(player_type *player_ptr, monap_type *monap_ptr, const int ap_cnt)
+static void increase_blow_type_seen(PlayerType *player_ptr, monap_type *monap_ptr, const int ap_cnt)
{
if (!is_original_ap_and_seen(player_ptr, monap_ptr->m_ptr) || monap_ptr->do_silly_attack) {
return;
* @brief モンスターからプレイヤーへの打撃処理本体
* @return 打撃に反応してプレイヤーがその場から離脱したかどうか
*/
-static bool process_monster_blows(player_type *player_ptr, monap_type *monap_ptr)
+static bool process_monster_blows(PlayerType *player_ptr, monap_type *monap_ptr)
{
auto *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
for (auto ap_cnt = 0; ap_cnt < MAX_NUM_BLOWS; ap_cnt++) {
return false;
}
-static void postprocess_monster_blows(player_type *player_ptr, monap_type *monap_ptr)
+static void postprocess_monster_blows(PlayerType *player_ptr, monap_type *monap_ptr)
{
SpellHex spell_hex(player_ptr, monap_ptr);
spell_hex.store_vengeful_damage(monap_ptr->get_damage);
* @param m_idx 打撃を行うモンスターのID
* @return 実際に攻撃処理を行った場合TRUEを返す
*/
-bool make_attack_normal(player_type *player_ptr, MONSTER_IDX m_idx)
+bool make_attack_normal(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monap_type tmp_monap;
monap_type *monap_ptr = initialize_monap_type(player_ptr, &tmp_monap, m_idx);
#include "system/angband.h"
-struct player_type;
-bool make_attack_normal(player_type *player_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+bool make_attack_normal(PlayerType *player_ptr, MONSTER_IDX m_idx);
* @details
* 反攻撃の洞窟など、直接攻撃ができない場所では処理をスキップする
*/
-void exe_monster_attack_to_player(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION ny, POSITION nx)
+void exe_monster_attack_to_player(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION ny, POSITION nx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param m_idx モンスターID
* @param g_ptr グリッドへの参照ポインタ
*/
-static bool exe_monster_attack_to_monster(player_type *player_ptr, MONSTER_IDX m_idx, grid_type *g_ptr)
+static bool exe_monster_attack_to_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, grid_type *g_ptr)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param can_cross モンスターが地形を踏破できるならばTRUE
* @return ターン消費が発生したらTRUE
*/
-bool process_monster_attack_to_monster(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, grid_type *g_ptr, bool can_cross)
+bool process_monster_attack_to_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, grid_type *g_ptr, bool can_cross)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
#include "system/angband.h"
struct grid_type;;
-struct player_type;
+class PlayerType;
struct turn_flags;
-void exe_monster_attack_to_player(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION ny, POSITION nx);
-bool process_monster_attack_to_monster(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, grid_type *g_ptr, bool can_cross);
+void exe_monster_attack_to_player(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION ny, POSITION nx);
+bool process_monster_attack_to_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, grid_type *g_ptr, bool can_cross);
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
-void process_blind_attack(player_type *player_ptr, monap_type *monap_ptr)
+void process_blind_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_resist_blind(player_ptr) || check_multishadow(player_ptr)) {
return;
monap_ptr->obvious = true;
}
-void process_terrify_attack(player_type *player_ptr, monap_type *monap_ptr)
+void process_terrify_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (check_multishadow(player_ptr)) {
return;
}
}
-void process_paralyze_attack(player_type *player_ptr, monap_type *monap_ptr)
+void process_paralyze_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (check_multishadow(player_ptr)) {
return;
}
}
-void process_lose_all_attack(player_type *player_ptr, monap_type *monap_ptr)
+void process_lose_all_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (do_dec_stat(player_ptr, A_STR)) {
monap_ptr->obvious = true;
}
}
-void process_stun_attack(player_type *player_ptr, monap_type *monap_ptr)
+void process_stun_attack(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_resist_sound(player_ptr) || check_multishadow(player_ptr)) {
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @monap_ptr モンスターからモンスターへの直接攻撃構造体への参照ポインタ
*/
-static void describe_disability(player_type *player_ptr, monap_type *monap_ptr)
+static void describe_disability(PlayerType *player_ptr, monap_type *monap_ptr)
{
int stat = randint0(6);
switch (stat) {
}
}
-void process_monster_attack_time(player_type *player_ptr, monap_type *monap_ptr)
+void process_monster_attack_time(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_resist_time(player_ptr) || check_multishadow(player_ptr)) {
return;
#include "system/angband.h"
typedef struct monap_type monap_type;
-struct player_type;
-void process_blind_attack(player_type *player_ptr, monap_type *monap_ptr);
-void process_terrify_attack(player_type *player_ptr, monap_type *monap_ptr);
-void process_paralyze_attack(player_type *player_ptr, monap_type *monap_ptr);
-void process_lose_all_attack(player_type *player_ptr, monap_type *monap_ptr);
-void process_stun_attack(player_type *player_ptr, monap_type *monap_ptr);
-void process_monster_attack_time(player_type *player_ptr, monap_type *monap_ptr);
+class PlayerType;
+void process_blind_attack(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_terrify_attack(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_paralyze_attack(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_lose_all_attack(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_stun_attack(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_monster_attack_time(PlayerType *player_ptr, monap_type *monap_ptr);
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
* @details 減衰の計算式がpoisではなくnukeなのは仕様 (1/3では減衰が強すぎると判断したため)
*/
-static void calc_blow_poison(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_poison(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (monap_ptr->explode)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_disenchant(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_disenchant(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (monap_ptr->explode)
return;
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
* @detals 魔道具使用能力向上フラグがあれば、吸収対象のアイテムをスキャンされる回数が半分で済む
*/
-static void calc_blow_un_power(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_un_power(PlayerType *player_ptr, monap_type *monap_ptr)
{
int damage_ratio = 1000;
if (has_dec_mana(player_ptr))
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_blind(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_blind(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_resist_blind(player_ptr))
monap_ptr->damage = monap_ptr->damage * (randint1(4) + 3) / 8;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_confusion(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_confusion(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (monap_ptr->explode) {
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_fear(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_fear(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_resist_fear(player_ptr))
monap_ptr->damage = monap_ptr->damage * (randint1(4) + 3) / 8;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_paralysis(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_paralysis(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (has_free_act(player_ptr))
monap_ptr->damage = monap_ptr->damage * (randint1(4) + 3) / 8;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_drain_exp(player_type *player_ptr, monap_type *monap_ptr, const int drain_value, const int hold_exp_prob)
+static void calc_blow_drain_exp(PlayerType *player_ptr, monap_type *monap_ptr, const int drain_value, const int hold_exp_prob)
{
int32_t d = damroll(drain_value, 6) + (player_ptr->exp / 100) * MON_DRAIN_LIFE;
monap_ptr->obvious = true;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_time(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_time(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (monap_ptr->explode)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_drain_life(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_drain_life(PlayerType *player_ptr, monap_type *monap_ptr)
{
int32_t d = damroll(60, 6) + (player_ptr->exp / 100) * MON_DRAIN_LIFE;
monap_ptr->obvious = true;
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-static void calc_blow_drain_mana(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_drain_mana(PlayerType *player_ptr, monap_type *monap_ptr)
{
monap_ptr->obvious = true;
int damage_ratio = 100;
update_smart_learn(player_ptr, monap_ptr->m_idx, DRS_MANA);
}
-static void calc_blow_inertia(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_inertia(PlayerType *player_ptr, monap_type *monap_ptr)
{
if ((player_ptr->fast > 0) || (player_ptr->pspeed >= 130))
monap_ptr->damage = monap_ptr->damage * (randint1(4) + 4) / 9;
/*!
* @brief 空腹進行度を計算する (急速回復があれば+100%、遅消化があれば-50%)
*/
-static void calc_blow_hungry(player_type *player_ptr, monap_type *monap_ptr)
+static void calc_blow_hungry(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (player_ptr->regenerate)
monap_ptr->damage = monap_ptr->damage * 2;
process_monster_attack_hungry(player_ptr, monap_ptr);
}
-void switch_monster_blow_to_player(player_type *player_ptr, monap_type *monap_ptr)
+void switch_monster_blow_to_player(PlayerType *player_ptr, monap_type *monap_ptr)
{
switch (monap_ptr->effect) {
case RaceBlowEffectType::NONE:
#pragma once
typedef struct monap_type monap_type;
-struct player_type;
-void switch_monster_blow_to_player(player_type *player_ptr, monap_type *monap_ptr);
+class PlayerType;
+void switch_monster_blow_to_player(PlayerType *player_ptr, monap_type *monap_ptr);
#include "system/monster-type-definition.h"
#include "system/player-type-definition.h"
-monap_type *initialize_monap_type(player_type *player_ptr, monap_type *monap_ptr, MONSTER_IDX m_idx)
+monap_type *initialize_monap_type(PlayerType *player_ptr, monap_type *monap_ptr, MONSTER_IDX m_idx)
{
#ifdef JP
monap_ptr->abbreviate = 0;
bool fear;
} monap_type;
-struct player_type;
-monap_type *initialize_monap_type(player_type *player_ptr, monap_type *monap_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+monap_type *initialize_monap_type(PlayerType *player_ptr, monap_type *monap_ptr, MONSTER_IDX m_idx);
#include "view/display-messages.h"
#include "world/world-object.h"
-void process_eat_gold(player_type *player_ptr, monap_type *monap_ptr)
+void process_eat_gold(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (!player_ptr->paralyzed && (randint0(100) < (adj_dex_safe[player_ptr->stat_index[A_DEX]] + player_ptr->lev))) {
msg_print(_("しかし素早く財布を守った!", "You quickly protect your money pouch!"));
* @monap_ptr モンスターからモンスターへの直接攻撃構造体への参照ポインタ
* @return 盗まれたらTRUE、何も盗まれなかったらFALSE
*/
-bool check_eat_item(player_type *player_ptr, monap_type *monap_ptr)
+bool check_eat_item(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (monster_confused_remaining(monap_ptr->m_ptr))
return false;
* @param player_ptr プレイヤーへの参照ポインタ
* @monap_ptr モンスターからモンスターへの直接攻撃構造体への参照ポインタ
*/
-static void move_item_to_monster(player_type *player_ptr, monap_type *monap_ptr, const OBJECT_IDX o_idx)
+static void move_item_to_monster(PlayerType *player_ptr, monap_type *monap_ptr, const OBJECT_IDX o_idx)
{
if (o_idx == 0)
return;
* @monap_ptr モンスターからモンスターへの直接攻撃構造体への参照ポインタ
* @details eatとあるがお金や食べ物と違ってなくならない、盗んだモンスターを倒せば取り戻せる
*/
-void process_eat_item(player_type *player_ptr, monap_type *monap_ptr)
+void process_eat_item(PlayerType *player_ptr, monap_type *monap_ptr)
{
for (int i = 0; i < 10; i++) {
OBJECT_IDX o_idx;
}
}
-void process_eat_food(player_type *player_ptr, monap_type *monap_ptr)
+void process_eat_food(PlayerType *player_ptr, monap_type *monap_ptr)
{
for (int i = 0; i < 10; i++) {
INVENTORY_IDX i_idx = (INVENTORY_IDX)randint0(INVEN_PACK);
}
}
-void process_eat_lite(player_type *player_ptr, monap_type *monap_ptr)
+void process_eat_lite(PlayerType *player_ptr, monap_type *monap_ptr)
{
if ((monap_ptr->o_ptr->xtra4 <= 0) || monap_ptr->o_ptr->is_fixed_artifact())
return;
* @details 魔道具使用能力向上フラグがあれば、吸収量は全部ではない
* 詳細はOSDN #40911の議論を参照のこと
*/
-bool process_un_power(player_type *player_ptr, monap_type *monap_ptr)
+bool process_un_power(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (((monap_ptr->o_ptr->tval != ItemKindType::STAFF) && (monap_ptr->o_ptr->tval != ItemKindType::WAND)) || (monap_ptr->o_ptr->pval == 0))
return false;
return true;
}
-bool check_drain_hp(player_type *player_ptr, const int32_t d)
+bool check_drain_hp(PlayerType *player_ptr, const int32_t d)
{
bool resist_drain = !drain_exp(player_ptr, d, d / 10, 50);
if (player_ptr->mimic_form) {
}
}
-void process_drain_life(player_type *player_ptr, monap_type *monap_ptr, const bool resist_drain)
+void process_drain_life(PlayerType *player_ptr, monap_type *monap_ptr, const bool resist_drain)
{
if ((monap_ptr->damage <= 5) || resist_drain)
return;
msg_format(_("%sは体力を回復したようだ。", "%^s appears healthier."), monap_ptr->m_name);
}
-void process_drain_mana(player_type *player_ptr, monap_type *monap_ptr)
+void process_drain_mana(PlayerType *player_ptr, monap_type *monap_ptr)
{
if (check_multishadow(player_ptr)) {
msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, but you are unharmed!"));
* @monap_ptr モンスターからモンスターへの直接攻撃構造体への参照ポインタ
* @details 空腹、衰弱の一歩手前で止める優しさは残す。
*/
-void process_monster_attack_hungry(player_type *player_ptr, monap_type *monap_ptr)
+void process_monster_attack_hungry(PlayerType *player_ptr, monap_type *monap_ptr)
{
msg_format(_("あなたは腹が減った!", "You feel hungry!"));
auto subtracted_food = static_cast<int16_t>(player_ptr->food - monap_ptr->damage);
#include "system/angband.h"
typedef struct monap_type monap_type;
-struct player_type;
-void process_eat_gold(player_type *player_ptr, monap_type *monap_ptr);
-bool check_eat_item(player_type *player_ptr, monap_type *monap_ptr);
-void process_eat_item(player_type *player_ptr, monap_type *monap_ptr);
-void process_eat_food(player_type *player_ptr, monap_type *monap_ptr);
-void process_eat_lite(player_type *player_ptr, monap_type *monap_ptr);
+class PlayerType;
+void process_eat_gold(PlayerType *player_ptr, monap_type *monap_ptr);
+bool check_eat_item(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_eat_item(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_eat_food(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_eat_lite(PlayerType *player_ptr, monap_type *monap_ptr);
-bool process_un_power(player_type *player_ptr, monap_type *monap_ptr);
-bool check_drain_hp(player_type *player_ptr, const int32_t d);
-void process_drain_life(player_type *player_ptr, monap_type *monap_ptr, const bool resist_drain);
-void process_drain_mana(player_type *player_ptr, monap_type *monap_ptr);
-void process_monster_attack_hungry(player_type *player_ptr, monap_type *monap_ptr);
+bool process_un_power(PlayerType *player_ptr, monap_type *monap_ptr);
+bool check_drain_hp(PlayerType *player_ptr, const int32_t d);
+void process_drain_life(PlayerType *player_ptr, monap_type *monap_ptr, const bool resist_drain);
+void process_drain_mana(PlayerType *player_ptr, monap_type *monap_ptr);
+void process_monster_attack_hungry(PlayerType *player_ptr, monap_type *monap_ptr);
return MON_PLAYER;
}
-monster_death_type *initialize_monster_death_type(player_type *player_ptr, monster_death_type *md_ptr, MONSTER_IDX m_idx, bool drop_item)
+monster_death_type *initialize_monster_death_type(PlayerType *player_ptr, monster_death_type *md_ptr, MONSTER_IDX m_idx, bool drop_item)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
md_ptr->m_idx = m_idx;
uint32_t mo_mode;
} monster_death_type;
-struct player_type;
-monster_death_type *initialize_monster_death_type(player_type *player_ptr, monster_death_type *md_ptr, MONSTER_IDX m_idx, bool drop_item);
+class PlayerType;
+monster_death_type *initialize_monster_death_type(PlayerType *player_ptr, monster_death_type *md_ptr, MONSTER_IDX m_idx, bool drop_item);
#include "view/display-messages.h"
#include "world/world.h"
-static void write_pet_death(player_type *player_ptr, monster_death_type *md_ptr)
+static void write_pet_death(PlayerType *player_ptr, monster_death_type *md_ptr)
{
md_ptr->md_y = md_ptr->m_ptr->fy;
md_ptr->md_x = md_ptr->m_ptr->fx;
}
}
-static void on_dead_explosion(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_explosion(PlayerType *player_ptr, monster_death_type *md_ptr)
{
for (int i = 0; i < 4; i++) {
if (md_ptr->r_ptr->blow[i].method != RBM_EXPLODE)
}
}
-static void on_defeat_arena_monster(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_defeat_arena_monster(PlayerType *player_ptr, monster_death_type *md_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!floor_ptr->inside_arena || is_pet(md_ptr->m_ptr))
exe_write_diary(player_ptr, DIARY_ARENA, player_ptr->arena_number, m_name);
}
-static void drop_corpse(player_type *player_ptr, monster_death_type *md_ptr)
+static void drop_corpse(PlayerType *player_ptr, monster_death_type *md_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
bool is_drop_corpse = one_in_(md_ptr->r_ptr->flags1 & RF1_UNIQUE ? 1 : 4);
* @param md_ptr モンスター死亡構造体への参照ポインタ
* @return 何かドロップするなら1以上、何もドロップしないなら0
*/
-static ARTIFACT_IDX drop_artifact_index(player_type *player_ptr, monster_death_type *md_ptr)
+static ARTIFACT_IDX drop_artifact_index(PlayerType *player_ptr, monster_death_type *md_ptr)
{
ARTIFACT_IDX a_idx = 0;
PERCENTAGE chance = 0;
* @param a_ix ドロップを試みるアーティファクトID
* @return ドロップするならtrue
*/
-bool drop_single_artifact(player_type *player_ptr, monster_death_type *md_ptr, ARTIFACT_IDX a_idx)
+bool drop_single_artifact(PlayerType *player_ptr, monster_death_type *md_ptr, ARTIFACT_IDX a_idx)
{
artifact_type *a_ptr = &a_info[a_idx];
if (a_ptr->cur_num == 1)
return false;
}
-static KIND_OBJECT_IDX drop_dungeon_final_artifact(player_type *player_ptr, monster_death_type *md_ptr, ARTIFACT_IDX a_idx)
+static KIND_OBJECT_IDX drop_dungeon_final_artifact(PlayerType *player_ptr, monster_death_type *md_ptr, ARTIFACT_IDX a_idx)
{
auto k_idx = d_info[player_ptr->dungeon_idx].final_object != 0 ? d_info[player_ptr->dungeon_idx].final_object : lookup_kind(ItemKindType::SCROLL, SV_SCROLL_ACQUIREMENT);
if (d_info[player_ptr->dungeon_idx].final_artifact == 0)
return d_info[player_ptr->dungeon_idx].final_object ? k_idx : 0;
}
-static void drop_artifact(player_type *player_ptr, monster_death_type *md_ptr)
+static void drop_artifact(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!md_ptr->drop_chosen_item)
return;
md_ptr->mo_mode |= (AM_GOOD | AM_GREAT);
}
-static int decide_drop_numbers(player_type *player_ptr, monster_death_type *md_ptr, const bool drop_item)
+static int decide_drop_numbers(PlayerType *player_ptr, monster_death_type *md_ptr, const bool drop_item)
{
int drop_numbers = 0;
if ((md_ptr->r_ptr->flags1 & RF1_DROP_60) && (randint0(100) < 60))
return drop_numbers;
}
-static void drop_items_golds(player_type *player_ptr, monster_death_type *md_ptr, int drop_numbers)
+static void drop_items_golds(PlayerType *player_ptr, monster_death_type *md_ptr, int drop_numbers)
{
int dump_item = 0;
int dump_gold = 0;
* @brief 最終ボス(混沌のサーペント)を倒したときの処理
* @param player_ptr プレイヤー情報への参照ポインタ
*/
-static void on_defeat_last_boss(player_type *player_ptr)
+static void on_defeat_last_boss(PlayerType *player_ptr)
{
w_ptr->total_winner = true;
add_winner_class(player_ptr->pclass);
* @param drop_item TRUEならばモンスターのドロップ処理を行う
* @param type ラストアタックの属性 (単一属性)
*/
-void monster_death(player_type *player_ptr, MONSTER_IDX m_idx, bool drop_item, AttributeType type)
+void monster_death(PlayerType *player_ptr, MONSTER_IDX m_idx, bool drop_item, AttributeType type)
{
AttributeFlags flags;
flags.clear();
* it drops all of its objects, which may disappear in crowded rooms.
* </pre>
*/
-void monster_death(player_type *player_ptr, MONSTER_IDX m_idx, bool drop_item, AttributeFlags attribute_flags)
+void monster_death(PlayerType *player_ptr, MONSTER_IDX m_idx, bool drop_item, AttributeFlags attribute_flags)
{
monster_death_type tmp_md;
monster_death_type *md_ptr = initialize_monster_death_type(player_ptr, &tmp_md, m_idx, drop_item);
#include "monster-floor/monster-death-util.h"
#include "effect/attribute-types.h"
-struct player_type;
-void monster_death(player_type *player_ptr, MONSTER_IDX m_idx, bool drop_item, AttributeFlags attribute_flags);
-void monster_death(player_type *player_ptr, MONSTER_IDX m_idx, bool drop_item, AttributeType type);
-bool drop_single_artifact(player_type *player_ptr, monster_death_type *md_ptr, ARTIFACT_IDX a_idx);
+class PlayerType;
+void monster_death(PlayerType *player_ptr, MONSTER_IDX m_idx, bool drop_item, AttributeFlags attribute_flags);
+void monster_death(PlayerType *player_ptr, MONSTER_IDX m_idx, bool drop_item, AttributeType type);
+bool drop_single_artifact(PlayerType *player_ptr, monster_death_type *md_ptr, ARTIFACT_IDX a_idx);
concptr extract_note_dies(MONRACE_IDX r_idx);
* @param plus モンスターIDの増減 (1/2 の確率で+1、1/2の確率で-1)
* @return ペットがモンスターに近づくならばTRUE
*/
-static bool decide_pet_approch_direction(player_type *player_ptr, monster_type *m_ptr, monster_type *t_ptr)
+static bool decide_pet_approch_direction(PlayerType *player_ptr, monster_type *m_ptr, monster_type *t_ptr)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (!is_pet(m_ptr))
* @param y モンスターの移動方向Y
* @param x モンスターの移動方向X
*/
-static void decide_enemy_approch_direction(player_type *player_ptr, MONSTER_IDX m_idx, int start, int plus, POSITION *y, POSITION *x)
+static void decide_enemy_approch_direction(PlayerType *player_ptr, MONSTER_IDX m_idx, int start, int plus, POSITION *y, POSITION *x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param mm 移動するべき方角IDを返す参照ポインタ
* @return 方向が確定した場合TRUE、接近する敵がそもそもいない場合FALSEを返す
*/
-bool get_enemy_dir(player_type *player_ptr, MONSTER_IDX m_idx, int *mm)
+bool get_enemy_dir(PlayerType *player_ptr, MONSTER_IDX m_idx, int *mm)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @return 不規則な方向へ歩くことになったらTRUE
* @todo "5"とはもしかして「その場に留まる」という意味か?
*/
-static bool random_walk(player_type *player_ptr, DIRECTION *mm, monster_type *m_ptr)
+static bool random_walk(PlayerType *player_ptr, DIRECTION *mm, monster_type *m_ptr)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (((r_ptr->flags1 & (RF1_RAND_50 | RF1_RAND_25)) == (RF1_RAND_50 | RF1_RAND_25)) && (randint0(100) < 75)) {
* @param aware モンスターがプレイヤーに気付いているならばTRUE、超隠密状態ならばFALSE
* @return 移動先が存在すればTRUE
*/
-bool decide_monster_movement_direction(player_type *player_ptr, DIRECTION *mm, MONSTER_IDX m_idx, bool aware)
+bool decide_monster_movement_direction(PlayerType *player_ptr, DIRECTION *mm, MONSTER_IDX m_idx, bool aware)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
#include "system/angband.h"
-struct player_type;
-bool get_enemy_dir(player_type *player_ptr, MONSTER_IDX m_idx, int *mm);
-bool decide_monster_movement_direction(player_type *player_ptr, DIRECTION *mm, MONSTER_IDX m_idx, bool aware);
+class PlayerType;
+bool get_enemy_dir(PlayerType *player_ptr, MONSTER_IDX m_idx, int *mm);
+bool decide_monster_movement_direction(PlayerType *player_ptr, DIRECTION *mm, MONSTER_IDX m_idx, bool aware);
* @return 成功したらtrue
*
*/
-bool mon_scatter(player_type *player_ptr, MONRACE_IDX r_idx, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION max_dist)
+bool mon_scatter(PlayerType *player_ptr, MONRACE_IDX r_idx, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION max_dist)
{
POSITION place_x[MON_SCAT_MAXD];
POSITION place_y[MON_SCAT_MAXD];
* @details
* Note that "reproduction" REQUIRES empty space.
*/
-bool multiply_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode)
+bool multiply_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param mode 生成オプション
* @return 成功したらtrue
*/
-static bool place_monster_group(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
+static bool place_monster_group(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
monster_race *r_ptr = &r_info[r_idx];
int total = randint1(10);
* @param r_idx チェックするモンスター種族のID
* @return 護衛にできるならばtrue
*/
-static bool place_monster_can_escort(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool place_monster_can_escort(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[place_monster_idx];
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[place_monster_m_idx];
* @param mode 生成オプション
* @return 生成に成功したらtrue
*/
-bool place_monster_aux(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
+bool place_monster_aux(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
monster_race *r_ptr = &r_info[r_idx];
* @param mode 生成オプション
* @return 生成に成功したらtrue
*/
-bool place_monster(player_type *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode)
+bool place_monster(PlayerType *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode)
{
get_mon_num_prep(player_ptr, get_monster_hook(player_ptr), get_monster_hook2(player_ptr, y, x));
MONRACE_IDX r_idx;
* @param x 生成地点x座標
* @return 生成に成功したらtrue
*/
-bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x, summon_specific_pf summon_specific)
+bool alloc_horde(PlayerType *player_ptr, POSITION y, POSITION x, summon_specific_pf summon_specific)
{
get_mon_num_prep(player_ptr, get_monster_hook(player_ptr), get_monster_hook2(player_ptr, y, x));
* @param def_val 現在の主の生成状態
* @return 生成に成功したらtrue
*/
-bool alloc_guardian(player_type *player_ptr, bool def_val)
+bool alloc_guardian(PlayerType *player_ptr, bool def_val)
{
MONRACE_IDX guardian = d_info[player_ptr->dungeon_idx].final_guardian;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* Use "slp" to choose the initial "sleep" status
* Use "floor_ptr->monster_level" for the monster level
*/
-bool alloc_monster(player_type *player_ptr, POSITION dis, BIT_FLAGS mode, summon_specific_pf summon_specific)
+bool alloc_monster(PlayerType *player_ptr, POSITION dis, BIT_FLAGS mode, summon_specific_pf summon_specific)
{
if (alloc_guardian(player_ptr, false))
return true;
#include "system/angband.h"
enum summon_type : int;
-struct player_type;
-typedef bool (*summon_specific_pf)(player_type *, MONSTER_IDX, POSITION, POSITION, DEPTH, summon_type, BIT_FLAGS);
+class PlayerType;
+typedef bool (*summon_specific_pf)(PlayerType *, MONSTER_IDX, POSITION, POSITION, DEPTH, summon_type, BIT_FLAGS);
-bool mon_scatter(player_type *player_ptr, MONRACE_IDX r_idx, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION max_dist);
-bool multiply_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
-bool place_monster_aux(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
-bool place_monster(player_type *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
-bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x, summon_specific_pf summon_specific);
-bool alloc_guardian(player_type *player_ptr, bool def_val);
-bool alloc_monster(player_type *player_ptr, POSITION dis, BIT_FLAGS mode, summon_specific_pf summon_specific);
+bool mon_scatter(PlayerType *player_ptr, MONRACE_IDX r_idx, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION max_dist);
+bool multiply_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
+bool place_monster_aux(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
+bool place_monster(PlayerType *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
+bool alloc_horde(PlayerType *player_ptr, POSITION y, POSITION x, summon_specific_pf summon_specific);
+bool alloc_guardian(PlayerType *player_ptr, bool def_val);
+bool alloc_monster(PlayerType *player_ptr, POSITION dis, BIT_FLAGS mode, summon_specific_pf summon_specific);
* @param x X座標
*/
static void update_monster_lite(
- player_type *const player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x, const monster_lite_type *const ml_ptr)
+ PlayerType *const player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x, const monster_lite_type *const ml_ptr)
{
grid_type *g_ptr;
int dpf, d;
* Add a square to the changes array
*/
static void update_monster_dark(
- player_type *const player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x, const monster_lite_type *const ml_ptr)
+ PlayerType *const player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x, const monster_lite_type *const ml_ptr)
{
grid_type *g_ptr;
int midpoint, dpf, d;
* changes are drawn via lite_spot().
* @todo player-status からのみ呼ばれている。しかしあちらは行数が酷いので要調整
*/
-void update_mon_lite(player_type *player_ptr)
+void update_mon_lite(PlayerType *player_ptr)
{
// 座標たちを記録する配列。
std::vector<Pos2D> points;
- void (*add_mon_lite)(player_type *, std::vector<Pos2D> &, const POSITION, const POSITION, const monster_lite_type *);
+ void (*add_mon_lite)(PlayerType *, std::vector<Pos2D> &, const POSITION, const POSITION, const monster_lite_type *);
int dis_lim = (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS) && !player_ptr->see_nocto) ? (MAX_SIGHT / 2 + 1) : (MAX_SIGHT + 3);
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (int i = 0; i < floor_ptr->mon_lite_n; i++) {
#pragma once
struct floor_type;
-struct player_type;
-void update_mon_lite(player_type *player_ptr);
+class PlayerType;
+void update_mon_lite(PlayerType *player_ptr);
void clear_mon_lite(floor_type *floor_ptr);
* @param can_cross モンスターが地形を踏破できるならばTRUE
* @return 透過も破壊もしなかった場合はFALSE、それ以外はTRUE
*/
-static bool process_wall(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx, bool can_cross)
+static bool process_wall(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx, bool can_cross)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
grid_type *g_ptr;
* @param nx モンスターのX座標
* @return ここではドアを開けず、ガラスのドアを開ける可能性があるならTRUE
*/
-static bool bash_normal_door(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
+static bool bash_normal_door(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
grid_type *g_ptr;
* @param g_ptr グリッドへの参照ポインタ
* @param f_ptr 地形への参照ポインタ
*/
-static void bash_glass_door(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, feature_type *f_ptr, bool may_bash)
+static void bash_glass_door(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, feature_type *f_ptr, bool may_bash)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (!may_bash || ((r_ptr->flags2 & RF2_BASH_DOOR) == 0) || f_ptr->flags.has_not(FloorFeatureType::BASH)
* @param nx モンスターのX座標
* @return モンスターが死亡した場合のみFALSE
*/
-static bool process_door(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
+static bool process_door(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
grid_type *g_ptr;
* @param nx モンスターのX座標
* @return ルーンのある/なし
*/
-static bool process_protection_rune(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
+static bool process_protection_rune(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
{
grid_type *g_ptr;
g_ptr = &player_ptr->current_floor_ptr->grid_array[ny][nx];
* @param nx モンスターのX座標
* @return モンスターが死亡した場合のみFALSE
*/
-static bool process_explosive_rune(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
+static bool process_explosive_rune(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
{
grid_type *g_ptr;
g_ptr = &player_ptr->current_floor_ptr->grid_array[ny][nx];
* @param nx モンスターのX座標
* @return モンスターが死亡した場合のみFALSE
*/
-static bool process_post_dig_wall(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
+static bool process_post_dig_wall(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, POSITION ny, POSITION nx)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
grid_type *g_ptr;
* @return 移動が阻害される何か (ドア等)があったらFALSE
* @todo 少し長いが、これといってブロックとしてまとまった部分もないので暫定でこのままとする
*/
-bool process_monster_movement(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, DIRECTION *mm, POSITION oy, POSITION ox, int *count)
+bool process_monster_movement(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, DIRECTION *mm, POSITION oy, POSITION ox, int *count)
{
for (int i = 0; mm[i]; i++) {
int d = mm[i];
* @param ox モンスターが元々いたX座標
* @param aware モンスターがプレイヤーに気付いているならばTRUE、超隠密状態ならばFALSE
*/
-void process_speak_sound(player_type *player_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, bool aware)
+void process_speak_sound(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, bool aware)
{
if (player_ptr->phase_out)
return;
#include "system/angband.h"
struct monster_type;
-struct player_type;
+class PlayerType;
struct turn_flags;
-bool process_monster_movement(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, DIRECTION *mm, POSITION oy, POSITION ox, int *count);
-void process_speak_sound(player_type *player_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, bool aware);
+bool process_monster_movement(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, DIRECTION *mm, POSITION oy, POSITION ox, int *count);
+void process_speak_sound(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, bool aware);
void set_target(monster_type *m_ptr, POSITION y, POSITION x);
void reset_target(monster_type *m_ptr);
* @param o_name アイテム名
* @param this_o_idx モンスターが乗ったオブジェクトID
*/
-static void monster_pickup_object(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, object_type *o_ptr, bool is_special_object,
+static void monster_pickup_object(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, object_type *o_ptr, bool is_special_object,
POSITION ny, POSITION nx, GAME_TEXT *m_name, GAME_TEXT *o_name, OBJECT_IDX this_o_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
* @param ny 移動後の、モンスターのY座標
* @param nx 移動後の、モンスターのX座標
*/
-void update_object_by_monster_movement(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION ny, POSITION nx)
+void update_object_by_monster_movement(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION ny, POSITION nx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param player_ptr プレイヤーへの参照ポインタ
* @param m_ptr モンスター参照ポインタ
*/
-void monster_drop_carried_objects(player_type *player_ptr, monster_type *m_ptr)
+void monster_drop_carried_objects(PlayerType *player_ptr, monster_type *m_ptr)
{
for (auto it = m_ptr->hold_o_idx_list.begin(); it != m_ptr->hold_o_idx_list.end();) {
object_type forge;
#include "system/angband.h"
struct monster_type;
-struct player_type;
+class PlayerType;
struct turn_flags;
-void update_object_by_monster_movement(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION ny, POSITION nx);
-void monster_drop_carried_objects(player_type *player_ptr, monster_type *m_ptr);
+void update_object_by_monster_movement(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION ny, POSITION nx);
+void monster_drop_carried_objects(PlayerType *player_ptr, monster_type *m_ptr);
* モンスターを削除するとそのモンスターが拾っていたアイテムも同時に削除される。 /
* When a monster is deleted, all of its objects are deleted.
*/
-void delete_monster_idx(player_type *player_ptr, MONSTER_IDX i)
+void delete_monster_idx(PlayerType *player_ptr, MONSTER_IDX i)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[i];
* This is an efficient method of simulating multiple calls to the
* "delete_monster()" function, with no visual effects.
*/
-void wipe_monsters_list(player_type *player_ptr)
+void wipe_monsters_list(PlayerType *player_ptr)
{
if (!r_info[MON_BANORLUPART].max_num) {
if (r_info[MON_BANOR].max_num) {
* @param x 削除位置x座標
* @param y 削除位置y座標
*/
-void delete_monster(player_type *player_ptr, POSITION y, POSITION x)
+void delete_monster(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
#include "system/angband.h"
-struct player_type;
-void delete_monster_idx(player_type *player_ptr, MONSTER_IDX i);
-void wipe_monsters_list(player_type *player_ptr);
-void delete_monster(player_type *player_ptr, POSITION y, POSITION x);
+class PlayerType;
+void delete_monster_idx(PlayerType *player_ptr, MONSTER_IDX i);
+void wipe_monsters_list(PlayerType *player_ptr);
+void delete_monster(PlayerType *player_ptr, POSITION y, POSITION x);
* @param m_name モンスター名称
* @param see_m モンスターが視界内にいたらTRUE
*/
-static void escape_monster(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, GAME_TEXT *m_name)
+static void escape_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, GAME_TEXT *m_name)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (turn_flags_ptr->is_riding_mon) {
* @param see_m モンスターが視界内にいたらTRUE
* @return モンスターがフロアから消えたらTRUE
*/
-bool runaway_monster(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx)
+bool runaway_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
#include "system/angband.h"
-struct player_type;
+class PlayerType;
struct turn_flags;
-bool runaway_monster(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx);
+bool runaway_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx);
* @param d モンスターがいる地点からの距離
* @return 逃げ込める地点の候補地
*/
-static coordinate_candidate sweep_safe_coordinate(player_type *player_ptr, MONSTER_IDX m_idx, const POSITION *y_offsets, const POSITION *x_offsets, int d)
+static coordinate_candidate sweep_safe_coordinate(PlayerType *player_ptr, MONSTER_IDX m_idx, const POSITION *y_offsets, const POSITION *x_offsets, int d)
{
coordinate_candidate candidate = init_coordinate_candidate();
floor_type *floor_ptr = player_ptr->current_floor_ptr;
*\n
* Return TRUE if a safe location is available.\n
*/
-bool find_safety(player_type *player_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
+bool find_safety(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
for (POSITION d = 1; d < 10; d++) {
* @param candidate 隠れられる地点の候補地
*/
static void sweep_hiding_candidate(
- player_type *player_ptr, monster_type *m_ptr, const POSITION *y_offsets, const POSITION *x_offsets, coordinate_candidate *candidate)
+ PlayerType *player_ptr, monster_type *m_ptr, const POSITION *y_offsets, const POSITION *x_offsets, coordinate_candidate *candidate)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
for (POSITION i = 0, dx = x_offsets[0], dy = y_offsets[0]; dx != 0 || dy != 0; i++, dx = x_offsets[i], dy = y_offsets[i]) {
*\n
* Return TRUE if a good location is available.\n
*/
-bool find_hiding(player_type *player_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
+bool find_hiding(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
coordinate_candidate candidate = init_coordinate_candidate();
#include "system/angband.h"
-struct player_type;
-bool find_safety(player_type *player_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp);
-bool find_hiding(player_type *player_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp);
+class PlayerType;
+bool find_safety(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp);
+bool find_hiding(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp);
* @param r_idx チェックするモンスター種族ID
* @return 召喚対象にできるならばTRUE
*/
-static bool summon_specific_okay(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool summon_specific_okay(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!mon_hook_dungeon(player_ptr, r_idx))
* ダンジョン及びクエストはdun_level>0となる。
* 荒野はdun_level==0なので、その場合荒野レベルを返す。
*/
-DEPTH get_dungeon_or_wilderness_level(player_type *player_ptr)
+DEPTH get_dungeon_or_wilderness_level(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->dun_level > 0)
* @param mode 生成オプション
* @return 召喚できたらtrueを返す
*/
-bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, summon_type type, BIT_FLAGS mode)
+bool summon_specific(PlayerType *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, summon_type type, BIT_FLAGS mode)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->inside_arena)
* @param mode 生成オプション
* @return 召喚できたらtrueを返す
*/
-bool summon_named_creature(player_type *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode)
+bool summon_named_creature(PlayerType *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
if ((r_idx <= 0) || (r_idx >= static_cast<MONRACE_IDX>(r_info.size()))) {
return false;
extern bool summon_unique_okay;
enum summon_type : int;
-struct player_type;
-bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, summon_type type, BIT_FLAGS mode);
-bool summon_named_creature(player_type *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode);
+class PlayerType;
+bool summon_specific(PlayerType *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, summon_type type, BIT_FLAGS mode);
+bool summon_named_creature(PlayerType *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode);
* @param m_idx 逃走するモンスターの参照ID
* @param mm 移動方向を返す方向IDの参照ポインタ
*/
-MonsterSweepGrid::MonsterSweepGrid(player_type *player_ptr, MONSTER_IDX m_idx, DIRECTION *mm)
+MonsterSweepGrid::MonsterSweepGrid(PlayerType *player_ptr, MONSTER_IDX m_idx, DIRECTION *mm)
: player_ptr(player_ptr)
, m_idx(m_idx)
, mm(mm)
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class MonsterSweepGrid {
public:
- MonsterSweepGrid(player_type *player_ptr, MONSTER_IDX m_idx, DIRECTION *mm);
+ MonsterSweepGrid(PlayerType *player_ptr, MONSTER_IDX m_idx, DIRECTION *mm);
virtual ~MonsterSweepGrid() = default;
- player_type *player_ptr;
+ PlayerType *player_ptr;
MONSTER_IDX m_idx;
DIRECTION *mm;
bool get_movable_grid();
#include "wizard/wizard-messages.h"
#include "world/world.h"
-static bool is_friendly_idx(player_type *player_ptr, MONSTER_IDX m_idx)
+static bool is_friendly_idx(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
return m_idx > 0 && is_friendly(&player_ptr->current_floor_ptr->m_list[(m_idx)]);
}
* @return 対象にできるならtrueを返す
* @todo グローバル変数対策の上 monster_hook.cへ移す。
*/
-static bool monster_hook_tanuki(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool monster_hook_tanuki(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
bool unselectable = any_bits(r_ptr->flags1, RF1_UNIQUE);
* @param r_idx モンスター種族ID
* @return モンスター種族の表層ID
*/
-static MONRACE_IDX initial_r_appearance(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS generate_mode)
+static MONRACE_IDX initial_r_appearance(PlayerType *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS generate_mode)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (is_chargeman(player_ptr) && any_bits(generate_mode, PM_JURAL) && none_bits(generate_mode, PM_MULTIPLY | PM_KAGE))
* @param r_idx 生成モンスター種族
* @return ユニークの生成が不可能な条件ならFALSE、それ以外はTRUE
*/
-static bool check_unique_placeable(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool check_unique_placeable(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
if (player_ptr->phase_out)
return true;
* @param r_idx 生成モンスター種族
* @return 生成が可能ならTRUE、不可能ならFALSE
*/
-static bool check_quest_placeable(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool check_quest_placeable(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (quest_number(player_ptr, floor_ptr->dun_level) == 0)
* @param x 生成位置x座標
* @return 生成が可能ならTRUE、不可能ならFALSE
*/
-static bool check_procection_rune(player_type *player_ptr, MONRACE_IDX r_idx, POSITION y, POSITION x)
+static bool check_procection_rune(PlayerType *player_ptr, MONRACE_IDX r_idx, POSITION y, POSITION x)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
if (!g_ptr->is_rune_protection())
return true;
}
-static void warn_unique_generation(player_type *player_ptr, MONRACE_IDX r_idx)
+static void warn_unique_generation(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
if (!player_ptr->warning || !w_ptr->character_dungeon)
return;
* @param mode 生成オプション
* @return 成功したらtrue
*/
-bool place_monster_one(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
+bool place_monster_one(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
#include "system/angband.h"
-struct player_type;
-bool place_monster_one(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
+class PlayerType;
+bool place_monster_one(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
* @param m_idx モンスターID
* @param see_m モンスターが視界内にいたらTRUE
*/
-static void vanish_nonunique(player_type *player_ptr, MONSTER_IDX m_idx, bool see_m)
+static void vanish_nonunique(PlayerType *player_ptr, MONSTER_IDX m_idx, bool see_m)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
if (see_m) {
* パターンは収縮どころか拡散しているが、この際気にしてはいけない
* @todo ユニークとプレイヤーとの間でしか効果が発生しない。ユニークとその他のモンスター間では何もしなくてよい?
*/
-static void produce_quantum_effect(player_type *player_ptr, MONSTER_IDX m_idx, bool see_m)
+static void produce_quantum_effect(PlayerType *player_ptr, MONSTER_IDX m_idx, bool see_m)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
bool coherent = los(player_ptr, m_ptr->fy, m_ptr->fx, player_ptr->y, player_ptr->x);
* @param see_m モンスターが視界内にいたらTRUE
* @return モンスターが量子的効果により消滅したらTRUE
*/
-bool process_quantum_effect(player_type *player_ptr, MONSTER_IDX m_idx, bool see_m)
+bool process_quantum_effect(PlayerType *player_ptr, MONSTER_IDX m_idx, bool see_m)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
#include "system/angband.h"
-struct player_type;
-bool process_quantum_effect(player_type *player_ptr, MONSTER_IDX m_idx, bool see_m);
+class PlayerType;
+bool process_quantum_effect(PlayerType *player_ptr, MONSTER_IDX m_idx, bool see_m);
* @param radius 召喚半径 (モンスターが死亡した座標から半径何マス以内に召喚させるか)
* @param message 召喚時のメッセージ
*/
-static void summon_self(player_type *player_ptr, monster_death_type *md_ptr, summon_type type, int probability, POSITION radius, concptr message)
+static void summon_self(PlayerType *player_ptr, monster_death_type *md_ptr, summon_type type, int probability, POSITION radius, concptr message)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->inside_arena || player_ptr->phase_out || one_in_(probability))
msg_print(message);
}
-static void on_dead_pink_horror(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_pink_horror(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (player_ptr->current_floor_ptr->inside_arena || player_ptr->phase_out)
return;
}
}
-static void on_dead_bloodletter(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_bloodletter(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!md_ptr->drop_chosen_item || (randint1(100) >= 15))
return;
(void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
}
-static void on_dead_raal(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_raal(PlayerType *player_ptr, monster_death_type *md_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!md_ptr->drop_chosen_item || (floor_ptr->dun_level <= 9))
* @param player_ptr プレイヤーへの参照ポインタ
* @param md_ptr モンスター撃破構造体への参照ポインタ
*/
-static void on_dead_dawn(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_dawn(PlayerType *player_ptr, monster_death_type *md_ptr)
{
summon_self(player_ptr, md_ptr, SUMMON_DAWN, 7, 20, _("新たな戦士が現れた!", "A new warrior steps forth!"));
}
-static void on_dead_unmaker(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_unmaker(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (is_seen(player_ptr, md_ptr->m_ptr)) {
GAME_TEXT m_name[MAX_NLEN];
(void)project(player_ptr, md_ptr->m_idx, 6, md_ptr->md_y, md_ptr->md_x, 100, AttributeType::CHAOS, PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL);
}
-static void on_dead_sacred_treasures(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_sacred_treasures(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if ((player_ptr->ppersonality != PERSONALITY_LAZY) || !md_ptr->drop_chosen_item)
return;
a_ptr->cur_num = 1;
}
-static void on_dead_serpent(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_serpent(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!md_ptr->drop_chosen_item)
return;
(void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
}
-static void on_dead_death_sword(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_death_sword(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!md_ptr->drop_chosen_item)
return;
(void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
}
-static void on_dead_can_angel(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_can_angel(PlayerType *player_ptr, monster_death_type *md_ptr)
{
bool is_drop_can = md_ptr->drop_chosen_item;
bool is_silver = md_ptr->m_ptr->r_idx == MON_A_SILVER;
(void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
}
-static void on_dead_rolento(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_rolento(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (is_seen(player_ptr, md_ptr->m_ptr)) {
GAME_TEXT m_name[MAX_NLEN];
(void)project(player_ptr, md_ptr->m_idx, 3, md_ptr->md_y, md_ptr->md_x, damroll(20, 10), AttributeType::FIRE, PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL);
}
-static void on_dead_aqua_illusion(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_aqua_illusion(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (player_ptr->current_floor_ptr->inside_arena || player_ptr->phase_out)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param md_ptr モンスター撃破構造体への参照ポインタ
*/
-static void on_dead_totem_moai(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_totem_moai(PlayerType *player_ptr, monster_death_type *md_ptr)
{
summon_self(player_ptr, md_ptr, SUMMON_TOTEM_MOAI, 8, 5, _("新たなモアイが現れた!", "A new moai steps forth!"));
}
-static void on_dead_demon_slayer_senior(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_demon_slayer_senior(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!is_seen(player_ptr, md_ptr->m_ptr))
return;
msg_format(_("あなたの闘気が%sの身体をサイコロ状に切り刻んだ!", "Your fighting spirit chopped %^s's body into dice!"), m_name);
}
-static void on_dead_mirmulnir(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_mirmulnir(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!is_seen(player_ptr, md_ptr->m_ptr))
return;
msg_format(_("%s「ドヴ@ーキン、やめろぉ!」", "%^s says, 'Dov@hkiin! No!!'"), m_name);
}
-static void on_dead_dragon_centipede(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_dragon_centipede(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (player_ptr->current_floor_ptr->inside_arena || player_ptr->phase_out)
return;
* @brief ビッグキューちゃん撃破時メッセージ
* @todo 死亡時の特殊メッセージを表示するだけの処理を複数作るなら、switch/case文に分けられるように汎用化すること
*/
-static void on_dead_big_raven(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_big_raven(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!is_seen(player_ptr, md_ptr->m_ptr))
return;
* @return 生成したアイテムが装備品ならtrue、それ以外ならfalse
* @todo 汎用的に使えそうだがどこかにいいファイルはないか?
*/
-static bool make_equipment(player_type *player_ptr, object_type *q_ptr, const BIT_FLAGS drop_mode, const bool is_object_hook_null)
+static bool make_equipment(PlayerType *player_ptr, object_type *q_ptr, const BIT_FLAGS drop_mode, const bool is_object_hook_null)
{
q_ptr->wipe();
(void)make_object(player_ptr, q_ptr, drop_mode);
* 最初のアイテム生成でいきなり☆が生成された場合を除き、中途半端な☆ (例:呪われている)は生成しない.
* このルーチンで★は生成されないので、★生成フラグのキャンセルも不要
*/
-static void on_dead_random_artifact(player_type *player_ptr, monster_death_type *md_ptr, bool (*object_hook_pf)(KIND_OBJECT_IDX k_idx))
+static void on_dead_random_artifact(PlayerType *player_ptr, monster_death_type *md_ptr, bool (*object_hook_pf)(KIND_OBJECT_IDX k_idx))
{
object_type forge;
object_type *q_ptr = &forge;
* @brief マニマニのあくま撃破時メッセージ
* @todo 死亡時の特殊メッセージを表示するだけの処理を複数作るなら、switch/case文に分けられるように汎用化すること
*/
-static void on_dead_manimani(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_manimani(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!is_seen(player_ptr, md_ptr->m_ptr))
return;
msg_print(_("どこからか声が聞こえる…「ハロー! そして…グッドバイ!」", "Heard a voice from somewhere... 'Hello! And... good bye!'"));
}
-static void drop_specific_item_on_dead(player_type *player_ptr, monster_death_type *md_ptr, bool (*object_hook_pf)(KIND_OBJECT_IDX k_idx))
+static void drop_specific_item_on_dead(PlayerType *player_ptr, monster_death_type *md_ptr, bool (*object_hook_pf)(KIND_OBJECT_IDX k_idx))
{
object_type forge;
object_type *q_ptr = &forge;
(void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
}
-static void on_dead_chest_mimic(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_chest_mimic(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (player_ptr->current_floor_ptr->inside_arena || player_ptr->phase_out)
return;
}
}
-static void on_dead_mimics(player_type *player_ptr, monster_death_type *md_ptr)
+static void on_dead_mimics(PlayerType *player_ptr, monster_death_type *md_ptr)
{
if (!md_ptr->drop_chosen_item)
return;
}
}
-static void on_dead_swordfish(player_type *player_ptr, monster_death_type *md_ptr, AttributeFlags attribute_flags)
+static void on_dead_swordfish(PlayerType *player_ptr, monster_death_type *md_ptr, AttributeFlags attribute_flags)
{
if (attribute_flags.has_not(AttributeType::COLD) || !md_ptr->drop_chosen_item || (randint1(100) >= 10))
return;
drop_single_artifact(player_ptr, md_ptr, ART_FROZEN_SWORDFISH);
}
-void switch_special_death(player_type *player_ptr, monster_death_type *md_ptr, AttributeFlags attribute_flags)
+void switch_special_death(PlayerType *player_ptr, monster_death_type *md_ptr, AttributeFlags attribute_flags)
{
switch (md_ptr->m_ptr->r_idx) {
case MON_PINK_HORROR:
#include "effect/attribute-types.h"
typedef struct monster_death_type monster_death_type;
-struct player_type;
-void switch_special_death(player_type *player_ptr, monster_death_type *md_ptr, AttributeFlags attribute_flags);
+class PlayerType;
+void switch_special_death(PlayerType *player_ptr, monster_death_type *md_ptr, AttributeFlags attribute_flags);
* @brief pit/nestの基準となる単種モンスターを決める /
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void vault_prep_clone(player_type *player_ptr)
+void vault_prep_clone(PlayerType *player_ptr)
{
get_mon_num_prep(player_ptr, vault_aux_simple, nullptr);
vault_aux_race = get_mon_num(player_ptr, 0, player_ptr->current_floor_ptr->dun_level + 10, 0);
* @brief pit/nestの基準となるモンスターシンボルを決める /
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void vault_prep_symbol(player_type *player_ptr)
+void vault_prep_symbol(PlayerType *player_ptr)
{
get_mon_num_prep(player_ptr, vault_aux_simple, nullptr);
MONRACE_IDX r_idx = get_mon_num(player_ptr, 0, player_ptr->current_floor_ptr->dun_level + 10, 0);
* @brief pit/nestの基準となるドラゴンの種類を決める /
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void vault_prep_dragon(player_type *player_ptr)
+void vault_prep_dragon(PlayerType *player_ptr)
{
/* Unused */
(void)player_ptr;
* @param r_idx モンスターID
* @return 討伐対象にできるならTRUEを返す。
*/
-bool mon_hook_quest(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_quest(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* ダンジョンが火山の場合は、荒野の火山(WILD_VOLCANO)に出ない水棲動物(AQUATIC)は許可しない。
* </pre>
*/
-bool mon_hook_dungeon(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_dungeon(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
if (!is_in_dungeon(player_ptr) && !player_ptr->current_floor_ptr->inside_quest)
return true;
* @param r_idx 判定するモンスターの種族ID
* @return 海洋に出現するならばTRUEを返す
*/
-bool mon_hook_ocean(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_ocean(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定するモンスターの種族ID
* @return 海岸に出現するならばTRUEを返す
*/
-bool mon_hook_shore(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_shore(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定するモンスターの種族ID
* @return 荒地に出現するならばTRUEを返す
*/
-bool mon_hook_waste(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_waste(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定するモンスターの種族ID
* @return 荒地に出現するならばTRUEを返す
*/
-bool mon_hook_town(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_town(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定するモンスターの種族ID
* @return 森林に出現するならばTRUEを返す
*/
-bool mon_hook_wood(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_wood(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定するモンスターの種族ID
* @return 火山に出現するならばTRUEを返す
*/
-bool mon_hook_volcano(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_volcano(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定するモンスターの種族ID
* @return 山地に出現するならばTRUEを返す
*/
-bool mon_hook_mountain(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_mountain(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定するモンスターの種族ID
* @return 森林に出現するならばTRUEを返す
*/
-bool mon_hook_grass(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_grass(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定するモンスターの種族ID
* @return 深い水地形に出現するならばTRUEを返す
*/
-bool mon_hook_deep_water(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_deep_water(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!mon_hook_dungeon(player_ptr, r_idx))
* @param r_idx 判定するモンスターの種族ID
* @return 浅い水地形に出現するならばTRUEを返す
*/
-bool mon_hook_shallow_water(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_shallow_water(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!mon_hook_dungeon(player_ptr, r_idx))
* @param r_idx 判定するモンスターの種族ID
* @return 溶岩地形に出現するならばTRUEを返す
*/
-bool mon_hook_lava(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_lava(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!mon_hook_dungeon(player_ptr, r_idx))
* @param r_idx 判定するモンスターの種族ID
* @return 通常の床地形に出現するならばTRUEを返す
*/
-bool mon_hook_floor(player_type *player_ptr, MONRACE_IDX r_idx)
+bool mon_hook_floor(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
/*
* Helper function for "glass room"
*/
-bool vault_aux_lite(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_lite(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
/*
* Helper function for "glass room"
*/
-bool vault_aux_shards(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_shards(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return Vault生成の最低必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_simple(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_simple(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_jelly(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_jelly(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_animal(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_animal(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_undead(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_undead(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_chapel_g(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_chapel_g(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
static int chapel_list[] = { MON_NOV_PRIEST, MON_NOV_PALADIN, MON_NOV_PRIEST_G, MON_NOV_PALADIN_G, MON_PRIEST, MON_JADE_MONK, MON_IVORY_MONK,
MON_ULTRA_PALADIN, MON_EBONY_MONK, MON_W_KNIGHT, MON_KNI_TEMPLAR, MON_PALADIN, MON_TOPAZ_MONK, 0 };
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_kennel(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_kennel(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_mimic(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_mimic(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_clone(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_clone(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
if (!vault_monster_okay(player_ptr, r_idx))
return false;
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_symbol_e(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_symbol_e(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_symbol_g(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_symbol_g(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_orc(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_orc(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_troll(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_troll(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_giant(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_giant(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_dragon(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_dragon(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_demon(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_demon(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_cthulhu(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_cthulhu(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (!vault_monster_okay(player_ptr, r_idx))
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-bool vault_aux_dark_elf(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_aux_dark_elf(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
static int dark_elf_list[] = {
MON_D_ELF,
* @param r_idx モンスターID
* @return 死体を食べられるならTRUEを返す。
*/
-bool monster_hook_human(player_type *player_ptr, MONRACE_IDX r_idx)
+bool monster_hook_human(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx 判定対象となるモンスターのID
* @return 悪夢の元凶となり得るか否か。
*/
-bool get_nightmare(player_type *player_ptr, MONRACE_IDX r_idx)
+bool get_nightmare(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if (none_bits(r_ptr->flags2, RF2_ELDRITCH_HORROR))
* @param r_idx 判定したいモンスター種族のID
* @return 釣れる対象ならばTRUEを返す
*/
-bool monster_is_fishing_target(player_type *player_ptr, MONRACE_IDX r_idx)
+bool monster_is_fishing_target(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* 自爆以外のなんらかのHP攻撃手段を持っていること。
* @return 参加できるか否か
*/
-bool monster_can_entry_arena(player_type *player_ptr, MONRACE_IDX r_idx)
+bool monster_can_entry_arena(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* @param r_idx チェックしたいモンスター種族のID
* @return 人形にできるならTRUEを返す
*/
-bool item_monster_okay(player_type *player_ptr, MONRACE_IDX r_idx)
+bool item_monster_okay(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
* Line 2 -- forbid uniques
* Line 3 -- forbid aquatic monsters
*/
-bool vault_monster_okay(player_type *player_ptr, MONRACE_IDX r_idx)
+bool vault_monster_okay(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
return (mon_hook_dungeon(player_ptr, r_idx) && none_bits(r_info[r_idx].flags1, RF1_UNIQUE) && none_bits(r_info[r_idx].flags7, RF7_UNIQUE2)
&& none_bits(r_info[r_idx].flagsr, RFR_RES_ALL) && none_bits(r_info[r_idx].flags7, RF7_AQUATIC));
extern char vault_aux_char;
extern EnumClassFlagGroup<MonsterAbilityType> vault_aux_dragon_mask4;
-struct player_type;
-bool mon_hook_quest(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_dungeon(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_ocean(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_shore(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_waste(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_town(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_wood(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_volcano(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_wood(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_volcano(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_mountain(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_grass(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_deep_water(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_shallow_water(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_lava(player_type *player_ptr, MONRACE_IDX r_idx);
-bool mon_hook_floor(player_type *player_ptr, MONRACE_IDX r_idx);
-
-void vault_prep_clone(player_type *player_ptr);
-void vault_prep_dragon(player_type *player_ptr);
-void vault_prep_symbol(player_type *player_ptr);
-
-bool vault_aux_lite(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_shards(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_simple(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_jelly(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_animal(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_undead(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_chapel_g(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_kennel(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_mimic(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_clone(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_symbol_e(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_symbol_g(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_orc(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_troll(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_giant(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_dragon(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_demon(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_cthulhu(player_type *player_ptr, MONRACE_IDX r_idx);
-bool vault_aux_dark_elf(player_type *player_ptr, MONRACE_IDX r_idx);
-
-bool vault_monster_okay(player_type *player_ptr, MONRACE_IDX r_idx);
+class PlayerType;
+bool mon_hook_quest(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_dungeon(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_ocean(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_shore(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_waste(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_town(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_wood(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_volcano(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_wood(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_volcano(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_mountain(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_grass(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_deep_water(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_shallow_water(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_lava(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool mon_hook_floor(PlayerType *player_ptr, MONRACE_IDX r_idx);
+
+void vault_prep_clone(PlayerType *player_ptr);
+void vault_prep_dragon(PlayerType *player_ptr);
+void vault_prep_symbol(PlayerType *player_ptr);
+
+bool vault_aux_lite(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_shards(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_simple(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_jelly(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_animal(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_undead(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_chapel_g(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_kennel(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_mimic(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_clone(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_symbol_e(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_symbol_g(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_orc(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_troll(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_giant(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_dragon(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_demon(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_cthulhu(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool vault_aux_dark_elf(PlayerType *player_ptr, MONRACE_IDX r_idx);
+
+bool vault_monster_okay(PlayerType *player_ptr, MONRACE_IDX r_idx);
bool monster_living(MONRACE_IDX r_idx);
bool no_questor_or_bounty_uniques(MONRACE_IDX r_idx);
-bool monster_hook_human(player_type *player_ptr, MONRACE_IDX r_idx);
-bool get_nightmare(player_type *player_ptr, MONRACE_IDX r_idx);
-bool monster_is_fishing_target(player_type *player_ptr, MONRACE_IDX r_idx);
-bool monster_can_entry_arena(player_type *player_ptr, MONRACE_IDX r_idx);
-bool item_monster_okay(player_type *player_ptr, MONRACE_IDX r_idx);
+bool monster_hook_human(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool get_nightmare(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool monster_is_fishing_target(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool monster_can_entry_arena(PlayerType *player_ptr, MONRACE_IDX r_idx);
+bool item_monster_okay(PlayerType *player_ptr, MONRACE_IDX r_idx);
* @param i1 配列移動元添字
* @param i2 配列移動先添字
*/
-static void compact_monsters_aux(player_type *player_ptr, MONSTER_IDX i1, MONSTER_IDX i2)
+static void compact_monsters_aux(PlayerType *player_ptr, MONSTER_IDX i1, MONSTER_IDX i2)
{
if (i1 == i2)
return;
* After "compacting" (if needed), we "reorder" the monsters into a more
* compact order, and we reset the allocation info, and the "live" array.
*/
-void compact_monsters(player_type *player_ptr, int size)
+void compact_monsters(PlayerType *player_ptr, int size)
{
if (size)
msg_print(_("モンスター情報を圧縮しています...", "Compacting monsters..."));
#pragma once
-struct player_type;
-void compact_monsters(player_type *player_ptr, int size);
+class PlayerType;
+void compact_monsters(PlayerType *player_ptr, int size);
* @param attribute 与えたダメージの種類 (単一属性)
* @param note モンスターが倒された際の特別なメッセージ述語
*/
-MonsterDamageProcessor::MonsterDamageProcessor(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeType attribute)
+MonsterDamageProcessor::MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeType attribute)
: player_ptr(player_ptr)
, m_idx(m_idx)
, dam(dam)
* @param attribute_flags 与えたダメージの種類 (複数属性)
* @param note モンスターが倒された際の特別なメッセージ述語
*/
-MonsterDamageProcessor::MonsterDamageProcessor(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeFlags attribute_flags)
+MonsterDamageProcessor::MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeFlags attribute_flags)
: player_ptr(player_ptr)
, m_idx(m_idx)
, dam(dam)
struct monster_race;
struct monster_type;
-struct player_type;
+class PlayerType;
typedef std::vector<std::tuple<monster_race_type, monster_race_type, monster_race_type>> combined_uniques;
class MonsterDamageProcessor {
public:
- MonsterDamageProcessor(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeType type);
- MonsterDamageProcessor(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeFlags attribute_flags);
+ MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeType type);
+ MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeFlags attribute_flags);
virtual ~MonsterDamageProcessor() = default;
bool mon_take_hit(concptr note);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
MONSTER_IDX m_idx;
HIT_POINT dam;
bool *fear;
* @param m_ptr モンスターの参照ポインタ
* @param mode 呼称オプション
*/
-void monster_desc(player_type *player_ptr, char *desc, monster_type *m_ptr, BIT_FLAGS mode)
+void monster_desc(PlayerType *player_ptr, char *desc, monster_type *m_ptr, BIT_FLAGS mode)
{
monster_race *r_ptr;
r_ptr = &r_info[m_ptr->ap_r_idx];
* @details
* Technically should attempt to treat "Beholder"'s as jelly's
*/
-void message_pain(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam)
+void message_pain(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
#include "system/angband.h"
struct monster_type;
-struct player_type;
-void monster_desc(player_type *player_ptr, char *desc, monster_type *m_ptr, BIT_FLAGS mode);
-void message_pain(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam);
+class PlayerType;
+void monster_desc(PlayerType *player_ptr, char *desc, monster_type *m_ptr, BIT_FLAGS mode);
+void message_pain(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam);
* @param mode オプション
* @return 踏破可能ならばTRUEを返す
*/
-bool monster_can_cross_terrain(player_type *player_ptr, FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode)
+bool monster_can_cross_terrain(PlayerType *player_ptr, FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode)
{
feature_type *f_ptr = &f_info[feat];
* @param mode オプション
* @return 踏破可能ならばTRUEを返す
*/
-bool monster_can_enter(player_type *player_ptr, POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode)
+bool monster_can_enter(PlayerType *player_ptr, POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode)
{
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
if (player_bold(player_ptr, y, x))
* @param n_ptr モンスター2の構造体参照ポインタ
* @return 敵対関係にあるならばTRUEを返す
*/
-bool are_enemies(player_type *player_ptr, monster_type *m_ptr, monster_type *n_ptr)
+bool are_enemies(PlayerType *player_ptr, monster_type *m_ptr, monster_type *n_ptr)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
monster_race *s_ptr = &r_info[n_ptr->r_idx];
* @details
* If user is player, m_ptr == nullptr.
*/
-bool monster_has_hostile_align(player_type *player_ptr, monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr)
+bool monster_has_hostile_align(PlayerType *player_ptr, monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr)
{
byte sub_align1 = SUB_ALIGN_NEUTRAL;
byte sub_align2 = SUB_ALIGN_NEUTRAL;
return false;
}
-bool is_original_ap_and_seen(player_type *player_ptr, monster_type *m_ptr) { return m_ptr->ml && !player_ptr->hallucinated && (m_ptr->ap_r_idx == m_ptr->r_idx); }
+bool is_original_ap_and_seen(PlayerType *player_ptr, monster_type *m_ptr) { return m_ptr->ml && !player_ptr->hallucinated && (m_ptr->ap_r_idx == m_ptr->r_idx); }
/* Determine monster race appearance index is same as race index */
bool is_original_ap(monster_type *m_ptr) { return m_ptr->ap_r_idx == m_ptr->r_idx; }
* @param m_idx モンスターID
* @param m_name モンスター名を入力する配列
*/
-void monster_name(player_type *player_ptr, MONSTER_IDX m_idx, char *m_name)
+void monster_name(PlayerType *player_ptr, MONSTER_IDX m_idx, char *m_name)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_desc(player_ptr, m_name, m_ptr, 0x00);
#define CEM_P_CAN_ENTER_PATTERN 0x0002
struct monster_race;
struct monster_type;
-struct player_type;
-bool monster_can_cross_terrain(player_type *player_ptr, FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode);
-bool monster_can_enter(player_type *player_ptr, POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode);
-bool are_enemies(player_type *player_ptr, monster_type *m_ptr1, monster_type *m_ptr2);
-bool monster_has_hostile_align(player_type *player_ptr, monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr);
-bool is_original_ap_and_seen(player_type *player_ptr, monster_type *m_ptr);
+class PlayerType;
+bool monster_can_cross_terrain(PlayerType *player_ptr, FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode);
+bool monster_can_enter(PlayerType *player_ptr, POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode);
+bool are_enemies(PlayerType *player_ptr, monster_type *m_ptr1, monster_type *m_ptr2);
+bool monster_has_hostile_align(PlayerType *player_ptr, monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr);
+bool is_original_ap_and_seen(PlayerType *player_ptr, monster_type *m_ptr);
bool is_friendly(monster_type *m_ptr);
bool is_pet(monster_type *m_ptr);
monster_race *real_r_ptr(monster_type *m_ptr);
MONRACE_IDX real_r_idx(monster_type *m_ptr);
-void monster_name(player_type *player_ptr, MONSTER_IDX m_idx, char *m_name);
+void monster_name(PlayerType *player_ptr, MONSTER_IDX m_idx, char *m_name);
* @param max_level 最大生成階
* @return 選択されたモンスター生成種族
*/
-MONRACE_IDX get_mon_num(player_type *player_ptr, DEPTH min_level, DEPTH max_level, BIT_FLAGS option)
+MONRACE_IDX get_mon_num(PlayerType *player_ptr, DEPTH min_level, DEPTH max_level, BIT_FLAGS option)
{
int r_idx;
monster_race *r_ptr;
* @param r_idx モンスター種族ID
* @return 対象にできるならtrueを返す
*/
-static bool monster_hook_chameleon_lord(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool monster_hook_chameleon_lord(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_race *r_ptr = &r_info[r_idx];
* @return 対象にできるならtrueを返す
* @todo グローバル変数対策の上 monster_hook.cへ移す。
*/
-static bool monster_hook_chameleon(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool monster_hook_chameleon(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_race *r_ptr = &r_info[r_idx];
* @param born 生成時の初変身先指定ならばtrue
* @param r_idx 旧モンスター種族のID
*/
-void choose_new_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx)
+void choose_new_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
struct floor_type;
struct monster_race;
-struct player_type;
+class PlayerType;
MONSTER_IDX m_pop(floor_type *floor_ptr);
-MONRACE_IDX get_mon_num(player_type *player_ptr, DEPTH min_level, DEPTH max_level, BIT_FLAGS option);
-void choose_new_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
+MONRACE_IDX get_mon_num(PlayerType *player_ptr, DEPTH min_level, DEPTH max_level, BIT_FLAGS option);
+void choose_new_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
SPEED get_mspeed(floor_type *player_ptr, monster_race *r_ptr);
int get_monster_crowd_number(floor_type *floor_ptr, MONSTER_IDX m_idx);
* @date 2020/03/07
* @author Hourier
* @details
- * 概ね、player_type 構造体が引数でない場合はここへ移動させることを検討しても良い
+ * 概ね、PlayerType 構造体が引数でない場合はここへ移動させることを検討しても良い
* 引数に入っていたらここには移動させないこと
*/
#include "target/projection-path-calculator.h"
#include "view/display-messages.h"
-void decide_drop_from_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool is_riding_mon);
-bool process_stealth(player_type *player_ptr, MONSTER_IDX m_idx);
-bool vanish_summoned_children(player_type *player_ptr, MONSTER_IDX m_idx, bool see_m);
-bool awake_monster(player_type *player_ptr, MONSTER_IDX m_idx);
-void process_angar(player_type *player_ptr, MONSTER_IDX m_idx, bool see_m);
-bool explode_grenade(player_type *player_ptr, MONSTER_IDX m_idx);
-bool decide_monster_multiplication(player_type *player_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox);
-void process_special(player_type *player_ptr, MONSTER_IDX m_idx);
-bool cast_spell(player_type *player_ptr, MONSTER_IDX m_idx, bool aware);
+void decide_drop_from_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool is_riding_mon);
+bool process_stealth(PlayerType *player_ptr, MONSTER_IDX m_idx);
+bool vanish_summoned_children(PlayerType *player_ptr, MONSTER_IDX m_idx, bool see_m);
+bool awake_monster(PlayerType *player_ptr, MONSTER_IDX m_idx);
+void process_angar(PlayerType *player_ptr, MONSTER_IDX m_idx, bool see_m);
+bool explode_grenade(PlayerType *player_ptr, MONSTER_IDX m_idx);
+bool decide_monster_multiplication(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox);
+void process_special(PlayerType *player_ptr, MONSTER_IDX m_idx);
+bool cast_spell(PlayerType *player_ptr, MONSTER_IDX m_idx, bool aware);
-bool process_monster_fear(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx);
+bool process_monster_fear(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx);
-void sweep_monster_process(player_type *player_ptr);
-bool decide_process_continue(player_type *player_ptr, monster_type *m_ptr);
+void sweep_monster_process(PlayerType *player_ptr);
+bool decide_process_continue(PlayerType *player_ptr, monster_type *m_ptr);
/*!
* @brief モンスター単体の1ターン行動処理メインルーチン /
*\n
* A "direction" of "5" means "pick a random direction".\n
*/
-void process_monster(player_type *player_ptr, MONSTER_IDX m_idx)
+void process_monster(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param m_idx モンスターID
* @return モンスターがプレイヤーに気付いているならばTRUE、超隠密状態ならばFALSE
*/
-bool process_stealth(player_type *player_ptr, MONSTER_IDX m_idx)
+bool process_stealth(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
auto ninja_data = PlayerClass(player_ptr).get_specific_data<ninja_data_type>();
if (!ninja_data || !ninja_data->s_stealth)
* @param m_idx モンスターID
* @param is_riding_mon 騎乗中であればTRUE
*/
-void decide_drop_from_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool is_riding_mon)
+void decide_drop_from_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool is_riding_mon)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param see_m モンスターが視界内にいたらTRUE
* @return 召喚モンスターが消滅したらTRUE
*/
-bool vanish_summoned_children(player_type *player_ptr, MONSTER_IDX m_idx, bool see_m)
+bool vanish_summoned_children(PlayerType *player_ptr, MONSTER_IDX m_idx, bool see_m)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
* @param m_idx モンスターID
* @return 寝たままならFALSE、起きているor起きたらTRUE
*/
-bool awake_monster(player_type *player_ptr, MONSTER_IDX m_idx)
+bool awake_monster(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param m_idx モンスターID
* @param see_m モンスターが視界内にいたらTRUE
*/
-void process_angar(player_type *player_ptr, MONSTER_IDX m_idx, bool see_m)
+void process_angar(PlayerType *player_ptr, MONSTER_IDX m_idx, bool see_m)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param m_idx モンスターID
* @return 爆死したらTRUE
*/
-bool explode_grenade(player_type *player_ptr, MONSTER_IDX m_idx)
+bool explode_grenade(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
if (m_ptr->r_idx != MON_GRENADE)
* @param player_ptr プレイヤーへの参照ポインタ
* @param m_idx モンスターID
*/
-void process_special(player_type *player_ptr, MONSTER_IDX m_idx)
+void process_special(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param ox 分裂元モンスターのX座標
* @return 実際に分裂したらTRUEを返す
*/
-bool decide_monster_multiplication(player_type *player_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox)
+bool decide_monster_multiplication(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param aware モンスターがプレイヤーに気付いているならばTRUE、超隠密状態ならばFALSE
* @return 魔法を唱えられなければ強制的にFALSE、その後モンスターが実際に魔法を唱えればTRUE
*/
-bool cast_spell(player_type *player_ptr, MONSTER_IDX m_idx, bool aware)
+bool cast_spell(PlayerType *player_ptr, MONSTER_IDX m_idx, bool aware)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param aware モンスターがプレイヤーに気付いているならばTRUE、超隠密状態ならばFALSE
* @return モンスターが戦いを決意したらTRUE
*/
-bool process_monster_fear(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx)
+bool process_monster_fear(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
bool is_battle_determined = !turn_flags_ptr->do_turn && !turn_flags_ptr->do_move && monster_fear_remaining(m_ptr) && turn_flags_ptr->aware;
* changes (flags, attacks, spells), we induce a redraw of the monster\n
* recall window.\n
*/
-void process_monsters(player_type *player_ptr)
+void process_monsters(PlayerType *player_ptr)
{
old_race_flags tmp_flags;
old_race_flags *old_race_flags_ptr = init_old_race_flags(&tmp_flags);
* @brief フロア内のモンスターについてターン終了時の処理を繰り返す
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void sweep_monster_process(player_type *player_ptr)
+void sweep_monster_process(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (MONSTER_IDX i = floor_ptr->m_max - 1; i >= 1; i--) {
* @param m_ptr モンスターへの参照ポインタ
* @return 後続処理が必要ならTRUE
*/
-bool decide_process_continue(player_type *player_ptr, monster_type *m_ptr)
+bool decide_process_continue(PlayerType *player_ptr, monster_type *m_ptr)
{
monster_race *r_ptr;
r_ptr = &r_info[m_ptr->r_idx];
#include "system/angband.h"
-struct player_type;
-void process_monsters(player_type *player_ptr);
-void process_monster(player_type *player_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+void process_monsters(PlayerType *player_ptr);
+void process_monster(PlayerType *player_ptr, MONSTER_IDX m_idx);
/*!
* @brief モンスターをペットにする
- * @param player_type プレイヤーへの参照ポインタ
+ * @param PlayerType プレイヤーへの参照ポインタ
* @param m_ptr モンスター情報構造体の参照ポインタ
*/
-void set_pet(player_type *player_ptr, monster_type *m_ptr)
+void set_pet(PlayerType *player_ptr, monster_type *m_ptr)
{
QuestCompletionChecker(player_ptr, m_ptr).complete();
m_ptr->mflag2.set(MonsterConstantFlagType::PET);
* Makes the monster hostile towards the player
* @param m_ptr モンスター情報構造体の参照ポインタ
*/
-void set_hostile(player_type *player_ptr, monster_type *m_ptr)
+void set_hostile(PlayerType *player_ptr, monster_type *m_ptr)
{
if (player_ptr->phase_out)
return;
* Anger the monster
* @param m_ptr モンスター情報構造体の参照ポインタ
*/
-void anger_monster(player_type *player_ptr, monster_type *m_ptr)
+void anger_monster(PlayerType *player_ptr, monster_type *m_ptr)
{
if (player_ptr->phase_out || !is_friendly(m_ptr))
return;
* @param v セットする値
* @return 別途更新処理が必要な場合TRUEを返す
*/
-bool set_monster_csleep(player_type *player_ptr, MONSTER_IDX m_idx, int v)
+bool set_monster_csleep(PlayerType *player_ptr, MONSTER_IDX m_idx, int v)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param v セットする値
* @return 別途更新処理が必要な場合TRUEを返す
*/
-bool set_monster_fast(player_type *player_ptr, MONSTER_IDX m_idx, int v)
+bool set_monster_fast(PlayerType *player_ptr, MONSTER_IDX m_idx, int v)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
/*
* Set "m_ptr->mtimed[MTIMED_SLOW]", notice observable changes
*/
-bool set_monster_slow(player_type *player_ptr, MONSTER_IDX m_idx, int v)
+bool set_monster_slow(PlayerType *player_ptr, MONSTER_IDX m_idx, int v)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param v セットする値
* @return 別途更新処理が必要な場合TRUEを返す
*/
-bool set_monster_stunned(player_type *player_ptr, MONSTER_IDX m_idx, int v)
+bool set_monster_stunned(PlayerType *player_ptr, MONSTER_IDX m_idx, int v)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param v セットする値
* @return 別途更新処理が必要な場合TRUEを返す
*/
-bool set_monster_confused(player_type *player_ptr, MONSTER_IDX m_idx, int v)
+bool set_monster_confused(PlayerType *player_ptr, MONSTER_IDX m_idx, int v)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param v セットする値
* @return 別途更新処理が必要な場合TRUEを返す
*/
-bool set_monster_monfear(player_type *player_ptr, MONSTER_IDX m_idx, int v)
+bool set_monster_monfear(PlayerType *player_ptr, MONSTER_IDX m_idx, int v)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param energy_need TRUEならば無敵解除時に行動ターン消費を行う
* @return 別途更新処理が必要な場合TRUEを返す
*/
-bool set_monster_invulner(player_type *player_ptr, MONSTER_IDX m_idx, int v, bool energy_need)
+bool set_monster_invulner(PlayerType *player_ptr, MONSTER_IDX m_idx, int v, bool energy_need)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param vs_player TRUEならば時間停止開始処理を行う
* @return 時間停止が行われている状態ならばTRUEを返す
*/
-bool set_monster_timewalk(player_type *player_ptr, int num, MONRACE_IDX who, bool vs_player)
+bool set_monster_timewalk(PlayerType *player_ptr, int num, MONRACE_IDX who, bool vs_player)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[hack_m_idx];
if (w_ptr->timewalk_m_idx)
#include "system/angband.h"
struct monster_type;
-struct player_type;
+class PlayerType;
void set_friendly(monster_type *m_ptr);
-void set_pet(player_type *player_ptr, monster_type *m_ptr);
-void set_hostile(player_type *player_ptr, monster_type *m_ptr);
-void anger_monster(player_type *player_ptr, monster_type *m_ptr);
-bool set_monster_csleep(player_type *player_ptr, MONSTER_IDX m_idx, int v);
-bool set_monster_fast(player_type *player_ptr, MONSTER_IDX m_idx, int v);
-bool set_monster_slow(player_type *player_ptr, MONSTER_IDX m_idx, int v);
-bool set_monster_stunned(player_type *player_ptr, MONSTER_IDX m_idx, int v);
-bool set_monster_confused(player_type *player_ptr, MONSTER_IDX m_idx, int v);
-bool set_monster_monfear(player_type *player_ptr, MONSTER_IDX m_idx, int v);
-bool set_monster_invulner(player_type *player_ptr, MONSTER_IDX m_idx, int v, bool energy_need);
-bool set_monster_timewalk(player_type *player_ptr, int num, MONRACE_IDX who, bool vs_player);
+void set_pet(PlayerType *player_ptr, monster_type *m_ptr);
+void set_hostile(PlayerType *player_ptr, monster_type *m_ptr);
+void anger_monster(PlayerType *player_ptr, monster_type *m_ptr);
+bool set_monster_csleep(PlayerType *player_ptr, MONSTER_IDX m_idx, int v);
+bool set_monster_fast(PlayerType *player_ptr, MONSTER_IDX m_idx, int v);
+bool set_monster_slow(PlayerType *player_ptr, MONSTER_IDX m_idx, int v);
+bool set_monster_stunned(PlayerType *player_ptr, MONSTER_IDX m_idx, int v);
+bool set_monster_confused(PlayerType *player_ptr, MONSTER_IDX m_idx, int v);
+bool set_monster_monfear(PlayerType *player_ptr, MONSTER_IDX m_idx, int v);
+bool set_monster_invulner(PlayerType *player_ptr, MONSTER_IDX m_idx, int v, bool energy_need);
+bool set_monster_timewalk(PlayerType *player_ptr, int num, MONRACE_IDX who, bool vs_player);
* @return 修正を行った結果のダメージ量
* @details RES_ALL持ちはAC軽減後のダメージを1/100に補正する. 光の剣は無敵を無効化する. 一定確率で無敵は貫通できる.
*/
-HIT_POINT mon_damage_mod(player_type *player_ptr, monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear)
+HIT_POINT mon_damage_mod(PlayerType *player_ptr, monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear)
{
auto *r_ptr = &r_info[m_ptr->r_idx];
if ((r_ptr->flagsr & RFR_RES_ALL) && dam > 0) {
* @param m_idx モンスター参照ID
* @param mtimed_idx 更新するモンスターの時限ステータスID
*/
-static void process_monsters_mtimed_aux(player_type *player_ptr, MONSTER_IDX m_idx, int mtimed_idx)
+static void process_monsters_mtimed_aux(PlayerType *player_ptr, MONSTER_IDX m_idx, int mtimed_idx)
{
auto *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
switch (mtimed_idx) {
* Process the counters of monsters (once per 10 game turns)\n
* These functions are to process monsters' counters same as player's.
*/
-void process_monsters_mtimed(player_type *player_ptr, int mtimed_idx)
+void process_monsters_mtimed(PlayerType *player_ptr, int mtimed_idx)
{
auto *floor_ptr = player_ptr->current_floor_ptr;
const auto &cur_mproc_list = floor_ptr->mproc_list[mtimed_idx];
* @param player_ptr プレイヤーへの参照ポインタ
* @param m_idx 魔力消去を受けるモンスターの参照ID
*/
-void dispel_monster_status(player_type *player_ptr, MONSTER_IDX m_idx)
+void dispel_monster_status(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
auto *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
GAME_TEXT m_name[MAX_NLEN];
* @param m_idx 経験値を得るモンスターの参照ID
* @param s_idx 撃破されたモンスター種族の参照ID
*/
-void monster_gain_exp(player_type *player_ptr, MONSTER_IDX m_idx, MONRACE_IDX s_idx)
+void monster_gain_exp(PlayerType *player_ptr, MONSTER_IDX m_idx, MONRACE_IDX s_idx)
{
if (m_idx <= 0 || s_idx <= 0) {
return;
#include "system/angband.h"
struct floor_type;
-struct player_type;
+class PlayerType;
struct monster_type;
bool monster_is_powerful(floor_type *floor_ptr, MONSTER_IDX m_idx);
DEPTH monster_level_idx(floor_type *floor_ptr, MONSTER_IDX m_idx);
-HIT_POINT mon_damage_mod(player_type *player_ptr, monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear);
+HIT_POINT mon_damage_mod(PlayerType *player_ptr, monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear);
bool monster_is_valid(monster_type *m_ptr);
-void dispel_monster_status(player_type *player_ptr, MONSTER_IDX m_idx);
-void monster_gain_exp(player_type *player_ptr, MONSTER_IDX m_idx, MONRACE_IDX s_idx);
+void dispel_monster_status(PlayerType *player_ptr, MONSTER_IDX m_idx);
+void monster_gain_exp(PlayerType *player_ptr, MONSTER_IDX m_idx, MONRACE_IDX s_idx);
-void process_monsters_mtimed(player_type *player_ptr, int mtimed_idx);
+void process_monsters_mtimed(PlayerType *player_ptr, int mtimed_idx);
TIME_EFFECT monster_csleep_remaining(monster_type *m_ptr);
TIME_EFFECT monster_fast_remaining(monster_type *m_ptr);
* @param ox 移動後の、モンスターのX座標
* @return アイテム等に影響を及ぼしたらTRUE
*/
-bool update_riding_monster(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, POSITION ny, POSITION nx)
+bool update_riding_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, POSITION ny, POSITION nx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[ny][nx];
* @param player_ptr プレイヤーへの参照ポインタ
* @param turn_flags_ptr ターン経過処理フラグへの参照ポインタ
*/
-void update_player_type(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_race *r_ptr)
+void update_player_type(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_race *r_ptr)
{
if (turn_flags_ptr->do_view) {
player_ptr->update |= PU_FLOW;
* @param turn_flags_ptr ターン経過処理フラグへの参照ポインタ
* @param m_ptr モンスターへの参照ポインタ
*/
-void update_monster_race_flags(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr)
+void update_monster_race_flags(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (!is_original_ap_and_seen(player_ptr, m_ptr))
* @param window ウィンドウフラグ
* @param old_race_flags_ptr モンスターフラグへの参照ポインタ
*/
-void update_player_window(player_type *player_ptr, old_race_flags *old_race_flags_ptr)
+void update_player_window(PlayerType *player_ptr, old_race_flags *old_race_flags_ptr)
{
monster_race *r_ptr;
r_ptr = &r_info[player_ptr->monster_race_idx];
}
}
-static um_type *initialize_um_type(player_type *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx, bool full)
+static um_type *initialize_um_type(PlayerType *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx, bool full)
{
um_ptr->m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
um_ptr->do_disturb = disturb_move;
return um_ptr;
}
-static POSITION decide_updated_distance(player_type *player_ptr, um_type *um_ptr)
+static POSITION decide_updated_distance(PlayerType *player_ptr, um_type *um_ptr)
{
if (!um_ptr->full)
return um_ptr->m_ptr->cdis;
* @param m_idx モンスターID
* @return WEIRD_MINDフラグがあるならTRUE
*/
-static bool update_weird_telepathy(player_type *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
+static bool update_weird_telepathy(PlayerType *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
{
monster_race *r_ptr = &r_info[um_ptr->m_ptr->r_idx];
if ((r_ptr->flags2 & RF2_WEIRD_MIND) == 0)
return true;
}
-static void update_telepathy_sight(player_type *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
+static void update_telepathy_sight(PlayerType *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
{
monster_race *r_ptr = &r_info[um_ptr->m_ptr->r_idx];
if (PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::MUSOU)) {
update_smart_stupid_flags(r_ptr);
}
-static void update_specific_race_telepathy(player_type *player_ptr, um_type *um_ptr)
+static void update_specific_race_telepathy(PlayerType *player_ptr, um_type *um_ptr)
{
monster_race *r_ptr = &r_info[um_ptr->m_ptr->r_idx];
if ((player_ptr->esp_animal) && (r_ptr->flags3 & RF3_ANIMAL)) {
}
}
-static bool check_cold_blood(player_type *player_ptr, um_type *um_ptr, const POSITION distance)
+static bool check_cold_blood(PlayerType *player_ptr, um_type *um_ptr, const POSITION distance)
{
if (distance > player_ptr->see_infra)
return false;
return true;
}
-static bool check_invisible(player_type *player_ptr, um_type *um_ptr)
+static bool check_invisible(PlayerType *player_ptr, um_type *um_ptr)
{
if (!player_can_see_bold(player_ptr, um_ptr->fy, um_ptr->fx))
return false;
* @param player_ptr プレイヤーへの参照ポインタ
* @param um_ptr モンスター情報アップデート構造体への参照ポインタ
*/
-static void decide_sight_invisible_monster(player_type *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
+static void decide_sight_invisible_monster(PlayerType *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
{
POSITION distance = decide_updated_distance(player_ptr, um_ptr);
monster_race *r_ptr = &r_info[um_ptr->m_ptr->r_idx];
* @param m_idx フロアのモンスター番号
* @details 感知した結果、エルドリッチホラー持ちがいたら精神を破壊する
*/
-static void update_invisible_monster(player_type *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
+static void update_invisible_monster(PlayerType *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
{
if (um_ptr->m_ptr->ml)
return;
}
}
-static void update_visible_monster(player_type *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
+static void update_visible_monster(PlayerType *player_ptr, um_type *um_ptr, MONSTER_IDX m_idx)
{
if (!um_ptr->m_ptr->ml)
return;
disturb(player_ptr, true, true);
}
-static bool update_clear_monster(player_type *player_ptr, um_type *um_ptr)
+static bool update_clear_monster(PlayerType *player_ptr, um_type *um_ptr)
{
if (!um_ptr->easy)
return false;
* @param m_idx 更新するモンスター情報のID
* @param full プレイヤーとの距離更新を行うならばtrue
*/
-void update_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool full)
+void update_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool full)
{
um_type tmp_um;
um_type *um_ptr = initialize_um_type(player_ptr, &tmp_um, m_idx, full);
* @param full 距離更新を行うならtrue
* @todo モンスターの感知状況しか更新していないように見える。関数名変更を検討する
*/
-void update_monsters(player_type *player_ptr, bool full)
+void update_monsters(PlayerType *player_ptr, bool full)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (MONSTER_IDX i = 1; i < floor_ptr->m_max; i++) {
* @param m_idx 更新を行う「モンスター情報ID
* @param what 学習対象ID
*/
-void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what)
+void update_smart_learn(PlayerType *player_ptr, MONSTER_IDX m_idx, int what)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
struct monster_race;
struct monster_type;
struct old_race_flags;;
-struct player_type;
+class PlayerType;
struct turn_flags;
-bool update_riding_monster(player_type *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, POSITION ny, POSITION nx);
-void update_player_type(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_race *r_ptr);
-void update_monster_race_flags(player_type *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr);
-void update_player_window(player_type *player_ptr, old_race_flags *old_race_flags_ptr);
-void update_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool full);
-void update_monsters(player_type *player_ptr, bool full);
-void update_smart_learn(player_type *player_ptr, MONSTER_IDX m_idx, int what);
+bool update_riding_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, POSITION ny, POSITION nx);
+void update_player_type(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_race *r_ptr);
+void update_monster_race_flags(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr);
+void update_player_window(PlayerType *player_ptr, old_race_flags *old_race_flags_ptr);
+void update_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool full);
+void update_monsters(PlayerType *player_ptr, bool full);
+void update_smart_learn(PlayerType *player_ptr, MONSTER_IDX m_idx, int what);
* @param r_idx チェックするモンスター種族ID
* @return 召喚条件が一致するならtrue / Return TRUE is the monster is OK and FALSE otherwise
*/
-static bool restrict_monster_to_dungeon(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool restrict_monster_to_dungeon(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
DUNGEON_IDX d_idx = player_ptr->dungeon_idx;
dungeon_type *d_ptr = &d_info[d_idx];
* @param player_ptr プレイヤーへの参照ポインタ
* @return 地勢にあったモンスターの生成条件関数
*/
-monsterrace_hook_type get_monster_hook(player_type *player_ptr)
+monsterrace_hook_type get_monster_hook(PlayerType *player_ptr)
{
if ((player_ptr->current_floor_ptr->dun_level > 0) || (player_ptr->current_floor_ptr->inside_quest > 0))
return (monsterrace_hook_type)mon_hook_dungeon;
* @brief 指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す
* @return 地勢にあったモンスターの生成条件関数
*/
-monsterrace_hook_type get_monster_hook2(player_type *player_ptr, POSITION y, POSITION x)
+monsterrace_hook_type get_monster_hook2(PlayerType *player_ptr, POSITION y, POSITION x)
{
feature_type *f_ptr = &f_info[player_ptr->current_floor_ptr->grid_array[y][x].feat];
if (f_ptr->flags.has(FloorFeatureType::WATER))
* モンスター生成テーブル alloc_race_table の各要素の基本重み prob1 を指定条件
* に従って変更し、結果を prob2 に書き込む。
*/
-static errr do_get_mon_num_prep(player_type *player_ptr, const monsterrace_hook_type hook1, const monsterrace_hook_type hook2, const bool restrict_to_dungeon)
+static errr do_get_mon_num_prep(PlayerType *player_ptr, const monsterrace_hook_type hook1, const monsterrace_hook_type hook2, const bool restrict_to_dungeon)
{
const floor_type *const floor_ptr = player_ptr->current_floor_ptr;
*
* get_mon_num() を呼ぶ前に get_mon_num_prep() 系関数のいずれかを呼ぶこと。
*/
-errr get_mon_num_prep(player_type *player_ptr, const monsterrace_hook_type hook1, const monsterrace_hook_type hook2)
+errr get_mon_num_prep(PlayerType *player_ptr, const monsterrace_hook_type hook1, const monsterrace_hook_type hook2)
{
return do_get_mon_num_prep(player_ptr, hook1, hook2, true);
}
*
* get_mon_num() を呼ぶ前に get_mon_num_prep 系関数のいずれかを呼ぶこと。
*/
-errr get_mon_num_prep_bounty(player_type *player_ptr)
+errr get_mon_num_prep_bounty(PlayerType *player_ptr)
{
return do_get_mon_num_prep(player_ptr, nullptr, nullptr, false);
}
#include "system/angband.h"
-struct player_type;
-typedef bool (*monsterrace_hook_type)(player_type *, MONRACE_IDX);
+class PlayerType;
+typedef bool (*monsterrace_hook_type)(PlayerType *, MONRACE_IDX);
extern MONSTER_IDX hack_m_idx;
extern MONSTER_IDX hack_m_idx_ii;
enum summon_type : int;
extern summon_type summon_specific_type;
-monsterrace_hook_type get_monster_hook(player_type *player_ptr);
-monsterrace_hook_type get_monster_hook2(player_type *player_ptr, POSITION y, POSITION x);
-errr get_mon_num_prep(player_type *player_ptr, monsterrace_hook_type hook1, monsterrace_hook_type hook2);
-errr get_mon_num_prep_bounty(player_type *player_ptr);
+monsterrace_hook_type get_monster_hook(PlayerType *player_ptr);
+monsterrace_hook_type get_monster_hook2(PlayerType *player_ptr, POSITION y, POSITION x);
+errr get_mon_num_prep(PlayerType *player_ptr, monsterrace_hook_type hook1, monsterrace_hook_type hook2);
+errr get_mon_num_prep_bounty(PlayerType *player_ptr);
#include "system/player-type-definition.h"
#include "util/enum-converter.h"
-static MonsterSpellResult monspell_to_player_impl(player_type *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx)
+static MonsterSpellResult monspell_to_player_impl(PlayerType *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
// clang-format off
switch (ms_type) {
}
static MonsterSpellResult monspell_to_monster_impl(
- player_type *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, bool is_special_spell)
+ PlayerType *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, bool is_special_spell)
{
// clang-format off
switch (ms_type) {
* @param x 対象の地点のx座標
* @param m_idx 呪文を唱えるモンスターID
*/
-MonsterSpellResult monspell_to_player(player_type *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx)
+MonsterSpellResult monspell_to_player(PlayerType *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
// 特技使用前の時点でプレイヤーがモンスターを視認できているかチェック(ラーニングの必要条件)。
const bool player_could_see_monster = spell_learnable(player_ptr, m_idx);
* @param m_idx 呪文を唱えるモンスターID
* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
* @param is_special_spell 特殊な行動である時TRUE
- * @todo モンスターからモンスターへの呪文なのにplayer_typeが引数になり得るのは間違っている……
+ * @todo モンスターからモンスターへの呪文なのにPlayerTypeが引数になり得るのは間違っている……
*/
MonsterSpellResult monspell_to_monster(
- player_type *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, bool is_special_spell)
+ PlayerType *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, bool is_special_spell)
{
// 特技使用前の時点でプレイヤーがモンスターを視認できているかチェック(ラーニングの必要条件)。
const bool player_could_see_monster = spell_learnable(player_ptr, m_idx);
enum class MonsterAbilityType;
-struct player_type;
-MonsterSpellResult monspell_to_player(player_type *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx);
+class PlayerType;
+MonsterSpellResult monspell_to_player(PlayerType *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx);
MonsterSpellResult monspell_to_monster(
- player_type *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, bool is_special_spell);
+ PlayerType *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, bool is_special_spell);
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-void add_cheat_remove_flags_element(player_type *player_ptr, msr_type *msr_ptr)
+void add_cheat_remove_flags_element(PlayerType *player_ptr, msr_type *msr_ptr)
{
if (has_resist_acid(player_ptr))
msr_ptr->smart.set(MonsterSmartLearnType::RES_ACID);
#pragma once
typedef struct msr_type msr_type;
-struct player_type;
-void add_cheat_remove_flags_element(player_type *player_ptr, msr_type *msr_ptr);
+class PlayerType;
+void add_cheat_remove_flags_element(PlayerType *player_ptr, msr_type *msr_ptr);
void check_element_resistance(msr_type *msr_ptr);
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-void add_cheat_remove_flags_others(player_type *player_ptr, msr_type *msr_ptr)
+void add_cheat_remove_flags_others(PlayerType *player_ptr, msr_type *msr_ptr)
{
if (has_resist_neth(player_ptr))
msr_ptr->smart.set(MonsterSmartLearnType::RES_NETH);
msr_ptr->smart.set(MonsterSmartLearnType::IMM_MANA);
}
-static void check_nether_resistance(player_type *player_ptr, msr_type *msr_ptr)
+static void check_nether_resistance(PlayerType *player_ptr, msr_type *msr_ptr)
{
if (msr_ptr->smart.has_not(MonsterSmartLearnType::RES_NETH))
return;
msr_ptr->ability_flags.reset(MonsterAbilityType::BA_LITE);
}
-static void check_dark_resistance(player_type *player_ptr, msr_type *msr_ptr)
+static void check_dark_resistance(PlayerType *player_ptr, msr_type *msr_ptr)
{
if (msr_ptr->smart.has_not(MonsterSmartLearnType::RES_DARK))
return;
msr_ptr->ability_flags.reset(MonsterAbilityType::MISSILE);
}
-void check_high_resistances(player_type *player_ptr, msr_type *msr_ptr)
+void check_high_resistances(PlayerType *player_ptr, msr_type *msr_ptr)
{
check_nether_resistance(player_ptr, msr_ptr);
check_lite_resistance(msr_ptr);
#pragma once
typedef struct msr_type msr_type;
-struct player_type;
-void add_cheat_remove_flags_others(player_type *player_ptr, msr_type *msr_ptr);
-void check_high_resistances(player_type *player_ptr, msr_type *msr_ptr);
+class PlayerType;
+void add_cheat_remove_flags_others(PlayerType *player_ptr, msr_type *msr_ptr);
+void check_high_resistances(PlayerType *player_ptr, msr_type *msr_ptr);
#include "system/monster-type-definition.h"
#include "system/player-type-definition.h"
-static void add_cheat_remove_flags(player_type *player_ptr, msr_type *msr_ptr)
+static void add_cheat_remove_flags(PlayerType *player_ptr, msr_type *msr_ptr)
{
if (!smart_cheat)
return;
* @param f5p モンスター魔法のフラグリスト2
* @param f6p モンスター魔法のフラグリスト3
*/
-void remove_bad_spells(MONSTER_IDX m_idx, player_type *player_ptr, EnumClassFlagGroup<MonsterAbilityType> &ability_flags)
+void remove_bad_spells(MONSTER_IDX m_idx, PlayerType *player_ptr, EnumClassFlagGroup<MonsterAbilityType> &ability_flags)
{
msr_type tmp_msr;
msr_type *msr_ptr = initialize_msr_type(player_ptr, &tmp_msr, m_idx, ability_flags);
#include "monster-race/race-ability-flags.h"
#include "util/flag-group.h"
-struct player_type;
-void remove_bad_spells(MONSTER_IDX m_idx, player_type *player_ptr, EnumClassFlagGroup<MonsterAbilityType> &ability_flags);
+class PlayerType;
+void remove_bad_spells(MONSTER_IDX m_idx, PlayerType *player_ptr, EnumClassFlagGroup<MonsterAbilityType> &ability_flags);
#include "system/monster-type-definition.h"
#include "system/player-type-definition.h"
-msa_type *initialize_msa_type(player_type *player_ptr, msa_type *msa_ptr, MONSTER_IDX m_idx)
+msa_type *initialize_msa_type(PlayerType *player_ptr, msa_type *msa_ptr, MONSTER_IDX m_idx)
{
msa_ptr->m_idx = m_idx;
msa_ptr->m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
DEPTH rlev;
} msa_type;
-struct player_type;
-msa_type *initialize_msa_type(player_type *player_ptr, msa_type *msa_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+msa_type *initialize_msa_type(PlayerType *player_ptr, msa_type *msa_ptr, MONSTER_IDX m_idx);
msa_ptr->ability_flags.reset(RF_ABILITY_NOMAGIC_MASK);
}
-static void check_mspell_stupid(player_type *player_ptr, msa_type *msa_ptr)
+static void check_mspell_stupid(PlayerType *player_ptr, msa_type *msa_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
msa_ptr->in_no_magic_dungeon = d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::NO_MAGIC) && floor_ptr->dun_level
msa_ptr->ability_flags &= RF_ABILITY_NOMAGIC_MASK;
}
-static void check_mspell_smart(player_type *player_ptr, msa_type *msa_ptr)
+static void check_mspell_smart(PlayerType *player_ptr, msa_type *msa_ptr)
{
if ((msa_ptr->r_ptr->flags2 & RF2_SMART) == 0)
return;
}
}
-static void check_mspell_arena(player_type *player_ptr, msa_type *msa_ptr)
+static void check_mspell_arena(PlayerType *player_ptr, msa_type *msa_ptr)
{
if (!player_ptr->current_floor_ptr->inside_arena && !player_ptr->phase_out)
return;
msa_ptr->ability_flags.reset(MonsterAbilityType::SPECIAL);
}
-static bool check_mspell_non_stupid(player_type *player_ptr, msa_type *msa_ptr)
+static bool check_mspell_non_stupid(PlayerType *player_ptr, msa_type *msa_ptr)
{
if ((msa_ptr->r_ptr->flags2 & RF2_STUPID) != 0)
return true;
EnumClassFlagGroup<MonsterAbilityType>::get_flags(msa_ptr->ability_flags, std::back_inserter(msa_ptr->mspells));
}
-static void describe_mspell_monster(player_type *player_ptr, msa_type *msa_ptr)
+static void describe_mspell_monster(PlayerType *player_ptr, msa_type *msa_ptr)
{
monster_desc(player_ptr, msa_ptr->m_name, msa_ptr->m_ptr, 0x00);
#endif
}
-static bool switch_do_spell(player_type *player_ptr, msa_type *msa_ptr)
+static bool switch_do_spell(PlayerType *player_ptr, msa_type *msa_ptr)
{
switch (msa_ptr->do_spell) {
case DO_SPELL_NONE: {
}
}
-static bool check_mspell_continuation(player_type *player_ptr, msa_type *msa_ptr)
+static bool check_mspell_continuation(PlayerType *player_ptr, msa_type *msa_ptr)
{
if (msa_ptr->ability_flags.none())
return false;
return true;
}
-static bool check_mspell_unexploded(player_type *player_ptr, msa_type *msa_ptr)
+static bool check_mspell_unexploded(PlayerType *player_ptr, msa_type *msa_ptr)
{
PERCENTAGE fail_rate = 25 - (msa_ptr->rlev + 3) / 4;
if (msa_ptr->r_ptr->flags2 & RF2_STUPID)
*
* ターゲット (msa_ptr->y, msa_ptr->x) は設定済みとする。
*/
-static bool check_thrown_mspell(player_type *player_ptr, msa_type *msa_ptr)
+static bool check_thrown_mspell(PlayerType *player_ptr, msa_type *msa_ptr)
{
// プレイヤーがモンスターを正しく視認できていれば思い出に残る。
// FIXME: ここで処理するのはおかしいような?
}
}
-static void check_mspell_imitation(player_type *player_ptr, msa_type *msa_ptr)
+static void check_mspell_imitation(PlayerType *player_ptr, msa_type *msa_ptr)
{
bool seen = (!player_ptr->blind && msa_ptr->m_ptr->ml);
bool can_imitate = player_has_los_bold(player_ptr, msa_ptr->m_ptr->fy, msa_ptr->m_ptr->fx);
* @param m_idx モンスター構造体配列のID
* @return 実際に特殊技能を利用したらTRUEを返す
*/
-bool make_attack_spell(player_type *player_ptr, MONSTER_IDX m_idx)
+bool make_attack_spell(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
msa_type tmp_msa;
msa_type *msa_ptr = initialize_msa_type(player_ptr, &tmp_msa, m_idx);
#include "system/angband.h"
-struct player_type;
-bool make_attack_spell(player_type *player_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+bool make_attack_spell(PlayerType *player_ptr, MONSTER_IDX m_idx);
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF4_BA_NUKE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF4_BA_NUKE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが放射能球を放った。", "%^s casts a ball of radiation."),
_("%^sが%sに放射能球を放った。", "%^s casts a ball of radiation at %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF4_BA_CHAO(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF4_BA_CHAO(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが恐ろしげにつぶやいた。", "%^s mumbles frighteningly."),
_("%^sが純ログルスを放った。", "%^s invokes a raw Logrus."), _("%^sが%sに純ログルスを放った。", "%^s invokes raw Logrus upon %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_ACID(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_ACID(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがアシッド・ボールの呪文を唱えた。", "%^s casts an acid ball."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_ELEC(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_ELEC(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがサンダー・ボールの呪文を唱えた。", "%^s casts a lightning ball."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_FIRE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_FIRE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg;
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_COLD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_COLD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがアイス・ボールの呪文を唱えた。", "%^s casts a frost ball."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_POIS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_POIS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが悪臭雲の呪文を唱えた。", "%^s casts a stinking cloud."),
_("%^sが%sに向かって悪臭雲の呪文を唱えた。", "%^s casts a stinking cloud at %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_NETH(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_NETH(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが地獄球の呪文を唱えた。", "%^s casts a nether ball."),
_("%^sが%sに向かって地獄球の呪文を唱えた。", "%^s casts a nether ball at %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_WATE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_WATE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
bool known = monster_near_player(player_ptr->current_floor_ptr, m_idx, t_idx);
bool see_either = see_monster(player_ptr, m_idx) || see_monster(player_ptr, t_idx);
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_MANA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_MANA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
_("%^sが魔力の嵐の呪文を念じた。", "%^s invokes a mana storm."), _("%^sが%sに対して魔力の嵐の呪文を念じた。", "%^s invokes a mana storm upon %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_DARK(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_DARK(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
_("%^sが暗黒の嵐の呪文を念じた。", "%^s invokes a darkness storm."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BA_LITE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BA_LITE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
_("%^sがスターバーストの呪文を念じた。", "%^s invokes a starburst."),
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF4_BA_NUKE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF4_BA_CHAO(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_ACID(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_ELEC(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_FIRE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_COLD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_POIS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_NETH(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_WATE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_MANA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_DARK(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BA_LITE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF4_BA_NUKE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF4_BA_CHAO(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_ACID(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_ELEC(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_FIRE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_COLD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_POIS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_NETH(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_WATE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_MANA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_DARK(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BA_LITE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF4_SHOOT(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF4_SHOOT(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが奇妙な音を発した。", "%^s makes a strange noise."),
_("%^sが矢を放った。", "%^s fires an arrow."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_ACID(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_ACID(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがアシッド・ボルトの呪文を唱えた。", "%^s casts an acid bolt."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_ELEC(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_ELEC(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがサンダー・ボルトの呪文を唱えた。", "%^s casts a lightning bolt."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_FIRE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_FIRE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがファイア・ボルトの呪文を唱えた。", "%^s casts a fire bolt."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_COLD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_COLD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがアイス・ボルトの呪文を唱えた。", "%^s casts a frost bolt."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_NETH(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_NETH(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが地獄の矢の呪文を唱えた。", "%^s casts a nether bolt."),
_("%^sが%sに向かって地獄の矢の呪文を唱えた。", "%^s casts a nether bolt at %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_WATE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_WATE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがウォーター・ボルトの呪文を唱えた。", "%^s casts a water bolt."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_MANA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_MANA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが魔力の矢の呪文を唱えた。", "%^s casts a mana bolt."),
_("%^sが%sに向かって魔力の矢の呪文を唱えた。", "%^s casts a mana bolt at %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_PLAS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_PLAS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがプラズマ・ボルトの呪文を唱えた。", "%^s casts a plasma bolt."),
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BO_ICEE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BO_ICEE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが極寒の矢の呪文を唱えた。", "%^s casts an ice bolt."),
_("%^sが%sに向かって極寒の矢の呪文を唱えた。", "%^s casts an ice bolt at %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_MISSILE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_MISSILE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがマジック・ミサイルの呪文を唱えた。", "%^s casts a magic missile."),
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF4_SHOOT(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_ACID(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_ELEC(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_FIRE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_COLD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_NETH(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_WATE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_MANA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_PLAS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BO_ICEE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_MISSILE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF4_SHOOT(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_ACID(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_ELEC(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_FIRE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_COLD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_NETH(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_WATE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_MANA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_PLAS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BO_ICEE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_MISSILE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF4_BREATH(player_type *player_ptr, AttributeType GF_TYPE, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF4_BREATH(PlayerType *player_ptr, AttributeType GF_TYPE, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
HIT_POINT dam, drs_type = 0;
concptr type_s;
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF4_BREATH(player_type *player_ptr, AttributeType GF_TYPE, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF4_BREATH(PlayerType *player_ptr, AttributeType GF_TYPE, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
* @param x1 判定を行いたいマスのX座標
* @return 召還に相応しいならばTRUEを返す
*/
-bool summon_possible(player_type *player_ptr, POSITION y1, POSITION x1)
+bool summon_possible(PlayerType *player_ptr, POSITION y1, POSITION x1)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (POSITION y = y1 - 2; y <= y1 + 2; y++) {
* @param m_ptr 判定を行いたいモンスターの構造体参照ポインタ
* @return 死者復活が有効な状態ならばTRUEを返す。
*/
-bool raise_possible(player_type *player_ptr, monster_type *m_ptr)
+bool raise_possible(PlayerType *player_ptr, monster_type *m_ptr)
{
POSITION y = m_ptr->fy;
POSITION x = m_ptr->fx;
* no equally friendly monster is\n
* between the attacker and target.\n
*/
-bool clean_shot(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend)
+bool clean_shot(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
uint16_t grid_g[512];
* @param monspell モンスター魔法のID
* @param target_type モンスターからモンスターへ撃つならMONSTER_TO_MONSTER、モンスターからプレイヤーならMONSTER_TO_PLAYER
*/
-ProjectResult bolt(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, AttributeType typ, int dam_hp, int target_type)
+ProjectResult bolt(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, AttributeType typ, int dam_hp, int target_type)
{
BIT_FLAGS flg = 0;
switch (target_type) {
* @param monspell モンスター魔法のID
* @param target_type モンスターからモンスターへ撃つならMONSTER_TO_MONSTER、モンスターからプレイヤーならMONSTER_TO_PLAYER
*/
-ProjectResult beam(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, AttributeType typ, int dam_hp, int target_type)
+ProjectResult beam(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, AttributeType typ, int dam_hp, int target_type)
{
BIT_FLAGS flg = 0;
switch (target_type) {
* @param monspell モンスター魔法のID
* @param target_type モンスターからモンスターへ撃つならMONSTER_TO_MONSTER、モンスターからプレイヤーならMONSTER_TO_PLAYER
*/
-ProjectResult breath(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, AttributeType typ, int dam_hp, POSITION rad, bool breath, int target_type)
+ProjectResult breath(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, AttributeType typ, int dam_hp, POSITION rad, bool breath, int target_type)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
enum class MonsterAbilityType;
struct monster_type;
-struct player_type;
-bool clean_shot(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend);
-bool summon_possible(player_type *player_ptr, POSITION y1, POSITION x1);
-bool raise_possible(player_type *player_ptr, monster_type *m_ptr);
+class PlayerType;
+bool clean_shot(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend);
+bool summon_possible(PlayerType *player_ptr, POSITION y1, POSITION x1);
+bool raise_possible(PlayerType *player_ptr, monster_type *m_ptr);
bool spell_is_inate(MonsterAbilityType spell);
-ProjectResult beam(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, AttributeType typ, int dam_hp, int target_type);
-ProjectResult bolt(player_type *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, AttributeType typ, int dam_hp, int target_type);
+ProjectResult beam(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, AttributeType typ, int dam_hp, int target_type);
+ProjectResult bolt(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, AttributeType typ, int dam_hp, int target_type);
ProjectResult breath(
- player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, AttributeType typ, int dam_hp, POSITION rad, bool breath, int target_type);
+ PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, AttributeType typ, int dam_hp, POSITION rad, bool breath, int target_type);
* @param MS_TYPE 呪文の番号
* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
*/
-static MonsterSpellResult spell_RF5_CAUSE(player_type *player_ptr, AttributeType GF_TYPE, HIT_POINT dam, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx,
+static MonsterSpellResult spell_RF5_CAUSE(PlayerType *player_ptr, AttributeType GF_TYPE, HIT_POINT dam, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx,
concptr msg1, concptr msg2, concptr msg3, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid(dam);
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_CAUSE_1(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_CAUSE_1(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
concptr msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
concptr msg2 = _("%^sがあなたを指さして呪った。", "%^s points at you and curses.");
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_CAUSE_2(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_CAUSE_2(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
concptr msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
concptr msg2 = _("%^sがあなたを指さして恐ろしげに呪った。", "%^s points at you and curses horribly.");
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_CAUSE_3(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_CAUSE_3(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
concptr msg1 = _("%^sが何かを大声で叫んだ。", "%^s mumbles loudly.");
concptr msg2 = _("%^sがあなたを指さして恐ろしげに呪文を唱えた!", "%^s points at you, incanting terribly!");
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_CAUSE_4(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_CAUSE_4(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
concptr msg1 = _("%^sが「お前は既に死んでいる」と叫んだ。", "%^s screams the word 'DIE!'");
concptr msg2 = _("%^sがあなたの秘孔を突いて「お前は既に死んでいる」と叫んだ。", "%^s points at you, screaming the word DIE!");
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF5_CAUSE_1(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_CAUSE_2(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_CAUSE_3(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_CAUSE_4(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF5_CAUSE_1(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_CAUSE_2(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_CAUSE_3(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_CAUSE_4(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
* @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
*/
static HIT_POINT monspell_damage_base(
- player_type *player_ptr, MonsterAbilityType ms_type, int hp, int rlev, bool powerful, int shoot_dd, int shoot_ds, int shoot_base, int TYPE)
+ PlayerType *player_ptr, MonsterAbilityType ms_type, int hp, int rlev, bool powerful, int shoot_dd, int shoot_ds, int shoot_base, int TYPE)
{
HIT_POINT dam = 0, dice_num = 0, dice_side = 0, mult = 1, div = 1;
* @param TYPE DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
* @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
*/
-HIT_POINT monspell_damage(player_type *player_ptr, MonsterAbilityType ms_type, MONSTER_IDX m_idx, int TYPE)
+HIT_POINT monspell_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONSTER_IDX m_idx, int TYPE)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param TYPE DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
* @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
*/
-HIT_POINT monspell_race_damage(player_type *player_ptr, MonsterAbilityType ms_type, MONRACE_IDX r_idx, int TYPE)
+HIT_POINT monspell_race_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONRACE_IDX r_idx, int TYPE)
{
monster_race *r_ptr = &r_info[r_idx];
DEPTH rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
* @param TYPE DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
* @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
*/
-HIT_POINT monspell_bluemage_damage(player_type *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, int TYPE)
+HIT_POINT monspell_bluemage_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, int TYPE)
{
int hp = player_ptr->chp;
int shoot_dd = 1, shoot_ds = 1, shoot_base = 0;
};
enum class MonsterAbilityType;
-struct player_type;
-HIT_POINT monspell_damage(player_type *player_ptr, MonsterAbilityType ms_type, MONSTER_IDX m_idx, int TYPE);
-HIT_POINT monspell_race_damage(player_type *player_ptr, MonsterAbilityType ms_type, MONRACE_IDX r_idx, int TYPE);
-HIT_POINT monspell_bluemage_damage(player_type *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, int TYPE);
+class PlayerType;
+HIT_POINT monspell_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONSTER_IDX m_idx, int TYPE);
+HIT_POINT monspell_race_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONRACE_IDX r_idx, int TYPE);
+HIT_POINT monspell_bluemage_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, int TYPE);
/*!
* @brief プレイヤーに魔力消去効果を与える。
*/
-static void dispel_player(player_type *player_ptr)
+static void dispel_player(PlayerType *player_ptr)
{
(void)set_fast(player_ptr, 0, true);
set_lightspeed(player_ptr, 0, true);
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF4_DISPEL(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF4_DISPEL(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid();
res.learnable = TARGET_TYPE == MONSTER_TO_PLAYER;
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF4_DISPEL(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF4_DISPEL(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF4_SHRIEK(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int target_type)
+MonsterSpellResult spell_RF4_SHRIEK(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int target_type)
{
mspell_cast_msg_simple msg(_("%^sがかん高い金切り声をあげた。", "%^s makes a high pitched shriek."),
_("%^sが%sに向かって叫んだ。", "%^s shrieks at %s."));
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_WORLD(player_type *player_ptr, MONSTER_IDX m_idx)
+MonsterSpellResult spell_RF6_WORLD(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
GAME_TEXT m_name[MAX_NLEN];
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_BLINK(player_type *player_ptr, MONSTER_IDX m_idx, int TARGET_TYPE, bool is_quantum_effect)
+MonsterSpellResult spell_RF6_BLINK(PlayerType *player_ptr, MONSTER_IDX m_idx, int TARGET_TYPE, bool is_quantum_effect)
{
const auto res = MonsterSpellResult::make_valid();
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_TPORT(player_type *player_ptr, MONSTER_IDX m_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_TPORT(PlayerType *player_ptr, MONSTER_IDX m_idx, int TARGET_TYPE)
{
const auto res = MonsterSpellResult::make_valid();
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_TELE_TO(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_TELE_TO(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid();
res.learnable = TARGET_TYPE == MONSTER_TO_PLAYER;
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_TELE_AWAY(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_TELE_AWAY(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid();
res.learnable = TARGET_TYPE == MONSTER_TO_PLAYER;
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_TELE_LEVEL(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_TELE_LEVEL(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
const auto res = MonsterSpellResult::make_valid();
*
* プレイヤーが対象かつ暗闇ならラーニング可。
*/
-MonsterSpellResult spell_RF6_DARKNESS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_DARKNESS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg;
concptr msg_done;
*
* ラーニング可。
*/
-MonsterSpellResult spell_RF6_TRAPS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+MonsterSpellResult spell_RF6_TRAPS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
GAME_TEXT m_name[MAX_NLEN];
monster_name(player_ptr, m_idx, m_name);
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_RAISE_DEAD(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_RAISE_DEAD(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF4_SHRIEK(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_WORLD(player_type *player_ptr, MONSTER_IDX m_idx);
-MonsterSpellResult spell_RF6_BLINK(player_type *player_ptr, MONSTER_IDX m_idx, int TARGET_TYPE, bool is_quantum_effect);
-MonsterSpellResult spell_RF6_TPORT(player_type *player_ptr, MONSTER_IDX m_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_TELE_TO(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_TELE_AWAY(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_TELE_LEVEL(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_DARKNESS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_TRAPS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
-MonsterSpellResult spell_RF6_RAISE_DEAD(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF4_SHRIEK(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_WORLD(PlayerType *player_ptr, MONSTER_IDX m_idx);
+MonsterSpellResult spell_RF6_BLINK(PlayerType *player_ptr, MONSTER_IDX m_idx, int TARGET_TYPE, bool is_quantum_effect);
+MonsterSpellResult spell_RF6_TPORT(PlayerType *player_ptr, MONSTER_IDX m_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_TELE_TO(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_TELE_AWAY(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_TELE_LEVEL(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_DARKNESS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_TRAPS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+MonsterSpellResult spell_RF6_RAISE_DEAD(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
* @param m_ptr 使用するモンスターの構造体参照ポインタ
* @return ビームが到達可能ならばTRUEを返す
*/
-bool direct_beam(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, monster_type *m_ptr)
+bool direct_beam(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, monster_type *m_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
uint16_t grid_g[512];
* @param is_friend TRUEならば、プレイヤーを巻き込む時にブレスの判定をFALSEにする。
* @return ブレスを直接当てられるならばTRUEを返す
*/
-bool breath_direct(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, AttributeType typ, bool is_friend)
+bool breath_direct(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, AttributeType typ, bool is_friend)
{
BIT_FLAGS flg;
switch (typ) {
* @param tx 目標X座標を返す参照ポインタ
* @param flg 判定のフラグ配列
*/
-void get_project_point(player_type *player_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg)
+void get_project_point(PlayerType *player_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg)
{
uint16_t path_g[128];
int path_n = projection_path(player_ptr, path_g, get_max_range(player_ptr), sy, sx, *ty, *tx, flg);
* @param t_idx 目標のモンスターID
* @return 魔力消去を使うべきならばTRUEを変えす。
*/
-bool dispel_check_monster(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx)
+bool dispel_check_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx)
{
monster_type *t_ptr = &player_ptr->current_floor_ptr->m_list[t_idx];
if (monster_invulner_remaining(t_ptr))
* @param m_idx モンスターの構造体配列ID
* @return 魔力消去をかけるべきならTRUEを返す。
*/
-bool dispel_check(player_type *player_ptr, MONSTER_IDX m_idx)
+bool dispel_check(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
if (is_invuln(player_ptr))
return true;
#include "effect/attribute-types.h"
struct monster_type;
-struct player_type;
-bool direct_beam(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, monster_type *m_ptr);
-bool breath_direct(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, AttributeType typ, bool is_friend);
-void get_project_point(player_type *player_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg);
-bool dispel_check_monster(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
-bool dispel_check(player_type *player_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+bool direct_beam(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, monster_type *m_ptr);
+bool breath_direct(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, AttributeType typ, bool is_friend);
+void get_project_point(PlayerType *player_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg);
+bool dispel_check_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
+bool dispel_check(PlayerType *player_ptr, MONSTER_IDX m_idx);
*
* モンスターが特技を使う前にプレイヤーがモンスターを視認できているかどうかの判定用。
*/
-bool spell_learnable(player_type *player_ptr, MONSTER_IDX m_idx)
+bool spell_learnable(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
bool seen = (!player_ptr->blind && m_ptr->ml);
#include "system/angband.h"
-struct player_type;
-bool spell_learnable(player_type *player_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+bool spell_learnable(PlayerType *player_ptr, MONSTER_IDX m_idx);
* @param path_check 射線を判定するための関数ポインタ
* @return 有効な座標があった場合TRUEを返す
*/
-bool adjacent_grid_check(player_type *player_ptr, monster_type *m_ptr, POSITION *yp, POSITION *xp, FloorFeatureType f_flag, path_check_pf path_check)
+bool adjacent_grid_check(PlayerType *player_ptr, monster_type *m_ptr, POSITION *yp, POSITION *xp, FloorFeatureType f_flag, path_check_pf path_check)
{
static int tonari_y[4][8] = { { -1, -1, -1, 0, 0, 1, 1, 1 }, { -1, -1, -1, 0, 0, 1, 1, 1 }, { 1, 1, 1, 0, 0, -1, -1, -1 }, { 1, 1, 1, 0, 0, -1, -1, -1 } };
static int tonari_x[4][8] = { { -1, 0, 1, -1, 1, -1, 0, 1 }, { 1, 0, -1, 1, -1, 1, 0, -1 }, { -1, 0, 1, -1, 1, -1, 0, 1 }, { 1, 0, -1, 1, -1, 1, 0, -1 } };
return false;
}
-void decide_lite_range(player_type *player_ptr, msa_type *msa_ptr)
+void decide_lite_range(PlayerType *player_ptr, msa_type *msa_ptr)
{
if (msa_ptr->ability_flags.has_not(MonsterAbilityType::BR_LITE))
return;
msa_ptr->do_spell = DO_SPELL_BR_LITE;
}
-static void check_lite_area_by_mspell(player_type *player_ptr, msa_type *msa_ptr)
+static void check_lite_area_by_mspell(PlayerType *player_ptr, msa_type *msa_ptr)
{
if (msa_ptr->ability_flags.has(MonsterAbilityType::BR_DISI) && (msa_ptr->m_ptr->cdis < get_max_range(player_ptr) / 2)
&& in_disintegration_range(player_ptr->current_floor_ptr, msa_ptr->m_ptr->fy, msa_ptr->m_ptr->fx, msa_ptr->y, msa_ptr->x)
}
}
-static void decide_lite_breath(player_type *player_ptr, msa_type *msa_ptr)
+static void decide_lite_breath(PlayerType *player_ptr, msa_type *msa_ptr)
{
if (msa_ptr->success)
return;
msa_ptr->success = true;
}
-bool decide_lite_projection(player_type *player_ptr, msa_type *msa_ptr)
+bool decide_lite_projection(PlayerType *player_ptr, msa_type *msa_ptr)
{
if (projectable(player_ptr, msa_ptr->m_ptr->fy, msa_ptr->m_ptr->fx, msa_ptr->y, msa_ptr->x)) {
feature_projection(player_ptr->current_floor_ptr, msa_ptr);
return msa_ptr->success;
}
-void decide_lite_area(player_type *player_ptr, msa_type *msa_ptr)
+void decide_lite_area(PlayerType *player_ptr, msa_type *msa_ptr)
{
if (msa_ptr->ability_flags.has_not(MonsterAbilityType::DARKNESS))
return;
struct monster_type;
typedef struct msa_type msa_type;
-struct player_type;
-typedef bool (*path_check_pf)(player_type *, POSITION, POSITION, POSITION, POSITION);
+class PlayerType;
+typedef bool (*path_check_pf)(PlayerType *, POSITION, POSITION, POSITION, POSITION);
enum class FloorFeatureType;
-bool adjacent_grid_check(player_type *player_ptr, monster_type *m_ptr, POSITION *yp, POSITION *xp, FloorFeatureType f_flag, path_check_pf path_check);
-void decide_lite_range(player_type *player_ptr, msa_type *msa_ptr);
-bool decide_lite_projection(player_type *player_ptr, msa_type *msa_ptr);
-void decide_lite_area(player_type *player_ptr, msa_type *msa_ptr);
+bool adjacent_grid_check(PlayerType *player_ptr, monster_type *m_ptr, POSITION *yp, POSITION *xp, FloorFeatureType f_flag, path_check_pf path_check);
+void decide_lite_range(PlayerType *player_ptr, msa_type *msa_ptr);
+bool decide_lite_projection(PlayerType *player_ptr, msa_type *msa_ptr);
+void decide_lite_area(PlayerType *player_ptr, msa_type *msa_ptr);
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF4_ROCKET(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF4_ROCKET(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かを射った。", "%^s shoots something."), _("%^sがロケットを発射した。", "%^s fires a rocket."),
_("%^sが%sにロケットを発射した。", "%^s fires a rocket at %s."));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF6_HAND_DOOM(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_HAND_DOOM(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_simple msg(_("%^sが<破滅の手>を放った!", "%^s invokes the Hand of Doom!"),
_("%^sが%sに<破滅の手>を放った!", "%^s invokes the Hand of Doom upon %s!"));
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF6_PSY_SPEAR(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_PSY_SPEAR(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが光の剣を放った。", "%^s throw a Psycho-Spear."),
_("%^sが%sに向かって光の剣を放った。", "%^s throw a Psycho-spear at %s."));
#include "system/angband.h"
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF4_ROCKET(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_HAND_DOOM(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_PSY_SPEAR(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF4_ROCKET(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_HAND_DOOM(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_PSY_SPEAR(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
* @param spell 判定対象のID
* @return 特別効果魔法のIDならばTRUEを返す。
*/
-static bool spell_special(player_type *player_ptr, MonsterAbilityType spell)
+static bool spell_special(PlayerType *player_ptr, MonsterAbilityType spell)
{
if (player_ptr->phase_out)
return false;
* This function may well be an efficiency bottleneck.\n
* @todo 長過ぎる。切り分けが必要
*/
-MonsterAbilityType choose_attack_spell(player_type *player_ptr, msa_type *msa_ptr)
+MonsterAbilityType choose_attack_spell(PlayerType *player_ptr, msa_type *msa_ptr)
{
std::vector<MonsterAbilityType> escape;
std::vector<MonsterAbilityType> attack;
enum class MonsterAbilityType;
typedef struct msa_type msa_type;
-struct player_type;
-MonsterAbilityType choose_attack_spell(player_type *player_ptr, msa_type *msa_ptr);
+class PlayerType;
+MonsterAbilityType choose_attack_spell(PlayerType *player_ptr, msa_type *msa_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param m_idx 呪文を唱えるモンスターID
*/
-static MonsterSpellResult spell_RF6_SPECIAL_BANORLUPART(player_type *player_ptr, MONSTER_IDX m_idx)
+static MonsterSpellResult spell_RF6_SPECIAL_BANORLUPART(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
*/
-static MonsterSpellResult spell_RF6_SPECIAL_ROLENTO(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+static MonsterSpellResult spell_RF6_SPECIAL_ROLENTO(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
int count = 0, k;
int num = 1 + randint1(3);
* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
*/
-static MonsterSpellResult spell_RF6_SPECIAL_B(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+static MonsterSpellResult spell_RF6_SPECIAL_B(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_simple msg;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_SPECIAL(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_SPECIAL(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF6_SPECIAL(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF6_SPECIAL(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
* @param resist 耐性の有無を判別するフラグ
* @param saved_throw 抵抗に成功したか判別するフラグ
*/
-void spell_badstatus_message_to_player(player_type *player_ptr, MONSTER_IDX m_idx, const mspell_cast_msg_bad_status_to_player &msgs, bool resist,
+void spell_badstatus_message_to_player(PlayerType *player_ptr, MONSTER_IDX m_idx, const mspell_cast_msg_bad_status_to_player &msgs, bool resist,
bool saved_throw)
{
GAME_TEXT m_name[MAX_NLEN];
* @param resist 耐性の有無を判別するフラグ
* @param saved_throw 抵抗に成功したか判別するフラグ
*/
-void spell_badstatus_message_to_mons(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_bad_status_to_monster &msgs, bool resist,
+void spell_badstatus_message_to_mons(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_bad_status_to_monster &msgs, bool resist,
bool saved_throw)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_DRAIN_MANA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_DRAIN_MANA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN];
monster_name(player_ptr, m_idx, m_name);
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_MIND_BLAST(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_MIND_BLAST(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
bool seen = (!player_ptr->blind && m_ptr->ml);
*
* プレイヤーに当たったらラーニング可。
*/
-MonsterSpellResult spell_RF5_BRAIN_SMASH(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BRAIN_SMASH(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
bool seen = (!player_ptr->blind && m_ptr->ml);
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_SCARE(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_SCARE(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid();
res.learnable = TARGET_TYPE == MONSTER_TO_PLAYER;
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_BLIND(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_BLIND(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid();
res.learnable = TARGET_TYPE == MONSTER_TO_PLAYER;
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_CONF(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_CONF(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid();
res.learnable = TARGET_TYPE == MONSTER_TO_PLAYER;
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_HOLD(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_HOLD(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid();
res.learnable = TARGET_TYPE == MONSTER_TO_PLAYER;
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_HASTE(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_HASTE(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
bool see_m = see_monster(player_ptr, m_idx);
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF5_SLOW(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF5_SLOW(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
auto res = MonsterSpellResult::make_valid();
res.learnable = TARGET_TYPE == MONSTER_TO_PLAYER;
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_HEAL(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_HEAL(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
const auto res = MonsterSpellResult::make_valid();
*
* ラーニング不可。
*/
-MonsterSpellResult spell_RF6_INVULNER(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_INVULNER(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
bool seen = (!player_ptr->blind && m_ptr->ml);
*
* ラーニング可。
*/
-MonsterSpellResult spell_RF6_FORGET(player_type *player_ptr, MONSTER_IDX m_idx)
+MonsterSpellResult spell_RF6_FORGET(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
DEPTH rlev = monster_level_idx(player_ptr->current_floor_ptr, m_idx);
GAME_TEXT m_name[MAX_NLEN];
struct MonsterSpellResult;
-struct player_type;
+class PlayerType;
struct mspell_cast_msg_bad_status_to_player {
mspell_cast_msg_bad_status_to_player(concptr blind, concptr not_blind, concptr resist, concptr saved_throw);
concptr success; /*成功時*/
};
-void spell_badstatus_message_to_player(player_type *player_ptr, MONSTER_IDX m_idx, const mspell_cast_msg_bad_status_to_player &msgs, bool resist,
+void spell_badstatus_message_to_player(PlayerType *player_ptr, MONSTER_IDX m_idx, const mspell_cast_msg_bad_status_to_player &msgs, bool resist,
bool saved_throw);
-void spell_badstatus_message_to_mons(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_bad_status_to_monster &msgs, bool resist,
+void spell_badstatus_message_to_mons(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_bad_status_to_monster &msgs, bool resist,
bool saved_throw);
-MonsterSpellResult spell_RF5_DRAIN_MANA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_MIND_BLAST(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BRAIN_SMASH(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_SCARE(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_BLIND(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_CONF(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_HOLD(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_HASTE(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF5_SLOW(MONSTER_IDX m_idx, player_type *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_HEAL(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_INVULNER(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_FORGET(player_type *player_ptr, MONSTER_IDX m_idx);
+MonsterSpellResult spell_RF5_DRAIN_MANA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_MIND_BLAST(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BRAIN_SMASH(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_SCARE(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_BLIND(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_CONF(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_HOLD(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_HASTE(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF5_SLOW(MONSTER_IDX m_idx, PlayerType *player_ptr, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_HEAL(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_INVULNER(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_FORGET(PlayerType *player_ptr, MONSTER_IDX m_idx);
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-static MONSTER_NUMBER summon_Kin(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+static MONSTER_NUMBER summon_Kin(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
for (int k = 0; k < 4; k++) {
}
static void decide_summon_kin_caster(
- player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int target_type, concptr m_name, concptr m_poss, const bool known)
+ PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int target_type, concptr m_name, concptr m_poss, const bool known)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_KIN(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int target_type)
+MonsterSpellResult spell_RF6_S_KIN(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int target_type)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_CYBER(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_CYBER(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
int count = 0;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_MONSTER(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_MONSTER(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが魔法で仲間を召喚した!", "%^s magically summons help!"),
_("%^sが魔法で仲間を召喚した!", "%^s magically summons help!"));
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_MONSTERS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_MONSTERS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが魔法でモンスターを召喚した!", "%^s magically summons monsters!"), _("%^sが魔法でモンスターを召喚した!", "%^s magically summons monsters!"));
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_ANT(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_ANT(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが魔法でアリを召喚した。", "%^s magically summons ants."),
_("%^sが魔法でアリを召喚した。", "%^s magically summons ants."));
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_SPIDER(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_SPIDER(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが魔法でクモを召喚した。", "%^s magically summons spiders."),
_("%^sが魔法でクモを召喚した。", "%^s magically summons spiders."));
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_HOUND(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_HOUND(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが魔法でハウンドを召喚した。", "%^s magically summons hounds."), _("%^sが魔法でハウンドを召喚した。", "%^s magically summons hounds."));
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_HYDRA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_HYDRA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが魔法でヒドラを召喚した。", "%^s magically summons hydras."), _("%^sが魔法でヒドラを召喚した。", "%^s magically summons hydras."));
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_ANGEL(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_ANGEL(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが魔法で天使を召喚した!", "%^s magically summons an angel!"), _("%^sが魔法で天使を召喚した!", "%^s magically summons an angel!"));
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_DEMON(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_DEMON(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sは魔法で混沌の宮廷から悪魔を召喚した!", "%^s magically summons a demon from the Courts of Chaos!"),
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_UNDEAD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_UNDEAD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが魔法でアンデッドの強敵を召喚した!", "%^s magically summons an undead adversary!"),
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_DRAGON(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_DRAGON(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが魔法でドラゴンを召喚した!", "%^s magically summons a dragon!"), _("%^sが魔法でドラゴンを召喚した!", "%^s magically summons a dragon!"));
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_HI_UNDEAD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_HI_UNDEAD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
GAME_TEXT m_name[MAX_NLEN];
monster_name(player_ptr, m_idx, m_name);
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_HI_DRAGON(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_HI_DRAGON(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが魔法で古代ドラゴンを召喚した!", "%^s magically summons ancient dragons!"),
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_AMBERITES(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_AMBERITES(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sがアンバーの王族を召喚した!", "%^s magically summons Lords of Amber!"),
*
* プレイヤーが対象ならラーニング可。
*/
-MonsterSpellResult spell_RF6_S_UNIQUE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MonsterSpellResult spell_RF6_S_UNIQUE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
mspell_cast_msg_blind msg(_("%^sが何かをつぶやいた。", "%^s mumbles."),
_("%^sが魔法で特別な強敵を召喚した!", "%^s magically summons special opponents!"),
struct MonsterSpellResult;
-struct player_type;
-MonsterSpellResult spell_RF6_S_KIN(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_CYBER(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_MONSTER(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_MONSTERS(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_ANT(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_SPIDER(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_HOUND(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_HYDRA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_ANGEL(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_DEMON(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_UNDEAD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_DRAGON(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_HI_UNDEAD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_HI_DRAGON(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_AMBERITES(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MonsterSpellResult spell_RF6_S_UNIQUE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+class PlayerType;
+MonsterSpellResult spell_RF6_S_KIN(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_CYBER(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_MONSTER(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_MONSTERS(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_ANT(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_SPIDER(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_HOUND(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_HYDRA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_ANGEL(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_DEMON(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_UNDEAD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_DRAGON(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_HI_UNDEAD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_HI_DRAGON(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_AMBERITES(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MonsterSpellResult spell_RF6_S_UNIQUE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
* @param m_idx モンスターID
* @return プレイヤーがモンスターを見ることができるならTRUE、そうでなければFALSEを返す。
*/
-bool see_monster(player_type* player_ptr, MONSTER_IDX m_idx)
+bool see_monster(PlayerType* player_ptr, MONSTER_IDX m_idx)
{
monster_type* m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
return is_seen(player_ptr, m_ptr);
* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
* @return メッセージを表示した場合trueを返す。
*/
-bool monspell_message_base(player_type* player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg &msgs, bool msg_flag_aux, int TARGET_TYPE)
+bool monspell_message_base(PlayerType* player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg &msgs, bool msg_flag_aux, int TARGET_TYPE)
{
bool notice = false;
floor_type* floor_ptr = player_ptr->current_floor_ptr;
* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
* @return メッセージを表示した場合trueを返す。
*/
-bool monspell_message(player_type* player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_blind &msgs, int TARGET_TYPE)
+bool monspell_message(PlayerType* player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_blind &msgs, int TARGET_TYPE)
{
return monspell_message_base(player_ptr, m_idx, t_idx, mspell_cast_msg(msgs.blind, msgs.blind, msgs.to_player, msgs.to_mons), player_ptr->blind > 0, TARGET_TYPE);
}
* @param msgs メッセージの構造体
* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
*/
-void simple_monspell_message(player_type* player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_simple &msgs, int TARGET_TYPE)
+void simple_monspell_message(PlayerType* player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_simple &msgs, int TARGET_TYPE)
{
monspell_message_base(player_ptr, m_idx, t_idx, mspell_cast_msg(msgs.to_player, msgs.to_mons,
msgs.to_player, msgs.to_mons), player_ptr->blind > 0, TARGET_TYPE);
#define RF6_SPELL_START 32 * 5
struct floor_type;
-struct player_type;
+class PlayerType;
struct mspell_cast_msg {
mspell_cast_msg(concptr to_player_true, concptr to_mons_true, concptr to_player_false, concptr to_mons_false);
concptr to_mons; /*!< モンスター対象*/
};
-bool see_monster(player_type *player_ptr, MONSTER_IDX m_idx);
+bool see_monster(PlayerType *player_ptr, MONSTER_IDX m_idx);
bool monster_near_player(floor_type *floor_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
-bool monspell_message_base(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg &msgs, bool msg_flag_aux, int TARGET_TYPE);
-bool monspell_message(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_blind &msgs, int TARGET_TYPE);
-void simple_monspell_message(player_type *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_simple &msgs, int TARGET_TYPE);
+bool monspell_message_base(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg &msgs, bool msg_flag_aux, int TARGET_TYPE);
+bool monspell_message(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_blind &msgs, int TARGET_TYPE);
+void simple_monspell_message(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_simple &msgs, int TARGET_TYPE);
#include "system/monster-type-definition.h"
#include "system/player-type-definition.h"
-msr_type *initialize_msr_type(player_type *player_ptr, msr_type *msr_ptr, MONSTER_IDX m_idx, const EnumClassFlagGroup<MonsterAbilityType> &ability_flags)
+msr_type *initialize_msr_type(PlayerType *player_ptr, msr_type *msr_ptr, MONSTER_IDX m_idx, const EnumClassFlagGroup<MonsterAbilityType> &ability_flags)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
msr_ptr->r_ptr = &r_info[m_ptr->r_idx];
EnumClassFlagGroup<MonsterSmartLearnType> smart;
} msr_type;
-struct player_type;
-msr_type *initialize_msr_type(player_type *player_ptr, msr_type *msr_ptr, MONSTER_IDX m_idx, const EnumClassFlagGroup<MonsterAbilityType> &ability_flags);
+class PlayerType;
+msr_type *initialize_msr_type(PlayerType *player_ptr, msr_type *msr_ptr, MONSTER_IDX m_idx, const EnumClassFlagGroup<MonsterAbilityType> &ability_flags);
bool int_outof(monster_race *r_ptr, PERCENTAGE prob);
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_EAGLE(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_EAGLE(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 4 + randint1(3);
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_EDGE(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_EDGE(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 2 + randint1(1 + rlev / 20);
* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_guardian(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MONSTER_NUMBER summon_guardian(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
int num = 2 + randint1(3);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_LOCKE_CLONE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_LOCKE_CLONE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
int count = 0;
int num = randint1(3);
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_LOUSE(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_LOUSE(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 2 + randint1(3);
return count;
}
-MONSTER_NUMBER summon_MOAI(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_MOAI(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 3 + randint1(3);
return count;
}
-MONSTER_NUMBER summon_DEMON_SLAYER(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_DEMON_SLAYER(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
monster_race *r_ptr = &r_info[MON_DEMON_SLAYER_MEMBER];
if (r_ptr->max_num == 0) {
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_NAZGUL(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_NAZGUL(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
BIT_FLAGS mode = 0L;
POSITION cy = y;
return count;
}
-MONSTER_NUMBER summon_APOCRYPHA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_APOCRYPHA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
int count = 0;
int num = 4 + randint1(4);
return count;
}
-MONSTER_NUMBER summon_HIGHEST_DRAGON(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_HIGHEST_DRAGON(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
int count = 0;
int num = 4 + randint1(4);
return count;
}
-MONSTER_NUMBER summon_PYRAMID(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_PYRAMID(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 2 + randint1(3);
return count;
}
-MONSTER_NUMBER summon_EYE_PHORN(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_EYE_PHORN(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 2 + randint1(1 + rlev / 20);
return count;
}
-MONSTER_NUMBER summon_VESPOID(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_VESPOID(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 2 + randint1(3);
return count;
}
-MONSTER_NUMBER summon_THUNDERS(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_THUNDERS(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
auto count = (MONSTER_NUMBER)0;
auto num = 11;
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_YENDER_WIZARD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_YENDER_WIZARD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
auto *r_ptr = &r_info[MON_YENDOR_WIZARD_2];
if (r_ptr->max_num == 0) {
return count;
}
-MONSTER_NUMBER summon_PLASMA(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_PLASMA(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
auto count = 0;
auto num = 2 + randint1(1 + rlev / 20);
#include "system/angband.h"
-struct player_type;
-MONSTER_NUMBER summon_EAGLE(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_EDGE(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_guardian(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
-MONSTER_NUMBER summon_LOCKE_CLONE(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_LOUSE(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_MOAI(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_DEMON_SLAYER(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_NAZGUL(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_APOCRYPHA(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_HIGHEST_DRAGON(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_PYRAMID(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_EYE_PHORN(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_VESPOID(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_YENDER_WIZARD(player_type *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_THUNDERS(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
-MONSTER_NUMBER summon_PLASMA(player_type *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+class PlayerType;
+MONSTER_NUMBER summon_EAGLE(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_EDGE(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_guardian(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
+MONSTER_NUMBER summon_LOCKE_CLONE(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_LOUSE(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_MOAI(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_DEMON_SLAYER(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_NAZGUL(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_APOCRYPHA(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_HIGHEST_DRAGON(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_PYRAMID(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_EYE_PHORN(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_VESPOID(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_YENDER_WIZARD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_THUNDERS(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
+MONSTER_NUMBER summon_PLASMA(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
* @return 召喚条件が一致するならtrue
* @details
*/
-bool check_summon_specific(player_type *player_ptr, MONRACE_IDX summoner_idx, MONRACE_IDX r_idx)
+bool check_summon_specific(PlayerType *player_ptr, MONRACE_IDX summoner_idx, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
bool is_match = false;
#include "system/angband.h"
-struct player_type;
-bool check_summon_specific(player_type *player_ptr, MONRACE_IDX summoner_idx, MONRACE_IDX r_idx);
+class PlayerType;
+bool check_summon_specific(PlayerType *player_ptr, MONRACE_IDX summoner_idx, MONRACE_IDX r_idx);
#include "mutation/mutation-util.h"
#include "system/player-type-definition.h"
-void switch_gain_mutation(player_type *player_ptr, glm_type *glm_ptr)
+void switch_gain_mutation(PlayerType *player_ptr, glm_type *glm_ptr)
{
switch (glm_ptr->choose_mut ? glm_ptr->choose_mut : (player_ptr->pclass == PlayerClassType::BERSERKER ? 74 + randint1(119) : randint1(193))) {
case 1:
#pragma once
typedef struct glm_type glm_type;
-struct player_type;
-void switch_gain_mutation(player_type *player_ptr, glm_type *gm_ptr);
+class PlayerType;
+void switch_gain_mutation(PlayerType *player_ptr, glm_type *gm_ptr);
#include "mutation/mutation-util.h"
#include "system/player-type-definition.h"
-void switch_lose_mutation(player_type *player_ptr, glm_type *glm_ptr)
+void switch_lose_mutation(PlayerType *player_ptr, glm_type *glm_ptr)
{
switch ((glm_ptr->choose_mut != 0) ? glm_ptr->choose_mut : randint1(193)) {
case 1:
#pragma once
typedef struct glm_type glm_type;
-struct player_type;
-void switch_lose_mutation(player_type *player_ptr, glm_type *glm_ptr);
+class PlayerType;
+void switch_lose_mutation(PlayerType *player_ptr, glm_type *glm_ptr);
* @brief 現在プレイヤー得ている突然変異の数を返す。
* @return 現在得ている突然変異の数
*/
-static int count_mutations(player_type *player_ptr)
+static int count_mutations(PlayerType *player_ptr)
{
return player_ptr->muta.count();
}
* Beastman get 10 "free" mutations and only 5% decrease per additional mutation.
* Max 90% decrease in regeneration speed.
*/
-int calc_mutant_regenerate_mod(player_type *player_ptr)
+int calc_mutant_regenerate_mod(PlayerType *player_ptr)
{
int regen;
int mod = 10;
#pragma once
-struct player_type;
-int calc_mutant_regenerate_mod(player_type *player_ptr);
+class PlayerType;
+int calc_mutant_regenerate_mod(PlayerType *player_ptr);
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
-static void sweep_gain_mutation(player_type *player_ptr, glm_type *gm_ptr)
+static void sweep_gain_mutation(PlayerType *player_ptr, glm_type *gm_ptr)
{
int attempts_left = 20;
if (gm_ptr->choose_mut)
}
}
-static void race_dependent_mutation(player_type *player_ptr, glm_type *gm_ptr)
+static void race_dependent_mutation(PlayerType *player_ptr, glm_type *gm_ptr)
{
if (gm_ptr->choose_mut != 0)
return;
}
}
-static void neutralize_base_status(player_type *player_ptr, glm_type *gm_ptr)
+static void neutralize_base_status(PlayerType *player_ptr, glm_type *gm_ptr)
{
if (gm_ptr->muta_which == PlayerMutationType::PUNY) {
if (player_ptr->muta.has(PlayerMutationType::HYPER_STR)) {
}
}
-static void neutralize_other_status(player_type *player_ptr, glm_type *gm_ptr)
+static void neutralize_other_status(PlayerType *player_ptr, glm_type *gm_ptr)
{
if (gm_ptr->muta_which == PlayerMutationType::COWARDICE) {
if (player_ptr->muta.has(PlayerMutationType::FEARLESS)) {
* @brief プレイヤーに突然変異を与える
* @param choose_mut 与えたい突然変異のID、0ならばランダムに選択
*/
-bool gain_mutation(player_type *player_ptr, MUTATION_IDX choose_mut)
+bool gain_mutation(PlayerType *player_ptr, MUTATION_IDX choose_mut)
{
glm_type tmp_gm;
glm_type *gm_ptr = initialize_glm_type(&tmp_gm, choose_mut);
return true;
}
-static void sweep_lose_mutation(player_type *player_ptr, glm_type *glm_ptr)
+static void sweep_lose_mutation(PlayerType *player_ptr, glm_type *glm_ptr)
{
int attempts_left = 20;
if (glm_ptr->choose_mut)
* @brief プレイヤーから突然変異を取り除く
* @param choose_mut 取り除きたい突然変異のID、0ならばランダムに消去
*/
-bool lose_mutation(player_type *player_ptr, MUTATION_IDX choose_mut)
+bool lose_mutation(PlayerType *player_ptr, MUTATION_IDX choose_mut)
{
glm_type tmp_glm;
glm_type *glm_ptr = initialize_glm_type(&tmp_glm, choose_mut);
return true;
}
-void lose_all_mutations(player_type *player_ptr)
+void lose_all_mutations(PlayerType *player_ptr)
{
if (player_ptr->muta.any()) {
chg_virtue(player_ptr, V_CHANCE, -5);
#include "system/angband.h"
-struct player_type;
-bool gain_mutation(player_type *player_ptr, MUTATION_IDX choose_mut);
-bool lose_mutation(player_type *player_ptr, MUTATION_IDX choose_mut);
-void lose_all_mutations(player_type *player_ptr);
+class PlayerType;
+bool gain_mutation(PlayerType *player_ptr, MUTATION_IDX choose_mut);
+bool lose_mutation(PlayerType *player_ptr, MUTATION_IDX choose_mut);
+void lose_all_mutations(PlayerType *player_ptr);
#include "term/screen-processor.h"
#include "view/display-messages.h"
-static bool get_hack_dir(player_type *player_ptr, DIRECTION *dp)
+static bool get_hack_dir(PlayerType *player_ptr, DIRECTION *dp)
{
*dp = 0;
char command;
* @brief 10ゲームターンが進行するごとに突然変異の発動判定を行う処理
* / Handle mutation effects once every 10 game turns
*/
-void process_world_aux_mutation(player_type *player_ptr)
+void process_world_aux_mutation(PlayerType *player_ptr)
{
if (player_ptr->muta.none() || player_ptr->phase_out || player_ptr->wild_mode) {
return;
}
}
-bool drop_weapons(player_type *player_ptr)
+bool drop_weapons(PlayerType *player_ptr)
{
INVENTORY_IDX slot = 0;
object_type *o_ptr = nullptr;
#pragma once
-struct player_type;
-void process_world_aux_mutation(player_type *player_ptr);
-bool drop_weapons(player_type *player_ptr);
+class PlayerType;
+void process_world_aux_mutation(PlayerType *player_ptr);
+bool drop_weapons(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return コマンドの入力方向に地形があればTRUE
*/
-bool eat_rock(player_type *player_ptr)
+bool eat_rock(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_direction(player_ptr, &dir, false, false))
#pragma once
-struct player_type;
-bool eat_rock(player_type *player_ptr);
+class PlayerType;
+bool eat_rock(PlayerType *player_ptr);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool activate_missile_1(player_type *player_ptr)
+bool activate_missile_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは眩しいくらいに明るく輝いている...", "It glows extremely brightly..."));
return true;
}
-bool activate_missile_2(player_type *player_ptr)
+bool activate_missile_2(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("魔法のトゲが現れた...", "It grows magical spikes..."));
return true;
}
-bool activate_missile_3(player_type *player_ptr)
+bool activate_missile_3(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_bolt_acid_1(player_type *player_ptr)
+bool activate_bolt_acid_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは酸に覆われた...", "It is covered in acid..."));
return true;
}
-bool activate_bolt_elec_1(player_type *player_ptr)
+bool activate_bolt_elec_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは火花に覆われた...", "It is covered in sparks..."));
return true;
}
-bool activate_bolt_fire_1(player_type *player_ptr)
+bool activate_bolt_fire_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは炎に覆われた...", "It is covered in fire..."));
return true;
}
-bool activate_bolt_cold_1(player_type *player_ptr)
+bool activate_bolt_cold_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
return true;
}
-bool activate_bolt_hypodynamia_1(player_type *player_ptr, concptr name)
+bool activate_bolt_hypodynamia_1(PlayerType *player_ptr, concptr name)
{
DIRECTION dir;
msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
return true;
}
-bool activate_bolt_hypodynamia_2(player_type *player_ptr)
+bool activate_bolt_hypodynamia_2(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("黒く輝いている...", "It glows black..."));
return true;
}
-bool activate_bolt_drain_1(player_type *player_ptr)
+bool activate_bolt_drain_1(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_bolt_drain_2(player_type *player_ptr)
+bool activate_bolt_drain_2(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_bolt_mana(player_type *player_ptr, concptr name)
+bool activate_bolt_mana(PlayerType *player_ptr, concptr name)
{
DIRECTION dir;
msg_format(_("%sに魔法のトゲが現れた...", "The %s grows magical spikes..."), name);
return true;
}
-bool activate_ball_pois_1(player_type *player_ptr)
+bool activate_ball_pois_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは濃緑色に脈動している...", "It throbs deep green..."));
return true;
}
-bool activate_ball_cold_1(player_type *player_ptr)
+bool activate_ball_cold_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
return true;
}
-bool activate_ball_cold_2(player_type *player_ptr)
+bool activate_ball_cold_2(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは青く激しく輝いた...", "It glows an intense blue..."));
return true;
}
-bool activate_ball_cold_3(player_type *player_ptr)
+bool activate_ball_cold_3(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("明るく白色に輝いている...", "It glows bright white..."));
return true;
}
-bool activate_ball_fire_1(player_type *player_ptr)
+bool activate_ball_fire_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
return true;
}
-bool activate_ball_fire_2(player_type *player_ptr, concptr name)
+bool activate_ball_fire_2(PlayerType *player_ptr, concptr name)
{
DIRECTION dir;
msg_format(_("%sから炎が吹き出した...", "The %s rages in fire..."), name);
return true;
}
-bool activate_ball_fire_3(player_type *player_ptr)
+bool activate_ball_fire_3(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("深赤色に輝いている...", "It glows deep red..."));
return true;
}
-bool activate_ball_fire_4(player_type *player_ptr)
+bool activate_ball_fire_4(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
return true;
}
-bool activate_ball_elec_2(player_type *player_ptr)
+bool activate_ball_elec_2(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("電気がパチパチ音を立てた...", "It crackles with electricity..."));
return true;
}
-bool activate_ball_elec_3(player_type *player_ptr)
+bool activate_ball_elec_3(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("深青色に輝いている...", "It glows deep blue..."));
return true;
}
-bool activate_ball_acid_1(player_type *player_ptr)
+bool activate_ball_acid_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは黒く激しく輝いた...", "It glows an intense black..."));
return true;
}
-bool activate_ball_nuke_1(player_type *player_ptr)
+bool activate_ball_nuke_1(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("それは緑に激しく輝いた...", "It glows an intense green..."));
return true;
}
-bool activate_rocket(player_type *player_ptr)
+bool activate_rocket(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_ball_water(player_type *player_ptr, concptr name)
+bool activate_ball_water(PlayerType *player_ptr, concptr name)
{
DIRECTION dir;
msg_format(_("%sが深い青色に鼓動している...", "The %s throbs deep blue..."), name);
return true;
}
-bool activate_ball_lite(player_type *player_ptr, concptr name)
+bool activate_ball_lite(PlayerType *player_ptr, concptr name)
{
HIT_POINT num = damroll(5, 3);
POSITION y = 0, x = 0;
return true;
}
-bool activate_ball_dark(player_type *player_ptr, concptr name)
+bool activate_ball_dark(PlayerType *player_ptr, concptr name)
{
DIRECTION dir;
msg_format(_("%sが深い闇に覆われた...", "The %s is covered in pitch-darkness..."), name);
return true;
}
-bool activate_ball_mana(player_type *player_ptr, concptr name)
+bool activate_ball_mana(PlayerType *player_ptr, concptr name)
{
DIRECTION dir;
msg_format(_("%sが青白く光った...", "The %s becomes pale..."), name);
#include "system/angband.h"
-struct player_type;
-bool activate_missile_1(player_type *player_ptr);
-bool activate_missile_2(player_type *player_ptr);
-bool activate_missile_3(player_type *player_ptr);
-bool activate_bolt_acid_1(player_type *player_ptr);
-bool activate_bolt_elec_1(player_type *player_ptr);
-bool activate_bolt_fire_1(player_type *player_ptr);
-bool activate_bolt_cold_1(player_type *player_ptr);
-bool activate_bolt_hypodynamia_1(player_type *player_ptr, concptr name);
-bool activate_bolt_hypodynamia_2(player_type *player_ptr);
-bool activate_bolt_drain_1(player_type *player_ptr);
-bool activate_bolt_drain_2(player_type *player_ptr);
-bool activate_bolt_mana(player_type *player_ptr, concptr name);
-bool activate_ball_pois_1(player_type *player_ptr);
-bool activate_ball_cold_1(player_type *player_ptr);
-bool activate_ball_cold_2(player_type *player_ptr);
-bool activate_ball_cold_3(player_type *player_ptr);
-bool activate_ball_fire_1(player_type *player_ptr);
-bool activate_ball_fire_2(player_type *player_ptr, concptr name);
-bool activate_ball_fire_3(player_type *player_ptr);
-bool activate_ball_fire_4(player_type *player_ptr);
-bool activate_ball_elec_2(player_type *player_ptr);
-bool activate_ball_elec_3(player_type *player_ptr);
-bool activate_ball_acid_1(player_type *player_ptr);
-bool activate_ball_nuke_1(player_type *player_ptr);
-bool activate_rocket(player_type *player_ptr);
-bool activate_ball_water(player_type *player_ptr, concptr name);
-bool activate_ball_lite(player_type *player_ptr, concptr name);
-bool activate_ball_dark(player_type *player_ptr, concptr name);
-bool activate_ball_mana(player_type *player_ptr, concptr name);
+class PlayerType;
+bool activate_missile_1(PlayerType *player_ptr);
+bool activate_missile_2(PlayerType *player_ptr);
+bool activate_missile_3(PlayerType *player_ptr);
+bool activate_bolt_acid_1(PlayerType *player_ptr);
+bool activate_bolt_elec_1(PlayerType *player_ptr);
+bool activate_bolt_fire_1(PlayerType *player_ptr);
+bool activate_bolt_cold_1(PlayerType *player_ptr);
+bool activate_bolt_hypodynamia_1(PlayerType *player_ptr, concptr name);
+bool activate_bolt_hypodynamia_2(PlayerType *player_ptr);
+bool activate_bolt_drain_1(PlayerType *player_ptr);
+bool activate_bolt_drain_2(PlayerType *player_ptr);
+bool activate_bolt_mana(PlayerType *player_ptr, concptr name);
+bool activate_ball_pois_1(PlayerType *player_ptr);
+bool activate_ball_cold_1(PlayerType *player_ptr);
+bool activate_ball_cold_2(PlayerType *player_ptr);
+bool activate_ball_cold_3(PlayerType *player_ptr);
+bool activate_ball_fire_1(PlayerType *player_ptr);
+bool activate_ball_fire_2(PlayerType *player_ptr, concptr name);
+bool activate_ball_fire_3(PlayerType *player_ptr);
+bool activate_ball_fire_4(PlayerType *player_ptr);
+bool activate_ball_elec_2(PlayerType *player_ptr);
+bool activate_ball_elec_3(PlayerType *player_ptr);
+bool activate_ball_acid_1(PlayerType *player_ptr);
+bool activate_ball_nuke_1(PlayerType *player_ptr);
+bool activate_rocket(PlayerType *player_ptr);
+bool activate_ball_water(PlayerType *player_ptr, concptr name);
+bool activate_ball_lite(PlayerType *player_ptr, concptr name);
+bool activate_ball_dark(PlayerType *player_ptr, concptr name);
+bool activate_ball_mana(PlayerType *player_ptr, concptr name);
* @param o_ptr 対象のオブジェクト構造体ポインタ
* @return 発動実行の是非を返す。
*/
-bool activate_dragon_breath(player_type *player_ptr, object_type *o_ptr)
+bool activate_dragon_breath(PlayerType *player_ptr, object_type *o_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_breath_fire(player_type *player_ptr, object_type *o_ptr)
+bool activate_breath_fire(PlayerType *player_ptr, object_type *o_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_breath_cold(player_type *player_ptr, object_type *o_ptr)
+bool activate_breath_cold(PlayerType *player_ptr, object_type *o_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
#pragma once
struct object_type;
-struct player_type;
-bool activate_dragon_breath(player_type *player_ptr, object_type *o_ptr);
-bool activate_breath_fire(player_type *player_ptr, object_type *o_ptr);
-bool activate_breath_cold(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool activate_dragon_breath(PlayerType *player_ptr, object_type *o_ptr);
+bool activate_breath_fire(PlayerType *player_ptr, object_type *o_ptr);
+bool activate_breath_cold(PlayerType *player_ptr, object_type *o_ptr);
#include "system/player-type-definition.h"
#include "target/target-getter.h"
-bool activate_charm_animal(player_type *player_ptr)
+bool activate_charm_animal(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_charm_undead(player_type *player_ptr)
+bool activate_charm_undead(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_charm_other(player_type *player_ptr)
+bool activate_charm_other(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_charm_animals(player_type *player_ptr)
+bool activate_charm_animals(PlayerType *player_ptr)
{
(void)charm_animals(player_ptr, player_ptr->lev * 2);
return true;
}
-bool activate_charm_others(player_type *player_ptr)
+bool activate_charm_others(PlayerType *player_ptr)
{
(void)charm_monsters(player_ptr, player_ptr->lev * 2);
return true;
#pragma once
-struct player_type;
-bool activate_charm_animal(player_type *player_ptr);
-bool activate_charm_undead(player_type *player_ptr);
-bool activate_charm_other(player_type *player_ptr);
-bool activate_charm_animals(player_type *player_ptr);
-bool activate_charm_others(player_type *player_ptr);
+class PlayerType;
+bool activate_charm_animal(PlayerType *player_ptr);
+bool activate_charm_undead(PlayerType *player_ptr);
+bool activate_charm_other(PlayerType *player_ptr);
+bool activate_charm_animals(PlayerType *player_ptr);
+bool activate_charm_others(PlayerType *player_ptr);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-bool activate_genocide(player_type *player_ptr)
+bool activate_genocide(PlayerType *player_ptr)
{
msg_print(_("深青色に輝いている...", "It glows deep blue..."));
(void)symbol_genocide(player_ptr, 200, true);
return true;
}
-bool activate_mass_genocide(player_type *player_ptr)
+bool activate_mass_genocide(PlayerType *player_ptr)
{
msg_print(_("ひどく鋭い音が流れ出た...", "It lets out a long, shrill note..."));
(void)mass_genocide(player_ptr, 200, true);
#pragma once
-struct player_type;
-bool activate_genocide(player_type *player_ptr);
-bool activate_mass_genocide(player_type *player_ptr);
+class PlayerType;
+bool activate_genocide(PlayerType *player_ptr);
+bool activate_mass_genocide(PlayerType *player_ptr);
#include "util/quarks.h"
#include "view/display-messages.h"
-bool activate_sunlight(player_type *player_ptr)
+bool activate_sunlight(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_confusion(player_type *player_ptr)
+bool activate_confusion(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
return true;
}
-bool activate_banish_evil(player_type *player_ptr)
+bool activate_banish_evil(PlayerType *player_ptr)
{
if (banish_evil(player_ptr, 100))
msg_print(_("アーティファクトの力が邪悪を打ち払った!", "The power of the artifact banishes evil!"));
return true;
}
-bool activate_scare(player_type *player_ptr)
+bool activate_scare(PlayerType *player_ptr)
{
if (music_singing_any(player_ptr))
stop_singing(player_ptr);
return true;
}
-bool activate_aggravation(player_type *player_ptr, object_type *o_ptr, concptr name)
+bool activate_aggravation(PlayerType *player_ptr, object_type *o_ptr, concptr name)
{
if (o_ptr->name1 == ART_HYOUSIGI)
msg_print(_("拍子木を打った。", "You beat your wooden clappers."));
return true;
}
-bool activate_stone_mud(player_type *player_ptr)
+bool activate_stone_mud(PlayerType *player_ptr)
{
DIRECTION dir;
msg_print(_("鼓動している...", "It pulsates..."));
return true;
}
-bool activate_judgement(player_type *player_ptr, concptr name)
+bool activate_judgement(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sは赤く明るく光った!", "The %s flashes bright red!"), name);
chg_virtue(player_ptr, V_KNOWLEDGE, 1);
return true;
}
-bool activate_telekinesis(player_type *player_ptr, concptr name)
+bool activate_telekinesis(PlayerType *player_ptr, concptr name)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_unique_detection(player_type *player_ptr)
+bool activate_unique_detection(PlayerType *player_ptr)
{
monster_type *m_ptr;
monster_race *r_ptr;
return true;
}
-bool activate_dispel_curse(player_type *player_ptr, concptr name)
+bool activate_dispel_curse(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
(void)remove_all_curse(player_ptr);
return true;
}
-bool activate_cure_lw(player_type *player_ptr)
+bool activate_cure_lw(PlayerType *player_ptr)
{
(void)BadStatusSetter(player_ptr).afraidness(0);
(void)hp_player(player_ptr, 30);
return true;
}
-bool activate_grand_cross(player_type *player_ptr)
+bool activate_grand_cross(PlayerType *player_ptr)
{
msg_print(_("「闇に還れ!」", "You say, 'Return to darkness!'"));
(void)project(player_ptr, 0, 8, player_ptr->y, player_ptr->x, (randint1(100) + 200) * 2, AttributeType::HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID);
return true;
}
-bool activate_call_chaos(player_type *player_ptr)
+bool activate_call_chaos(PlayerType *player_ptr)
{
msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
call_chaos(player_ptr);
return true;
}
-bool activate_dispel_evil(player_type *player_ptr)
+bool activate_dispel_evil(PlayerType *player_ptr)
{
msg_print(_("神聖な雰囲気が充満した...", "It floods the area with goodness..."));
dispel_evil(player_ptr, player_ptr->lev * 5);
return true;
}
-bool activate_dispel_good(player_type *player_ptr)
+bool activate_dispel_good(PlayerType *player_ptr)
{
msg_print(_("邪悪な雰囲気が充満した...", "It floods the area with evil..."));
dispel_good(player_ptr, player_ptr->lev * 5);
return true;
}
-bool activate_all_monsters_detection(player_type *player_ptr)
+bool activate_all_monsters_detection(PlayerType *player_ptr)
{
(void)detect_monsters_invis(player_ptr, 255);
(void)detect_monsters_normal(player_ptr, 255);
return true;
}
-bool activate_all_detection(player_type *player_ptr)
+bool activate_all_detection(PlayerType *player_ptr)
{
msg_print(_("白く明るく輝いている...", "It glows bright white..."));
msg_print(_("心にイメージが浮かんできた...", "An image forms in your mind..."));
return true;
}
-bool activate_extra_detection(player_type *player_ptr)
+bool activate_extra_detection(PlayerType *player_ptr)
{
msg_print(_("明るく輝いている...", "It glows brightly..."));
detect_all(player_ptr, DETECT_RAD_DEFAULT);
return true;
}
-bool activate_fully_identification(player_type *player_ptr)
+bool activate_fully_identification(PlayerType *player_ptr)
{
msg_print(_("黄色く輝いている...", "It glows yellow..."));
identify_fully(player_ptr, false);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 発動に成功したらTRUE
*/
-bool activate_identification(player_type *player_ptr)
+bool activate_identification(PlayerType *player_ptr)
{
return ident_spell(player_ptr, false);
}
-bool activate_pesticide(player_type *player_ptr)
+bool activate_pesticide(PlayerType *player_ptr)
{
msg_print(_("あなたは害虫を一掃した。", "You exterminate some pests."));
(void)dispel_monsters(player_ptr, 4);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 発動に成功したらTRUE
*/
-bool activate_whirlwind(player_type *player_ptr)
+bool activate_whirlwind(PlayerType *player_ptr)
{
massacre(player_ptr);
return true;
}
-bool activate_blinding_light(player_type *player_ptr, concptr name)
+bool activate_blinding_light(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが眩しい光で輝いた...", "The %s gleams with blinding light..."), name);
(void)fire_ball(player_ptr, AttributeType::LITE, 0, 300, 6);
return true;
}
-bool activate_sleep(player_type *player_ptr)
+bool activate_sleep(PlayerType *player_ptr)
{
msg_print(_("深青色に輝いている...", "It glows deep blue..."));
sleep_monsters_touch(player_ptr);
return true;
}
-bool activate_door_destroy(player_type *player_ptr)
+bool activate_door_destroy(PlayerType *player_ptr)
{
msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
destroy_doors_touch(player_ptr);
return true;
}
-bool activate_earthquake(player_type *player_ptr)
+bool activate_earthquake(PlayerType *player_ptr)
{
earthquake(player_ptr, player_ptr->y, player_ptr->x, 5, 0);
return true;
}
-bool activate_recharge(player_type *player_ptr)
+bool activate_recharge(PlayerType *player_ptr)
{
recharge(player_ptr, 130);
return true;
}
-bool activate_recharge_extra(player_type *player_ptr, concptr name)
+bool activate_recharge_extra(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが白く輝いた...", "The %s gleams with blinding light..."), name);
return recharge(player_ptr, 1000);
}
-bool activate_shikofumi(player_type *player_ptr)
+bool activate_shikofumi(PlayerType *player_ptr)
{
msg_print(_("力強く四股を踏んだ。", "You stamp. (as if you are in a ring.)"));
(void)BadStatusSetter(player_ptr).afraidness(0);
return true;
}
-bool activate_terror(player_type *player_ptr)
+bool activate_terror(PlayerType *player_ptr)
{
turn_monsters(player_ptr, 40 + player_ptr->lev);
return true;
}
-bool activate_map_light(player_type *player_ptr)
+bool activate_map_light(PlayerType *player_ptr)
{
msg_print(_("眩しく輝いた...", "It shines brightly..."));
map_area(player_ptr, DETECT_RAD_MAP);
return true;
}
-bool activate_exploding_rune(player_type *player_ptr)
+bool activate_exploding_rune(PlayerType *player_ptr)
{
msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
create_rune_explosion(player_ptr, player_ptr->y, player_ptr->x);
return true;
}
-bool activate_protection_rune(player_type *player_ptr)
+bool activate_protection_rune(PlayerType *player_ptr)
{
msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
create_rune_protection_one(player_ptr);
return true;
}
-bool activate_protection_elbereth(player_type *player_ptr)
+bool activate_protection_elbereth(PlayerType *player_ptr)
{
BadStatusSetter bss(player_ptr);
msg_print(_("エルベレスよ、我を護り給え!", "A Elbereth gilthoniel!"));
return true;
}
-bool activate_light(player_type *player_ptr, concptr name)
+bool activate_light(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sから澄んだ光があふれ出た...", "The %s wells with clear light..."), name);
(void)lite_area(player_ptr, damroll(2, 15), 3);
return true;
}
-bool activate_recall(player_type *player_ptr)
+bool activate_recall(PlayerType *player_ptr)
{
msg_print(_("やわらかな白色に輝いている...", "It glows soft white..."));
return recall_player(player_ptr, randint0(21) + 15);
}
-bool activate_tree_creation(player_type *player_ptr, object_type *o_ptr, concptr name)
+bool activate_tree_creation(PlayerType *player_ptr, object_type *o_ptr, concptr name)
{
msg_format(_("%s%sから明るい緑の光があふれ出た...", "The %s%s wells with clear light..."), name, quark_str(o_ptr->art_name));
return tree_creation(player_ptr, player_ptr->y, player_ptr->x);
}
-bool activate_animate_dead(player_type *player_ptr, object_type *o_ptr)
+bool activate_animate_dead(PlayerType *player_ptr, object_type *o_ptr)
{
msg_print(_("黄金色の光が溢れ出た...", "It emitted a golden light..."));
if (o_ptr->name1 > 0)
return animate_dead(player_ptr, 0, player_ptr->y, player_ptr->x);
}
-bool activate_detect_treasure(player_type *player_ptr)
+bool activate_detect_treasure(PlayerType *player_ptr)
{
msg_print(_("金と銀に彩られている...", "It shines with gold and silver..."));
return detect_treasure(player_ptr, DETECT_RAD_DEFAULT);
#include "system/angband.h"
struct object_type;
-struct player_type;
-bool activate_sunlight(player_type *player_ptr);
-bool activate_confusion(player_type *player_ptr);
-bool activate_banish_evil(player_type *player_ptr);
-bool activate_scare(player_type *player_ptr);
-bool activate_aggravation(player_type *player_ptr, object_type *o_ptr, concptr name);
-bool activate_stone_mud(player_type *player_ptr);
-bool activate_judgement(player_type *player_ptr, concptr name);
-bool activate_telekinesis(player_type *player_ptr, concptr name);
-bool activate_unique_detection(player_type *player_ptr);
-bool activate_dispel_curse(player_type *player_ptr, concptr name);
-bool activate_cure_lw(player_type *player_ptr);
-bool activate_grand_cross(player_type *player_ptr);
-bool activate_call_chaos(player_type *player_ptr);
-bool activate_dispel_evil(player_type *player_ptr);
-bool activate_dispel_good(player_type *player_ptr);
-bool activate_all_monsters_detection(player_type *player_ptr);
-bool activate_all_detection(player_type *player_ptr);
-bool activate_extra_detection(player_type *player_ptr);
-bool activate_fully_identification(player_type *player_ptr);
-bool activate_identification(player_type *player_ptr);
-bool activate_pesticide(player_type *player_ptr);
-bool activate_whirlwind(player_type *player_ptr);
-bool activate_blinding_light(player_type *player_ptr, concptr name);
-bool activate_sleep(player_type *player_ptr);
-bool activate_door_destroy(player_type *player_ptr);
-bool activate_earthquake(player_type *player_ptr);
-bool activate_recharge(player_type *player_ptr);
-bool activate_recharge_extra(player_type *player_ptr, concptr name);
-bool activate_shikofumi(player_type *player_ptr);
-bool activate_terror(player_type *player_ptr);
-bool activate_map_light(player_type *player_ptr);
-bool activate_exploding_rune(player_type *player_ptr);
-bool activate_protection_rune(player_type *player_ptr);
-bool activate_protection_elbereth(player_type *player_ptr);
-bool activate_light(player_type *player_ptr, concptr name);
-bool activate_recall(player_type *player_ptr);
-bool activate_tree_creation(player_type *player_ptr, object_type *o_ptr, concptr name);
-bool activate_animate_dead(player_type *player_ptr, object_type *o_ptr);
-bool activate_detect_treasure(player_type *player_ptr);
+class PlayerType;
+bool activate_sunlight(PlayerType *player_ptr);
+bool activate_confusion(PlayerType *player_ptr);
+bool activate_banish_evil(PlayerType *player_ptr);
+bool activate_scare(PlayerType *player_ptr);
+bool activate_aggravation(PlayerType *player_ptr, object_type *o_ptr, concptr name);
+bool activate_stone_mud(PlayerType *player_ptr);
+bool activate_judgement(PlayerType *player_ptr, concptr name);
+bool activate_telekinesis(PlayerType *player_ptr, concptr name);
+bool activate_unique_detection(PlayerType *player_ptr);
+bool activate_dispel_curse(PlayerType *player_ptr, concptr name);
+bool activate_cure_lw(PlayerType *player_ptr);
+bool activate_grand_cross(PlayerType *player_ptr);
+bool activate_call_chaos(PlayerType *player_ptr);
+bool activate_dispel_evil(PlayerType *player_ptr);
+bool activate_dispel_good(PlayerType *player_ptr);
+bool activate_all_monsters_detection(PlayerType *player_ptr);
+bool activate_all_detection(PlayerType *player_ptr);
+bool activate_extra_detection(PlayerType *player_ptr);
+bool activate_fully_identification(PlayerType *player_ptr);
+bool activate_identification(PlayerType *player_ptr);
+bool activate_pesticide(PlayerType *player_ptr);
+bool activate_whirlwind(PlayerType *player_ptr);
+bool activate_blinding_light(PlayerType *player_ptr, concptr name);
+bool activate_sleep(PlayerType *player_ptr);
+bool activate_door_destroy(PlayerType *player_ptr);
+bool activate_earthquake(PlayerType *player_ptr);
+bool activate_recharge(PlayerType *player_ptr);
+bool activate_recharge_extra(PlayerType *player_ptr, concptr name);
+bool activate_shikofumi(PlayerType *player_ptr);
+bool activate_terror(PlayerType *player_ptr);
+bool activate_map_light(PlayerType *player_ptr);
+bool activate_exploding_rune(PlayerType *player_ptr);
+bool activate_protection_rune(PlayerType *player_ptr);
+bool activate_protection_elbereth(PlayerType *player_ptr);
+bool activate_light(PlayerType *player_ptr, concptr name);
+bool activate_recall(PlayerType *player_ptr);
+bool activate_tree_creation(PlayerType *player_ptr, object_type *o_ptr, concptr name);
+bool activate_animate_dead(PlayerType *player_ptr, object_type *o_ptr);
+bool activate_detect_treasure(PlayerType *player_ptr);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool activate_resistance_elements(player_type *player_ptr)
+bool activate_resistance_elements(PlayerType *player_ptr)
{
msg_print(_("様々な色に輝いている...", "It glows many colours..."));
(void)set_oppose_acid(player_ptr, randint1(40) + 40, false);
* @param name アイテム名
* @return 発動をキャンセルした場合FALSE、それ以外はTRUEを返す
*/
-bool activate_acid_ball_and_resistance(player_type *player_ptr, concptr name)
+bool activate_acid_ball_and_resistance(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが黒く輝いた...", "The %s grows black."), name);
* @param name アイテム名
* @return 発動をキャンセルした場合FALSE、それ以外はTRUEを返す
*/
-bool activate_elec_ball_and_resistance(player_type *player_ptr, concptr name)
+bool activate_elec_ball_and_resistance(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが青く輝いた...", "The %s grows blue."), name);
* @param name アイテム名
* @return 発動をキャンセルした場合FALSE、それ以外はTRUEを返す
*/
-bool activate_fire_ball_and_resistance(player_type *player_ptr, concptr name)
+bool activate_fire_ball_and_resistance(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが赤く輝いた...", "The %s grows red."), name);
* @param name アイテム名
* @return 発動をキャンセルした場合FALSE、それ以外はTRUEを返す
*/
-bool activate_cold_ball_and_resistance(player_type *player_ptr, concptr name)
+bool activate_cold_ball_and_resistance(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが白く輝いた...", "The %s grows white."), name);
* @param name アイテム名
* @return 発動をキャンセルした場合FALSE、それ以外はTRUEを返す
*/
-bool activate_pois_ball_and_resistance(player_type *player_ptr, concptr name)
+bool activate_pois_ball_and_resistance(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが緑に輝いた...", "The %s grows green."), name);
* @param name アイテム名
* @return 常にTRUE
*/
-bool activate_resistance_acid(player_type *player_ptr, concptr name)
+bool activate_resistance_acid(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが黒く輝いた...", "The %s grows black."), name);
(void)set_oppose_acid(player_ptr, randint1(20) + 20, false);
* @param name アイテム名
* @return 常にTRUE
*/
-bool activate_resistance_elec(player_type *player_ptr, concptr name)
+bool activate_resistance_elec(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが青く輝いた...", "The %s grows blue."), name);
(void)set_oppose_elec(player_ptr, randint1(20) + 20, false);
* @param name アイテム名
* @return 常にTRUE
*/
-bool activate_resistance_fire(player_type *player_ptr, concptr name)
+bool activate_resistance_fire(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが赤く輝いた...", "The %s grows red."), name);
(void)set_oppose_fire(player_ptr, randint1(20) + 20, false);
* @param name アイテム名
* @return 常にTRUE
*/
-bool activate_resistance_cold(player_type *player_ptr, concptr name)
+bool activate_resistance_cold(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが白く輝いた...", "The %s grows white."), name);
(void)set_oppose_cold(player_ptr, randint1(20) + 20, false);
* @param name アイテム名
* @return 常にTRUE
*/
-bool activate_resistance_pois(player_type *player_ptr, concptr name)
+bool activate_resistance_pois(PlayerType *player_ptr, concptr name)
{
msg_format(_("%sが緑に輝いた...", "The %s grows green."), name);
(void)set_oppose_pois(player_ptr, randint1(20) + 20, false);
return true;
}
-bool activate_ultimate_resistance(player_type *player_ptr)
+bool activate_ultimate_resistance(PlayerType *player_ptr)
{
TIME_EFFECT v = randint1(25) + 25;
(void)BadStatusSetter(player_ptr).afraidness(0);
#include "system/angband.h"
-struct player_type;
-bool activate_resistance_elements(player_type *player_ptr);
-bool activate_resistance_acid(player_type *player_ptr, concptr name);
-bool activate_resistance_elec(player_type *player_ptr, concptr name);
-bool activate_resistance_fire(player_type *player_ptr, concptr name);
-bool activate_resistance_cold(player_type *player_ptr, concptr name);
-bool activate_resistance_pois(player_type *player_ptr, concptr name);
-bool activate_acid_ball_and_resistance(player_type *player_ptr, concptr name);
-bool activate_elec_ball_and_resistance(player_type *player_ptr, concptr name);
-bool activate_fire_ball_and_resistance(player_type *player_ptr, concptr name);
-bool activate_cold_ball_and_resistance(player_type *player_ptr, concptr name);
-bool activate_pois_ball_and_resistance(player_type *player_ptr, concptr name);
-bool activate_ultimate_resistance(player_type *player_ptr);
+class PlayerType;
+bool activate_resistance_elements(PlayerType *player_ptr);
+bool activate_resistance_acid(PlayerType *player_ptr, concptr name);
+bool activate_resistance_elec(PlayerType *player_ptr, concptr name);
+bool activate_resistance_fire(PlayerType *player_ptr, concptr name);
+bool activate_resistance_cold(PlayerType *player_ptr, concptr name);
+bool activate_resistance_pois(PlayerType *player_ptr, concptr name);
+bool activate_acid_ball_and_resistance(PlayerType *player_ptr, concptr name);
+bool activate_elec_ball_and_resistance(PlayerType *player_ptr, concptr name);
+bool activate_fire_ball_and_resistance(PlayerType *player_ptr, concptr name);
+bool activate_cold_ball_and_resistance(PlayerType *player_ptr, concptr name);
+bool activate_pois_ball_and_resistance(PlayerType *player_ptr, concptr name);
+bool activate_ultimate_resistance(PlayerType *player_ptr);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-bool switch_activation(player_type *player_ptr, object_type **o_ptr_ptr, const activation_type *const act_ptr, concptr name)
+bool switch_activation(PlayerType *player_ptr, object_type **o_ptr_ptr, const activation_type *const act_ptr, concptr name)
{
object_type *o_ptr = (*o_ptr_ptr);
struct activation_type;
struct object_type;
-struct player_type;
-bool switch_activation(player_type *player_ptr, object_type **o_ptr_ptr, const activation_type *const act_ptr, concptr name);
+class PlayerType;
+bool switch_activation(PlayerType *player_ptr, object_type **o_ptr_ptr, const activation_type *const act_ptr, concptr name);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool activate_teleport_away(player_type *player_ptr)
+bool activate_teleport_away(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_escape(player_type *player_ptr)
+bool activate_escape(PlayerType *player_ptr)
{
switch (randint1(13)) {
case 1:
}
}
-bool activate_teleport_level(player_type *player_ptr)
+bool activate_teleport_level(PlayerType *player_ptr)
{
if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)")))
return false;
return true;
}
-bool activate_dimension_door(player_type *player_ptr)
+bool activate_dimension_door(PlayerType *player_ptr)
{
msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
return dimension_door(player_ptr);
}
-bool activate_teleport(player_type *player_ptr)
+bool activate_teleport(PlayerType *player_ptr)
{
msg_print(_("周りの空間が歪んでいる...", "It twists space around you..."));
teleport_player(player_ptr, 100, TELEPORT_SPONTANEOUS);
return true;
}
-bool activate_phase_door(player_type *player_ptr)
+bool activate_phase_door(PlayerType *player_ptr)
{
teleport_player(player_ptr, 10, TELEPORT_SPONTANEOUS);
return true;
#pragma once
-struct player_type;
-bool activate_teleport_away(player_type *player_ptr);
-bool activate_escape(player_type *player_ptr);
-bool activate_teleport_level(player_type *player_ptr);
-bool activate_dimension_door(player_type *player_ptr);
-bool activate_teleport(player_type *player_ptr);
-bool activate_phase_door(player_type *player_ptr);
+class PlayerType;
+bool activate_teleport_away(PlayerType *player_ptr);
+bool activate_escape(PlayerType *player_ptr);
+bool activate_teleport_level(PlayerType *player_ptr);
+bool activate_dimension_door(PlayerType *player_ptr);
+bool activate_teleport(PlayerType *player_ptr);
+bool activate_phase_door(PlayerType *player_ptr);
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
-ae_type *initialize_ae_type(player_type *player_ptr, ae_type *ae_ptr, const INVENTORY_IDX item)
+ae_type *initialize_ae_type(PlayerType *player_ptr, ae_type *ae_ptr, const INVENTORY_IDX item)
{
ae_ptr->o_ptr = ref_item(player_ptr, item);
ae_ptr->lev = k_info[ae_ptr->o_ptr->k_idx].level;
int fail;
} ae_type;
-struct player_type;
-ae_type *initialize_ae_type(player_type *player_ptr, ae_type *ae_ptr, const INVENTORY_IDX item);
+class PlayerType;
+ae_type *initialize_ae_type(PlayerType *player_ptr, ae_type *ae_ptr, const INVENTORY_IDX item);
* @param level 生成基準階
* @param power 生成ランク
*/
-AmuletEnchanter::AmuletEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+AmuletEnchanter::AmuletEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: player_ptr(player_ptr)
, o_ptr(o_ptr)
, level(level)
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class AmuletEnchanter : EnchanterBase {
public:
- AmuletEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ AmuletEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~AmuletEnchanter() = default;
void apply_magic() override;
void give_cursed() override;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
object_type *o_ptr;
DEPTH level;
int power;
* @param level 生成基準階
* @param power 生成ランク
*/
-ArmorEnchanter::ArmorEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+ArmorEnchanter::ArmorEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: AbstractProtectorEnchanter{ o_ptr, level, power }
, player_ptr(player_ptr)
{
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class ArmorEnchanter : AbstractProtectorEnchanter {
public:
- ArmorEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ ArmorEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~ArmorEnchanter() = default;
void apply_magic() override;
void give_cursed() override;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
bool is_high_ego_generated = false;
};
* @param level 生成基準階
* @param power 生成ランク
*/
-BootsEnchanter::BootsEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+BootsEnchanter::BootsEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: AbstractProtectorEnchanter{ o_ptr, level, power }
, player_ptr(player_ptr)
{
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class BootsEnchanter : AbstractProtectorEnchanter {
public:
- BootsEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ BootsEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~BootsEnchanter() = default;
void apply_magic() override;
void give_cursed() override{};
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* @param level 生成基準階
* @param power 生成ランク
*/
-CloakEnchanter::CloakEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+CloakEnchanter::CloakEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: AbstractProtectorEnchanter{ o_ptr, level, power }
, player_ptr(player_ptr)
{
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class CloakEnchanter : AbstractProtectorEnchanter {
public:
- CloakEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ CloakEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~CloakEnchanter() = default;
void apply_magic() override;
void give_cursed() override{};
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* @param level 生成基準階
* @param power 生成ランク
*/
-CrownEnchanter::CrownEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+CrownEnchanter::CrownEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: AbstractProtectorEnchanter{ o_ptr, level, power }
, player_ptr(player_ptr)
{
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class CrownEnchanter : AbstractProtectorEnchanter {
public:
- CrownEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ CrownEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~CrownEnchanter() = default;
void apply_magic() override;
void give_cursed() override;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* @param level 生成基準階
* @param power 生成ランク
*/
-GlovesEnchanter::GlovesEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+GlovesEnchanter::GlovesEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: AbstractProtectorEnchanter{ o_ptr, level, power }
, player_ptr(player_ptr)
{
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class GlovesEnchanter : AbstractProtectorEnchanter {
public:
- GlovesEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ GlovesEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~GlovesEnchanter() = default;
void apply_magic() override;
void give_cursed() override{};
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* @param level 生成基準階
* @param power 生成ランク
*/
-HelmEnchanter::HelmEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+HelmEnchanter::HelmEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: AbstractProtectorEnchanter{ o_ptr, level, power }
, player_ptr(player_ptr)
{
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class HelmEnchanter : AbstractProtectorEnchanter {
public:
- HelmEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ HelmEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~HelmEnchanter() = default;
void apply_magic() override;
void give_cursed() override;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* @details
* Hack -- note the special code for various items
*/
-void apply_magic_others(player_type *player_ptr, object_type *o_ptr, int power)
+void apply_magic_others(PlayerType *player_ptr, object_type *o_ptr, int power)
{
object_kind *k_ptr = &k_info[o_ptr->k_idx];
#pragma once
struct object_type;
-struct player_type;
-void apply_magic_others(player_type *player_ptr, object_type *o_ptr, int power);
+class PlayerType;
+void apply_magic_others(PlayerType *player_ptr, object_type *o_ptr, int power);
* @param level 生成基準階
* @param power 生成ランク
*/
-RingEnchanter::RingEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+RingEnchanter::RingEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: player_ptr(player_ptr)
, o_ptr(o_ptr)
, level(level)
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class RingEnchanter : EnchanterBase {
public:
- RingEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ RingEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~RingEnchanter() = default;
void apply_magic() override;
void give_cursed() override;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
object_type *o_ptr;
DEPTH level;
int power;
* @param level 生成基準階
* @param power 生成ランク
*/
-ShieldEnchanter::ShieldEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+ShieldEnchanter::ShieldEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
: AbstractProtectorEnchanter{ o_ptr, level, power }
, player_ptr(player_ptr)
{
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class ShieldEnchanter : AbstractProtectorEnchanter {
public:
- ShieldEnchanter(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+ ShieldEnchanter(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
virtual ~ShieldEnchanter() = default;
void apply_magic() override;
void give_cursed() override{};
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* Hack -- note special base damage dice boosting\n
* Hack -- note special processing for weapon/digger\n
*/
-void apply_magic_weapon(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power)
+void apply_magic_weapon(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power)
{
HIT_PROB tohit1 = randint1(5) + (HIT_PROB)m_bonus(5, level);
HIT_POINT todam1 = randint1(5) + (HIT_POINT)m_bonus(5, level);
#include "system/angband.h"
struct object_type;
-struct player_type;
-void apply_magic_weapon(player_type *player_ptr, object_type *o_ptr, DEPTH level, int power);
+class PlayerType;
+void apply_magic_weapon(PlayerType *player_ptr, object_type *o_ptr, DEPTH level, int power);
* @details
* エゴ&アーティファクトの生成、呪い、pval強化
*/
-void apply_magic_to_object(player_type *player_ptr, object_type *o_ptr, DEPTH lev, BIT_FLAGS mode)
+void apply_magic_to_object(PlayerType *player_ptr, object_type *o_ptr, DEPTH lev, BIT_FLAGS mode)
{
if (player_ptr->ppersonality == PERSONALITY_MUNCHKIN)
lev += randint0(player_ptr->lev / 2 + 10);
#include "system/angband.h"
struct object_type;
-struct player_type;
-void apply_magic_to_object(player_type *player_ptr, object_type *o_ptr, DEPTH lev, BIT_FLAGS mode);
+class PlayerType;
+void apply_magic_to_object(PlayerType *player_ptr, object_type *o_ptr, DEPTH lev, BIT_FLAGS mode);
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
class EnchanterBase {
public:
virtual void apply_magic() = 0;
* @param chance 呪いの基本確率
* @param heavy_chance さらに重い呪いとなる確率
*/
-void curse_equipment(player_type *player_ptr, PERCENTAGE chance, PERCENTAGE heavy_chance)
+void curse_equipment(PlayerType *player_ptr, PERCENTAGE chance, PERCENTAGE heavy_chance)
{
if (randint1(100) > chance)
return;
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
enum class CurseTraitType;
CurseTraitType get_curse(int power, object_type *o_ptr);
-void curse_equipment(player_type *player_ptr, PERCENTAGE chance, PERCENTAGE heavy_chance);
+void curse_equipment(PlayerType *player_ptr, PERCENTAGE chance, PERCENTAGE heavy_chance);
extern std::vector<ego_item_type> e_info;
struct object_type;
-struct player_type;
+class PlayerType;
byte get_random_ego(byte slot, bool good);
void apply_ego(object_type *o_ptr, DEPTH lev);
/*!
* @brief 鍛冶クラスコンストラクタ
*/
-Smith::Smith(player_type *player_ptr)
+Smith::Smith(PlayerType *player_ptr)
: player_ptr(player_ptr)
, smith_data(PlayerClass(player_ptr).get_specific_data<smith_data_type>())
{
#include <unordered_map>
struct object_type;
-struct player_type;
+class PlayerType;
class ISmithInfo;
struct essence_drain_type;
class ItemTester;
//! エッセンスとその抽出量を表すタプルのリスト
using DrainEssenceResult = std::vector<std::tuple<SmithEssenceType, int>>;
- Smith(player_type *player_ptr);
+ Smith(PlayerType *player_ptr);
static const std::vector<SmithEssenceType> &get_essence_list();
static concptr get_essence_name(SmithEssenceType essence);
static const std::vector<essence_drain_type> essence_drain_info_table;
static const std::vector<std::shared_ptr<ISmithInfo>> smith_info_table;
- player_type *player_ptr;
+ PlayerType *player_ptr;
std::shared_ptr<smith_data_type> smith_data;
};
{
}
-bool BasicSmithInfo::add_essence(player_type *, object_type *o_ptr, int) const
+bool BasicSmithInfo::add_essence(PlayerType *, object_type *o_ptr, int) const
{
o_ptr->smith_effect = effect;
{
}
-bool ActivationSmithInfo::add_essence(player_type *, object_type *o_ptr, int) const
+bool ActivationSmithInfo::add_essence(PlayerType *, object_type *o_ptr, int) const
{
o_ptr->smith_act_idx = this->act_idx;
{
}
-bool EnchantWeaponSmithInfo::add_essence(player_type *player_ptr, object_type *o_ptr, int) const
+bool EnchantWeaponSmithInfo::add_essence(PlayerType *player_ptr, object_type *o_ptr, int) const
{
const auto max_val = player_ptr->lev / 5 + 5;
if ((o_ptr->to_h >= max_val) && (o_ptr->to_d >= max_val)) {
{
}
-bool EnchantArmourSmithInfo::add_essence(player_type *player_ptr, object_type *o_ptr, int) const
+bool EnchantArmourSmithInfo::add_essence(PlayerType *player_ptr, object_type *o_ptr, int) const
{
const auto max_val = player_ptr->lev / 5 + 5;
if (o_ptr->to_a >= max_val) {
{
}
-bool SustainSmithInfo::add_essence(player_type *, object_type *o_ptr, int) const
+bool SustainSmithInfo::add_essence(PlayerType *, object_type *o_ptr, int) const
{
o_ptr->art_flags.set(TR_IGNORE_ACID);
o_ptr->art_flags.set(TR_IGNORE_ELEC);
{
}
-bool SlayingGlovesSmithInfo::add_essence(player_type *player_ptr, object_type *o_ptr, int number) const
+bool SlayingGlovesSmithInfo::add_essence(PlayerType *player_ptr, object_type *o_ptr, int number) const
{
BasicSmithInfo::add_essence(player_ptr, o_ptr, number);
enum class SmithEssenceType : int16_t;
enum class RandomArtActType : short;
-struct player_type;
+class PlayerType;
struct object_type;
/*!
* @param number 付与を行うエッセンスの個数
* @return 鍛冶効果の付与に成功した場合は true、失敗した場合は false
*/
- virtual bool add_essence(player_type *player_ptr, object_type *o_ptr, int number) const = 0;
+ virtual bool add_essence(PlayerType *player_ptr, object_type *o_ptr, int number) const = 0;
/*!
* @brief 鍛冶効果を消去する
class BasicSmithInfo : public ISmithInfo {
public:
BasicSmithInfo(SmithEffectType effect, concptr name, SmithCategoryType category, std::vector<SmithEssenceType> need_essences, int consumption, TrFlags add_flags);
- virtual bool add_essence(player_type *player_ptr, object_type *o_ptr, int number) const override;
+ virtual bool add_essence(PlayerType *player_ptr, object_type *o_ptr, int number) const override;
virtual void erase_essence(object_type *o_ptr) const override;
virtual TrFlags tr_flags() const override;
virtual bool can_give_smith_effect(const object_type *o_ptr) const final override;
class ActivationSmithInfo : public ISmithInfo {
public:
ActivationSmithInfo(SmithEffectType effect, concptr name, SmithCategoryType category, std::vector<SmithEssenceType> need_essences, int consumption, RandomArtActType act_idx);
- virtual bool add_essence(player_type *player_ptr, object_type *o_ptr, int number) const override;
+ virtual bool add_essence(PlayerType *player_ptr, object_type *o_ptr, int number) const override;
virtual void erase_essence(object_type *) const override;
virtual bool can_give_smith_effect(const object_type *o_ptr) const override;
class EnchantWeaponSmithInfo : public ISmithInfo {
public:
EnchantWeaponSmithInfo(SmithEffectType effect, concptr name, SmithCategoryType category, std::vector<SmithEssenceType> need_essences, int consumption);
- virtual bool add_essence(player_type *player_ptr, object_type *o_ptr, int number) const override;
+ virtual bool add_essence(PlayerType *player_ptr, object_type *o_ptr, int number) const override;
virtual void erase_essence(object_type *) const override {}
virtual bool can_give_smith_effect(const object_type *o_ptr) const override;
};
class EnchantArmourSmithInfo : public ISmithInfo {
public:
EnchantArmourSmithInfo(SmithEffectType effect, concptr name, SmithCategoryType category, std::vector<SmithEssenceType> need_essences, int consumption);
- virtual bool add_essence(player_type *player_ptr, object_type *o_ptr, int number) const override;
+ virtual bool add_essence(PlayerType *player_ptr, object_type *o_ptr, int number) const override;
virtual void erase_essence(object_type *) const override {}
virtual bool can_give_smith_effect(const object_type *o_ptr) const override;
};
class SustainSmithInfo : public ISmithInfo {
public:
SustainSmithInfo(SmithEffectType effect, concptr name, SmithCategoryType category, std::vector<SmithEssenceType> need_essences, int consumption);
- virtual bool add_essence(player_type *player_ptr, object_type *o_ptr, int number) const override;
+ virtual bool add_essence(PlayerType *player_ptr, object_type *o_ptr, int number) const override;
virtual void erase_essence(object_type *) const override {}
virtual bool can_give_smith_effect(const object_type *o_ptr) const override;
};
class SlayingGlovesSmithInfo : public BasicSmithInfo {
public:
SlayingGlovesSmithInfo(SmithEffectType effect, concptr name, SmithCategoryType category, std::vector<SmithEssenceType> need_essences, int consumption);
- virtual bool add_essence(player_type *player_ptr, object_type *o_ptr, int number) const override;
+ virtual bool add_essence(PlayerType *player_ptr, object_type *o_ptr, int number) const override;
virtual void erase_essence(object_type *) const override;
private:
* @param vorpal_cut メッタ斬りにできるかどうか
* @param vorpal_chance ヴォーパル倍率上昇の機会値
*/
-void process_vorpal_attack(player_type *player_ptr, player_attack_type *pa_ptr, const bool vorpal_cut, const int vorpal_chance)
+void process_vorpal_attack(PlayerType *player_ptr, player_attack_type *pa_ptr, const bool vorpal_cut, const int vorpal_chance)
{
if (!vorpal_cut)
return;
#pragma once
struct player_attack_type;
-struct player_type;
-void process_vorpal_attack(player_type *player_ptr, player_attack_type *pa_ptr, const bool vorpal_cut, const int vorpal_chance);
+class PlayerType;
+void process_vorpal_attack(PlayerType *player_ptr, player_attack_type *pa_ptr, const bool vorpal_cut, const int vorpal_chance);
* @param o_ptr 判定するオブジェクトの構造体参照ポインタ
* @return オブジェクトが防具として装備できるならTRUEを返す。
*/
-bool item_tester_hook_wear(player_type *player_ptr, const object_type *o_ptr)
+bool item_tester_hook_wear(PlayerType *player_ptr, const object_type *o_ptr)
{
if ((o_ptr->tval == ItemKindType::SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI))
if (player_ptr->psex == SEX_MALE)
#pragma once
struct object_type;
-struct player_type;
-bool item_tester_hook_wear(player_type *player_ptr, const object_type *o_ptr);
+class PlayerType;
+bool item_tester_hook_wear(PlayerType *player_ptr, const object_type *o_ptr);
* @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
* @return 食べることが可能ならばTRUEを返す
*/
-bool item_tester_hook_eatable(player_type *player_ptr, const object_type *o_ptr)
+bool item_tester_hook_eatable(PlayerType *player_ptr, const object_type *o_ptr)
{
if (o_ptr->tval == ItemKindType::FOOD)
return true;
* @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
* @return 飲むことが可能ならばTRUEを返す
*/
-bool item_tester_hook_quaff(player_type *player_ptr, const object_type *o_ptr)
+bool item_tester_hook_quaff(PlayerType *player_ptr, const object_type *o_ptr)
{
if (o_ptr->tval == ItemKindType::POTION)
return true;
* @param o_ptr 破壊可能かを確認したいオブジェクトの構造体参照ポインタ
* @return オブジェクトが破壊可能ならばTRUEを返す
*/
-bool can_player_destroy_object(player_type *player_ptr, object_type *o_ptr)
+bool can_player_destroy_object(PlayerType *player_ptr, object_type *o_ptr)
{
/* Artifacts cannot be destroyed */
if (!o_ptr->is_artifact())
#pragma once
struct object_type;
-struct player_type;
-bool item_tester_hook_eatable(player_type *player_ptr, const object_type *o_ptr);
-bool item_tester_hook_quaff(player_type *player_ptr, const object_type *o_ptr);
-bool can_player_destroy_object(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool item_tester_hook_eatable(PlayerType *player_ptr, const object_type *o_ptr);
+bool item_tester_hook_quaff(PlayerType *player_ptr, const object_type *o_ptr);
+bool can_player_destroy_object(PlayerType *player_ptr, object_type *o_ptr);
* @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
* @return 利用可能ならばTRUEを返す
*/
-bool item_tester_hook_use(player_type *player_ptr, const object_type *o_ptr)
+bool item_tester_hook_use(PlayerType *player_ptr, const object_type *o_ptr)
{
if (o_ptr->tval == player_ptr->tval_ammo)
return true;
* @param o_ptr 判定したいオブ会ジェクトの構造体参照ポインタ
* @return 学習できる魔道書ならばTRUEを返す
*/
-bool item_tester_learn_spell(player_type *player_ptr, const object_type *o_ptr)
+bool item_tester_learn_spell(PlayerType *player_ptr, const object_type *o_ptr)
{
int32_t choices = realm_choices2[enum2i(player_ptr->pclass)];
if (player_ptr->pclass == PlayerClassType::PRIEST) {
#pragma once
struct object_type;
-struct player_type;
-bool item_tester_hook_use(player_type *player_ptr, const object_type *o_ptr);
-bool item_tester_learn_spell(player_type *player_ptr, const object_type *o_ptr);
+class PlayerType;
+bool item_tester_hook_use(PlayerType *player_ptr, const object_type *o_ptr);
+bool item_tester_learn_spell(PlayerType *player_ptr, const object_type *o_ptr);
bool item_tester_high_level_book(const object_type *o_ptr);
* @param o_ptr 対象のオブジェクト構造体ポインタ
* @return オブジェクトが報酬対象になるならTRUEを返す
*/
-bool object_is_bounty(player_type *player_ptr, object_type *o_ptr)
+bool object_is_bounty(PlayerType *player_ptr, object_type *o_ptr)
{
int i;
#include "system/angband.h"
struct object_type;
-struct player_type;
-bool object_is_bounty(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool object_is_bounty(PlayerType *player_ptr, object_type *o_ptr);
bool object_is_quest_target(QUEST_IDX quest_idx, object_type *o_ptr);
* @param o_ptr 対象のオブジェクト構造体ポインタ
* @return オブジェクトが適正武器ならばTRUEを返す
*/
-bool object_is_favorite(player_type *player_ptr, const object_type *o_ptr)
+bool object_is_favorite(PlayerType *player_ptr, const object_type *o_ptr)
{
/* Only melee weapons match */
if (!(o_ptr->tval == ItemKindType::POLEARM || o_ptr->tval == ItemKindType::SWORD || o_ptr->tval == ItemKindType::DIGGING || o_ptr->tval == ItemKindType::HAFTED)) {
#pragma once
struct object_type;
-struct player_type;
-bool object_is_favorite(player_type *player_ptr, const object_type *o_ptr);
+class PlayerType;
+bool object_is_favorite(PlayerType *player_ptr, const object_type *o_ptr);
#include "timed-effect/player-stun.h"
#include "view/display-messages.h"
-ItemUseChecker::ItemUseChecker(player_type* player_ptr)
+ItemUseChecker::ItemUseChecker(PlayerType* player_ptr)
: player_ptr(player_ptr)
{
}
#include <string>
-struct player_type;
+class PlayerType;
class ItemUseChecker {
public:
- ItemUseChecker(player_type *player_ptr);
+ ItemUseChecker(PlayerType *player_ptr);
virtual ~ItemUseChecker() = default;
bool check_stun(std::string_view mes) const;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* @brief コンストラクタ
* @param player_ptr プレイヤーへの参照ポインタ
*/
-ObjectQuaffEntity::ObjectQuaffEntity(player_type *player_ptr)
+ObjectQuaffEntity::ObjectQuaffEntity(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ObjectQuaffEntity {
public:
- ObjectQuaffEntity(player_type *player_ptr);
+ ObjectQuaffEntity(PlayerType *player_ptr);
virtual ~ObjectQuaffEntity() = default;
void execute(INVENTORY_IDX item);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
bool check_can_quaff();
bool booze();
* @param player_ptr プレイヤーへの参照ポインタ
* @param item 読むオブジェクトの所持品ID
*/
-ObjectReadEntity::ObjectReadEntity(player_type *player_ptr, INVENTORY_IDX item)
+ObjectReadEntity::ObjectReadEntity(PlayerType *player_ptr, INVENTORY_IDX item)
: player_ptr(player_ptr)
, item(item)
{
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ObjectReadEntity {
public:
- ObjectReadEntity(player_type *player_ptr, INVENTORY_IDX item);
+ ObjectReadEntity(PlayerType *player_ptr, INVENTORY_IDX item);
virtual ~ObjectReadEntity() = default;
void execute(bool known);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
INVENTORY_IDX item;
bool check_can_read();
#include "view/object-describer.h"
#include "wizard/wizard-messages.h"
-ObjectThrowEntity::ObjectThrowEntity(player_type *player_ptr, object_type *q_ptr, const int delay_factor_val, const int mult, const bool boomerang, const OBJECT_IDX shuriken)
+ObjectThrowEntity::ObjectThrowEntity(PlayerType *player_ptr, object_type *q_ptr, const int delay_factor_val, const int mult, const bool boomerang, const OBJECT_IDX shuriken)
: q_ptr(q_ptr)
, player_ptr(player_ptr)
, shuriken(shuriken)
struct grid_type;
struct monster_type;
struct object_type;
-struct player_type;
+class PlayerType;
class ObjectThrowEntity {
public:
ObjectThrowEntity() = default;
ObjectThrowEntity(
- player_type *player_ptr, object_type *q_ptr, const int delay_factor_val, const int mult, const bool boomerang, const OBJECT_IDX shuriken);
+ PlayerType *player_ptr, object_type *q_ptr, const int delay_factor_val, const int mult, const bool boomerang, const OBJECT_IDX shuriken);
virtual ~ObjectThrowEntity() = default;
object_type *q_ptr;
void drop_thrown_item();
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
OBJECT_IDX shuriken;
int mult;
int msec;
* @param player_ptr プレイヤーへの参照ポインタ
* @param item 使うオブジェクトの所持品ID
*/
-ObjectUseEntity::ObjectUseEntity(player_type* player_ptr, INVENTORY_IDX item)
+ObjectUseEntity::ObjectUseEntity(PlayerType* player_ptr, INVENTORY_IDX item)
: player_ptr(player_ptr)
, item(item)
{
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ObjectUseEntity {
public:
- ObjectUseEntity(player_type *player_ptr, INVENTORY_IDX item);
+ ObjectUseEntity(PlayerType *player_ptr, INVENTORY_IDX item);
virtual ~ObjectUseEntity() = default;
void execute();
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
INVENTORY_IDX item;
bool check_can_use();
* @param player_ptr プレイヤーへの参照ポインタ
* @param item 使うオブジェクトの所持品ID
*/
-ObjectZapRodEntity::ObjectZapRodEntity(player_type* player_ptr)
+ObjectZapRodEntity::ObjectZapRodEntity(PlayerType* player_ptr)
: player_ptr(player_ptr)
{
}
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ObjectZapRodEntity {
public:
- ObjectZapRodEntity(player_type *player_ptr);
+ ObjectZapRodEntity(PlayerType *player_ptr);
virtual ~ObjectZapRodEntity() = default;
void execute(INVENTORY_IDX item);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
bool check_can_zap();
};
#include "view/display-messages.h"
#include "view/object-describer.h"
-ObjectZapWandEntity::ObjectZapWandEntity(player_type *player_ptr)
+ObjectZapWandEntity::ObjectZapWandEntity(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ObjectZapWandEntity {
public:
- ObjectZapWandEntity(player_type *player_ptr);
+ ObjectZapWandEntity(PlayerType *player_ptr);
virtual ~ObjectZapWandEntity() = default;
void execute(INVENTORY_IDX item);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
bool check_can_zap() const;
};
* @param test_func そのオブジェクトが条件に合うならtrueを返すメンバ関数を指定する
*/
FuncItemTester::FuncItemTester(TestMemberFunctionPtr test_func)
- : test_func([f = test_func](player_type *, const object_type *o_ptr) { return (o_ptr->*f)(); })
+ : test_func([f = test_func](PlayerType *, const object_type *o_ptr) { return (o_ptr->*f)(); })
{
}
* @param test_func 引数に object_type へのポインタを取り、そのオブジェクトが条件に合うならtrueを返す関数を指定する
*/
FuncItemTester::FuncItemTester(std::function<bool(const object_type *)> test_func)
- : test_func([f = std::move(test_func)](player_type *, const object_type *o_ptr) { return f(o_ptr); })
+ : test_func([f = std::move(test_func)](PlayerType *, const object_type *o_ptr) { return f(o_ptr); })
{
}
/*!
* @brief Construct a new Func Item Tester:: Func Item Tester object
*
- * @param test_func 引数に player_type へのポインタと object_type へのポインタを取り、そのオブジェクトが条件に合うならtrueを返す関数を指定する
- * @param player_ptr test_func の player_type へのポインタの引数に対して渡すポインタを指定する
+ * @param test_func 引数に PlayerType へのポインタと object_type へのポインタを取り、そのオブジェクトが条件に合うならtrueを返す関数を指定する
+ * @param player_ptr test_func の PlayerType へのポインタの引数に対して渡すポインタを指定する
*/
-FuncItemTester::FuncItemTester(std::function<bool(player_type *, const object_type *)> test_func, player_type *player_ptr)
+FuncItemTester::FuncItemTester(std::function<bool(PlayerType *, const object_type *)> test_func, PlayerType *player_ptr)
: test_func(std::move(test_func))
, player_ptr(player_ptr)
{
#include <memory>
struct object_type;
-struct player_type;
+class PlayerType;
/*!
* @brief アイテムの絞り込み条件をテストする基底クラス
using TestMemberFunctionPtr = bool (object_type::*)() const;
explicit FuncItemTester(TestMemberFunctionPtr test_func);
explicit FuncItemTester(std::function<bool(const object_type *)> test_func);
- explicit FuncItemTester(std::function<bool(player_type *, const object_type *)> test_func, player_type *player_ptr);
+ explicit FuncItemTester(std::function<bool(PlayerType *, const object_type *)> test_func, PlayerType *player_ptr);
private:
virtual bool okay_impl(const object_type *o_ptr) const;
- std::function<bool(player_type *, const object_type *)> test_func;
- player_type *player_ptr;
+ std::function<bool(PlayerType *, const object_type *)> test_func;
+ PlayerType *player_ptr;
};
* @brief 10ゲームターンが進行する毎に光源の寿命を減らす処理
* / Handle burning fuel every 10 game turns
*/
-void reduce_lite_life(player_type* player_ptr)
+void reduce_lite_life(PlayerType* player_ptr)
{
object_type* o_ptr = &player_ptr->inventory_list[INVEN_LITE];
if (o_ptr->tval != ItemKindType::LITE)
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr 現在光源として使っているオブジェクトの構造体参照ポインタ
*/
-void notice_lite_change(player_type* player_ptr, object_type* o_ptr)
+void notice_lite_change(PlayerType* player_ptr, object_type* o_ptr)
{
if ((o_ptr->xtra4 < 100) || (!(o_ptr->xtra4 % 100))) {
player_ptr->window_flags |= (PW_EQUIP);
#pragma once
struct object_type;
-struct player_type;
-void reduce_lite_life(player_type *player_ptr);
-void notice_lite_change(player_type* player_ptr, object_type* o_ptr);
+class PlayerType;
+void reduce_lite_life(PlayerType *player_ptr);
+void notice_lite_change(PlayerType* player_ptr, object_type* o_ptr);
* o_ptr --- pointer to the potion object.
* </pre>
*/
-bool potion_smash_effect(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, KIND_OBJECT_IDX k_idx)
+bool potion_smash_effect(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, KIND_OBJECT_IDX k_idx)
{
int radius = 2;
AttributeType dt = AttributeType::NONE;
* @details
* Note that artifacts never break, see the "drop_near()" function.
*/
-PERCENTAGE breakage_chance(player_type *player_ptr, object_type *o_ptr, bool has_archer_bonus, SPELL_IDX snipe_type)
+PERCENTAGE breakage_chance(PlayerType *player_ptr, object_type *o_ptr, bool has_archer_bonus, SPELL_IDX snipe_type)
{
/* Examine the snipe type */
if (snipe_type) {
#include "object-enchant/tr-types.h"
struct object_type;
-struct player_type;
+class PlayerType;
-bool potion_smash_effect(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, KIND_OBJECT_IDX k_idx);
-PERCENTAGE breakage_chance(player_type *player_ptr, object_type *o_ptr, bool has_archer_bonus, SPELL_IDX snipe_type);
+bool potion_smash_effect(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, KIND_OBJECT_IDX k_idx);
+PERCENTAGE breakage_chance(PlayerType *player_ptr, object_type *o_ptr, bool has_archer_bonus, SPELL_IDX snipe_type);
class ObjectBreaker {
protected:
* @param o_ptr 名称を取得する元のオブジェクト構造体参照ポインタ
* @return 対応する装備部位ID
*/
-int16_t wield_slot(player_type *player_ptr, const object_type *o_ptr)
+int16_t wield_slot(PlayerType *player_ptr, const object_type *o_ptr)
{
switch (o_ptr->tval) {
case ItemKindType::DIGGING:
* @param book_sval ベースアイテムのsval
* @return 使用可能な魔法書ならばTRUEを返す。
*/
-bool check_book_realm(player_type *player_ptr, const ItemKindType book_tval, const OBJECT_SUBTYPE_VALUE book_sval)
+bool check_book_realm(PlayerType *player_ptr, const ItemKindType book_tval, const OBJECT_SUBTYPE_VALUE book_sval)
{
if (book_tval < ItemKindType::LIFE_BOOK)
return false;
return (get_realm1_book(player_ptr) == book_tval) || (get_realm2_book(player_ptr) == book_tval);
}
-object_type *ref_item(player_type *player_ptr, INVENTORY_IDX item)
+object_type *ref_item(PlayerType *player_ptr, INVENTORY_IDX item)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
return item >= 0 ? &player_ptr->inventory_list[item] : &(floor_ptr->o_list[0 - item]);
#define OBJ_GOLD_LIST 480 /* First "gold" entry */
struct object_type;
-struct player_type;
+class PlayerType;
concptr activation_explanation(object_type *o_ptr);
char index_to_label(int i);
-int16_t wield_slot(player_type *player_ptr, const object_type *o_ptr);
-bool check_book_realm(player_type *player_ptr, const ItemKindType book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
-object_type *ref_item(player_type *player_ptr, INVENTORY_IDX item);
+int16_t wield_slot(PlayerType *player_ptr, const object_type *o_ptr);
+bool check_book_realm(PlayerType *player_ptr, const ItemKindType book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
+object_type *ref_item(PlayerType *player_ptr, INVENTORY_IDX item);
TERM_COLOR object_attr(object_type *o_ptr);
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
int32_t flag_cost(const object_type *o_ptr, int plusses);
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
PRICE object_value(const object_type *o_ptr);
PRICE object_value_real(const object_type *o_ptr);
* Calculate spell damages
* @return 警告を行う
*/
-object_type *choose_warning_item(player_type *player_ptr)
+object_type *choose_warning_item(PlayerType *player_ptr)
{
int choices[INVEN_TOTAL - INVEN_MAIN_HAND];
* @param dam 基本ダメージ
* @param max 算出した最大ダメージを返すポインタ
*/
-static void spell_damcalc(player_type *player_ptr, monster_type *m_ptr, AttributeType typ, HIT_POINT dam, int *max)
+static void spell_damcalc(PlayerType *player_ptr, monster_type *m_ptr, AttributeType typ, HIT_POINT dam, int *max)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
int rlev = r_ptr->level;
* @param m_idx 魔法を行使するモンスターのID
* @param max 算出した最大ダメージを返すポインタ
*/
-static void spell_damcalc_by_spellnum(player_type *player_ptr, MonsterAbilityType ms_type, AttributeType typ, MONSTER_IDX m_idx, int *max)
+static void spell_damcalc_by_spellnum(PlayerType *player_ptr, MonsterAbilityType ms_type, AttributeType typ, MONSTER_IDX m_idx, int *max)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
HIT_POINT dam = monspell_damage(player_ptr, ms_type, m_idx, DAM_MAX);
* @param blow_ptr モンスターの打撃能力の構造体参照ポインタ
* @return 算出された最大ダメージを返す。
*/
-static int blow_damcalc(monster_type *m_ptr, player_type *player_ptr, monster_blow *blow_ptr)
+static int blow_damcalc(monster_type *m_ptr, PlayerType *player_ptr, monster_blow *blow_ptr)
{
int dam = blow_ptr->d_dice * blow_ptr->d_side;
int dummy_max = 0;
* @param yy 危険性を調査するマスのY座標
* @return 警告を無視して進むことを選択するかか問題が無ければTRUE、警告に従ったならFALSEを返す。
*/
-bool process_warning(player_type *player_ptr, POSITION xx, POSITION yy)
+bool process_warning(PlayerType *player_ptr, POSITION xx, POSITION yy)
{
POSITION mx, my;
grid_type *g_ptr;
#include "system/angband.h"
struct object_type;
-struct player_type;
-object_type *choose_warning_item(player_type *player_ptr);
-bool process_warning(player_type *player_ptr, POSITION xx, POSITION yy);
+class PlayerType;
+object_type *choose_warning_item(PlayerType *player_ptr);
+bool process_warning(PlayerType *player_ptr, POSITION xx, POSITION yy);
* @param mode 表示オプション
* @return 特筆すべき情報が一つでもあった場合TRUE、一つもなく表示がキャンセルされた場合FALSEを返す。
*/
-bool screen_object(player_type *player_ptr, object_type *o_ptr, BIT_FLAGS mode)
+bool screen_object(PlayerType *player_ptr, object_type *o_ptr, BIT_FLAGS mode)
{
char temp[70 * 20];
concptr info[128];
#define SCROBJ_FAKE_OBJECT 0x00000001
#define SCROBJ_FORCE_DETAIL 0x00000002
struct object_type;
-struct player_type;
-bool screen_object(player_type *player_ptr, object_type *o_ptr, BIT_FLAGS mode);
+class PlayerType;
+bool screen_object(PlayerType *player_ptr, object_type *o_ptr, BIT_FLAGS mode);
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr *鑑定*済にするオブジェクトの構造体参照ポインタ
*/
-void object_aware(player_type *player_ptr, object_type *o_ptr)
+void object_aware(PlayerType *player_ptr, object_type *o_ptr)
{
const bool is_already_awared = o_ptr->is_aware();
#pragma once
struct object_type;
-struct player_type;
+class PlayerType;
void object_known(object_type *o_ptr);
-void object_aware(player_type *player_ptr, object_type *o_ptr);
+void object_aware(PlayerType *player_ptr, object_type *o_ptr);
void object_tried(object_type *o_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param heavy 重度の擬似鑑定を行うならばTRUE
*/
-static void sense_inventory_aux(player_type *player_ptr, INVENTORY_IDX slot, bool heavy)
+static void sense_inventory_aux(PlayerType *player_ptr, INVENTORY_IDX slot, bool heavy)
{
object_type *o_ptr = &player_ptr->inventory_list[slot];
GAME_TEXT o_name[MAX_NLEN];
* Class 4 = Ranger --> slow but heavy (changed!)\n
* Class 5 = Paladin --> slow but heavy\n
*/
-void sense_inventory1(player_type *player_ptr)
+void sense_inventory1(PlayerType *player_ptr)
{
PLAYER_LEVEL plev = player_ptr->lev;
bool heavy = false;
/*!
* @brief 1プレイヤーターン毎に武器、防具以外の擬似鑑定が行われるかを判定する。
*/
-void sense_inventory2(player_type *player_ptr)
+void sense_inventory2(PlayerType *player_ptr)
{
PLAYER_LEVEL plev = player_ptr->lev;
object_type *o_ptr;
#include "object-enchant/item-feeling.h"
struct object_type;
-struct player_type;
-void sense_inventory1(player_type *player_ptr);
-void sense_inventory2(player_type* player_ptr);
+class PlayerType;
+void sense_inventory1(PlayerType *player_ptr);
+void sense_inventory2(PlayerType* player_ptr);
item_feel_type pseudo_value_check_heavy(object_type *o_ptr);
item_feel_type pseudo_value_check_light(object_type *o_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param monap_ptr モンスターからプレイヤーへの直接攻撃構造体への参照ポインタ
*/
-void check_fall_off_horse(player_type *player_ptr, monap_type *monap_ptr)
+void check_fall_off_horse(PlayerType *player_ptr, monap_type *monap_ptr)
{
if ((player_ptr->riding == 0) || (monap_ptr->damage == 0))
return;
* @return FALSEなら落馬しないことで確定、TRUEなら処理続行
* @details レベルの低い乗馬からは落馬しにくい
*/
-static bool calc_fall_off_possibility(player_type *player_ptr, const HIT_POINT dam, const bool force, monster_race *r_ptr)
+static bool calc_fall_off_possibility(PlayerType *player_ptr, const HIT_POINT dam, const bool force, monster_race *r_ptr)
{
if (force)
return true;
* @param force TRUEならば強制的に落馬する
* @return 実際に落馬したらTRUEを返す
*/
-bool process_fall_off_horse(player_type *player_ptr, HIT_POINT dam, bool force)
+bool process_fall_off_horse(PlayerType *player_ptr, HIT_POINT dam, bool force)
{
POSITION sy = 0;
POSITION sx = 0;
#include "system/angband.h"
typedef struct monap_type monap_type;
-struct player_type;
-void check_fall_off_horse(player_type *player_ptr, monap_type *monap_ptr);
-bool process_fall_off_horse(player_type *player_ptr, HIT_POINT dam, bool force);
+class PlayerType;
+void check_fall_off_horse(PlayerType *player_ptr, monap_type *monap_ptr);
+bool process_fall_off_horse(PlayerType *player_ptr, HIT_POINT dam, bool force);
* @param now_riding trueなら下馬処理、falseならば騎乗処理
* @return 可能ならばtrueを返す
*/
-bool can_player_ride_pet(player_type *player_ptr, grid_type *g_ptr, bool now_riding)
+bool can_player_ride_pet(PlayerType *player_ptr, grid_type *g_ptr, bool now_riding)
{
bool old_character_xtra = w_ptr->character_xtra;
MONSTER_IDX old_riding = player_ptr->riding;
* @brief ペットの維持コスト計算
* @return 維持コスト(%)
*/
-PERCENTAGE calculate_upkeep(player_type *player_ptr)
+PERCENTAGE calculate_upkeep(PlayerType *player_ptr)
{
bool has_a_unique = false;
DEPTH total_friend_levels = 0;
extern int total_friends;
struct grid_type;;
-struct player_type;
-bool can_player_ride_pet(player_type *player_ptr, grid_type *g_ptr, bool now_riding);
-PERCENTAGE calculate_upkeep(player_type *player_ptr);
+class PlayerType;
+bool can_player_ride_pet(PlayerType *player_ptr, grid_type *g_ptr, bool now_riding);
+PERCENTAGE calculate_upkeep(PlayerType *player_ptr);
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerCharisma::PlayerCharisma(player_type *player_ptr)
+PlayerCharisma::PlayerCharisma(PlayerType *player_ptr)
: PlayerBasicStatistics(player_ptr)
{
}
#include "player-status/player-basic-statistics.h"
-struct player_type;
+class PlayerType;
class PlayerCharisma : public PlayerBasicStatistics {
public:
- PlayerCharisma(player_type *player_ptr);
+ PlayerCharisma(PlayerType *player_ptr);
BIT_FLAGS get_all_flags() override;
BIT_FLAGS get_bad_flags() override;
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerConstitution::PlayerConstitution(player_type *player_ptr)
+PlayerConstitution::PlayerConstitution(PlayerType *player_ptr)
: PlayerBasicStatistics(player_ptr)
{
}
#include "player-status/player-basic-statistics.h"
-struct player_type;
+class PlayerType;
class PlayerConstitution : public PlayerBasicStatistics {
public:
- PlayerConstitution(player_type *player_ptr);
+ PlayerConstitution(PlayerType *player_ptr);
protected:
void set_locals() override;
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerDexterity::PlayerDexterity(player_type* player_ptr)
+PlayerDexterity::PlayerDexterity(PlayerType* player_ptr)
: PlayerBasicStatistics(player_ptr)
{
}
#include "player-status/player-basic-statistics.h"
-struct player_type;
+class PlayerType;
class PlayerDexterity : public PlayerBasicStatistics {
public:
- PlayerDexterity(player_type *player_ptr);
+ PlayerDexterity(PlayerType *player_ptr);
protected:
void set_locals() override;
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerIntelligence::PlayerIntelligence(player_type *player_ptr)
+PlayerIntelligence::PlayerIntelligence(PlayerType *player_ptr)
: PlayerBasicStatistics(player_ptr)
{
}
#include "player-status/player-basic-statistics.h"
-struct player_type;
+class PlayerType;
class PlayerIntelligence : public PlayerBasicStatistics {
public:
- PlayerIntelligence(player_type *player_ptr);
+ PlayerIntelligence(PlayerType *player_ptr);
protected:
void set_locals() override;
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerStrength::PlayerStrength(player_type *player_ptr)
+PlayerStrength::PlayerStrength(PlayerType *player_ptr)
: PlayerBasicStatistics(player_ptr)
{
}
#include "player-status/player-basic-statistics.h"
-struct player_type;
+class PlayerType;
class PlayerStrength : public PlayerBasicStatistics {
public:
- PlayerStrength(player_type *player_ptr);
+ PlayerStrength(PlayerType *player_ptr);
protected:
void set_locals() override;
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerWisdom::PlayerWisdom(player_type *player_ptr)
+PlayerWisdom::PlayerWisdom(PlayerType *player_ptr)
: PlayerBasicStatistics(player_ptr)
{
}
#include "player-status/player-basic-statistics.h"
-struct player_type;
+class PlayerType;
class PlayerWisdom : public PlayerBasicStatistics {
public:
- PlayerWisdom(player_type *player_ptr);
+ PlayerWisdom(PlayerType *player_ptr);
protected:
void set_locals() override;
* @details
* カオス属性や混乱の手
*/
-static void attack_confuse(player_type *player_ptr, player_attack_type *pa_ptr, bool can_resist = true)
+static void attack_confuse(PlayerType *player_ptr, player_attack_type *pa_ptr, bool can_resist = true)
{
if (player_ptr->special_attack & ATTACK_CONFUSE) {
player_ptr->special_attack &= ~(ATTACK_CONFUSE);
* @details
* 魔術属性
*/
-static void attack_stun(player_type *player_ptr, player_attack_type *pa_ptr, bool can_resist = true)
+static void attack_stun(PlayerType *player_ptr, player_attack_type *pa_ptr, bool can_resist = true)
{
monster_race *r_ptr = pa_ptr->r_ptr;
if (any_bits(r_ptr->flags3, RF3_NO_STUN)) {
* @details
* 魔術属性
*/
-static void attack_scare(player_type *player_ptr, player_attack_type *pa_ptr, bool can_resist = true)
+static void attack_scare(PlayerType *player_ptr, player_attack_type *pa_ptr, bool can_resist = true)
{
monster_race *r_ptr = pa_ptr->r_ptr;
if (any_bits(r_ptr->flags3, RF3_NO_FEAR)) {
* @details
* 魔術属性
*/
-static void attack_dispel(player_type *player_ptr, player_attack_type *pa_ptr)
+static void attack_dispel(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
if (pa_ptr->r_ptr->ability_flags.has_none_of(RF_ABILITY_ATTACK_MASK) && pa_ptr->r_ptr->ability_flags.has_none_of(RF_ABILITY_INDIRECT_MASK))
return;
* @details
* 魔術属性
*/
-static void attack_probe(player_type *player_ptr, player_attack_type *pa_ptr)
+static void attack_probe(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
msg_print(_("刃が敵を調査した...", "The blade probed your enemy..."));
msg_print(nullptr);
* @param pa_ptr 直接攻撃構造体への参照ポインタ
* @return 抵抗されたらTRUE、アウェイされるならFALSE
*/
-static bool judge_tereprt_resistance(player_type *player_ptr, player_attack_type *pa_ptr)
+static bool judge_tereprt_resistance(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
monster_race *r_ptr = pa_ptr->r_ptr;
if ((r_ptr->flagsr & RFR_RES_TELE) == 0)
* @param pa_ptr 直接攻撃構造体への参照ポインタ
* @param num 現在の攻撃回数 (テレポートしてしまったら追加攻撃できないのでその補正)
*/
-static void attack_teleport_away(player_type *player_ptr, player_attack_type *pa_ptr, int *num)
+static void attack_teleport_away(PlayerType *player_ptr, player_attack_type *pa_ptr, int *num)
{
if (judge_tereprt_resistance(player_ptr, pa_ptr))
return;
* @param y モンスターのY座標
* @param x モンスターのX座標
*/
-static void attack_polymorph(player_type *player_ptr, player_attack_type *pa_ptr, POSITION y, POSITION x)
+static void attack_polymorph(PlayerType *player_ptr, player_attack_type *pa_ptr, POSITION y, POSITION x)
{
monster_race *r_ptr = pa_ptr->r_ptr;
if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) != 0) || ((r_ptr->flagsr & RFR_EFF_RES_CHAO_MASK) != 0))
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-static void attack_golden_hammer(player_type *player_ptr, player_attack_type *pa_ptr)
+static void attack_golden_hammer(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[pa_ptr->m_idx];
* @param x モンスターのX座標
* @param num 現在の攻撃回数
*/
-void change_monster_stat(player_type *player_ptr, player_attack_type *pa_ptr, const POSITION y, const POSITION x, int *num)
+void change_monster_stat(PlayerType *player_ptr, player_attack_type *pa_ptr, const POSITION y, const POSITION x, int *num)
{
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
#include "system/angband.h"
struct player_attack_type;
-struct player_type;
-void change_monster_stat(player_type *player_ptr, player_attack_type *pa_ptr, const POSITION y, const POSITION x, int *num);
+class PlayerType;
+void change_monster_stat(PlayerType *player_ptr, player_attack_type *pa_ptr, const POSITION y, const POSITION x, int *num);
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-void decide_blood_sucking(player_type *player_ptr, player_attack_type *pa_ptr)
+void decide_blood_sucking(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
bool is_blood_sucker = pa_ptr->flags.has(TR_VAMPIRIC);
is_blood_sucker |= pa_ptr->chaos_effect == CE_VAMPIRIC;
* @param pa_ptr 直接攻撃構造体への参照ポインタ
* @param is_human モンスターが人間かどうか
*/
-static void drain_muramasa(player_type *player_ptr, player_attack_type *pa_ptr, const bool is_human)
+static void drain_muramasa(PlayerType *player_ptr, player_attack_type *pa_ptr, const bool is_human)
{
if (!is_human)
return;
* @param drain_msg 吸血をした旨のメッセージを表示するかどうか
* @details 1行目の5がマジックナンバーで良く分からなかったので、取り敢えず元々あったコメントをベースに定数宣言しておいた
*/
-static void drain_result(player_type *player_ptr, player_attack_type *pa_ptr, bool *drain_msg)
+static void drain_result(PlayerType *player_ptr, player_attack_type *pa_ptr, bool *drain_msg)
{
const int real_drain = 5;
if (pa_ptr->drain_result <= real_drain)
* @param drain_msg 吸血をした旨のメッセージを表示するかどうか
* @details モンスターが死んだ場合、(ゲームのフレーバー的に)吸血しない
*/
-void process_drain(player_type *player_ptr, player_attack_type *pa_ptr, const bool is_human, bool *drain_msg)
+void process_drain(PlayerType *player_ptr, player_attack_type *pa_ptr, const bool is_human, bool *drain_msg)
{
if (!pa_ptr->can_drain || (pa_ptr->drain_result <= 0))
return;
#pragma once
struct player_attack_type;
-struct player_type;
-void decide_blood_sucking(player_type *player_ptr, player_attack_type *pa_ptr);
+class PlayerType;
+void decide_blood_sucking(PlayerType *player_ptr, player_attack_type *pa_ptr);
void calc_drain(player_attack_type *pa_ptr);
-void process_drain(player_type *player_ptr, player_attack_type *pa_ptr, const bool is_human, bool *drain_msg);
+void process_drain(PlayerType *player_ptr, player_attack_type *pa_ptr, const bool is_human, bool *drain_msg);
* @brief プレイヤーの攻撃情報を初期化する(コンストラクタ以外の分)
*/
static player_attack_type *initialize_player_attack_type(
- player_attack_type *pa_ptr, player_type *player_ptr, POSITION y, POSITION x, int16_t hand, combat_options mode, bool *fear, bool *mdeath)
+ player_attack_type *pa_ptr, PlayerType *player_ptr, POSITION y, POSITION x, int16_t hand, combat_options mode, bool *fear, bool *mdeath)
{
auto floor_ptr = player_ptr->current_floor_ptr;
auto g_ptr = &floor_ptr->grid_array[y][x];
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-static void attack_classify(player_type *player_ptr, player_attack_type *pa_ptr)
+static void attack_classify(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
switch (player_ptr->pclass) {
case PlayerClassType::ROGUE:
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-static void get_bare_knuckle_exp(player_type *player_ptr, player_attack_type *pa_ptr)
+static void get_bare_knuckle_exp(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
if ((r_ptr->level + 10) <= player_ptr->lev)
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-static void get_weapon_exp(player_type *player_ptr, player_attack_type *pa_ptr)
+static void get_weapon_exp(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
auto *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-static void get_attack_exp(player_type *player_ptr, player_attack_type *pa_ptr)
+static void get_attack_exp(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
* @param pa_ptr 直接攻撃構造体への参照ポインタ
* @details 毒針は確定で1回
*/
-static void calc_num_blow(player_type *player_ptr, player_attack_type *pa_ptr)
+static void calc_num_blow(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
if ((pa_ptr->mode == HISSATSU_KYUSHO) || (pa_ptr->mode == HISSATSU_MINEUCHI) || (pa_ptr->mode == HISSATSU_3DAN) || (pa_ptr->mode == HISSATSU_IAI))
pa_ptr->num_blow = 1;
* 吸血20%、地震0.12%、混乱26.892%、テレポート・アウェイ1.494%、変身1.494% /
* Vampiric 20%, Quake 0.12%, Confusion 26.892%, Teleport away 1.494% and Polymorph 1.494%
*/
-static chaotic_effect select_chaotic_effect(player_type *player_ptr, player_attack_type *pa_ptr)
+static chaotic_effect select_chaotic_effect(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
if (pa_ptr->flags.has_not(TR_CHAOTIC) || one_in_(2))
return CE_NONE;
* @param pa_ptr プレイヤー攻撃情報への参照ポインタ
* @return 魔術属性効果
*/
-static MagicalBrandEffectType select_magical_brand_effect(player_type *player_ptr, player_attack_type *pa_ptr)
+static MagicalBrandEffectType select_magical_brand_effect(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
if (pa_ptr->flags.has_not(TR_BRAND_MAGIC))
return MagicalBrandEffectType::NONE;
* 打撃に使用する武器または武器以外の装備品が地震を起こすなら、
* ダメージ量が50より多いか1/7で地震を起こす
*/
-static bool does_equip_cause_earthquake(player_type *player_ptr, player_attack_type *pa_ptr)
+static bool does_equip_cause_earthquake(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
if (!player_ptr->earthquake)
return false;
* @param vorpal_chance ヴォーパル倍率上昇の機会値
* @return 攻撃の結果、地震を起こすことになったらTRUE、それ以外はFALSE
*/
-static void process_weapon_attack(player_type *player_ptr, player_attack_type *pa_ptr, bool *do_quake, const bool vorpal_cut, const int vorpal_chance)
+static void process_weapon_attack(PlayerType *player_ptr, player_attack_type *pa_ptr, bool *do_quake, const bool vorpal_cut, const int vorpal_chance)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
auto dd = o_ptr->dd + player_ptr->to_dd[pa_ptr->hand] + magical_brand_extra_dice(pa_ptr);
* @param vorpal_change ヴォーパル倍率上昇の機会値
* @details 取り敢えず素手と仮定し1とする.
*/
-static void calc_attack_damage(player_type *player_ptr, player_attack_type *pa_ptr, bool *do_quake, const bool vorpal_cut, const int vorpal_chance)
+static void calc_attack_damage(PlayerType *player_ptr, player_attack_type *pa_ptr, bool *do_quake, const bool vorpal_cut, const int vorpal_chance)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
pa_ptr->attack_damage = 1;
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-static void apply_damage_bonus(player_type *player_ptr, player_attack_type *pa_ptr)
+static void apply_damage_bonus(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
pa_ptr->attack_damage += player_ptr->to_d[pa_ptr->hand];
pa_ptr->drain_result += player_ptr->to_d[pa_ptr->hand];
* @param pa_ptr 直接攻撃構造体への参照ポインタ
* @return 死んだらTRUE、生きていたらFALSE
*/
-static bool check_fear_death(player_type *player_ptr, player_attack_type *pa_ptr, const int num, const bool is_lowlevel)
+static bool check_fear_death(PlayerType *player_ptr, player_attack_type *pa_ptr, const int num, const bool is_lowlevel)
{
MonsterDamageProcessor mdp(player_ptr, pa_ptr->m_idx, pa_ptr->attack_damage, pa_ptr->fear, pa_ptr->attribute_flags);
if (!mdp.mon_take_hit(nullptr))
* @param is_ej_nullified 蜘蛛相手ならばTRUE
*/
static void apply_actual_attack(
- player_type *player_ptr, player_attack_type *pa_ptr, bool *do_quake, const bool is_zantetsu_nullified, const bool is_ej_nullified)
+ PlayerType *player_ptr, player_attack_type *pa_ptr, bool *do_quake, const bool is_zantetsu_nullified, const bool is_ej_nullified)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
int vorpal_chance = ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) ? 2 : 4;
* @param y モンスターのY座標
* @param x モンスターのX座標
*/
-static void cause_earthquake(player_type *player_ptr, player_attack_type *pa_ptr, const bool do_quake, const POSITION y, const POSITION x)
+static void cause_earthquake(PlayerType *player_ptr, player_attack_type *pa_ptr, const bool do_quake, const POSITION y, const POSITION x)
{
if (!do_quake)
return;
* @details
* If no "weapon" is available, then "punch" the monster one time.
*/
-void exe_player_attack_to_monster(player_type *player_ptr, POSITION y, POSITION x, bool *fear, bool *mdeath, int16_t hand, combat_options mode)
+void exe_player_attack_to_monster(PlayerType *player_ptr, POSITION y, POSITION x, bool *fear, bool *mdeath, int16_t hand, combat_options mode)
{
bool do_quake = false;
bool drain_msg = true;
* @brief 皆殺し(全方向攻撃)処理
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void massacre(player_type *player_ptr)
+void massacre(PlayerType *player_ptr)
{
grid_type *g_ptr;
monster_type *m_ptr;
#include "system/angband.h"
#include "combat/combat-options-type.h"
-struct player_type;
-void exe_player_attack_to_monster(player_type *player_ptr, POSITION y, POSITION x, bool *fear, bool *mdeath, int16_t hand, combat_options mode);
-void massacre(player_type *player_ptr);
+class PlayerType;
+void exe_player_attack_to_monster(PlayerType *player_ptr, POSITION y, POSITION x, bool *fear, bool *mdeath, int16_t hand, combat_options mode);
+void massacre(PlayerType *player_ptr);
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerClass::PlayerClass(player_type *player_ptr)
+PlayerClass::PlayerClass(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
/**
* @brief プレイヤーの職業にで使用する職業固有データ領域を初期化する
- * @details 事前条件: player_type の職業や領域が決定済みであること
+ * @details 事前条件: PlayerType の職業や領域が決定済みであること
*/
void PlayerClass::init_specific_data()
{
class PlayerClass {
public:
- PlayerClass(player_type *player_ptr);
+ PlayerClass(PlayerType *player_ptr);
virtual ~PlayerClass() = default;
TrFlags tr_flags() const;
std::shared_ptr<T> get_specific_data() const;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
/**
* @param base_race true の場合、仮に変身している場合でも元の種族について扱う。 false の場合変身している種族について扱う。
* 引数を省略した場合は false
*/
-PlayerRace::PlayerRace(player_type *player_ptr, bool base_race)
+PlayerRace::PlayerRace(PlayerType *player_ptr, bool base_race)
: player_ptr(player_ptr)
, base_race(base_race)
{
enum class PlayerRaceType;
enum class PlayerRaceLifeType;
enum class PlayerRaceFoodType;
-struct player_type;
+class PlayerType;
struct player_race_info;
class PlayerRace {
public:
- PlayerRace(player_type *player_ptr, bool base_race = false);
+ PlayerRace(PlayerType *player_ptr, bool base_race = false);
virtual ~PlayerRace() = default;
TrFlags tr_flags() const;
int16_t additional_constitution() const;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
bool base_race;
};
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerAlignment::PlayerAlignment(player_type *player_ptr)
+PlayerAlignment::PlayerAlignment(PlayerType *player_ptr)
{
this->player_ptr = player_ptr;
}
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class PlayerAlignment {
public:
- PlayerAlignment(player_type *player_ptr);
+ PlayerAlignment(PlayerType *player_ptr);
virtual ~PlayerAlignment() = default;
concptr get_alignment_description(bool with_value = false);
void update_alignment();
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
concptr alignment_label();
void bias_good_alignment(int value);
void bias_evil_alignment(int value);
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-void set_equipment_influence(player_type *player_ptr, self_info_type *self_ptr)
+void set_equipment_influence(PlayerType *player_ptr, self_info_type *self_ptr)
{
for (int k = INVEN_MAIN_HAND; k < INVEN_TOTAL; k++) {
object_type *o_ptr = &player_ptr->inventory_list[k];
self_ptr->info[self_ptr->line++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
}
-void set_status_sustain_info(player_type *player_ptr, self_info_type *self_ptr)
+void set_status_sustain_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (has_sustain_str(player_ptr)) {
self_ptr->info[self_ptr->line++] = _("あなたの腕力は維持されている。", "Your strength is sustained.");
#pragma once
-struct player_type;
+class PlayerType;
struct self_info_type;
-void set_equipment_influence(player_type *player_ptr, self_info_type *self_ptr);
-void set_status_sustain_info(player_type *player_ptr, self_info_type *self_ptr);
+void set_equipment_influence(PlayerType *player_ptr, self_info_type *self_ptr);
+void set_status_sustain_info(PlayerType *player_ptr, self_info_type *self_ptr);
#include "system/player-type-definition.h"
/*!< @todo 並び順の都合で連番を付ける。まとめても良いならまとめてしまう予定 */
-void set_body_improvement_info_1(player_type *player_ptr, self_info_type *self_ptr)
+void set_body_improvement_info_1(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (is_blessed(player_ptr))
self_ptr->info[self_ptr->line++] = _("あなたは高潔さを感じている。", "You feel rightous.");
}
/*!< @todo 並び順の都合で連番を付ける。まとめても良いならまとめてしまう予定 */
-void set_body_improvement_info_2(player_type *player_ptr, self_info_type *self_ptr)
+void set_body_improvement_info_2(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (player_ptr->new_spells)
self_ptr->info[self_ptr->line++] = _("あなたは呪文や祈りを学ぶことができる。", "You can learn some spells/prayers.");
}
/*!< @todo 並び順の都合で連番を付ける。まとめても良いならまとめてしまう予定 */
-void set_body_improvement_info_3(player_type *player_ptr, self_info_type *self_ptr)
+void set_body_improvement_info_3(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (player_ptr->hold_exp)
self_ptr->info[self_ptr->line++] = _("あなたは自己の経験値をしっかりと維持する。", "You have a firm hold on your experience.");
}
/*!< @todo 並び順の都合で連番を付ける。まとめても良いならまとめてしまう予定 */
-void set_body_improvement_info_4(player_type *player_ptr, self_info_type *self_ptr)
+void set_body_improvement_info_4(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (has_resist_fear(player_ptr))
self_ptr->info[self_ptr->line++] = _("あなたは全く恐怖を感じない。", "You are completely fearless.");
#pragma once
-struct player_type;
+class PlayerType;
struct self_info_type;
-void set_body_improvement_info_1(player_type *player_ptr, self_info_type *self_ptr);
-void set_body_improvement_info_2(player_type *player_ptr, self_info_type *self_ptr);
-void set_body_improvement_info_3(player_type *player_ptr, self_info_type *self_ptr);
-void set_body_improvement_info_4(player_type *player_ptr, self_info_type *self_ptr);
+void set_body_improvement_info_1(PlayerType *player_ptr, self_info_type *self_ptr);
+void set_body_improvement_info_2(PlayerType *player_ptr, self_info_type *self_ptr);
+void set_body_improvement_info_3(PlayerType *player_ptr, self_info_type *self_ptr);
+void set_body_improvement_info_4(PlayerType *player_ptr, self_info_type *self_ptr);
#include "realm/realm-types.h"
#include "system/player-type-definition.h"
-void set_class_ability_info(player_type *player_ptr, self_info_type *self_ptr)
+void set_class_ability_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
switch (player_ptr->pclass) {
case PlayerClassType::WARRIOR:
#pragma once
-struct player_type;
+class PlayerType;
struct self_info_type;
-void set_class_ability_info(player_type *player_ptr, self_info_type *self_ptr);
+void set_class_ability_info(PlayerType *player_ptr, self_info_type *self_ptr);
* @param i 判定する手のID(右手:INVEN_MAIN_HAND 左手:INVEN_SUB_HAND)
* @return 持っているならばTRUE
*/
-bool has_melee_weapon(player_type *player_ptr, int slot)
+bool has_melee_weapon(PlayerType *player_ptr, int slot)
{
const auto o_ptr = &player_ptr->inventory_list[slot];
return o_ptr->k_idx && o_ptr->is_melee_weapon();
* @param riding_control 乗馬中により片手を必要としている状態ならばTRUEを返す。
* @return 開いている手のビットフラグ
*/
-BIT_FLAGS16 empty_hands(player_type *player_ptr, bool riding_control)
+BIT_FLAGS16 empty_hands(PlayerType *player_ptr, bool riding_control)
{
BIT_FLAGS16 status = EMPTY_HAND_NONE;
if (!player_ptr->inventory_list[INVEN_MAIN_HAND].k_idx)
return status;
}
-bool can_two_hands_wielding(player_type *player_ptr)
+bool can_two_hands_wielding(PlayerType *player_ptr)
{
return !player_ptr->riding || any_bits(player_ptr->pet_extra_flags, PF_TWO_HANDS);
}
* @brief プレイヤーが防具重量制限のある職業時にペナルティを受ける状態にあるかどうかを返す。
* @return ペナルティが適用されるならばTRUE。
*/
-bool heavy_armor(player_type *player_ptr)
+bool heavy_armor(PlayerType *player_ptr)
{
if ((player_ptr->pclass != PlayerClassType::MONK) && (player_ptr->pclass != PlayerClassType::FORCETRAINER) && (player_ptr->pclass != PlayerClassType::NINJA))
return false;
#include "system/angband.h"
-struct player_type;
-bool has_melee_weapon(player_type *player_ptr, int i);
-BIT_FLAGS16 empty_hands(player_type *player_ptr, bool riding_control);
-bool can_two_hands_wielding(player_type *player_ptr);
-bool heavy_armor(player_type *player_ptr);
+class PlayerType;
+bool has_melee_weapon(PlayerType *player_ptr, int i);
+BIT_FLAGS16 empty_hands(PlayerType *player_ptr, bool riding_control);
+bool can_two_hands_wielding(PlayerType *player_ptr);
+bool heavy_armor(PlayerType *player_ptr);
#include "util/bit-flags-calculator.h"
/*!< @todo FEAELESS フラグも記述して問題ないと思われる */
-void set_mutation_info(player_type *player_ptr, self_info_type *self_ptr)
+void set_mutation_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (player_ptr->muta.none())
return;
#pragma once
-struct player_type;
+class PlayerType;
struct self_info_type;
-void set_mutation_info(player_type *player_ptr, self_info_type *self_ptr);
+void set_mutation_info(PlayerType *player_ptr, self_info_type *self_ptr);
* @details
* 使用可能レベル以上を条件とする。
*/
-void set_race_ability_info(player_type *player_ptr, self_info_type *self_ptr)
+void set_race_ability_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
switch (player_ptr->prace) {
case PlayerRaceType::DWARF:
#pragma once
-struct player_type;
+class PlayerType;
struct self_info_type;
-void set_race_ability_info(player_type *player_ptr, self_info_type *self_ptr);
+void set_race_ability_info(PlayerType *player_ptr, self_info_type *self_ptr);
* @param player_ptr プレイヤー情報への参照ポインタ
* @return シンボル文字
*/
-SYMBOL_CODE get_summon_symbol_from_player(player_type *player_ptr)
+SYMBOL_CODE get_summon_symbol_from_player(PlayerType *player_ptr)
{
SYMBOL_CODE symbol = 'N';
auto mmc_ptr = PlayerRace(player_ptr).get_info();
extern const player_race_info *rp_ptr;
-struct player_type;
-SYMBOL_CODE get_summon_symbol_from_player(player_type *player_ptr);
+class PlayerType;
+SYMBOL_CODE get_summon_symbol_from_player(PlayerType *player_ptr);
#include "status/element-resistance.h"
#include "system/player-type-definition.h"
-void set_element_resistance_info(player_type *player_ptr, self_info_type *self_ptr)
+void set_element_resistance_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
const auto race_tr_flags = PlayerRace(player_ptr).tr_flags();
self_ptr->info[self_ptr->line++] = _("あなたは毒への耐性を持っている。", "You are resistant to poison.");
}
-void set_high_resistance_info(player_type *player_ptr, self_info_type *self_ptr)
+void set_high_resistance_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (has_resist_lite(player_ptr))
self_ptr->info[self_ptr->line++] = _("あなたは閃光への耐性を持っている。", "You are resistant to bright light.");
#pragma once
-struct player_type;
+class PlayerType;
struct self_info_type;
-void set_element_resistance_info(player_type *player_ptr, self_info_type *self_ptr);
-void set_high_resistance_info(player_type *player_ptr, self_info_type *self_ptr);
+void set_element_resistance_info(PlayerType *player_ptr, self_info_type *self_ptr);
+void set_high_resistance_info(PlayerType *player_ptr, self_info_type *self_ptr);
#include "timed-effect/timed-effects.h"
#include "view/display-self-info.h"
-static void set_bad_status_info(player_type *player_ptr, self_info_type *self_ptr)
+static void set_bad_status_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
auto effects = player_ptr->effects();
if (player_ptr->blind)
self_ptr->info[self_ptr->line++] = _("あなたは幻覚を見ている。", "You are hallucinating.");
}
-static void set_curse_info(player_type *player_ptr, self_info_type *self_ptr)
+static void set_curse_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (player_ptr->cursed.has(CurseTraitType::TY_CURSE))
self_ptr->info[self_ptr->line++] = _("あなたは邪悪な怨念に包まれている。", "You carry an ancient foul curse.");
self_ptr->info[self_ptr->line++] = _("あなたは魔力を吸われている。", "You occasionally lose spell points for no reason.");
}
-static void set_special_attack_info(player_type *player_ptr, self_info_type *self_ptr)
+static void set_special_attack_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (player_ptr->special_attack & ATTACK_CONFUSE)
self_ptr->info[self_ptr->line++] = _("あなたの手は赤く輝いている。", "Your hands are glowing dull red.");
self_ptr->info[self_ptr->line++] = _("あなたの手は毒に覆われている。", "You can strike the enemy with poison.");
}
-static void set_esp_info(player_type *player_ptr, self_info_type *self_ptr)
+static void set_esp_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
if (player_ptr->telepathy)
self_ptr->info[self_ptr->line++] = _("あなたはテレパシー能力を持っている。", "You have ESP.");
* Use the "show_file()" method, perhaps.
* </pre>
*/
-void self_knowledge(player_type *player_ptr)
+void self_knowledge(PlayerType *player_ptr)
{
self_info_type tmp_si;
self_info_type *self_ptr = initialize_self_info_type(&tmp_si);
/*!
* @brief 現在の一時的効果一覧を返す / Report all currently active magical effects.
*/
-void report_magics(player_type *player_ptr)
+void report_magics(PlayerType *player_ptr)
{
int i = 0;
concptr info[128];
#pragma once
-struct player_type;
-void self_knowledge(player_type *player_ptr);
-void report_magics(player_type *player_ptr);
+class PlayerType;
+void self_knowledge(PlayerType *player_ptr);
+void report_magics(PlayerType *player_ptr);
self_ptr->info[self_ptr->line++] = _("あなたの武器はドラゴンに対して特に強い力を発揮する。", "Your weapon is especially deadly against dragons.");
}
-void set_weapon_effect_info(player_type *player_ptr, self_info_type *self_ptr)
+void set_weapon_effect_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND];
if (o_ptr->k_idx == 0)
#pragma once
-struct player_type;
+class PlayerType;
struct self_info_type;
-void set_weapon_effect_info(player_type *player_ptr, self_info_type *self_ptr);
+void set_weapon_effect_info(PlayerType *player_ptr, self_info_type *self_ptr);
#include "util/bit-flags-calculator.h"
#include "util/enum-converter.h"
-PlayerBasicStatistics::PlayerBasicStatistics(player_type *player_ptr)
+PlayerBasicStatistics::PlayerBasicStatistics(PlayerType *player_ptr)
: PlayerStatusBase(player_ptr)
{
}
#include "player-ability/player-ability-types.h"
#include "player-status/player-status-base.h"
-struct player_type;
+class PlayerType;
class PlayerBasicStatistics : public PlayerStatusBase {
public:
void update_value();
int16_t get_value() override;
protected:
- PlayerBasicStatistics(player_type *player_ptr);
+ PlayerBasicStatistics(PlayerType *player_ptr);
player_ability_type ability_type{};
int16_t race_value() override;
#include "player-status/player-energy.h"
#include "system/player-type-definition.h"
-PlayerEnergy::PlayerEnergy(player_type *player_ptr)
+PlayerEnergy::PlayerEnergy(PlayerType *player_ptr)
{
this->player_ptr = player_ptr;
}
/*
* @brief ターン消費をなくす (主にコマンド実行に失敗した場合)
- * @param player_type プレイヤーへの参照ポインタ
+ * @param PlayerType プレイヤーへの参照ポインタ
*/
void PlayerEnergy::reset_player_turn()
{
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class PlayerEnergy {
public:
- PlayerEnergy(player_type *player_ptr);
+ PlayerEnergy(PlayerType *player_ptr);
virtual ~PlayerEnergy() = default;
void set_player_turn_energy(ENERGY need_cost); // 代入.
void add_player_turn_energy(ENERGY need_cost); // 加算.
void div_player_turn_energy(ENERGY need_cost); // 除算.
void reset_player_turn();
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
#include "system/player-type-definition.h"
#include "util/enum-converter.h"
-PlayerInfravision::PlayerInfravision(player_type *player_ptr)
+PlayerInfravision::PlayerInfravision(PlayerType *player_ptr)
: PlayerStatusBase(player_ptr)
{
}
class PlayerInfravision : public PlayerStatusBase {
public:
- PlayerInfravision(player_type *player_ptr);
+ PlayerInfravision(PlayerType *player_ptr);
protected:
void set_locals() override;
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
-PlayerSpeed::PlayerSpeed(player_type *player_ptr)
+PlayerSpeed::PlayerSpeed(PlayerType *player_ptr)
: PlayerStatusBase(player_ptr)
{
}
class PlayerSpeed : public PlayerStatusBase {
public:
- PlayerSpeed(player_type *player_ptr);
+ PlayerSpeed(PlayerType *player_ptr);
protected:
void set_locals() override;
* @details
* * コンストラクタでplayer_ptrをセット。メンバ変数を0クリア。
*/
-PlayerStatusBase::PlayerStatusBase(player_type *player_ptr)
+PlayerStatusBase::PlayerStatusBase(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
this->set_locals(); /* 初期化。基底クラスの0クリアが呼ばれる。*/
#include "system/angband.h"
#include "player/player-status-flags.h"
-struct player_type;
+class PlayerType;
class PlayerStatusBase {
public:
virtual ~PlayerStatusBase() = default;
virtual BIT_FLAGS get_bad_flags();
protected:
- PlayerStatusBase(player_type *player_ptr);
+ PlayerStatusBase(PlayerType *player_ptr);
int16_t default_value;
int16_t min_value;
int16_t max_value;
- player_type *player_ptr;
+ PlayerType *player_ptr;
tr_type tr_flag;
tr_type tr_bad_flag;
virtual void set_locals();
#include "util/bit-flags-calculator.h"
#include "util/enum-converter.h"
-PlayerStealth::PlayerStealth(player_type* player_ptr)
+PlayerStealth::PlayerStealth(PlayerType* player_ptr)
: PlayerStatusBase(player_ptr)
{
}
class PlayerStealth : public PlayerStatusBase {
public:
- PlayerStealth(player_type *player_ptr);
+ PlayerStealth(PlayerType *player_ptr);
BIT_FLAGS get_bad_flags() override;
* @brief 10ゲームターンが進行するごとにプレイヤーの腹を減らす
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void starve_player(player_type *player_ptr)
+void starve_player(PlayerType *player_ptr)
{
if (player_ptr->phase_out)
return;
* game turns, or 500/(100/5) = 25 player turns (if nothing else is
* affecting the player speed).\n
*/
-bool set_food(player_type *player_ptr, TIME_EFFECT v)
+bool set_food(PlayerType *player_ptr, TIME_EFFECT v)
{
int old_aux, new_aux;
#define PY_FOOD_FAINT 500 /*!< 衰弱~衰弱(赤表示/麻痺)の閾値 / Food value (Fainting) */
#define PY_FOOD_STARVE 100 /*!< 衰弱(赤表示/麻痺)~飢餓ダメージの閾値 / Food value (Starving) */
-struct player_type;
-void starve_player(player_type *player_ptr);
-bool set_food(player_type *player_ptr, TIME_EFFECT v);
+class PlayerType;
+void starve_player(PlayerType *player_ptr);
+bool set_food(PlayerType *player_ptr, TIME_EFFECT v);
* @param m_ptr ELDRITCH_HORRORを引き起こしたモンスターの参照ポインタ。薬・罠・魔法の影響ならnullptr
* @param necro 暗黒領域魔法の詠唱失敗によるものならばTRUEを返す
*/
-void sanity_blast(player_type *player_ptr, monster_type *m_ptr, bool necro)
+void sanity_blast(PlayerType *player_ptr, monster_type *m_ptr, bool necro)
{
if (player_ptr->phase_out || !w_ptr->character_dungeon)
return;
#pragma once
struct monster_type;
-struct player_type;
-void sanity_blast(player_type *player_ptr, monster_type *m_ptr, bool necro);
+class PlayerType;
+void sanity_blast(PlayerType *player_ptr, monster_type *m_ptr, bool necro);
{
}
-void Patron::gain_level_reward(player_type *player_ptr_, int chosen_reward)
+void Patron::gain_level_reward(PlayerType *player_ptr_, int chosen_reward)
{
this->player_ptr = player_ptr_;
char wrath_reason[32] = "";
}
}
-void Patron::admire(player_type *player_ptr_)
+void Patron::admire(PlayerType *player_ptr_)
{
this->player_ptr = player_ptr_;
if ((this->player_ptr->pclass == PlayerClassType::CHAOS_WARRIOR) || this->player_ptr->muta.has(PlayerMutationType::CHAOS_GIFT)) {
REW_SER_MONS = 36, /*!< カオスパトロンからの報酬: モンスターの下僕下賜 */
};
-struct player_type;
+class PlayerType;
enum player_ability_type : int;
/*!
virtual ~Patron() = default;
// @note C4458 クラスメンバーの隠蔽 への対応として末尾に「_」を付ける.
- void gain_level_reward(player_type *player_ptr_, int chosen_reward);
- void admire(player_type *player_ptr_);
+ void gain_level_reward(PlayerType *player_ptr_, int chosen_reward);
+ void admire(PlayerType *player_ptr_);
private:
- player_type *player_ptr = nullptr; //!< プレイヤー参照ポインタ
+ PlayerType *player_ptr = nullptr; //!< プレイヤー参照ポインタ
std::vector<patron_reward> reward_table; //!< 報酬テーブル
player_ability_type boost_stat; //!< 強化能力値傾向
};
* @param flags 耐性フラグの配列
* @todo 最終的にplayer-status系列と統合する
*/
-static void add_mutation_flags(player_type *player_ptr, TrFlags &flags)
+static void add_mutation_flags(PlayerType *player_ptr, TrFlags &flags)
{
if (player_ptr->muta.none())
return;
* @param flags 耐性フラグの配列
* @todo 最終的にplayer-status系列と統合する
*/
-static void add_personality_flags(player_type *player_ptr, TrFlags &flags)
+static void add_personality_flags(PlayerType *player_ptr, TrFlags &flags)
{
if (player_ptr->ppersonality == PERSONALITY_SEXY)
flags.set(TR_AGGRAVATE);
* Obtain the "flags" for the player as if he was an item
* @todo 最終的にplayer-status系列と統合する
*/
-void player_flags(player_type *player_ptr, TrFlags &flags)
+void player_flags(PlayerType *player_ptr, TrFlags &flags)
{
flags.clear();
add_personality_flags(player_ptr, flags);
}
-void riding_flags(player_type *player_ptr, TrFlags &flags, TrFlags &negative_flags)
+void riding_flags(PlayerType *player_ptr, TrFlags &flags, TrFlags &negative_flags)
{
flags.clear();
negative_flags.clear();
#include "object-enchant/tr-flags.h"
-struct player_type;
-void player_flags(player_type *player_ptr, TrFlags &flags);
-void riding_flags(player_type *player_ptr, TrFlags &flags, TrFlags &negative_flags);
+class PlayerType;
+void player_flags(PlayerType *player_ptr, TrFlags &flags);
+void riding_flags(PlayerType *player_ptr, TrFlags &flags, TrFlags &negative_flags);
#include "view/display-messages.h"
#include "world/world.h"
-using dam_func = HIT_POINT (*)(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
+using dam_func = HIT_POINT (*)(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
/*!
* @brief 酸攻撃による装備のAC劣化処理 /
* Note that the "base armor" of an object never changes.
* If any armor is damaged (or resists), the player takes less damage.
*/
-static bool acid_minus_ac(player_type *player_ptr)
+static bool acid_minus_ac(PlayerType *player_ptr)
{
object_type *o_ptr = nullptr;
switch (randint1(7)) {
* @return 修正HPダメージ量
* @details 酸オーラは存在しないが関数ポインタのために引数だけは用意している
*/
-HIT_POINT acid_dam(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
+HIT_POINT acid_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
{
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
bool double_resist = is_oppose_acid(player_ptr);
* @param aura オーラよるダメージが原因ならばTRUE
* @return 修正HPダメージ量
*/
-HIT_POINT elec_dam(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
+HIT_POINT elec_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
{
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
bool double_resist = is_oppose_elec(player_ptr);
* @param aura オーラよるダメージが原因ならばTRUE
* @return 修正HPダメージ量
*/
-HIT_POINT fire_dam(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
+HIT_POINT fire_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
{
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
bool double_resist = is_oppose_fire(player_ptr);
* @param aura オーラよるダメージが原因ならばTRUE
* @return 修正HPダメージ量
*/
-HIT_POINT cold_dam(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
+HIT_POINT cold_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
{
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
bool double_resist = is_oppose_cold(player_ptr);
* the game when he dies, since the "You die." message is shown before
* setting the player to "dead".
*/
-int take_hit(player_type *player_ptr, int damage_type, HIT_POINT damage, concptr hit_from)
+int take_hit(PlayerType *player_ptr, int damage_type, HIT_POINT damage, concptr hit_from)
{
int old_chp = player_ptr->chp;
* @param dam_func ダメージ処理を行う関数の参照ポインタ
* @param message オーラダメージを受けた際のメッセージ
*/
-static void process_aura_damage(monster_type *m_ptr, player_type *player_ptr, bool immune, MonsterAuraType aura_flag, dam_func dam_func, concptr message)
+static void process_aura_damage(monster_type *m_ptr, PlayerType *player_ptr, bool immune, MonsterAuraType aura_flag, dam_func dam_func, concptr message)
{
auto *r_ptr = &r_info[m_ptr->r_idx];
if (r_ptr->aura_flags.has_not(aura_flag) || immune) {
* @param m_ptr オーラを持つモンスターの構造体参照ポインタ
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void touch_zap_player(monster_type *m_ptr, player_type *player_ptr)
+void touch_zap_player(monster_type *m_ptr, PlayerType *player_ptr)
{
process_aura_damage(m_ptr, player_ptr, has_immune_fire(player_ptr) != 0, MonsterAuraType::FIRE, fire_dam, _("突然とても熱くなった!", "You are suddenly very hot!"));
process_aura_damage(m_ptr, player_ptr, has_immune_cold(player_ptr) != 0, MonsterAuraType::COLD, cold_dam, _("突然とても寒くなった!", "You are suddenly very cold!"));
#define DAMAGE_USELIFE 6
struct monster_type;
-struct player_type;
-int take_hit(player_type *player_ptr, int damage_type, HIT_POINT damage, concptr kb_str);
-HIT_POINT acid_dam(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
-HIT_POINT elec_dam(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
-HIT_POINT fire_dam(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
-HIT_POINT cold_dam(player_type *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
-void touch_zap_player(monster_type *m_ptr, player_type *player_ptr);
+class PlayerType;
+int take_hit(PlayerType *player_ptr, int damage_type, HIT_POINT damage, concptr kb_str);
+HIT_POINT acid_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
+HIT_POINT elec_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
+HIT_POINT fire_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
+HIT_POINT cold_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
+void touch_zap_player(monster_type *m_ptr, PlayerType *player_ptr);
* @param y 対象となるマスのY座標
* @param x 対象となるマスのX座標
*/
-static void discover_hidden_things(player_type *player_ptr, POSITION y, POSITION x)
+static void discover_hidden_things(PlayerType *player_ptr, POSITION y, POSITION x)
{
grid_type *g_ptr;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* @brief プレイヤーの探索処理判定
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void search(player_type *player_ptr)
+void search(PlayerType *player_ptr)
{
PERCENTAGE chance = player_ptr->skill_srh;
if (player_ptr->blind || no_lite(player_ptr))
* @param mpe_mode 移動オプションフラグ
* @return プレイヤーが死亡やフロア離脱を行わず、実際に移動が可能ならばTRUEを返す。
*/
-bool move_player_effect(player_type *player_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
+bool move_player_effect(PlayerType *player_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
{
POSITION oy = player_ptr->y;
POSITION ox = player_ptr->x;
* @param feat 地形ID
* @return トラップが自動的に無効ならばTRUEを返す
*/
-bool trap_can_be_ignored(player_type *player_ptr, FEAT_IDX feat)
+bool trap_can_be_ignored(PlayerType *player_ptr, FEAT_IDX feat)
{
feature_type *f_ptr = &f_info[feat];
if (f_ptr->flags.has_not(FloorFeatureType::TRAP))
extern POSITION temp2_x[MAX_SHORT];
extern POSITION temp2_y[MAX_SHORT];
-struct player_type;
-bool move_player_effect(player_type *player_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode);
-bool trap_can_be_ignored(player_type *player_ptr, FEAT_IDX feat);
-void search(player_type *player_ptr);
+class PlayerType;
+bool move_player_effect(PlayerType *player_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode);
+bool trap_can_be_ignored(PlayerType *player_ptr, FEAT_IDX feat);
+void search(PlayerType *player_ptr);
(CH_NONE), /* Elementalist */
};
-ItemKindType get_realm1_book(player_type *player_ptr)
+ItemKindType get_realm1_book(PlayerType *player_ptr)
{
return ItemKindType::LIFE_BOOK + player_ptr->realm1 - 1;
}
-ItemKindType get_realm2_book(player_type *player_ptr)
+ItemKindType get_realm2_book(PlayerType *player_ptr)
{
return ItemKindType::LIFE_BOOK + player_ptr->realm2 - 1;
}
extern const std::vector<BIT_FLAGS> realm_choices1;
extern const std::vector<BIT_FLAGS> realm_choices2;
-struct player_type;
+class PlayerType;
enum class ItemKindType : short;
-ItemKindType get_realm1_book(player_type *player_ptr);
-ItemKindType get_realm2_book(player_type *player_ptr);
+ItemKindType get_realm1_book(PlayerType *player_ptr);
+ItemKindType get_realm2_book(PlayerType *player_ptr);
using GainAmountList = std::array<int, enum2i(PlayerSkillRank::MASTER)>;
-void gain_attack_skill_exp(player_type *player_ptr, short &exp, const GainAmountList &gain_amount_list)
+void gain_attack_skill_exp(PlayerType *player_ptr, short &exp, const GainAmountList &gain_amount_list)
{
auto gain_amount = 0;
auto calc_gain_amount = [&gain_amount_list, exp](PlayerSkillRank rank, int next_rank_exp) {
set_bits(player_ptr->update, PU_BONUS);
}
-void gain_spell_skill_exp_aux(player_type *player_ptr, short &exp, const GainAmountList &gain_amount_list, int spell_level)
+void gain_spell_skill_exp_aux(PlayerType *player_ptr, short &exp, const GainAmountList &gain_amount_list, int spell_level)
{
const auto dlev = player_ptr->current_floor_ptr->dun_level;
const auto plev = player_ptr->lev;
}
-PlayerSkill::PlayerSkill(player_type *player_ptr)
+PlayerSkill::PlayerSkill(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
struct monster_race;
struct object_type;
-struct player_type;
+class PlayerType;
class PlayerSkill {
public:
- PlayerSkill(player_type *player_ptr);
+ PlayerSkill(PlayerType *player_ptr);
static SUB_EXP weapon_exp_at(PlayerSkillRank rank);
static SUB_EXP spell_exp_at(PlayerSkillRank rank);
EXP exp_of_spell(int realm, int spell_idx) const;
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* @param tr_flag 特性フラグ
* @return tr_flag が得られる要因となるフラグの集合
*/
-BIT_FLAGS common_cause_flags(player_type *player_ptr, tr_type tr_flag)
+BIT_FLAGS common_cause_flags(PlayerType *player_ptr, tr_type tr_flag)
{
BIT_FLAGS result = check_equipment_flags(player_ptr, tr_flag);
/*!
* @brief 装備による所定の特性フラグを得ているかを一括して取得する関数。
*/
-BIT_FLAGS check_equipment_flags(player_type *player_ptr, tr_type tr_flag)
+BIT_FLAGS check_equipment_flags(PlayerType *player_ptr, tr_type tr_flag)
{
object_type *o_ptr;
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS player_flags_brand_pois(player_type *player_ptr)
+BIT_FLAGS player_flags_brand_pois(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_BRAND_POIS);
return result;
}
-BIT_FLAGS player_flags_brand_acid(player_type *player_ptr)
+BIT_FLAGS player_flags_brand_acid(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_BRAND_ACID);
return result;
}
-BIT_FLAGS player_flags_brand_elec(player_type *player_ptr)
+BIT_FLAGS player_flags_brand_elec(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_BRAND_ELEC);
return result;
}
-BIT_FLAGS player_flags_brand_fire(player_type *player_ptr)
+BIT_FLAGS player_flags_brand_fire(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_BRAND_FIRE);
return result;
}
-BIT_FLAGS player_flags_brand_cold(player_type *player_ptr)
+BIT_FLAGS player_flags_brand_cold(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_BRAND_COLD);
* @param player_ptr プレイヤーへの参照ポインタ
* @param tr_flag 要求する装備フラグ
*/
-BIT_FLAGS get_player_flags(player_type *player_ptr, tr_type tr_flag)
+BIT_FLAGS get_player_flags(PlayerType *player_ptr, tr_type tr_flag)
{
switch (tr_flag) {
case TR_STR:
/*!
* @brief プレイヤーが壁破壊進行を持っているかを返す。
*/
-bool has_kill_wall(player_type *player_ptr)
+bool has_kill_wall(PlayerType *player_ptr)
{
if (player_ptr->mimic_form == MIMIC_DEMON_LORD || music_singing(player_ptr, MUSIC_WALL)) {
return true;
* * 時限で幽体化、壁抜けをもつか種族幽霊ならばひとまずTRUE。
* * 但し騎乗中は乗騎が壁抜けを持っていなければ不能になる。
*/
-bool has_pass_wall(player_type *player_ptr)
+bool has_pass_wall(PlayerType *player_ptr)
{
bool pow = false;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_xtra_might(player_type *player_ptr)
+BIT_FLAGS has_xtra_might(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_XTRA_MIGHT);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_evil(player_type *player_ptr)
+BIT_FLAGS has_esp_evil(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_ESP_EVIL);
if (player_ptr->realm1 == REALM_HEX) {
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_animal(player_type *player_ptr)
+BIT_FLAGS has_esp_animal(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_ANIMAL);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_undead(player_type *player_ptr)
+BIT_FLAGS has_esp_undead(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_UNDEAD);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_demon(player_type *player_ptr)
+BIT_FLAGS has_esp_demon(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_DEMON);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_orc(player_type *player_ptr)
+BIT_FLAGS has_esp_orc(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_ORC);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_troll(player_type *player_ptr)
+BIT_FLAGS has_esp_troll(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_TROLL);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_giant(player_type *player_ptr)
+BIT_FLAGS has_esp_giant(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_GIANT);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_dragon(player_type *player_ptr)
+BIT_FLAGS has_esp_dragon(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_DRAGON);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_human(player_type *player_ptr)
+BIT_FLAGS has_esp_human(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_HUMAN);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_good(player_type *player_ptr)
+BIT_FLAGS has_esp_good(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_GOOD);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_nonliving(player_type *player_ptr)
+BIT_FLAGS has_esp_nonliving(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_NONLIVING);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_unique(player_type *player_ptr)
+BIT_FLAGS has_esp_unique(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_ESP_UNIQUE);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 持っていたら所持前提ビットフラグを返す。
*/
-BIT_FLAGS has_esp_telepathy(player_type *player_ptr)
+BIT_FLAGS has_esp_telepathy(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_TELEPATHY);
return result;
}
-BIT_FLAGS has_bless_blade(player_type *player_ptr)
+BIT_FLAGS has_bless_blade(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_BLESSED);
}
-BIT_FLAGS has_easy2_weapon(player_type *player_ptr)
+BIT_FLAGS has_easy2_weapon(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_EASY2_WEAPON);
}
-BIT_FLAGS has_down_saving(player_type *player_ptr)
+BIT_FLAGS has_down_saving(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_DOWN_SAVING);
}
-BIT_FLAGS has_no_ac(player_type *player_ptr)
+BIT_FLAGS has_no_ac(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_NO_AC);
}
-BIT_FLAGS has_invuln_arrow(player_type *player_ptr)
+BIT_FLAGS has_invuln_arrow(PlayerType *player_ptr)
{
if (player_ptr->blind)
return 0;
return common_cause_flags(player_ptr, TR_INVULN_ARROW);
}
-void check_no_flowed(player_type *player_ptr)
+void check_no_flowed(PlayerType *player_ptr)
{
object_type *o_ptr;
bool has_sw = false, has_kabe = false;
}
}
-BIT_FLAGS has_mighty_throw(player_type *player_ptr)
+BIT_FLAGS has_mighty_throw(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_MIGHTY_THROW);
}
-BIT_FLAGS has_dec_mana(player_type *player_ptr)
+BIT_FLAGS has_dec_mana(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_DEC_MANA);
}
-BIT_FLAGS has_reflect(player_type *player_ptr)
+BIT_FLAGS has_reflect(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_REFLECT);
return result;
}
-BIT_FLAGS has_see_nocto(player_type *player_ptr)
+BIT_FLAGS has_see_nocto(PlayerType *player_ptr)
{
return (player_ptr->pclass == PlayerClassType::NINJA) ? FLAG_CAUSE_CLASS : FLAG_CAUSE_NONE;
}
-BIT_FLAGS has_warning(player_type *player_ptr)
+BIT_FLAGS has_warning(PlayerType *player_ptr)
{
BIT_FLAGS result = 0L;
object_type *o_ptr;
return result;
}
-BIT_FLAGS has_anti_magic(player_type *player_ptr)
+BIT_FLAGS has_anti_magic(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_NO_MAGIC);
}
-BIT_FLAGS has_anti_tele(player_type *player_ptr)
+BIT_FLAGS has_anti_tele(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_NO_TELE);
}
-BIT_FLAGS has_sh_fire(player_type *player_ptr)
+BIT_FLAGS has_sh_fire(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SH_FIRE);
return result;
}
-BIT_FLAGS has_sh_elec(player_type *player_ptr)
+BIT_FLAGS has_sh_elec(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SH_ELEC);
return result;
}
-BIT_FLAGS has_sh_cold(player_type *player_ptr)
+BIT_FLAGS has_sh_cold(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SH_COLD);
return result;
}
-BIT_FLAGS has_easy_spell(player_type *player_ptr)
+BIT_FLAGS has_easy_spell(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_EASY_SPELL);
}
-BIT_FLAGS has_heavy_spell(player_type *player_ptr)
+BIT_FLAGS has_heavy_spell(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_HEAVY_SPELL);
}
-BIT_FLAGS has_hold_exp(player_type *player_ptr)
+BIT_FLAGS has_hold_exp(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_HOLD_EXP);
return result;
}
-BIT_FLAGS has_see_inv(player_type *player_ptr)
+BIT_FLAGS has_see_inv(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SEE_INVIS);
return result;
}
-BIT_FLAGS has_magic_mastery(player_type *player_ptr)
+BIT_FLAGS has_magic_mastery(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_MAGIC_MASTERY);
}
-BIT_FLAGS has_free_act(player_type *player_ptr)
+BIT_FLAGS has_free_act(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_FREE_ACT);
return result;
}
-BIT_FLAGS has_sustain_str(player_type *player_ptr)
+BIT_FLAGS has_sustain_str(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SUST_STR);
return result;
}
-BIT_FLAGS has_sustain_int(player_type *player_ptr)
+BIT_FLAGS has_sustain_int(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SUST_INT);
return result;
}
-BIT_FLAGS has_sustain_wis(player_type *player_ptr)
+BIT_FLAGS has_sustain_wis(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SUST_WIS);
return result;
}
-BIT_FLAGS has_sustain_dex(player_type *player_ptr)
+BIT_FLAGS has_sustain_dex(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SUST_DEX);
return result;
}
-BIT_FLAGS has_sustain_con(player_type *player_ptr)
+BIT_FLAGS has_sustain_con(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SUST_CON);
return result;
}
-BIT_FLAGS has_sustain_chr(player_type *player_ptr)
+BIT_FLAGS has_sustain_chr(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SUST_CHR);
return result;
}
-BIT_FLAGS has_levitation(player_type *player_ptr)
+BIT_FLAGS has_levitation(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_LEVITATION);
return result;
}
-bool has_can_swim(player_type *player_ptr)
+bool has_can_swim(PlayerType *player_ptr)
{
bool can_swim = false;
if (player_ptr->riding) {
return can_swim;
}
-BIT_FLAGS has_slow_digest(player_type *player_ptr)
+BIT_FLAGS has_slow_digest(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_SLOW_DIGEST);
return result;
}
-BIT_FLAGS has_regenerate(player_type *player_ptr)
+BIT_FLAGS has_regenerate(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_REGEN);
return result;
}
-void update_curses(player_type *player_ptr)
+void update_curses(PlayerType *player_ptr)
{
object_type *o_ptr;
player_ptr->cursed.clear();
player_ptr->cursed_special.reset(CurseSpecialTraitType::TELEPORT_SELF);
}
-BIT_FLAGS has_impact(player_type *player_ptr)
+BIT_FLAGS has_impact(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_IMPACT);
}
-BIT_FLAGS has_earthquake(player_type *player_ptr)
+BIT_FLAGS has_earthquake(PlayerType *player_ptr)
{
return common_cause_flags(player_ptr, TR_EARTHQUAKE);
}
-void update_extra_blows(player_type *player_ptr)
+void update_extra_blows(PlayerType *player_ptr)
{
object_type *o_ptr;
player_ptr->extra_blows[0] = player_ptr->extra_blows[1] = 0;
}
}
-BIT_FLAGS has_resist_acid(player_type *player_ptr)
+BIT_FLAGS has_resist_acid(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_ACID);
return result;
}
-BIT_FLAGS has_vuln_acid(player_type *player_ptr)
+BIT_FLAGS has_vuln_acid(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_VUL_ACID);
return result;
}
-BIT_FLAGS has_resist_elec(player_type *player_ptr)
+BIT_FLAGS has_resist_elec(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_ELEC);
return result;
}
-BIT_FLAGS has_vuln_elec(player_type *player_ptr)
+BIT_FLAGS has_vuln_elec(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_VUL_ELEC);
return result;
}
-BIT_FLAGS has_resist_fire(player_type *player_ptr)
+BIT_FLAGS has_resist_fire(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_FIRE);
return result;
}
-BIT_FLAGS has_vuln_fire(player_type *player_ptr)
+BIT_FLAGS has_vuln_fire(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_VUL_FIRE);
return result;
}
-BIT_FLAGS has_resist_cold(player_type *player_ptr)
+BIT_FLAGS has_resist_cold(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_COLD);
return result;
}
-BIT_FLAGS has_vuln_cold(player_type *player_ptr)
+BIT_FLAGS has_vuln_cold(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_VUL_COLD);
return result;
}
-BIT_FLAGS has_resist_pois(player_type *player_ptr)
+BIT_FLAGS has_resist_pois(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_POIS);
return result;
}
-BIT_FLAGS has_resist_conf(player_type *player_ptr)
+BIT_FLAGS has_resist_conf(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_CONF);
return result;
}
-BIT_FLAGS has_resist_sound(player_type *player_ptr)
+BIT_FLAGS has_resist_sound(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_SOUND);
return result;
}
-BIT_FLAGS has_resist_lite(player_type *player_ptr)
+BIT_FLAGS has_resist_lite(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_LITE);
return result;
}
-BIT_FLAGS has_vuln_lite(player_type *player_ptr)
+BIT_FLAGS has_vuln_lite(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_VUL_LITE);
return result;
}
-BIT_FLAGS has_resist_dark(player_type *player_ptr)
+BIT_FLAGS has_resist_dark(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_DARK);
return result;
}
-BIT_FLAGS has_resist_chaos(player_type *player_ptr)
+BIT_FLAGS has_resist_chaos(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_CHAOS);
return result;
}
-BIT_FLAGS has_resist_disen(player_type *player_ptr)
+BIT_FLAGS has_resist_disen(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_DISEN);
return result;
}
-BIT_FLAGS has_resist_shard(player_type *player_ptr)
+BIT_FLAGS has_resist_shard(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_SHARDS);
return result;
}
-BIT_FLAGS has_resist_nexus(player_type *player_ptr)
+BIT_FLAGS has_resist_nexus(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_NEXUS);
return result;
}
-BIT_FLAGS has_resist_blind(player_type *player_ptr)
+BIT_FLAGS has_resist_blind(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_BLIND);
return result;
}
-BIT_FLAGS has_resist_neth(player_type *player_ptr)
+BIT_FLAGS has_resist_neth(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_NETHER);
return result;
}
-BIT_FLAGS has_resist_time(player_type *player_ptr)
+BIT_FLAGS has_resist_time(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_TIME);
return result;
}
-BIT_FLAGS has_resist_water(player_type *player_ptr)
+BIT_FLAGS has_resist_water(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_WATER);
* @param プレイヤー情報への参照ポインタ
* @return 呪力耐性を所持していればTRUE、なければFALSE
*/
-BIT_FLAGS has_resist_curse(player_type *player_ptr)
+BIT_FLAGS has_resist_curse(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_CURSE);
return result;
}
-BIT_FLAGS has_resist_fear(player_type *player_ptr)
+BIT_FLAGS has_resist_fear(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_RES_FEAR);
return result;
}
-BIT_FLAGS has_immune_acid(player_type *player_ptr)
+BIT_FLAGS has_immune_acid(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_IM_ACID);
return result;
}
-BIT_FLAGS has_immune_elec(player_type *player_ptr)
+BIT_FLAGS has_immune_elec(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_IM_ELEC);
return result;
}
-BIT_FLAGS has_immune_fire(player_type *player_ptr)
+BIT_FLAGS has_immune_fire(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_IM_FIRE);
return result;
}
-BIT_FLAGS has_immune_cold(player_type *player_ptr)
+BIT_FLAGS has_immune_cold(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_IM_COLD);
return result;
}
-BIT_FLAGS has_immune_dark(player_type *player_ptr)
+BIT_FLAGS has_immune_dark(PlayerType *player_ptr)
{
BIT_FLAGS result = common_cause_flags(player_ptr, TR_IM_DARK);
return result;
}
-melee_type player_melee_type(player_type *player_ptr)
+melee_type player_melee_type(PlayerType *player_ptr)
{
if (has_two_handed_weapons(player_ptr))
return MELEE_TYPE_WEAPON_TWOHAND;
* 利き手が素手かつ左手も素手もしくは盾を装備している事を意味する。
* @details Includes martial arts and hand combats as weapons.
*/
-bool can_attack_with_main_hand(player_type *player_ptr)
+bool can_attack_with_main_hand(PlayerType *player_ptr)
{
if (has_melee_weapon(player_ptr, INVEN_MAIN_HAND))
return true;
* 非利き手で攻撃可能とは、非利き手に武器を持っている事に等しい
* @details Exclude martial arts and hand combats from weapons.
*/
-bool can_attack_with_sub_hand(player_type *player_ptr)
+bool can_attack_with_sub_hand(PlayerType *player_ptr)
{
return has_melee_weapon(player_ptr, INVEN_SUB_HAND);
}
/*
* @brief 両手持ち状態かどうかを判定する
*/
-bool has_two_handed_weapons(player_type *player_ptr)
+bool has_two_handed_weapons(PlayerType *player_ptr)
{
if (can_two_hands_wielding(player_ptr)) {
if (can_attack_with_main_hand(player_ptr) && (empty_hands(player_ptr, false) == EMPTY_HAND_SUB)
return false;
}
-BIT_FLAGS has_lite(player_type *player_ptr)
+BIT_FLAGS has_lite(PlayerType *player_ptr)
{
BIT_FLAGS result = 0L;
if (player_ptr->pclass == PlayerClassType::NINJA)
* Only can get hit bonuses when wieids an enough light weapon which is lighter than 5 times of weight limit.
* If its weight is 10 times heavier or more than weight limit, gets hit penalty in calc_to_hit().
*/
-bool has_disable_two_handed_bonus(player_type *player_ptr, int i)
+bool has_disable_two_handed_bonus(PlayerType *player_ptr, int i)
{
if (has_melee_weapon(player_ptr, INVEN_MAIN_HAND + i) && has_two_handed_weapons(player_ptr)) {
object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + i];
* @brief ふさわしくない武器を持っているかどうかを返す。
* @todo 相応しい時にFALSEで相応しくない時にTRUEという負論理は良くない、後で修正する
*/
-bool is_wielding_icky_weapon(player_type *player_ptr, int i)
+bool is_wielding_icky_weapon(PlayerType *player_ptr, int i)
{
auto *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + i];
auto flgs = object_flags(o_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param i 武器を持っている手。0ならば利き手、1ならば反対の手
*/
-bool is_wielding_icky_riding_weapon(player_type *player_ptr, int i)
+bool is_wielding_icky_riding_weapon(PlayerType *player_ptr, int i)
{
auto *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + i];
auto flgs = object_flags(o_ptr);
return (player_ptr->riding > 0) && !has_no_weapon && !is_suitable;
}
-bool has_not_ninja_weapon(player_type *player_ptr, int i)
+bool has_not_ninja_weapon(PlayerType *player_ptr, int i)
{
if (!has_melee_weapon(player_ptr, INVEN_MAIN_HAND + i)) {
return false;
(player_ptr->inventory_list[INVEN_SUB_HAND - i].tval != ItemKindType::SHIELD));
}
-bool has_not_monk_weapon(player_type *player_ptr, int i)
+bool has_not_monk_weapon(PlayerType *player_ptr, int i)
{
if (!has_melee_weapon(player_ptr, INVEN_MAIN_HAND + i)) {
return false;
return ((player_ptr->pclass == PlayerClassType::MONK) || (player_ptr->pclass == PlayerClassType::FORCETRAINER)) && !(s_info[enum2i(player_ptr->pclass)].w_max[tval][sval]);
}
-bool has_good_luck(player_type *player_ptr)
+bool has_good_luck(PlayerType *player_ptr)
{
return (player_ptr->ppersonality == PERSONALITY_LUCKY) || (player_ptr->muta.has(PlayerMutationType::GOOD_LUCK));
}
-BIT_FLAGS player_aggravate_state(player_type *player_ptr)
+BIT_FLAGS player_aggravate_state(PlayerType *player_ptr)
{
if (player_ptr->cursed.has(CurseTraitType::AGGRAVATE)) {
if ((PlayerRace(player_ptr).equals(PlayerRaceType::S_FAIRY)) && (player_ptr->ppersonality != PERSONALITY_SEXY)) {
return AGGRAVATE_NONE;
}
-bool has_aggravate(player_type *player_ptr)
+bool has_aggravate(PlayerType *player_ptr)
{
return player_aggravate_state(player_ptr) == AGGRAVATE_NORMAL;
}
AGGRAVATE_NORMAL = 0x00000002L,
};
-struct player_type;
+class PlayerType;
BIT_FLAGS convert_inventory_slot_type_to_flag_cause(inventory_slot_type inventory_slot);
-BIT_FLAGS check_equipment_flags(player_type *player_ptr, tr_type tr_flag);
-BIT_FLAGS get_player_flags(player_type *player_ptr, tr_type tr_flag);
-bool has_pass_wall(player_type *player_ptr);
-bool has_kill_wall(player_type *player_ptr);
-BIT_FLAGS has_xtra_might(player_type *player_ptr);
-BIT_FLAGS has_esp_evil(player_type *player_ptr);
-BIT_FLAGS has_esp_animal(player_type *player_ptr);
-BIT_FLAGS has_esp_undead(player_type *player_ptr);
-BIT_FLAGS has_esp_demon(player_type *player_ptr);
-BIT_FLAGS has_esp_orc(player_type *player_ptr);
-BIT_FLAGS has_esp_troll(player_type *player_ptr);
-BIT_FLAGS has_esp_giant(player_type *player_ptr);
-BIT_FLAGS has_esp_dragon(player_type *player_ptr);
-BIT_FLAGS has_esp_human(player_type *player_ptr);
-BIT_FLAGS has_esp_good(player_type *player_ptr);
-BIT_FLAGS has_esp_nonliving(player_type *player_ptr);
-BIT_FLAGS has_esp_unique(player_type *player_ptr);
-BIT_FLAGS has_esp_telepathy(player_type *player_ptr);
-BIT_FLAGS has_bless_blade(player_type *player_ptr);
-BIT_FLAGS has_easy2_weapon(player_type *player_ptr);
-BIT_FLAGS has_down_saving(player_type *player_ptr);
-BIT_FLAGS has_no_ac(player_type *player_ptr);
-BIT_FLAGS has_invuln_arrow(player_type *player_ptr);
-void check_no_flowed(player_type *player_ptr);
-BIT_FLAGS has_mighty_throw(player_type *player_ptr);
-BIT_FLAGS has_dec_mana(player_type *player_ptr);
-BIT_FLAGS has_reflect(player_type *player_ptr);
-BIT_FLAGS has_see_nocto(player_type *player_ptr);
-BIT_FLAGS has_warning(player_type *player_ptr);
-BIT_FLAGS has_anti_magic(player_type *player_ptr);
-BIT_FLAGS has_anti_tele(player_type *player_ptr);
-BIT_FLAGS has_sh_fire(player_type *player_ptr);
-BIT_FLAGS has_sh_elec(player_type *player_ptr);
-BIT_FLAGS has_sh_cold(player_type *player_ptr);
-BIT_FLAGS has_easy_spell(player_type *player_ptr);
-BIT_FLAGS has_heavy_spell(player_type *player_ptr);
-BIT_FLAGS has_hold_exp(player_type *player_ptr);
-BIT_FLAGS has_see_inv(player_type *player_ptr);
-BIT_FLAGS has_magic_mastery(player_type *player_ptr);
-BIT_FLAGS has_free_act(player_type *player_ptr);
-BIT_FLAGS has_sustain_str(player_type *player_ptr);
-BIT_FLAGS has_sustain_int(player_type *player_ptr);
-BIT_FLAGS has_sustain_wis(player_type *player_ptr);
-BIT_FLAGS has_sustain_dex(player_type *player_ptr);
-BIT_FLAGS has_sustain_con(player_type *player_ptr);
-BIT_FLAGS has_sustain_chr(player_type *player_ptr);
-BIT_FLAGS has_levitation(player_type *player_ptr);
-bool has_can_swim(player_type *player_ptr);
-BIT_FLAGS has_slow_digest(player_type *player_ptr);
-BIT_FLAGS has_regenerate(player_type *player_ptr);
-void update_curses(player_type *player_ptr);
-BIT_FLAGS has_impact(player_type *player_ptr);
-BIT_FLAGS has_earthquake(player_type *player_ptr);
-void update_extra_blows(player_type *player_ptr);
-BIT_FLAGS has_resist_acid(player_type *player_ptr);
-BIT_FLAGS has_vuln_acid(player_type *player_ptr);
-BIT_FLAGS has_resist_elec(player_type *player_ptr);
-BIT_FLAGS has_vuln_elec(player_type *player_ptr);
-BIT_FLAGS has_resist_fire(player_type *player_ptr);
-BIT_FLAGS has_vuln_fire(player_type *player_ptr);
-BIT_FLAGS has_resist_cold(player_type *player_ptr);
-BIT_FLAGS has_vuln_cold(player_type *player_ptr);
-BIT_FLAGS has_resist_pois(player_type *player_ptr);
-BIT_FLAGS has_resist_conf(player_type *player_ptr);
-BIT_FLAGS has_resist_sound(player_type *player_ptr);
-BIT_FLAGS has_resist_lite(player_type *player_ptr);
-BIT_FLAGS has_vuln_lite(player_type *player_ptr);
-BIT_FLAGS has_resist_dark(player_type *player_ptr);
-BIT_FLAGS has_resist_chaos(player_type *player_ptr);
-BIT_FLAGS has_resist_disen(player_type *player_ptr);
-BIT_FLAGS has_resist_shard(player_type *player_ptr);
-BIT_FLAGS has_resist_nexus(player_type *player_ptr);
-BIT_FLAGS has_resist_blind(player_type *player_ptr);
-BIT_FLAGS has_resist_neth(player_type *player_ptr);
-BIT_FLAGS has_resist_time(player_type *player_ptr);
-BIT_FLAGS has_resist_water(player_type *player_ptr);
-BIT_FLAGS has_resist_curse(player_type *player_ptr);
-BIT_FLAGS has_resist_fear(player_type *player_ptr);
-BIT_FLAGS has_immune_acid(player_type *player_ptr);
-BIT_FLAGS has_immune_elec(player_type *player_ptr);
-BIT_FLAGS has_immune_fire(player_type *player_ptr);
-BIT_FLAGS has_immune_cold(player_type *player_ptr);
-BIT_FLAGS has_immune_dark(player_type *player_ptr);
-bool can_attack_with_main_hand(player_type *player_ptr);
-bool can_attack_with_sub_hand(player_type *player_ptr);
-bool has_two_handed_weapons(player_type *player_ptr);
-BIT_FLAGS has_lite(player_type *player_ptr);
-bool has_disable_two_handed_bonus(player_type *player_ptr, int i);
-bool has_not_ninja_weapon(player_type *player_ptr, int i);
-bool has_not_monk_weapon(player_type *player_ptr, int i);
-bool is_wielding_icky_weapon(player_type *player_ptr, int i);
-bool is_wielding_icky_riding_weapon(player_type *player_ptr, int i);
-bool has_good_luck(player_type *player_ptr);
-BIT_FLAGS player_aggravate_state(player_type *player_ptr);
-melee_type player_melee_type(player_type *player_ptr);
-bool has_aggravate(player_type *player_ptr);
+BIT_FLAGS check_equipment_flags(PlayerType *player_ptr, tr_type tr_flag);
+BIT_FLAGS get_player_flags(PlayerType *player_ptr, tr_type tr_flag);
+bool has_pass_wall(PlayerType *player_ptr);
+bool has_kill_wall(PlayerType *player_ptr);
+BIT_FLAGS has_xtra_might(PlayerType *player_ptr);
+BIT_FLAGS has_esp_evil(PlayerType *player_ptr);
+BIT_FLAGS has_esp_animal(PlayerType *player_ptr);
+BIT_FLAGS has_esp_undead(PlayerType *player_ptr);
+BIT_FLAGS has_esp_demon(PlayerType *player_ptr);
+BIT_FLAGS has_esp_orc(PlayerType *player_ptr);
+BIT_FLAGS has_esp_troll(PlayerType *player_ptr);
+BIT_FLAGS has_esp_giant(PlayerType *player_ptr);
+BIT_FLAGS has_esp_dragon(PlayerType *player_ptr);
+BIT_FLAGS has_esp_human(PlayerType *player_ptr);
+BIT_FLAGS has_esp_good(PlayerType *player_ptr);
+BIT_FLAGS has_esp_nonliving(PlayerType *player_ptr);
+BIT_FLAGS has_esp_unique(PlayerType *player_ptr);
+BIT_FLAGS has_esp_telepathy(PlayerType *player_ptr);
+BIT_FLAGS has_bless_blade(PlayerType *player_ptr);
+BIT_FLAGS has_easy2_weapon(PlayerType *player_ptr);
+BIT_FLAGS has_down_saving(PlayerType *player_ptr);
+BIT_FLAGS has_no_ac(PlayerType *player_ptr);
+BIT_FLAGS has_invuln_arrow(PlayerType *player_ptr);
+void check_no_flowed(PlayerType *player_ptr);
+BIT_FLAGS has_mighty_throw(PlayerType *player_ptr);
+BIT_FLAGS has_dec_mana(PlayerType *player_ptr);
+BIT_FLAGS has_reflect(PlayerType *player_ptr);
+BIT_FLAGS has_see_nocto(PlayerType *player_ptr);
+BIT_FLAGS has_warning(PlayerType *player_ptr);
+BIT_FLAGS has_anti_magic(PlayerType *player_ptr);
+BIT_FLAGS has_anti_tele(PlayerType *player_ptr);
+BIT_FLAGS has_sh_fire(PlayerType *player_ptr);
+BIT_FLAGS has_sh_elec(PlayerType *player_ptr);
+BIT_FLAGS has_sh_cold(PlayerType *player_ptr);
+BIT_FLAGS has_easy_spell(PlayerType *player_ptr);
+BIT_FLAGS has_heavy_spell(PlayerType *player_ptr);
+BIT_FLAGS has_hold_exp(PlayerType *player_ptr);
+BIT_FLAGS has_see_inv(PlayerType *player_ptr);
+BIT_FLAGS has_magic_mastery(PlayerType *player_ptr);
+BIT_FLAGS has_free_act(PlayerType *player_ptr);
+BIT_FLAGS has_sustain_str(PlayerType *player_ptr);
+BIT_FLAGS has_sustain_int(PlayerType *player_ptr);
+BIT_FLAGS has_sustain_wis(PlayerType *player_ptr);
+BIT_FLAGS has_sustain_dex(PlayerType *player_ptr);
+BIT_FLAGS has_sustain_con(PlayerType *player_ptr);
+BIT_FLAGS has_sustain_chr(PlayerType *player_ptr);
+BIT_FLAGS has_levitation(PlayerType *player_ptr);
+bool has_can_swim(PlayerType *player_ptr);
+BIT_FLAGS has_slow_digest(PlayerType *player_ptr);
+BIT_FLAGS has_regenerate(PlayerType *player_ptr);
+void update_curses(PlayerType *player_ptr);
+BIT_FLAGS has_impact(PlayerType *player_ptr);
+BIT_FLAGS has_earthquake(PlayerType *player_ptr);
+void update_extra_blows(PlayerType *player_ptr);
+BIT_FLAGS has_resist_acid(PlayerType *player_ptr);
+BIT_FLAGS has_vuln_acid(PlayerType *player_ptr);
+BIT_FLAGS has_resist_elec(PlayerType *player_ptr);
+BIT_FLAGS has_vuln_elec(PlayerType *player_ptr);
+BIT_FLAGS has_resist_fire(PlayerType *player_ptr);
+BIT_FLAGS has_vuln_fire(PlayerType *player_ptr);
+BIT_FLAGS has_resist_cold(PlayerType *player_ptr);
+BIT_FLAGS has_vuln_cold(PlayerType *player_ptr);
+BIT_FLAGS has_resist_pois(PlayerType *player_ptr);
+BIT_FLAGS has_resist_conf(PlayerType *player_ptr);
+BIT_FLAGS has_resist_sound(PlayerType *player_ptr);
+BIT_FLAGS has_resist_lite(PlayerType *player_ptr);
+BIT_FLAGS has_vuln_lite(PlayerType *player_ptr);
+BIT_FLAGS has_resist_dark(PlayerType *player_ptr);
+BIT_FLAGS has_resist_chaos(PlayerType *player_ptr);
+BIT_FLAGS has_resist_disen(PlayerType *player_ptr);
+BIT_FLAGS has_resist_shard(PlayerType *player_ptr);
+BIT_FLAGS has_resist_nexus(PlayerType *player_ptr);
+BIT_FLAGS has_resist_blind(PlayerType *player_ptr);
+BIT_FLAGS has_resist_neth(PlayerType *player_ptr);
+BIT_FLAGS has_resist_time(PlayerType *player_ptr);
+BIT_FLAGS has_resist_water(PlayerType *player_ptr);
+BIT_FLAGS has_resist_curse(PlayerType *player_ptr);
+BIT_FLAGS has_resist_fear(PlayerType *player_ptr);
+BIT_FLAGS has_immune_acid(PlayerType *player_ptr);
+BIT_FLAGS has_immune_elec(PlayerType *player_ptr);
+BIT_FLAGS has_immune_fire(PlayerType *player_ptr);
+BIT_FLAGS has_immune_cold(PlayerType *player_ptr);
+BIT_FLAGS has_immune_dark(PlayerType *player_ptr);
+bool can_attack_with_main_hand(PlayerType *player_ptr);
+bool can_attack_with_sub_hand(PlayerType *player_ptr);
+bool has_two_handed_weapons(PlayerType *player_ptr);
+BIT_FLAGS has_lite(PlayerType *player_ptr);
+bool has_disable_two_handed_bonus(PlayerType *player_ptr, int i);
+bool has_not_ninja_weapon(PlayerType *player_ptr, int i);
+bool has_not_monk_weapon(PlayerType *player_ptr, int i);
+bool is_wielding_icky_weapon(PlayerType *player_ptr, int i);
+bool is_wielding_icky_riding_weapon(PlayerType *player_ptr, int i);
+bool has_good_luck(PlayerType *player_ptr);
+BIT_FLAGS player_aggravate_state(PlayerType *player_ptr);
+melee_type player_melee_type(PlayerType *player_ptr);
+bool has_aggravate(PlayerType *player_ptr);
/*!
* @brief 酸属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_acid_damage_rate(player_type *player_ptr)
+PERCENTAGE calc_acid_damage_rate(PlayerType *player_ptr)
{
PERCENTAGE per = 100;
/*!
* @brief 電撃属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_elec_damage_rate(player_type *player_ptr)
+PERCENTAGE calc_elec_damage_rate(PlayerType *player_ptr)
{
PERCENTAGE per = 100;
/*!
* @brief 火炎属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_fire_damage_rate(player_type *player_ptr)
+PERCENTAGE calc_fire_damage_rate(PlayerType *player_ptr)
{
PERCENTAGE per = 100;
BIT_FLAGS flgs = has_vuln_fire(player_ptr);
/*!
* @brief 冷気属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_cold_damage_rate(player_type *player_ptr)
+PERCENTAGE calc_cold_damage_rate(PlayerType *player_ptr)
{
PERCENTAGE per = 100;
BIT_FLAGS flgs = has_vuln_cold(player_ptr);
/*!
* @brief 毒属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_pois_damage_rate(player_type *player_ptr)
+PERCENTAGE calc_pois_damage_rate(PlayerType *player_ptr)
{
PERCENTAGE per = 100;
if (has_resist_pois(player_ptr))
/*!
* @brief 放射性廃棄物攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_nuke_damage_rate(player_type *player_ptr)
+PERCENTAGE calc_nuke_damage_rate(PlayerType *player_ptr)
{
PERCENTAGE per = 100;
/*!
* @brief 死の光線に対するダメージ倍率計算
*/
-PERCENTAGE calc_deathray_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_deathray_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
if (player_ptr->mimic_form) {
/*!
* @brief 閃光属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_lite_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_lite_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief 暗黒属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_dark_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_dark_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief 破片属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_shards_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_shards_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief 轟音属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_sound_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_sound_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief 混乱属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_conf_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_conf_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief 混沌属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_chaos_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_chaos_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief 劣化属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_disenchant_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_disenchant_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief 因果混乱属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_nexus_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_nexus_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief ロケット属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_rocket_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_rocket_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
PERCENTAGE per = 100;
/*!
* @brief 地獄属性攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_nether_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_nether_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
/*!
* @brief 時間逆転攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_time_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_time_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
PERCENTAGE per = 100;
/*!
* @brief 水流攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_water_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_water_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
PERCENTAGE per = 100;
/*!
* @brief 聖なる火炎攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_holy_fire_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_holy_fire_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
PERCENTAGE per = 100;
/*!
* @brief 地獄の火炎攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_hell_fire_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_hell_fire_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
PERCENTAGE per = 100;
/*!
* @brief 重力攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_gravity_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_gravity_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
PERCENTAGE per = 100;
/*!
* @brief 虚無攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_void_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_void_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
PERCENTAGE per = 100;
/*!
* @brief 深淵攻撃に対するダメージ倍率計算
*/
-PERCENTAGE calc_abyss_damage_rate(player_type *player_ptr, rate_calc_type_mode mode)
+PERCENTAGE calc_abyss_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode)
{
(void)mode; // unused
PERCENTAGE per = 100;
CALC_MAX = 3,
};
-struct player_type;
-PERCENTAGE calc_acid_damage_rate(player_type *player_ptr);
-PERCENTAGE calc_elec_damage_rate(player_type *player_ptr);
-PERCENTAGE calc_fire_damage_rate(player_type *player_ptr);
-PERCENTAGE calc_cold_damage_rate(player_type *player_ptr);
-PERCENTAGE calc_pois_damage_rate(player_type *player_ptr);
-PERCENTAGE calc_nuke_damage_rate(player_type *player_ptr);
-PERCENTAGE calc_lite_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_dark_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_shards_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_sound_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_conf_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_chaos_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_nether_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_disenchant_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_nexus_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_time_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_water_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_rocket_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_deathray_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_holy_fire_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_hell_fire_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_gravity_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_void_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
-PERCENTAGE calc_abyss_damage_rate(player_type *player_ptr, rate_calc_type_mode mode);
+class PlayerType;
+PERCENTAGE calc_acid_damage_rate(PlayerType *player_ptr);
+PERCENTAGE calc_elec_damage_rate(PlayerType *player_ptr);
+PERCENTAGE calc_fire_damage_rate(PlayerType *player_ptr);
+PERCENTAGE calc_cold_damage_rate(PlayerType *player_ptr);
+PERCENTAGE calc_pois_damage_rate(PlayerType *player_ptr);
+PERCENTAGE calc_nuke_damage_rate(PlayerType *player_ptr);
+PERCENTAGE calc_lite_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_dark_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_shards_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_sound_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_conf_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_chaos_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_nether_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_disenchant_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_nexus_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_time_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_water_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_rocket_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_deathray_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_holy_fire_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_hell_fire_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_gravity_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_void_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_abyss_damage_rate(PlayerType *player_ptr, rate_calc_type_mode mode);
static const int extra_magic_glove_reduce_mana = 1;
-static bool is_martial_arts_mode(player_type *player_ptr);
-
-static ACTION_SKILL_POWER calc_disarming(player_type *player_ptr);
-static ACTION_SKILL_POWER calc_device_ability(player_type *player_ptr);
-static ACTION_SKILL_POWER calc_saving_throw(player_type *player_ptr);
-static ACTION_SKILL_POWER calc_search(player_type *player_ptr);
-static ACTION_SKILL_POWER calc_search_freq(player_type *player_ptr);
-static ACTION_SKILL_POWER calc_to_hit_melee(player_type *player_ptr);
-static ACTION_SKILL_POWER calc_to_hit_shoot(player_type *player_ptr);
-static ACTION_SKILL_POWER calc_to_hit_throw(player_type *player_ptr);
-static ACTION_SKILL_POWER calc_skill_dig(player_type *player_ptr);
-static bool is_heavy_wield(player_type *player_ptr, int i);
-static int16_t calc_num_blow(player_type *player_ptr, int i);
-static int16_t calc_to_magic_chance(player_type *player_ptr);
-static ARMOUR_CLASS calc_base_ac(player_type *player_ptr);
-static ARMOUR_CLASS calc_to_ac(player_type *player_ptr, bool is_real_value);
-static int16_t calc_double_weapon_penalty(player_type *player_ptr, INVENTORY_IDX slot);
-static bool is_riding_two_hands(player_type *player_ptr);
-static int16_t calc_riding_bow_penalty(player_type *player_ptr);
-static void put_equipment_warning(player_type *player_ptr);
-
-static short calc_to_damage(player_type *player_ptr, INVENTORY_IDX slot, bool is_real_value);
-static int16_t calc_to_hit(player_type *player_ptr, INVENTORY_IDX slot, bool is_real_value);
-
-static int16_t calc_to_hit_bow(player_type *player_ptr, bool is_real_value);
-
-static int16_t calc_to_damage_misc(player_type *player_ptr);
-static int16_t calc_to_hit_misc(player_type *player_ptr);
-
-static DICE_NUMBER calc_to_weapon_dice_num(player_type *player_ptr, INVENTORY_IDX slot);
-static player_hand main_attack_hand(player_type *player_ptr);
+static bool is_martial_arts_mode(PlayerType *player_ptr);
+
+static ACTION_SKILL_POWER calc_disarming(PlayerType *player_ptr);
+static ACTION_SKILL_POWER calc_device_ability(PlayerType *player_ptr);
+static ACTION_SKILL_POWER calc_saving_throw(PlayerType *player_ptr);
+static ACTION_SKILL_POWER calc_search(PlayerType *player_ptr);
+static ACTION_SKILL_POWER calc_search_freq(PlayerType *player_ptr);
+static ACTION_SKILL_POWER calc_to_hit_melee(PlayerType *player_ptr);
+static ACTION_SKILL_POWER calc_to_hit_shoot(PlayerType *player_ptr);
+static ACTION_SKILL_POWER calc_to_hit_throw(PlayerType *player_ptr);
+static ACTION_SKILL_POWER calc_skill_dig(PlayerType *player_ptr);
+static bool is_heavy_wield(PlayerType *player_ptr, int i);
+static int16_t calc_num_blow(PlayerType *player_ptr, int i);
+static int16_t calc_to_magic_chance(PlayerType *player_ptr);
+static ARMOUR_CLASS calc_base_ac(PlayerType *player_ptr);
+static ARMOUR_CLASS calc_to_ac(PlayerType *player_ptr, bool is_real_value);
+static int16_t calc_double_weapon_penalty(PlayerType *player_ptr, INVENTORY_IDX slot);
+static bool is_riding_two_hands(PlayerType *player_ptr);
+static int16_t calc_riding_bow_penalty(PlayerType *player_ptr);
+static void put_equipment_warning(PlayerType *player_ptr);
+
+static short calc_to_damage(PlayerType *player_ptr, INVENTORY_IDX slot, bool is_real_value);
+static int16_t calc_to_hit(PlayerType *player_ptr, INVENTORY_IDX slot, bool is_real_value);
+
+static int16_t calc_to_hit_bow(PlayerType *player_ptr, bool is_real_value);
+
+static int16_t calc_to_damage_misc(PlayerType *player_ptr);
+static int16_t calc_to_hit_misc(PlayerType *player_ptr);
+
+static DICE_NUMBER calc_to_weapon_dice_num(PlayerType *player_ptr, INVENTORY_IDX slot);
+static player_hand main_attack_hand(PlayerType *player_ptr);
/*** Player information ***/
* @param player_ptr 主観となるプレイヤー構造体参照ポインタ
* @todo 将来独自インターフェース実装にはz-term系に追い出すべきか?
*/
-static void delayed_visual_update(player_type *player_ptr)
+static void delayed_visual_update(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (int i = 0; i < floor_ptr->redraw_n; i++) {
* @param o_ptr 判定する射撃武器のアイテム情報参照ポインタ
* @return 重すぎるならばTRUE
*/
-static bool is_heavy_shoot(player_type *player_ptr, object_type *o_ptr)
+static bool is_heavy_shoot(PlayerType *player_ptr, object_type *o_ptr)
{
return (calc_bow_weight_limit(player_ptr) < o_ptr->weight / 10);
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 総重量
*/
-WEIGHT calc_inventory_weight(player_type *player_ptr)
+WEIGHT calc_inventory_weight(PlayerType *player_ptr)
{
WEIGHT weight = 0;
return weight;
}
-static void update_ability_scores(player_type *player_ptr)
+static void update_ability_scores(PlayerType *player_ptr)
{
PlayerStrength player_str(player_ptr);
PlayerIntelligence player_int(player_ptr);
* </pre>
* @todo ここで計算していた各値は一部の状態変化メッセージ処理を除き、今後必要な時に適示計算する形に移行するためほぼすべて削られる。
*/
-static void update_bonuses(player_type *player_ptr)
+static void update_bonuses(PlayerType *player_ptr)
{
auto empty_hands_status = empty_hands(player_ptr, true);
object_type *o_ptr;
* Adjust current hitpoints if necessary
* @details
*/
-static void update_max_hitpoints(player_type *player_ptr)
+static void update_max_hitpoints(PlayerType *player_ptr)
{
int bonus = ((int)(adj_con_mhp[player_ptr->stat_index[A_CON]]) - 128) * player_ptr->lev / 4;
int mhp = player_ptr->player_hp[player_ptr->lev - 1];
* Note that this function induces various "status" messages,
* which must be bypasses until the character is created.
*/
-static void update_num_of_spells(player_type *player_ptr)
+static void update_num_of_spells(PlayerType *player_ptr)
{
if (mp_ptr->spell_book == ItemKindType::NONE)
return;
* @details
* This function induces status messages.
*/
-static void update_max_mana(player_type *player_ptr)
+static void update_max_mana(PlayerType *player_ptr)
{
if ((mp_ptr->spell_book == ItemKindType::NONE) && mp_ptr->spell_first == SPELL_FIRST_NO_SPELL)
return;
* @param o_ptr 計算する射撃武器のアイテム情報参照ポインタ
* @return 射撃倍率の値(100で1.00倍)
*/
-int16_t calc_num_fire(player_type *player_ptr, object_type *o_ptr)
+int16_t calc_num_fire(PlayerType *player_ptr, object_type *o_ptr)
{
int extra_shots = 0;
* * 器用さに応じたadj_dex_disテーブルによる加算
* * 知力に応じたadj_int_disテーブルによる加算
*/
-static ACTION_SKILL_POWER calc_disarming(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_disarming(PlayerType *player_ptr)
{
ACTION_SKILL_POWER pow;
const player_race_info *tmp_rp_ptr;
* * 知力に応じたadj_int_devテーブルによる加算
* * 狂戦士化による減算(-20)
*/
-static ACTION_SKILL_POWER calc_device_ability(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_device_ability(PlayerType *player_ptr)
{
ACTION_SKILL_POWER pow;
const player_race_info *tmp_rp_ptr;
* * 生命の「究極の耐性」や regist_magic,magicdef持ちなら大なり上書き(95+レベル未満ならその値に上書き)
* * 呪いのdown_savingがかかっているなら半減
*/
-static ACTION_SKILL_POWER calc_saving_throw(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_saving_throw(PlayerType *player_ptr)
{
ACTION_SKILL_POWER pow;
const player_race_info *tmp_rp_ptr;
* * 狂戦士化による減算(-15)
* * 変異(MUT3_XTRA_EYES)による加算(+15)
*/
-static ACTION_SKILL_POWER calc_search(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_search(PlayerType *player_ptr)
{
ACTION_SKILL_POWER pow;
const player_race_info *tmp_rp_ptr;
* * 狂戦士化による減算(-15)
* * 変異(MUT3_XTRA_EYES)による加算(+15)
*/
-static ACTION_SKILL_POWER calc_search_freq(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_search_freq(PlayerType *player_ptr)
{
ACTION_SKILL_POWER pow;
const player_race_info *tmp_rp_ptr;
* @details
* * 種族/職業/性格による加算とレベルによる追加加算
*/
-static ACTION_SKILL_POWER calc_to_hit_melee(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_to_hit_melee(PlayerType *player_ptr)
{
ACTION_SKILL_POWER pow;
const player_race_info *tmp_rp_ptr;
* @details
* * 種族/職業/性格による加算とレベルによる追加加算
*/
-static ACTION_SKILL_POWER calc_to_hit_shoot(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_to_hit_shoot(PlayerType *player_ptr)
{
ACTION_SKILL_POWER pow;
const player_race_info *tmp_rp_ptr;
* * 種族/職業/性格による加算とレベルによる追加加算
* * 狂戦士による減算(-20)
*/
-static ACTION_SKILL_POWER calc_to_hit_throw(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_to_hit_throw(PlayerType *player_ptr)
{
ACTION_SKILL_POWER pow;
const player_race_info *tmp_rp_ptr;
* * 武器重量によるプラス修正
* * 最終算出値に1を保証
*/
-static ACTION_SKILL_POWER calc_skill_dig(player_type *player_ptr)
+static ACTION_SKILL_POWER calc_skill_dig(PlayerType *player_ptr)
{
object_type *o_ptr;
return pow;
}
-static bool is_martial_arts_mode(player_type *player_ptr)
+static bool is_martial_arts_mode(PlayerType *player_ptr)
{
return ((player_ptr->pclass == PlayerClassType::MONK) || (player_ptr->pclass == PlayerClassType::FORCETRAINER) || (player_ptr->pclass == PlayerClassType::BERSERKER))
&& (any_bits(empty_hands(player_ptr, true), EMPTY_HAND_MAIN)) && !can_attack_with_sub_hand(player_ptr);
}
-static bool is_heavy_wield(player_type *player_ptr, int i)
+static bool is_heavy_wield(PlayerType *player_ptr, int i)
{
const object_type *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + i];
return has_melee_weapon(player_ptr, INVEN_MAIN_HAND + i) && (calc_weapon_weight_limit(player_ptr) < o_ptr->weight / 10);
}
-static int16_t calc_num_blow(player_type *player_ptr, int i)
+static int16_t calc_num_blow(PlayerType *player_ptr, int i)
{
object_type *o_ptr;
int16_t num_blow = 1;
* * 性格チャージマンなら加算(+5)
* * 装備品にTRC::HARD_SPELLがあるなら加算(軽い呪いなら+3/重い呪いなら+10)
*/
-static int16_t calc_to_magic_chance(player_type *player_ptr)
+static int16_t calc_to_magic_chance(PlayerType *player_ptr)
{
int16_t chance = 0;
return chance;
}
-static ARMOUR_CLASS calc_base_ac(player_type *player_ptr)
+static ARMOUR_CLASS calc_base_ac(PlayerType *player_ptr)
{
ARMOUR_CLASS ac = 0;
if (player_ptr->yoiyami)
return ac;
}
-static ARMOUR_CLASS calc_to_ac(player_type *player_ptr, bool is_real_value)
+static ARMOUR_CLASS calc_to_ac(PlayerType *player_ptr, bool is_real_value)
{
ARMOUR_CLASS ac = 0;
if (player_ptr->yoiyami)
* * 武蔵セットによる免除
* * 竿状武器による増加
*/
-int16_t calc_double_weapon_penalty(player_type *player_ptr, INVENTORY_IDX slot)
+int16_t calc_double_weapon_penalty(PlayerType *player_ptr, INVENTORY_IDX slot)
{
int penalty = 0;
return (int16_t)penalty;
}
-static bool is_riding_two_hands(player_type *player_ptr)
+static bool is_riding_two_hands(PlayerType *player_ptr)
{
if (!player_ptr->riding) {
return false;
return false;
}
-static int16_t calc_riding_bow_penalty(player_type *player_ptr)
+static int16_t calc_riding_bow_penalty(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!player_ptr->riding)
return penalty;
}
-void put_equipment_warning(player_type *player_ptr)
+void put_equipment_warning(PlayerType *player_ptr)
{
bool heavy_shoot = is_heavy_shoot(player_ptr, &player_ptr->inventory_list[INVEN_BOW]);
if (player_ptr->old_heavy_shoot != heavy_shoot) {
}
}
-static short calc_to_damage(player_type *player_ptr, INVENTORY_IDX slot, bool is_real_value)
+static short calc_to_damage(PlayerType *player_ptr, INVENTORY_IDX slot, bool is_real_value)
{
object_type *o_ptr = &player_ptr->inventory_list[slot];
auto flgs = object_flags(o_ptr);
* @details
* 'slot' MUST be INVEN_MAIN_HAND or INVEM_SUB_HAND.
*/
-static short calc_to_hit(player_type *player_ptr, INVENTORY_IDX slot, bool is_real_value)
+static short calc_to_hit(PlayerType *player_ptr, INVENTORY_IDX slot, bool is_real_value)
{
auto hit = 0;
return static_cast<short>(hit);
}
-static int16_t calc_to_hit_bow(player_type *player_ptr, bool is_real_value)
+static int16_t calc_to_hit_bow(PlayerType *player_ptr, bool is_real_value)
{
int16_t pow = 0;
return pow;
}
-static int16_t calc_to_damage_misc(player_type *player_ptr)
+static int16_t calc_to_damage_misc(PlayerType *player_ptr)
{
object_type *o_ptr;
return to_dam;
}
-static int16_t calc_to_hit_misc(player_type *player_ptr)
+static int16_t calc_to_hit_misc(PlayerType *player_ptr)
{
object_type *o_ptr;
return to_hit;
}
-static DICE_NUMBER calc_to_weapon_dice_num(player_type *player_ptr, INVENTORY_IDX slot)
+static DICE_NUMBER calc_to_weapon_dice_num(PlayerType *player_ptr, INVENTORY_IDX slot)
{
auto *o_ptr = &player_ptr->inventory_list[slot];
return (player_ptr->riding > 0) && o_ptr->is_lance() ? 2 : 0;
* Computes current weight limit.
* @return 制限重量(ポンド)
*/
-WEIGHT calc_weight_limit(player_type *player_ptr)
+WEIGHT calc_weight_limit(PlayerType *player_ptr)
{
WEIGHT i = (WEIGHT)adj_str_wgt[player_ptr->stat_index[A_STR]] * 50;
if (player_ptr->pclass == PlayerClassType::BERSERKER)
* @brief update のフラグに応じた更新をまとめて行う / Handle "update"
* @details 更新処理の対象はプレイヤーの能力修正/光源寿命/HP/MP/魔法の学習状態、他多数の外界の状態判定。
*/
-void update_creature(player_type *player_ptr)
+void update_creature(PlayerType *player_ptr)
{
if (!player_ptr->update)
return;
* @brief プレイヤーが魔道書を一冊も持っていないかを判定する
* @return 魔道書を一冊も持っていないならTRUEを返す
*/
-bool player_has_no_spellbooks(player_type *player_ptr)
+bool player_has_no_spellbooks(PlayerType *player_ptr)
{
object_type *o_ptr;
for (int i = 0; i < INVEN_PACK; i++) {
* @param y 配置先Y座標
* @return 配置に成功したらTRUE
*/
-bool player_place(player_type *player_ptr, POSITION y, POSITION x)
+bool player_place(PlayerType *player_ptr, POSITION y, POSITION x)
{
if (player_ptr->current_floor_ptr->grid_array[y][x].m_idx != 0)
return false;
/*!
* @brief 種族アンバライトが出血時パターンの上に乗った際のペナルティ処理
*/
-void wreck_the_pattern(player_type *player_ptr)
+void wreck_the_pattern(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
int pattern_type = f_info[floor_ptr->grid_array[player_ptr->y][player_ptr->x].feat].subtype;
* @brief プレイヤーの経験値について整合性のためのチェックと調整を行う /
* Advance experience levels and print experience
*/
-void check_experience(player_type *player_ptr)
+void check_experience(PlayerType *player_ptr)
{
if (player_ptr->exp < 0)
player_ptr->exp = 0;
* Hack -- Calculates the total number of points earned -JWT-
* @details
*/
-long calc_score(player_type *player_ptr)
+long calc_score(PlayerType *player_ptr)
{
int arena_win = std::min<int>(player_ptr->arena_number, MAX_ARENA_MONS);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 祝福状態ならばTRUE
*/
-bool is_blessed(player_type *player_ptr)
+bool is_blessed(PlayerType *player_ptr)
{
return player_ptr->blessed || music_singing(player_ptr, MUSIC_BLESS) || SpellHex(player_ptr).is_spelling_specific(HEX_BLESS);
}
-bool is_tim_esp(player_type *player_ptr)
+bool is_tim_esp(PlayerType *player_ptr)
{
auto sniper_data = PlayerClass(player_ptr).get_specific_data<sniper_data_type>();
auto sniper_concent = sniper_data ? sniper_data->concent : 0;
return player_ptr->tim_esp || music_singing(player_ptr, MUSIC_MIND) || (sniper_concent >= CONCENT_TELE_THRESHOLD);
}
-bool is_tim_stealth(player_type *player_ptr)
+bool is_tim_stealth(PlayerType *player_ptr)
{
return player_ptr->tim_stealth || music_singing(player_ptr, MUSIC_STEALTH);
}
-bool is_time_limit_esp(player_type *player_ptr)
+bool is_time_limit_esp(PlayerType *player_ptr)
{
auto sniper_data = PlayerClass(player_ptr).get_specific_data<sniper_data_type>();
auto sniper_concent = sniper_data ? sniper_data->concent : 0;
return player_ptr->tim_esp || music_singing(player_ptr, MUSIC_MIND) || (sniper_concent >= CONCENT_TELE_THRESHOLD);
}
-bool is_time_limit_stealth(player_type *player_ptr)
+bool is_time_limit_stealth(PlayerType *player_ptr)
{
return player_ptr->tim_stealth || music_singing(player_ptr, MUSIC_STEALTH);
}
* @brief 口を使う継続的な処理を中断する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void stop_mouth(player_type *player_ptr)
+void stop_mouth(PlayerType *player_ptr)
{
if (music_singing_any(player_ptr))
stop_singing(player_ptr);
}
}
-bool is_fast(player_type *player_ptr)
+bool is_fast(PlayerType *player_ptr)
{
return player_ptr->fast || music_singing(player_ptr, MUSIC_SPEED) || music_singing(player_ptr, MUSIC_SHERO);
}
-bool is_invuln(player_type *player_ptr)
+bool is_invuln(PlayerType *player_ptr)
{
return player_ptr->invuln || music_singing(player_ptr, MUSIC_INVULN);
}
-bool is_hero(player_type *player_ptr)
+bool is_hero(PlayerType *player_ptr)
{
return player_ptr->hero || music_singing(player_ptr, MUSIC_HERO) || music_singing(player_ptr, MUSIC_SHERO);
}
-bool is_shero(player_type *player_ptr)
+bool is_shero(PlayerType *player_ptr)
{
return player_ptr->shero || player_ptr->pclass == PlayerClassType::BERSERKER;
}
-bool is_echizen(player_type *player_ptr)
+bool is_echizen(PlayerType *player_ptr)
{
return (player_ptr->ppersonality == PERSONALITY_COMBAT) || (player_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON);
}
-bool is_chargeman(player_type *player_ptr)
+bool is_chargeman(PlayerType *player_ptr)
{
return player_ptr->ppersonality == PERSONALITY_CHARGEMAN;
}
-WEIGHT calc_weapon_weight_limit(player_type *player_ptr)
+WEIGHT calc_weapon_weight_limit(PlayerType *player_ptr)
{
WEIGHT weight = adj_str_hold[player_ptr->stat_index[A_STR]];
return weight;
}
-WEIGHT calc_bow_weight_limit(player_type *player_ptr)
+WEIGHT calc_bow_weight_limit(PlayerType *player_ptr)
{
WEIGHT weight = adj_str_hold[player_ptr->stat_index[A_STR]];
return weight;
}
-static player_hand main_attack_hand(player_type *player_ptr)
+static player_hand main_attack_hand(PlayerType *player_ptr)
{
switch (player_melee_type(player_ptr)) {
case MELEE_TYPE_BAREHAND_TWO:
#include "system/angband.h"
struct object_type;
-struct player_type;
+class PlayerType;
-WEIGHT calc_weapon_weight_limit(player_type *player_ptr);
-WEIGHT calc_bow_weight_limit(player_type *player_ptr);
-WEIGHT calc_inventory_weight(player_type *player_ptr);
+WEIGHT calc_weapon_weight_limit(PlayerType *player_ptr);
+WEIGHT calc_bow_weight_limit(PlayerType *player_ptr);
+WEIGHT calc_inventory_weight(PlayerType *player_ptr);
-int16_t calc_num_fire(player_type *player_ptr, object_type *o_ptr);
-WEIGHT calc_weight_limit(player_type *player_ptr);
-void update_creature(player_type *player_ptr);
-bool player_has_no_spellbooks(player_type *player_ptr);
+int16_t calc_num_fire(PlayerType *player_ptr, object_type *o_ptr);
+WEIGHT calc_weight_limit(PlayerType *player_ptr);
+void update_creature(PlayerType *player_ptr);
+bool player_has_no_spellbooks(PlayerType *player_ptr);
-bool player_place(player_type *player_ptr, POSITION y, POSITION x);
+bool player_place(PlayerType *player_ptr, POSITION y, POSITION x);
-void check_experience(player_type *player_ptr);
-void wreck_the_pattern(player_type *player_ptr);
+void check_experience(PlayerType *player_ptr);
+void wreck_the_pattern(PlayerType *player_ptr);
void cnv_stat(int val, char *out_val);
int16_t modify_stat_value(int value, int amount);
-long calc_score(player_type *player_ptr);
-
-bool is_blessed(player_type *player_ptr);
-bool is_time_limit_esp(player_type *player_ptr);
-bool is_time_limit_stealth(player_type *player_ptr);
-bool is_fast(player_type *player_ptr);
-bool is_invuln(player_type *player_ptr);
-bool is_hero(player_type *player_ptr);
-bool is_shero(player_type *player_ptr);
-bool is_echizen(player_type *player_ptr);
-bool is_chargeman(player_type *player_ptr);
-
-void stop_mouth(player_type *player_ptr);
+long calc_score(PlayerType *player_ptr);
+
+bool is_blessed(PlayerType *player_ptr);
+bool is_time_limit_esp(PlayerType *player_ptr);
+bool is_time_limit_stealth(PlayerType *player_ptr);
+bool is_fast(PlayerType *player_ptr);
+bool is_invuln(PlayerType *player_ptr);
+bool is_hero(PlayerType *player_ptr);
+bool is_shero(PlayerType *player_ptr);
+bool is_echizen(PlayerType *player_ptr);
+bool is_chargeman(PlayerType *player_ptr);
+
+void stop_mouth(PlayerType *player_ptr);
*
* This function now returns "TRUE" if vision is "blocked" by grid (y,x).
*/
-static bool update_view_aux(player_type *player_ptr, POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+static bool update_view_aux(PlayerType *player_ptr, POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g1_c_ptr;
* 4c1: Each side aborts as soon as possible
* 4c2: Each side tells the next strip how far it has to check
*/
-void update_view(player_type *player_ptr)
+void update_view(PlayerType *player_ptr)
{
// 前回プレイヤーから見えていた座標たちを格納する配列。
std::vector<Pos2D> points;
#pragma once
-struct player_type;
-void update_view(player_type *player_ptr);
+class PlayerType;
+void update_view(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param buf 墓テンプレ
*/
-static void show_basic_params(player_type *player_ptr, char *buf)
+static void show_basic_params(PlayerType *player_ptr, char *buf)
{
char tomb_message[160];
(void)sprintf(tomb_message, _("レベル: %d", "Level: %d"), (int)player_ptr->lev);
* @param tomb_message 墓碑に刻む言葉
* @return 追加の行数
*/
-static int show_killing_monster(player_type *player_ptr, char *buf, char *tomb_message, size_t tomb_message_size)
+static int show_killing_monster(PlayerType *player_ptr, char *buf, char *tomb_message, size_t tomb_message_size)
{
shape_buffer(player_ptr->died_from, GRAVE_LINE_WIDTH + 1, tomb_message, tomb_message_size);
char *t;
* @param tomb_message 表示する文字列
* @param extra_line 追加の行数
*/
-static void show_dead_place(player_type *player_ptr, char *buf, char *tomb_message, int extra_line)
+static void show_dead_place(PlayerType *player_ptr, char *buf, char *tomb_message, int extra_line)
{
if (streq(player_ptr->died_from, "ripe") || streq(player_ptr->died_from, "Seppuku"))
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param buf 墓テンプレ
*/
-static void show_tomb_detail(player_type *player_ptr, char *buf)
+static void show_tomb_detail(PlayerType *player_ptr, char *buf)
{
char tomb_message[160];
int extra_line = 0;
* @param buf template of the tomb
* @return nothing
*/
-static void show_tomb_detail(player_type *player_ptr, char *buf)
+static void show_tomb_detail(PlayerType *player_ptr, char *buf)
{
char tomb_message[160];
(void)sprintf(tomb_message, "Killed on Level %d", player_ptr->current_floor_ptr->dun_level);
* Display a "tomb-stone"
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_tomb(player_type *player_ptr)
+void print_tomb(PlayerType *player_ptr)
{
term_clear();
char buf[1024];
* @brief 死亡/引退/切腹時にインベントリ内のアイテムを*鑑定*する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void inventory_aware(player_type *player_ptr)
+static void inventory_aware(PlayerType *player_ptr)
{
object_type *o_ptr;
for (int i = 0; i < INVEN_TOTAL; i++) {
* @brief 死亡/引退/切腹時に我が家のアイテムを*鑑定*する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void home_aware(player_type *player_ptr)
+static void home_aware(PlayerType *player_ptr)
{
object_type *o_ptr;
store_type *store_ptr;
* @param player_ptr プレイヤーへの参照ポインタ
* @return Escキーでゲームを終了する時TRUE
*/
-static bool show_dead_player_items(player_type *player_ptr)
+static bool show_dead_player_items(PlayerType *player_ptr)
{
if (player_ptr->equip_cnt) {
term_clear();
* @brief 我が家にあったアイテムを表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void show_dead_home_items(player_type *player_ptr)
+static void show_dead_home_items(PlayerType *player_ptr)
{
for (int l = 1; l < max_towns; l++) {
store_type *store_ptr;
* @param player_ptr プレイヤーへの参照ポインタ
* @param file_character ステータスダンプへのコールバック
*/
-static void export_player_info(player_type *player_ptr, display_player_pf display_player)
+static void export_player_info(PlayerType *player_ptr, display_player_pf display_player)
{
prt(_("キャラクターの記録をファイルに書き出すことができます。", "You may now dump a character record to one or more files."), 21, 0);
prt(_("リターンキーでキャラクターを見ます。ESCで中断します。", "Then, hit RETURN to see the character, or ESC to abort."), 22, 0);
/*!
* @brief 自動的にプレイヤーステータスをファイルダンプ出力する
*/
-static void file_character_auto(player_type *player_ptr, display_player_pf display_player)
+static void file_character_auto(PlayerType *player_ptr, display_player_pf display_player)
{
time_t now_t = time(nullptr);
struct tm *now_tm = localtime(&now_t);
* @param player_ptr プレイヤーへの参照ポインタ
* @param display_player ステータス表示へのコールバック
*/
-void show_death_info(player_type *player_ptr, display_player_pf display_player)
+void show_death_info(PlayerType *player_ptr, display_player_pf display_player)
{
inventory_aware(player_ptr);
home_aware(player_ptr);
#include "io/files-util.h"
-struct player_type;
-void print_tomb(player_type *player_ptr);
-void show_death_info(player_type *player_ptr, display_player_pf display_player);
+class PlayerType;
+void print_tomb(PlayerType *player_ptr);
+void show_death_info(PlayerType *player_ptr, display_player_pf display_player);
* Extract a clean "base name".
* Build the savefile name if needed.
*/
-void process_player_name(player_type *player_ptr, bool is_new_savefile)
+void process_player_name(PlayerType *player_ptr, bool is_new_savefile)
{
char old_player_base[32] = "";
if (w_ptr->character_generated)
* What a horrible name for a global function.
* </pre>
*/
-void get_name(player_type *player_ptr)
+void get_name(PlayerType *player_ptr)
{
char tmp[64];
strcpy(tmp, player_ptr->name);
#pragma once
-struct player_type;
-void process_player_name(player_type *player_ptr, bool is_new_savefile = false);
-void get_name(player_type *player_ptr);
+class PlayerType;
+void process_player_name(PlayerType *player_ptr, bool is_new_savefile = false);
+void get_name(PlayerType *player_ptr);
* @todo
* xtra1.c周りと多重実装になっているのを何とかする
*/
-void player_immunity(player_type *player_ptr, TrFlags &flags)
+void player_immunity(PlayerType *player_ptr, TrFlags &flags)
{
flags.clear();
* @todo
* xtra1.c周りと多重実装になっているのを何とかする
*/
-void tim_player_immunity(player_type *player_ptr, TrFlags &flags)
+void tim_player_immunity(PlayerType *player_ptr, TrFlags &flags)
{
flags.clear();
* @todo
* xtra1.c周りと多重実装になっているのを何とかする
*/
-void known_obj_immunity(player_type *player_ptr, TrFlags &flags)
+void known_obj_immunity(PlayerType *player_ptr, TrFlags &flags)
{
flags.clear();
* @todo
* xtra1.c周りと多重実装になっているのを何とかする
*/
-void player_vulnerability_flags(player_type *player_ptr, TrFlags &flags)
+void player_vulnerability_flags(PlayerType *player_ptr, TrFlags &flags)
{
flags.clear();
#include "object-enchant/tr-flags.h"
-struct player_type;
-void player_immunity(player_type *player_ptr, TrFlags &flags);
-void tim_player_immunity(player_type *player_ptr, TrFlags &flags);
-void known_obj_immunity(player_type *player_ptr, TrFlags &flags);
-void player_vulnerability_flags(player_type *player_ptr, TrFlags &flags);
+class PlayerType;
+void player_immunity(PlayerType *player_ptr, TrFlags &flags);
+void tim_player_immunity(PlayerType *player_ptr, TrFlags &flags);
+void known_obj_immunity(PlayerType *player_ptr, TrFlags &flags);
+void player_vulnerability_flags(PlayerType *player_ptr, TrFlags &flags);
* @todo
* xtra1.c周りと多重実装になっているのを何とかする
*/
-void tim_player_flags(player_type *player_ptr, TrFlags &flags)
+void tim_player_flags(PlayerType *player_ptr, TrFlags &flags)
{
BIT_FLAGS tmp_effect_flag = FLAG_CAUSE_MAGIC_TIME_EFFECT;
set_bits(tmp_effect_flag, FLAG_CAUSE_STANCE);
#include "object-enchant/tr-flags.h"
-struct player_type;
-void tim_player_flags(player_type *player_ptr, TrFlags &flags);
+class PlayerType;
+void tim_player_flags(PlayerType *player_ptr, TrFlags &flags);
#include "realm/realm-types.h"
#include "system/player-type-definition.h"
-void switch_class_racial(player_type *player_ptr, rc_type *rc_ptr)
+void switch_class_racial(PlayerType *player_ptr, rc_type *rc_ptr)
{
rpi_type rpi;
switch (player_ptr->pclass) {
#pragma once
-struct player_type;
+class PlayerType;
struct rc_type;
-void switch_class_racial(player_type *player_ptr, rc_type *rc_ptr);
+void switch_class_racial(PlayerType *player_ptr, rc_type *rc_ptr);
#include "system/player-type-definition.h"
#include "util/enum-converter.h"
-void select_mutation_racial(player_type *player_ptr, rc_type *rc_ptr)
+void select_mutation_racial(PlayerType *player_ptr, rc_type *rc_ptr)
{
rpi_type rpi;
if (player_ptr->muta.has(PlayerMutationType::SPIT_ACID)) {
#pragma once
-struct player_type;
+class PlayerType;
struct rc_type;
-void select_mutation_racial(player_type *player_ptr, rc_type *rc_ptr);
+void select_mutation_racial(PlayerType *player_ptr, rc_type *rc_ptr);
#include "racial/racial-util.h"
#include "system/player-type-definition.h"
-void set_mimic_racial_command(player_type *player_ptr, rc_type *rc_ptr)
+void set_mimic_racial_command(PlayerType *player_ptr, rc_type *rc_ptr)
{
rpi_type rpi;
switch (player_ptr->mimic_form) {
}
}
-void set_race_racial_command(player_type *player_ptr, rc_type *rc_ptr)
+void set_race_racial_command(PlayerType *player_ptr, rc_type *rc_ptr)
{
rpi_type rpi;
switch (player_ptr->prace) {
#pragma once
-struct player_type;
+class PlayerType;
struct rc_type;
-void set_mimic_racial_command(player_type *player_ptr, rc_type *rc_ptr);
-void set_race_racial_command(player_type *player_ptr, rc_type *rc_ptr);
+void set_mimic_racial_command(PlayerType *player_ptr, rc_type *rc_ptr);
+void set_race_racial_command(PlayerType *player_ptr, rc_type *rc_ptr);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool android_inside_weapon(player_type *player_ptr)
+bool android_inside_weapon(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-void calc_android_exp(player_type *player_ptr)
+void calc_android_exp(PlayerType *player_ptr)
{
uint32_t total_exp = 0;
if (player_ptr->is_dead || (player_ptr->prace != PlayerRaceType::ANDROID))
#pragma once
-struct player_type;
-bool android_inside_weapon(player_type *player_ptr);
-void calc_android_exp(player_type *player_ptr);
+class PlayerType;
+bool android_inside_weapon(PlayerType *player_ptr);
+void calc_android_exp(PlayerType *player_ptr);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool demonic_breath(player_type *player_ptr)
+bool demonic_breath(PlayerType *player_ptr)
{
DIRECTION dir;
AttributeType type = (one_in_(2) ? AttributeType::NETHER : AttributeType::FIRE);
#pragma once
-struct player_type;
-bool demonic_breath(player_type *player_ptr);
+class PlayerType;
+bool demonic_breath(PlayerType *player_ptr);
#include "target/target-getter.h"
#include "view/display-messages.h"
-static void decide_breath_kind(player_type *player_ptr, AttributeType *breath_type, concptr *breath_type_description)
+static void decide_breath_kind(PlayerType *player_ptr, AttributeType *breath_type, concptr *breath_type_description)
{
if (randint1(100) >= player_ptr->lev)
return;
}
}
-bool draconian_breath(player_type *player_ptr)
+bool draconian_breath(PlayerType *player_ptr)
{
AttributeType breath_type = (one_in_(3) ? AttributeType::COLD : AttributeType::FIRE);
concptr breath_type_description = ((breath_type == AttributeType::COLD) ? _("冷気", "cold") : _("炎", "fire"));
#pragma once
-struct player_type;
-bool draconian_breath(player_type *player_ptr);
+class PlayerType;
+bool draconian_breath(PlayerType *player_ptr);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_leveling(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_leveling(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
#include "system/angband.h"
-struct player_type;
-bool set_leveling(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+bool set_leveling(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
#include "util/int-char-converter.h"
#include "view/display-messages.h"
-bool switch_class_racial_execution(player_type *player_ptr, const int32_t command)
+bool switch_class_racial_execution(PlayerType *player_ptr, const int32_t command)
{
DIRECTION dir = 0;
switch (player_ptr->pclass) {
}
}
-bool switch_mimic_racial_execution(player_type *player_ptr)
+bool switch_mimic_racial_execution(PlayerType *player_ptr)
{
switch (player_ptr->mimic_form) {
case MIMIC_DEMON:
}
}
-bool switch_race_racial_execution(player_type *player_ptr, const int32_t command)
+bool switch_race_racial_execution(PlayerType *player_ptr, const int32_t command)
{
DIRECTION dir = 0;
switch (player_ptr->prace) {
#include "system/angband.h"
-struct player_type;
-bool switch_class_racial_execution(player_type *player_ptr, const int32_t command);
-bool switch_mimic_racial_execution(player_type *player_ptr);
-bool switch_race_racial_execution(player_type *player_ptr, const int32_t command);
+class PlayerType;
+bool switch_class_racial_execution(PlayerType *player_ptr, const int32_t command);
+bool switch_mimic_racial_execution(PlayerType *player_ptr);
+bool switch_race_racial_execution(PlayerType *player_ptr, const int32_t command);
#include "system/player-type-definition.h"
#include "util/enum-converter.h"
-rc_type::rc_type(player_type *player_ptr)
+rc_type::rc_type(PlayerType *player_ptr)
{
this->ask = true;
this->lvl = player_ptr->lev;
/*!
* レイシャル/クラスパワー管理構造体
*/
-struct player_type;
+class PlayerType;
struct rc_type {
std::vector<rpi_type> power_desc{}; //!< パワー定義配列
COMMAND_CODE command_code{}; //!< 使用しようとしているパワー番号
* @param player_ptr プレイヤー情報への参照ポインタ
* @return 管理構造体
*/
- rc_type(player_type *player_ptr);
+ rc_type(PlayerType *player_ptr);
/*!
* @brief レイシャル/クラスパワー定義を追加
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool vampirism(player_type *player_ptr)
+bool vampirism(PlayerType *player_ptr)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::NO_MELEE)) {
msg_print(_("なぜか攻撃することができない。", "Something prevents you from attacking."));
#pragma once
-struct player_type;
-bool vampirism(player_type *player_ptr);
+class PlayerType;
+bool vampirism(PlayerType *player_ptr);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_arcane_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_arcane_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_arcane_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_arcane_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_chaos_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_chaos_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_craft_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_craft_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_craft_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_craft_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_crusade_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_crusade_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_crusade_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_crusade_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_death_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_death_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_death_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_death_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_daemon_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_daemon_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST / SPELL_CONT / SpellProcessType::STOP)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST / SPELL_CONT / SpellProcessType::STOP 時はnullptr文字列を返す。
*/
-concptr do_hex_spell(player_type *player_ptr, spell_hex_type spell, SpellProcessType mode)
+concptr do_hex_spell(PlayerType *player_ptr, spell_hex_type spell, SpellProcessType mode)
{
auto name = mode == SpellProcessType::NAME;
auto description = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_hex_spell(player_type *player_ptr, spell_hex_type spell, SpellProcessType mode);
+class PlayerType;
+concptr do_hex_spell(PlayerType *player_ptr, spell_hex_type spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_hissatsu_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_hissatsu_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_hissatsu_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_hissatsu_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_life_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_life_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_life_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_life_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_nature_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_nature_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_nature_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_nature_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param spell 領域魔法としてのID
* @param song 魔法効果のID
*/
-static void start_singing(player_type *player_ptr, SPELL_IDX spell, int32_t song)
+static void start_singing(PlayerType *player_ptr, SPELL_IDX spell, int32_t song)
{
/* Remember the song index */
set_singing_song_effect(player_ptr, song);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST / SpellProcessType::FAIL / SPELL_CONT / SpellProcessType::STOP)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST / SpellProcessType::FAIL / SPELL_CONT / SpellProcessType::STOP 時はnullptr文字列を返す。
*/
-concptr do_music_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_music_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_music_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_music_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_sorcery_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_sorcery_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_sorcery_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_sorcery_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
* @param mode 処理内容 (SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO / SpellProcessType::CAST)
* @return SpellProcessType::NAME / SPELL_DESC / SpellProcessType::INFO 時には文字列ポインタを返す。SpellProcessType::CAST時はnullptr文字列を返す。
*/
-concptr do_trump_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode)
+concptr do_trump_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode)
{
bool name = mode == SpellProcessType::NAME;
bool desc = mode == SpellProcessType::DESCRIPTION;
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr do_trump_spell(player_type *player_ptr, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr do_trump_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType mode);
}
}
-static bool hack_isnt_wall(player_type *player_ptr, POSITION y, POSITION x, int c1, int c2, int c3, FEAT_IDX feat1, FEAT_IDX feat2, FEAT_IDX feat3,
+static bool hack_isnt_wall(PlayerType *player_ptr, POSITION y, POSITION x, int c1, int c2, int c3, FEAT_IDX feat1, FEAT_IDX feat2, FEAT_IDX feat3,
BIT_FLAGS info1, BIT_FLAGS info2, BIT_FLAGS info3)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* Quick and nasty fill routine used to find the connected region
* of floor in the middle of the grids
*/
-static void cave_fill(player_type *player_ptr, const POSITION y, const POSITION x)
+static void cave_fill(PlayerType *player_ptr, const POSITION y, const POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
}
}
-bool generate_fracave(player_type *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room)
+bool generate_fracave(PlayerType *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room)
{
POSITION xhsize = xsize / 2;
POSITION yhsize = ysize / 2;
return true;
}
-bool generate_lake(player_type *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type)
+bool generate_lake(PlayerType *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type)
{
FEAT_IDX feat1, feat2, feat3;
POSITION xhsize = xsize / 2;
#include "system/angband.h"
struct floor_type;
-struct player_type;
+class PlayerType;
void generate_hmap(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff);
-bool generate_fracave(player_type *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room);
-bool generate_lake(player_type *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type);
+bool generate_fracave(PlayerType *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room);
+bool generate_lake(PlayerType *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type);
* @note that we restrict the number of "crowded" rooms to reduce the chance of overflowing the monster list during level creation.
* @return 部屋の生成に成功した場合 TRUE を返す。
*/
-static bool room_build(player_type *player_ptr, dun_data_type *dd_ptr, EFFECT_ID typ)
+static bool room_build(PlayerType *player_ptr, dun_data_type *dd_ptr, EFFECT_ID typ)
{
switch (typ) {
case ROOM_T_NORMAL:
* @param player_ptr プレイヤーへの参照ポインタ
* @return 部屋生成に成功した場合 TRUE を返す。
*/
-bool generate_rooms(player_type *player_ptr, dun_data_type *dd_ptr)
+bool generate_rooms(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
int crowded = 0;
#pragma once
struct dun_data_type;
-struct player_type;
-bool generate_rooms(player_type *player_ptr, dun_data_type *dun_data);
+class PlayerType;
+bool generate_rooms(PlayerType *player_ptr, dun_data_type *dun_data);
* Note - this should be used only on allocated regions
* within another room.
*/
-void build_small_room(player_type *player_ptr, POSITION x0, POSITION y0)
+void build_small_room(PlayerType *player_ptr, POSITION x0, POSITION y0)
{
for (POSITION y = y0 - 1; y <= y0 + 1; y++) {
place_bold(player_ptr, y, x0 - 1, GB_INNER);
/*
* Builds a cave system in the center of the dungeon.
*/
-void build_cavern(player_type *player_ptr)
+void build_cavern(PlayerType *player_ptr)
{
bool light = false;
bool done = false;
/*
* makes a lake/collapsed floor in the center of the dungeon
*/
-void build_lake(player_type *player_ptr, int type)
+void build_lake(PlayerType *player_ptr, int type)
{
if ((type < LAKE_T_LAVA) || (type > LAKE_T_FIRE_VAULT)) {
msg_format("Invalid lake type (%d)", type);
* The area inside the walls is not touched:
* only granite is removed- normal walls stay
*/
-void build_room(player_type *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2)
+void build_room(PlayerType *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2)
{
int temp;
if ((x1 == x2) || (y1 == y2))
* The power variable is a measure of how well defended a region is.
* This alters the possible choices.
*/
-void build_recursive_room(player_type *player_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power)
+void build_recursive_room(PlayerType *player_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power)
{
POSITION xsize = x2 - x1;
POSITION ysize = y2 - y1;
* Note: no range checking is done so must be inside dungeon
* This routine also stomps on doors
*/
-void add_outer_wall(player_type *player_ptr, POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2)
+void add_outer_wall(PlayerType *player_ptr, POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!in_bounds(floor_ptr, y, x))
#include "system/angband.h"
-struct player_type;
-void build_lake(player_type *player_ptr, int type);
-void build_cavern(player_type *player_ptr);
-void build_small_room(player_type *player_ptr, POSITION x0, POSITION y0);
-void add_outer_wall(player_type *player_ptr, POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2);
+class PlayerType;
+void build_lake(PlayerType *player_ptr, int type);
+void build_cavern(PlayerType *player_ptr);
+void build_small_room(PlayerType *player_ptr, POSITION x0, POSITION y0);
+void add_outer_wall(PlayerType *player_ptr, POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2);
POSITION dist2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, POSITION h1, POSITION h2, POSITION h3, POSITION h4);
-void build_recursive_room(player_type *player_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power);
-void build_room(player_type *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2);
+void build_recursive_room(PlayerType *player_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power);
+void build_room(PlayerType *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2);
}
/* Create a new floor room with optional light */
-static void generate_room_floor(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light)
+static void generate_room_floor(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light)
{
grid_type *g_ptr;
for (POSITION y = y1; y <= y2; y++) {
}
}
-static void generate_fill_perm_bold(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+static void generate_fill_perm_bold(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
for (POSITION y = y1; y <= y2; y++)
for (POSITION x = x1; x <= x2; x++)
* @note
* Note: ltcy and ltcx indicate "left top corner".
*/
-static void build_stores(player_type *player_ptr, POSITION ltcy, POSITION ltcx, StoreSaleType stores[], int n, const std::vector<ugbldg_type>& ugbldg)
+static void build_stores(PlayerType *player_ptr, POSITION ltcy, POSITION ltcx, StoreSaleType stores[], int n, const std::vector<ugbldg_type>& ugbldg)
{
int i;
POSITION y, x;
* This function does NOT do anything about the owners of the stores,\n
* nor the contents thereof. It only handles the physical layout.\n
*/
-bool build_type16(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type16(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
StoreSaleType stores[] = {
StoreSaleType::GENERAL,
} ugbldg_type;
struct dun_data_type;
-struct player_type;
-bool build_type16(player_type *player_ptr, dun_data_type *dd_ptr);
+class PlayerType;
+bool build_type16(PlayerType *player_ptr, dun_data_type *dd_ptr);
* @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal grid
* @return なし
*/
-bool build_type9(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type9(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
int grd, roug, cutoff;
POSITION xsize, ysize, y0, x0;
#pragma once
struct dun_data_type;
-struct player_type;
-bool build_type9(player_type *player_ptr, dun_data_type *dd_ptr);
+class PlayerType;
+bool build_type9(PlayerType *player_ptr, dun_data_type *dd_ptr);
* is the randint0(3) below; it governs the relative density of
* twists and turns in the labyrinth: smaller number, more twists.
*/
-void r_visit(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited)
+void r_visit(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited)
{
int adj[4];
int m = (x2 - x1) / 2 + 1;
}
}
-void build_maze_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault)
+void build_maze_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault)
{
msg_print_wizard(player_ptr, CHEAT_DUNGEON, _("迷路ランダムVaultを生成しました。", "Maze Vault."));
floor_type *floor_ptr = player_ptr->current_floor_ptr;
#include "system/angband.h"
-struct player_type;
-void r_visit(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited);
-void build_maze_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault);
+class PlayerType;
+void r_visit(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited);
+void build_maze_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault);
* @brief タイプ1の部屋…通常可変長方形の部屋を生成する / Type 1 -- normal rectangular rooms
* @param player_ptr プレイヤーへの参照ポインタ
*/
-bool build_type1(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type1(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, y2, x2, yval, xval;
POSITION y1, x1, xsize, ysize;
* @brief タイプ2の部屋…二重長方形の部屋を生成する / Type 2 -- Overlapping rectangular rooms
* @param player_ptr プレイヤーへの参照ポインタ
*/
-bool build_type2(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type2(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, xval, yval;
POSITION y1a, x1a, y2a, x2a;
* the code below will work (with "bounds checking") for 5x5, or even\n
* for unsymetric values like 4x3 or 5x3 or 3x4 or 3x5, or even larger.\n
*/
-bool build_type3(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type3(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, dy, dx, wy, wx;
POSITION y1a, x1a, y2a, x2a;
* 4 - Inner room has a maze\n
* 5 - A set of four inner rooms\n
*/
-bool build_type4(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type4(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, y1, x1;
POSITION y2, x2, tmp, yval, xval;
*\n
* When done fill from the inside to find the walls,\n
*/
-bool build_type11(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type11(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION rad, x, y, x0, y0;
int light = false;
*\n
* When done fill from the inside to find the walls,\n
*/
-bool build_type12(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type12(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION rad, x, y, x0, y0;
int light = false;
#pragma once
struct dun_data_type;
-struct player_type;
-bool build_type1(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type2(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type3(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type4(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type11(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type12(player_type *player_ptr, dun_data_type *dd_ptr);
+class PlayerType;
+bool build_type1(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type2(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type3(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type4(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type11(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type12(PlayerType *player_ptr, dun_data_type *dd_ptr);
* @param b 比較対象参照ID2
* TODO: to sort.c
*/
-static bool ang_sort_comp_nest_mon_info(player_type *player_ptr, vptr u, vptr v, int a, int b)
+static bool ang_sort_comp_nest_mon_info(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
* @param b スワップ対象参照ID2
* TODO: to sort.c
*/
-static void ang_sort_swap_nest_mon_info(player_type *player_ptr, vptr u, vptr v, int a, int b)
+static void ang_sort_swap_nest_mon_info(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
*\n
* Note that "monster nests" will never contain "unique" monsters.\n
*/
-bool build_type5(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type5(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, y1, x1, y2, x2, xval, yval;
int i;
*\n
* Note that "monster pits" will never contain "unique" monsters.\n
*/
-bool build_type6(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type6(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, y1, x1, y2, x2, xval, yval;
int i, j;
* @detai;
* 穴を掘るモンスター、壁を抜けるモンスターは却下
*/
-static bool vault_aux_trapped_pit(player_type *player_ptr, MONRACE_IDX r_idx)
+static bool vault_aux_trapped_pit(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
/* Unused */
(void)player_ptr;
*\n
* Note that "monster pits" will never contain "unique" monsters.\n
*/
-bool build_type13(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type13(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, y1, x1, y2, x2, xval, yval;
int i, j;
};
/*! pit/nest型情報の構造体定義 */
-struct player_type;
+class PlayerType;
struct nest_pit_type {
concptr name; //<! 部屋名
- bool (*hook_func)(player_type *player_ptr, MONRACE_IDX r_idx); //<! モンスターフィルタ関数
- void (*prep_func)(player_type *player_ptr); //<! 能力フィルタ関数
+ bool (*hook_func)(PlayerType *player_ptr, MONRACE_IDX r_idx); //<! モンスターフィルタ関数
+ void (*prep_func)(PlayerType *player_ptr); //<! 能力フィルタ関数
DEPTH level; //<! 相当階
int chance; //!< 生成確率
};
};
struct dun_data_type;
-bool build_type5(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type6(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type13(player_type *player_ptr, dun_data_type *dd_ptr);
+bool build_type5(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type6(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type13(PlayerType *player_ptr, dun_data_type *dd_ptr);
* @brief タイプ15の部屋…ガラス部屋の生成 / Type 15 -- glass rooms
* @param player_ptr プレイヤーへの参照ポインタ
*/
-bool build_type15(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type15(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, y2, x2, yval, xval;
POSITION y1, x1, xsize, ysize;
#pragma once
struct dun_data_type;
-struct player_type;
-bool build_type15(player_type *player_ptr, dun_data_type *dd_ptr);
+class PlayerType;
+bool build_type15(PlayerType *player_ptr, dun_data_type *dd_ptr);
* @details
* A special trap is placed at center of the room
*/
-bool build_type14(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type14(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y, x, y2, x2, yval, xval;
POSITION y1, x1, xsize, ysize;
#pragma once
struct dun_data_type;
-struct player_type;
-bool build_type14(player_type *player_ptr, dun_data_type *dd_ptr);
+class PlayerType;
+bool build_type14(PlayerType *player_ptr, dun_data_type *dd_ptr);
* Note: If two centers are on the same point then this algorithm will create a
* blank bubble filled with walls. - This is prevented from happening.
*/
-static void build_bubble_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
+static void build_bubble_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
{
#define BUBBLENUM 10 /* number of bubbles */
}
/* Create a random vault that looks like a collection of overlapping rooms */
-static void build_room_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
+static void build_room_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
{
POSITION x1, x2, y1, y2, xhsize, yhsize;
int i;
}
/* Create a random vault out of a fractal grid */
-static void build_cave_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsiz, POSITION ysiz)
+static void build_cave_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsiz, POSITION ysiz)
{
int grd, roug, cutoff;
bool done, light, room;
* @param transno 変換ID
*/
static void build_vault(
- player_type *player_ptr, POSITION yval, POSITION xval, POSITION ymax, POSITION xmax, concptr data, POSITION xoffset, POSITION yoffset, int transno)
+ PlayerType *player_ptr, POSITION yval, POSITION xval, POSITION ymax, POSITION xmax, concptr data, POSITION xoffset, POSITION yoffset, int transno)
{
POSITION dx, dy, x, y, i, j;
concptr t;
/*!
* @brief タイプ7の部屋…v_info.txtより小型vaultを生成する / Type 7 -- simple vaults (see "v_info.txt")
*/
-bool build_type7(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type7(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
vault_type *v_ptr = nullptr;
int dummy;
/*!
* @brief タイプ8の部屋…v_info.txtより大型vaultを生成する / Type 8 -- greater vaults (see "v_info.txt")
*/
-bool build_type8(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type8(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
vault_type *v_ptr;
int dummy;
* This is made by two concentric "crypts" with perpendicular
* walls creating the cross-hairs.
*/
-static void build_target_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
+static void build_target_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
{
POSITION rad, x, y;
*
* Miniture rooms are then scattered across the vault.
*/
-static void build_elemental_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsiz, POSITION ysiz)
+static void build_elemental_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsiz, POSITION ysiz)
{
int grd, roug;
int c1, c2, c3;
* The vault has two entrances on opposite sides to guarantee
* a way to get in even if the vault abuts a side of the dungeon.
*/
-static void build_mini_c_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
+static void build_mini_c_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
{
POSITION dy, dx;
POSITION y1, x1, y2, x2, y, x, total;
*
*This makes a vault that looks like a castle/ city in the dungeon.
*/
-static void build_castle_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
+static void build_castle_vault(PlayerType *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
{
POSITION dy, dx;
POSITION y1, x1, y2, x2;
* @brief タイプ10の部屋…ランダム生成vault / Type 10 -- Random vaults
* @param player_ptr プレイヤーへの参照ポインタ
*/
-bool build_type10(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type10(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
POSITION y0, x0, xsize, ysize, vtype;
/*!
* @brief タイプ17の部屋…v_info.txtより固定特殊部屋を生成する / Type 17 -- fixed special room (see "v_info.txt")
*/
-bool build_type17(player_type *player_ptr, dun_data_type *dd_ptr)
+bool build_type17(PlayerType *player_ptr, dun_data_type *dd_ptr)
{
vault_type *v_ptr = nullptr;
int dummy;
extern std::vector<vault_type> v_info;
struct dun_data_type;
-struct player_type;
-bool build_type7(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type8(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type10(player_type *player_ptr, dun_data_type *dd_ptr);
-bool build_type17(player_type *player_ptr, dun_data_type *dd_ptr);
+class PlayerType;
+bool build_type7(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type8(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type10(PlayerType *player_ptr, dun_data_type *dd_ptr);
+bool build_type17(PlayerType *player_ptr, dun_data_type *dd_ptr);
* @param x 地形を変えたいマスのX座標
* @param y 地形を変えたいマスのY座標
*/
-static void set_floor(player_type *player_ptr, POSITION x, POSITION y)
+static void set_floor(PlayerType *player_ptr, POSITION x, POSITION y)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!in_bounds(floor_ptr, y, x))
* @param x2 範囲の右端
* @param y2 範囲の下端
*/
-static void check_room_boundary(player_type *player_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2)
+static void check_room_boundary(PlayerType *player_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2)
{
bool old_is_floor;
bool new_is_floor;
* Return TRUE and values for the center of the room if all went well.\n
* Otherwise, return FALSE.\n
*/
-bool find_space(player_type *player_ptr, dun_data_type *dd_ptr, POSITION *y, POSITION *x, POSITION height, POSITION width)
+bool find_space(PlayerType *player_ptr, dun_data_type *dd_ptr, POSITION *y, POSITION *x, POSITION height, POSITION width)
{
int pick;
POSITION block_y = 0;
#include "system/angband.h"
struct dun_data_type;
-struct player_type;
-bool find_space(player_type *player_ptr, dun_data_type *dd_ptr, POSITION *y, POSITION *x, POSITION height, POSITION width);
+class PlayerType;
+bool find_space(PlayerType *player_ptr, dun_data_type *dd_ptr, POSITION *y, POSITION *x, POSITION height, POSITION width);
/*
* Routine that fills the empty areas of a room with treasure and monsters.
*/
-void fill_treasure(player_type *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty)
+void fill_treasure(PlayerType *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty)
{
POSITION cx = (x1 + x2) / 2;
POSITION cy = (y1 + y2) / 2;
#include "system/angband.h"
-struct player_type;
-void fill_treasure(player_type *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty);
+class PlayerType;
+void fill_treasure(PlayerType *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty);
/*
* Grid based version of "creature_bold()"
*/
-static bool player_grid(player_type *player_ptr, grid_type *g_ptr) { return g_ptr == &player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x]; }
+static bool player_grid(PlayerType *player_ptr, grid_type *g_ptr) { return g_ptr == &player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x]; }
/*
* Grid based version of "cave_empty_bold()"
*/
-static bool is_cave_empty_grid(player_type *player_ptr, grid_type *g_ptr)
+static bool is_cave_empty_grid(PlayerType *player_ptr, grid_type *g_ptr)
{
bool is_empty_grid = g_ptr->cave_has_flag(FloorFeatureType::PLACE);
is_empty_grid &= g_ptr->m_idx == 0;
* @details
* Only really called by some of the "vault" routines.
*/
-void vault_monsters(player_type *player_ptr, POSITION y1, POSITION x1, int num)
+void vault_monsters(PlayerType *player_ptr, POSITION y1, POSITION x1, int num)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (int k = 0; k < num; k++) {
* @details
* Only really called by some of the "vault" routines.
*/
-void vault_objects(player_type *player_ptr, POSITION y, POSITION x, int num)
+void vault_objects(PlayerType *player_ptr, POSITION y, POSITION x, int num)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (; num > 0; --num) {
* @details
* Only really called by some of the "vault" routines.
*/
-static void vault_trap_aux(player_type *player_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd)
+static void vault_trap_aux(PlayerType *player_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd)
{
grid_type *g_ptr;
floor_type *floor_ptr = player_ptr->current_floor_ptr;
* Only really called by some of the "vault" routines.
* @todo rooms-normal からしか呼ばれていない、要調整
*/
-void vault_traps(player_type *player_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd, int num)
+void vault_traps(PlayerType *player_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd, int num)
{
for (int i = 0; i < num; i++)
vault_trap_aux(player_ptr, y, x, yd, xd);
#include "system/angband.h"
-struct player_type;
-void vault_monsters(player_type *player_ptr, POSITION y1, POSITION x1, int num);
-void vault_objects(player_type *player_ptr, POSITION y, POSITION x, int num);
-void vault_traps(player_type *player_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd, int num);
+class PlayerType;
+void vault_monsters(PlayerType *player_ptr, POSITION y1, POSITION x1, int num);
+void vault_objects(PlayerType *player_ptr, POSITION y, POSITION x, int num);
+void vault_traps(PlayerType *player_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd, int num);
* @brief 保存フロアの書き込み / Actually write a saved floor data using effectively compressed format.
* @param sf_ptr 保存したいフロアの参照ポインタ
*/
-void wr_saved_floor(player_type *player_ptr, saved_floor_type *sf_ptr)
+void wr_saved_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!sf_ptr) {
* @player_ptr プレイヤーへの参照ポインタ
* @return 保存に成功したらTRUE
*/
-bool wr_dungeon(player_type *player_ptr)
+bool wr_dungeon(PlayerType *player_ptr)
{
forget_lite(player_ptr->current_floor_ptr);
forget_view(player_ptr->current_floor_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param sf_ptr 保存フロア参照ポインタ
*/
-static bool save_floor_aux(player_type *player_ptr, saved_floor_type *sf_ptr)
+static bool save_floor_aux(PlayerType *player_ptr, saved_floor_type *sf_ptr)
{
compact_objects(player_ptr, 0);
compact_monsters(player_ptr, 0);
* @param sf_ptr 保存フロア参照ポインタ
* @param mode 保存オプション
*/
-bool save_floor(player_type *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode)
+bool save_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode)
{
FILE *old_fff = nullptr;
byte old_xor_byte = 0;
#define SLF_SECOND 0x0001 /* Called from another save/load function */
#define SLF_NO_KILL 0x0002 /* Don't kill temporary files */
-struct player_type;
+class PlayerType;
struct saved_floor_type;
-void wr_saved_floor(player_type *player_ptr, saved_floor_type *sf_ptr);
-bool wr_dungeon(player_type *player_ptr);
-bool save_floor(player_type *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode);
+void wr_saved_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr);
+bool wr_dungeon(PlayerType *player_ptr);
+bool save_floor(PlayerType *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode);
* @brief セーブデータに領域情報を書き込む / Write player realms
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void wr_relams(player_type *player_ptr)
+static void wr_relams(PlayerType *player_ptr)
{
if (player_ptr->pclass == PlayerClassType::ELEMENTALIST)
wr_byte((byte)player_ptr->element);
* @brief セーブデータにプレイヤー情報を書き込む / Write some "player" info
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void wr_player(player_type *player_ptr)
+void wr_player(PlayerType *player_ptr)
{
wr_string(player_ptr->name);
wr_string(player_ptr->died_from);
#pragma once
-struct player_type;
-void wr_player(player_type *player_ptr);
+class PlayerType;
+void wr_player(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 成功すればtrue
*/
-static bool wr_savefile_new(player_type *player_ptr, save_type type)
+static bool wr_savefile_new(PlayerType *player_ptr, save_type type)
{
compact_objects(player_ptr, 0);
compact_monsters(player_ptr, 0);
* @details
* Angband 2.8.0 will use "fd" instead of "fff" if possible
*/
-static bool save_player_aux(player_type *player_ptr, char *name, save_type type)
+static bool save_player_aux(PlayerType *player_ptr, char *name, save_type type)
{
safe_setuid_grab(player_ptr);
int file_permission = 0644;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 成功すればtrue
*/
-bool save_player(player_type *player_ptr, save_type type)
+bool save_player(PlayerType *player_ptr, save_type type)
{
char safe[1024];
strcpy(safe, savefile);
SAVE_TYPE_DEBUG = 2
};
-struct player_type;
-bool save_player(player_type *player_ptr, save_type type);
+class PlayerType;
+bool save_player(PlayerType *player_ptr, save_type type);
#include "target/target-getter.h"
#include "view/display-messages.h"
-bool activate_bladeturner(player_type *player_ptr)
+bool activate_bladeturner(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
#pragma once
-struct player_type;
-bool activate_bladeturner(player_type *player_ptr);
+class PlayerType;
+bool activate_bladeturner(PlayerType *player_ptr);
* @param o_ptr ブラッディ・ムーンへの参照ポインタ
* @return オブジェクト情報に異常がない限りTRUE
*/
-bool activate_bloody_moon(player_type *player_ptr, object_type *o_ptr)
+bool activate_bloody_moon(PlayerType *player_ptr, object_type *o_ptr)
{
if (o_ptr->name1 != ART_BLOOD)
return false;
#pragma once
struct object_type;
-struct player_type;
+class PlayerType;
void get_bloody_moon_flags(object_type *o_ptr);
-bool activate_bloody_moon(player_type *player_ptr, object_type *o_ptr);
+bool activate_bloody_moon(PlayerType *player_ptr, object_type *o_ptr);
/*!< この値以降の小項目IDを持った箱は大型の箱としてドロップ数を増やす / Special "sval" limit -- first "large" chest */
#define SV_CHEST_MIN_LARGE 4
-Chest::Chest(player_type *player_ptr)
+Chest::Chest(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class Chest {
public:
- Chest(player_type *player_ptr);
+ Chest(PlayerType *player_ptr);
virtual ~Chest() = default;
void chest_death(bool scatter, POSITION y, POSITION x, OBJECT_IDX o_idx);
void chest_trap(POSITION y, POSITION x, OBJECT_IDX o_idx);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
};
* Need to analyze size of the window.
* Need more color coding.
*/
-static bool fire_crimson(player_type *player_ptr)
+static bool fire_crimson(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
return true;
}
-bool activate_crimson(player_type *player_ptr, object_type *o_ptr)
+bool activate_crimson(PlayerType *player_ptr, object_type *o_ptr)
{
if (o_ptr->name1 != ART_CRIMSON)
return false;
#pragma once
struct object_type;
-struct player_type;
-bool activate_crimson(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool activate_crimson(PlayerType *player_ptr, object_type *o_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 倍率 (実際は1/10になる)
*/
-static int calc_death_scythe_reflection_magnification_mimic_none(player_type *player_ptr)
+static int calc_death_scythe_reflection_magnification_mimic_none(PlayerType *player_ptr)
{
switch (player_ptr->prace) {
case PlayerRaceType::YEEK:
* @param player_ptr プレイヤーへの参照ポインタ
* @return 倍率 (実際は1/10になる)
*/
-static int calc_death_scythe_reflection_magnification(player_type *player_ptr)
+static int calc_death_scythe_reflection_magnification(PlayerType *player_ptr)
{
switch (player_ptr->mimic_form) {
case MIMIC_NONE:
* @param magnification ダメージ倍率
* @param death_scythe_flags 死の大鎌に関するオブジェクトフラグ配列
*/
-static void compensate_death_scythe_reflection_magnification(player_type *player_ptr, int *magnification, const TrFlags &death_scythe_flags)
+static void compensate_death_scythe_reflection_magnification(PlayerType *player_ptr, int *magnification, const TrFlags &death_scythe_flags)
{
if ((player_ptr->alignment < 0) && (*magnification < 20))
*magnification = 20;
* @param player_ptr プレイヤーへの参照ポインタ
* @param pa_ptr 直接攻撃構造体への参照ポインタ
*/
-void process_death_scythe_reflection(player_type *player_ptr, player_attack_type *pa_ptr)
+void process_death_scythe_reflection(PlayerType *player_ptr, player_attack_type *pa_ptr)
{
sound(SOUND_HIT);
msg_format(_("ミス! %sにかわされた。", "You miss %s."), pa_ptr->m_name);
#pragma once
struct player_attack_type;
-struct player_type;
-void process_death_scythe_reflection(player_type *player_ptr, player_attack_type *pa_ptr);
+class PlayerType;
+void process_death_scythe_reflection(PlayerType *player_ptr, player_attack_type *pa_ptr);
ae_ptr->o_ptr->inscription = quark_add(buf);
}
-static bool set_activation_target(player_type *player_ptr, ae_type *ae_ptr)
+static bool set_activation_target(PlayerType *player_ptr, ae_type *ae_ptr)
{
bool old_target_pet = target_pet;
target_pet = true;
return true;
}
-static void add_quark_to_inscription(player_type *player_ptr, ae_type *ae_ptr, concptr t, char *buf)
+static void add_quark_to_inscription(PlayerType *player_ptr, ae_type *ae_ptr, concptr t, char *buf)
{
if (!*t)
return;
ae_ptr->o_ptr->inscription = quark_add(buf);
}
-static void check_inscription_value(player_type *player_ptr, ae_type *ae_ptr)
+static void check_inscription_value(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->inscription == 0)
return;
add_quark_to_inscription(player_ptr, ae_ptr, t, buf);
}
-static void check_monster_ball_use(player_type *player_ptr, ae_type *ae_ptr)
+static void check_monster_ball_use(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (!monster_can_enter(player_ptr, player_ptr->y + ddy[ae_ptr->dir], player_ptr->x + ddx[ae_ptr->dir], &r_info[ae_ptr->o_ptr->pval], 0))
return;
ae_ptr->success = true;
}
-bool exe_monster_capture(player_type *player_ptr, ae_type *ae_ptr)
+bool exe_monster_capture(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != ItemKindType::CAPTURE)
return false;
#pragma once
typedef struct ae_type ae_type;
-struct player_type;
-bool exe_monster_capture(player_type *player_ptr, ae_type *ae_ptr);
+class PlayerType;
+bool exe_monster_capture(PlayerType *player_ptr, ae_type *ae_ptr);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-bool activate_muramasa(player_type *player_ptr, object_type *o_ptr)
+bool activate_muramasa(PlayerType *player_ptr, object_type *o_ptr)
{
if (o_ptr->name1 != ART_MURAMASA)
return false;
#pragma once
struct object_type;
-struct player_type;
-bool activate_muramasa(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool activate_muramasa(PlayerType *player_ptr, object_type *o_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param dir 発動の方向ID
*/
-static void exe_ring_of_power(player_type *player_ptr, DIRECTION dir)
+static void exe_ring_of_power(PlayerType *player_ptr, DIRECTION dir)
{
switch (randint1(10)) {
case 1:
}
}
-bool activate_ring_of_power(player_type *player_ptr, concptr name)
+bool activate_ring_of_power(PlayerType *player_ptr, concptr name)
{
DIRECTION dir;
msg_format(_("%sは漆黒に輝いた...", "The %s glows intensely black..."), name);
#include "system/angband.h"
-struct player_type;
-bool activate_ring_of_power(player_type *player_ptr, concptr name);
+class PlayerType;
+bool activate_ring_of_power(PlayerType *player_ptr, concptr name);
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
-StoneOfLore::StoneOfLore(player_type *player_ptr)
+StoneOfLore::StoneOfLore(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
#pragma once
-struct player_type;
+class PlayerType;
class StoneOfLore {
public:
- StoneOfLore(player_type *player_ptr);
+ StoneOfLore(PlayerType *player_ptr);
virtual ~StoneOfLore() = default;
bool perilous_secrets();
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
void consume_mp();
};
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-bool activate_toragoroshi(player_type *player_ptr)
+bool activate_toragoroshi(PlayerType *player_ptr)
{
msg_print(_("あなたは妖刀に魅入られた…", "You are fascinated by the cursed blade..."));
msg_print(_("「狂ほしく 血のごとき 月はのぼれり 秘めおきし 魔剣 いずこぞや」", "'Behold the blade arts.'"));
#pragma once
-struct player_type;
-bool activate_toragoroshi(player_type *player_ptr);
+class PlayerType;
+bool activate_toragoroshi(PlayerType *player_ptr);
* @details
* SWD: Experimental modification: multiple light sources have additive effect.
*/
-void update_lite_radius(player_type *player_ptr)
+void update_lite_radius(PlayerType *player_ptr)
{
player_ptr->cur_lite = 0;
for (int i = INVEN_MAIN_HAND; i < INVEN_TOTAL; i++) {
* *** *****
* ***
*/
-void update_lite(player_type *player_ptr)
+void update_lite(PlayerType *player_ptr)
{
// 前回照らされていた座標たちを格納する配列。
std::vector<Pos2D> points;
#include "object-enchant/tr-flags.h"
struct object_type;
-struct player_type;
+class PlayerType;
bool is_active_torch(object_type *o_ptr);
void torch_flags(object_type *o_ptr, TrFlags &flgs);
void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds);
void torch_lost_fuel(object_type *o_ptr);
-void update_lite_radius(player_type *player_ptr);
-void update_lite(player_type *player_ptr);
+void update_lite_radius(PlayerType *player_ptr);
+void update_lite(PlayerType *player_ptr);
#include "system/player-type-definition.h"
#include "view/display-messages.h"
-void blood_curse_to_enemy(player_type *player_ptr, MONSTER_IDX m_idx)
+void blood_curse_to_enemy(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[m_ptr->fy][m_ptr->fx];
#include "system/angband.h"
-struct player_type;
-void blood_curse_to_enemy(player_type *player_ptr, MONSTER_IDX m_idx);
+class PlayerType;
+void blood_curse_to_enemy(PlayerType *player_ptr, MONSTER_IDX m_idx);
* @param m_idx 地震を起こしたモンスターID(0ならばプレイヤー)
* @return 効力があった場合TRUEを返す
*/
-bool earthquake(player_type *player_ptr, POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
+bool earthquake(PlayerType *player_ptr, POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if ((floor_ptr->inside_quest && quest_type::is_fixed(floor_ptr->inside_quest)) || !floor_ptr->dun_level) {
#include "system/angband.h"
-struct player_type;
-bool earthquake(player_type *player_ptr, POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
+class PlayerType;
+bool earthquake(PlayerType *player_ptr, POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
*
* Beware of "sliding index errors".
*/
-bool recharge(player_type *player_ptr, int power)
+bool recharge(PlayerType *player_ptr, int power)
{
concptr q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? ");
concptr s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge.");
#pragma once
-struct player_type;
-bool recharge(player_type *player_ptr, int power);
+class PlayerType;
+bool recharge(PlayerType *player_ptr, int power);
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool wall_to_mud(player_type *player_ptr, DIRECTION dir, HIT_POINT dam)
+bool wall_to_mud(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(player_ptr, AttributeType::KILL_WALL, dir, dam, flg));
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool wizard_lock(player_type *player_ptr, DIRECTION dir)
+bool wizard_lock(PlayerType *player_ptr, DIRECTION dir)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(player_ptr, AttributeType::JAM_DOOR, dir, 20 + randint1(30), flg));
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool destroy_door(player_type *player_ptr, DIRECTION dir)
+bool destroy_door(PlayerType *player_ptr, DIRECTION dir)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(player_ptr, AttributeType::KILL_DOOR, dir, 0, flg));
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool disarm_trap(player_type *player_ptr, DIRECTION dir)
+bool disarm_trap(PlayerType *player_ptr, DIRECTION dir)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(player_ptr, AttributeType::KILL_TRAP, dir, 0, flg));
#include "system/angband.h"
-struct player_type;
-bool wall_to_mud(player_type *player_ptr, DIRECTION dir, HIT_POINT dam);
-bool wizard_lock(player_type *player_ptr, DIRECTION dir);
-bool destroy_door(player_type *player_ptr, DIRECTION dir);
-bool disarm_trap(player_type *player_ptr, DIRECTION dir);
+class PlayerType;
+bool wall_to_mud(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam);
+bool wizard_lock(PlayerType *player_ptr, DIRECTION dir);
+bool destroy_door(PlayerType *player_ptr, DIRECTION dir);
+bool disarm_trap(PlayerType *player_ptr, DIRECTION dir);
* @param plev パワー
* @return 作用が実際にあった場合TRUEを返す
*/
-bool charm_monster(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+bool charm_monster(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(player_ptr, AttributeType::CHARM, dir, plev, flg));
* @param plev パワー
* @return 作用が実際にあった場合TRUEを返す
*/
-bool control_one_undead(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+bool control_one_undead(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(player_ptr, AttributeType::CONTROL_UNDEAD, dir, plev, flg));
* @param plev パワー
* @return 作用が実際にあった場合TRUEを返す
*/
-bool control_one_demon(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+bool control_one_demon(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(player_ptr, AttributeType::CONTROL_DEMON, dir, plev, flg));
* @param plev パワー
* @return 作用が実際にあった場合TRUEを返す
*/
-bool charm_animal(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+bool charm_animal(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(player_ptr, AttributeType::CONTROL_ANIMAL, dir, plev, flg));
#include "system/angband.h"
-struct player_type;
-bool charm_monster(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-bool control_one_undead(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-bool control_one_demon(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-bool charm_animal(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+class PlayerType;
+bool charm_monster(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool control_one_undead(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool control_one_demon(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool charm_animal(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
* @return 解呪されたアイテムの数
* @details 永遠の呪いは解呪できない
*/
-static int exe_curse_removal(player_type *player_ptr, int all)
+static int exe_curse_removal(PlayerType *player_ptr, int all)
{
int cnt = 0;
for (int i = INVEN_MAIN_HAND; i < INVEN_TOTAL; i++) {
* @param player_ptr プレイヤーへの参照ポインタ
* @return 解呪に成功した装備数
*/
-int remove_curse(player_type *player_ptr) { return exe_curse_removal(player_ptr, false); }
+int remove_curse(PlayerType *player_ptr) { return exe_curse_removal(player_ptr, false); }
/*!
* @brief 装備の重い呪い解呪処理 /
* Remove all curses
* @return 解呪に成功した装備数
*/
-int remove_all_curse(player_type *player_ptr) { return exe_curse_removal(player_ptr, true); }
+int remove_all_curse(PlayerType *player_ptr) { return exe_curse_removal(player_ptr, true); }
#pragma once
-struct player_type;
-int remove_curse(player_type *player_ptr);
-int remove_all_curse(player_type *player_ptr);
+class PlayerType;
+int remove_curse(PlayerType *player_ptr);
+int remove_all_curse(PlayerType *player_ptr);
* @param known 地形から危険フラグを外すならTRUE
* @return 効力があった場合TRUEを返す
*/
-static bool detect_feat_flag(player_type *player_ptr, POSITION range, FloorFeatureType flag, bool known)
+static bool detect_feat_flag(PlayerType *player_ptr, POSITION range, FloorFeatureType flag, bool known)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @details
* 吟遊詩人による感知についてはFALSEを返す
*/
-bool detect_traps(player_type *player_ptr, POSITION range, bool known)
+bool detect_traps(PlayerType *player_ptr, POSITION range, bool known)
{
bool detect = detect_feat_flag(player_ptr, range, FloorFeatureType::TRAP, known);
if (!known && detect)
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_doors(player_type *player_ptr, POSITION range)
+bool detect_doors(PlayerType *player_ptr, POSITION range)
{
bool detect = detect_feat_flag(player_ptr, range, FloorFeatureType::DOOR, true);
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_stairs(player_type *player_ptr, POSITION range)
+bool detect_stairs(PlayerType *player_ptr, POSITION range)
{
bool detect = detect_feat_flag(player_ptr, range, FloorFeatureType::STAIRS, true);
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_treasure(player_type *player_ptr, POSITION range)
+bool detect_treasure(PlayerType *player_ptr, POSITION range)
{
bool detect = detect_feat_flag(player_ptr, range, FloorFeatureType::HAS_GOLD, true);
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_objects_gold(player_type *player_ptr, POSITION range)
+bool detect_objects_gold(PlayerType *player_ptr, POSITION range)
{
POSITION range2 = range;
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_objects_normal(player_type *player_ptr, POSITION range)
+bool detect_objects_normal(PlayerType *player_ptr, POSITION range)
{
POSITION range2 = range;
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
* It can probably be argued that this function is now too powerful.
* </pre>
*/
-bool detect_objects_magic(player_type *player_ptr, POSITION range)
+bool detect_objects_magic(PlayerType *player_ptr, POSITION range)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_normal(player_type *player_ptr, POSITION range)
+bool detect_monsters_normal(PlayerType *player_ptr, POSITION range)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_invis(player_type *player_ptr, POSITION range)
+bool detect_monsters_invis(PlayerType *player_ptr, POSITION range)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_evil(player_type *player_ptr, POSITION range)
+bool detect_monsters_evil(PlayerType *player_ptr, POSITION range)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_nonliving(player_type *player_ptr, POSITION range)
+bool detect_monsters_nonliving(PlayerType *player_ptr, POSITION range)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_mind(player_type *player_ptr, POSITION range)
+bool detect_monsters_mind(PlayerType *player_ptr, POSITION range)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @param Match 対応シンボルの混じったモンスター文字列(複数指定化)
* @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_string(player_type *player_ptr, POSITION range, concptr Match)
+bool detect_monsters_string(PlayerType *player_ptr, POSITION range, concptr Match)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @param match_flag 感知フラグ
* @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_xxx(player_type *player_ptr, POSITION range, uint32_t match_flag)
+bool detect_monsters_xxx(PlayerType *player_ptr, POSITION range, uint32_t match_flag)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* @param range 効果範囲
* @return 効力があった場合TRUEを返す
*/
-bool detect_all(player_type *player_ptr, POSITION range)
+bool detect_all(PlayerType *player_ptr, POSITION range)
{
bool detect = false;
if (detect_traps(player_ptr, range, true))
#include "system/angband.h"
-struct player_type;
-bool detect_traps(player_type *player_ptr, POSITION range, bool known);
-bool detect_doors(player_type* player_ptr, POSITION range);
-bool detect_stairs(player_type* player_ptr, POSITION range);
-bool detect_treasure(player_type* player_ptr, POSITION range);
-bool detect_objects_gold(player_type* player_ptr, POSITION range);
-bool detect_objects_normal(player_type* player_ptr, POSITION range);
-bool detect_objects_magic(player_type* player_ptr, POSITION range);
-bool detect_monsters_normal(player_type* player_ptr, POSITION range);
-bool detect_monsters_invis(player_type* player_ptr, POSITION range);
-bool detect_monsters_evil(player_type* player_ptr, POSITION range);
-bool detect_monsters_xxx(player_type* player_ptr, POSITION range, uint32_t match_flag);
-bool detect_monsters_string(player_type* player_ptr, POSITION range, concptr);
-bool detect_monsters_nonliving(player_type* player_ptr, POSITION range);
-bool detect_monsters_mind(player_type* player_ptr, POSITION range);
-bool detect_all(player_type* player_ptr, POSITION range);
+class PlayerType;
+bool detect_traps(PlayerType *player_ptr, POSITION range, bool known);
+bool detect_doors(PlayerType* player_ptr, POSITION range);
+bool detect_stairs(PlayerType* player_ptr, POSITION range);
+bool detect_treasure(PlayerType* player_ptr, POSITION range);
+bool detect_objects_gold(PlayerType* player_ptr, POSITION range);
+bool detect_objects_normal(PlayerType* player_ptr, POSITION range);
+bool detect_objects_magic(PlayerType* player_ptr, POSITION range);
+bool detect_monsters_normal(PlayerType* player_ptr, POSITION range);
+bool detect_monsters_invis(PlayerType* player_ptr, POSITION range);
+bool detect_monsters_evil(PlayerType* player_ptr, POSITION range);
+bool detect_monsters_xxx(PlayerType* player_ptr, POSITION range, uint32_t match_flag);
+bool detect_monsters_string(PlayerType* player_ptr, POSITION range, concptr);
+bool detect_monsters_nonliving(PlayerType* player_ptr, POSITION range);
+bool detect_monsters_mind(PlayerType* player_ptr, POSITION range);
+bool detect_all(PlayerType* player_ptr, POSITION range);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 生成が実際に試みられたらTRUEを返す
*/
-bool artifact_scroll(player_type *player_ptr)
+bool artifact_scroll(PlayerType *player_ptr)
{
concptr q = _("どのアイテムを強化しますか? ", "Enchant which item? ");
concptr s = _("強化できるアイテムがない。", "You have nothing to enchant.");
* Returns TRUE if something was mundanified, else FALSE.
* </pre>
*/
-bool mundane_spell(player_type *player_ptr, bool only_equip)
+bool mundane_spell(PlayerType *player_ptr, bool only_equip)
{
std::unique_ptr<ItemTester> item_tester = std::make_unique<AllMatchItemTester>();
if (only_equip)
#pragma once
-struct player_type;
-bool artifact_scroll(player_type *player_ptr);
-bool mundane_spell(player_type *player_ptr, bool only_equip);
+class PlayerType;
+bool artifact_scroll(PlayerType *player_ptr);
+bool mundane_spell(PlayerType *player_ptr, bool only_equip);
* @return 劣化処理に関するメッセージが発せられた場合はTRUEを返す /
* Return "TRUE" if the player notices anything
*/
-bool apply_disenchant(player_type *player_ptr, BIT_FLAGS mode)
+bool apply_disenchant(PlayerType *player_ptr, BIT_FLAGS mode)
{
int t = 0;
switch (randint1(8)) {
#include "system/angband.h"
-struct player_type;
-bool apply_disenchant(player_type *player_ptr, BIT_FLAGS mode);
+class PlayerType;
+bool apply_disenchant(PlayerType *player_ptr, BIT_FLAGS mode);
* @param wgt 許容重量
* @param require_los 射線の通りを要求するならばTRUE
*/
-void fetch_item(player_type *player_ptr, DIRECTION dir, WEIGHT wgt, bool require_los)
+void fetch_item(PlayerType *player_ptr, DIRECTION dir, WEIGHT wgt, bool require_los)
{
grid_type *g_ptr;
object_type *o_ptr;
player_ptr->redraw |= PR_MAP;
}
-bool fetch_monster(player_type *player_ptr)
+bool fetch_monster(PlayerType *player_ptr)
{
monster_type *m_ptr;
MONSTER_IDX m_idx;
#include "system/angband.h"
-struct player_type;
-void fetch_item(player_type *player_ptr, DIRECTION dir, WEIGHT wgt, bool require_los);
-bool fetch_monster(player_type *player_ptr);
+class PlayerType;
+void fetch_item(PlayerType *player_ptr, DIRECTION dir, WEIGHT wgt, bool require_los);
+bool fetch_monster(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param ninja 忍者かどうか
*/
-void wiz_lite(player_type *player_ptr, bool ninja)
+void wiz_lite(PlayerType *player_ptr, bool ninja)
{
/* Memorize objects */
for (OBJECT_IDX i = 1; i < player_ptr->current_floor_ptr->o_max; i++) {
/*
* Forget the dungeon map (ala "Thinking of Maud...").
*/
-void wiz_dark(player_type *player_ptr)
+void wiz_dark(PlayerType *player_ptr)
{
/* Forget every grid */
for (POSITION y = 1; y < player_ptr->current_floor_ptr->height - 1; y++) {
/*
* Hack -- map the current panel (plus some) ala "magic mapping"
*/
-void map_area(player_type *player_ptr, POSITION range)
+void map_area(PlayerType *player_ptr, POSITION range)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS))
range /= 3;
* "earthquake" by using the "full" to select "destruction".
* </pre>
*/
-bool destroy_area(player_type *player_ptr, POSITION y1, POSITION x1, POSITION r, bool in_generate)
+bool destroy_area(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION r, bool in_generate)
{
/* Prevent destruction of quest levels and town */
floor_type *floor_ptr = player_ptr->current_floor_ptr;
#include "system/angband.h"
-struct player_type;
-void wiz_lite(player_type *player_ptr, bool ninja);
-void wiz_dark(player_type *player_ptr);
-void map_area(player_type *player_ptr, POSITION range);
-bool destroy_area(player_type *player_ptr, POSITION y1, POSITION x1, POSITION r, bool in_generate);
+class PlayerType;
+void wiz_lite(PlayerType *player_ptr, bool ninja);
+void wiz_dark(PlayerType *player_ptr);
+void map_area(PlayerType *player_ptr, POSITION range);
+bool destroy_area(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION r, bool in_generate);
* @param spell_name 抹殺効果を起こした魔法の名前
* @return 効力があった場合TRUEを返す
*/
-bool genocide_aux(player_type *player_ptr, MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name)
+bool genocide_aux(PlayerType *player_ptr, MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param player_cast プレイヤーの魔法によるものならば TRUE
* @return 効力があった場合TRUEを返す
*/
-bool symbol_genocide(player_type *player_ptr, int power, bool player_cast)
+bool symbol_genocide(PlayerType *player_ptr, int power, bool player_cast)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
bool is_special_floor = floor_ptr->inside_quest && !random_quest_number(player_ptr, floor_ptr->dun_level);
* @param player_cast プレイヤーの魔法によるものならば TRUE
* @return 効力があった場合TRUEを返す
*/
-bool mass_genocide(player_type *player_ptr, int power, bool player_cast)
+bool mass_genocide(PlayerType *player_ptr, int power, bool player_cast)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
bool is_special_floor = floor_ptr->inside_quest && !random_quest_number(player_ptr, floor_ptr->dun_level);
* @param player_cast プレイヤーの魔法によるものならば TRUE
* @return 効力があった場合TRUEを返す
*/
-bool mass_genocide_undead(player_type *player_ptr, int power, bool player_cast)
+bool mass_genocide_undead(PlayerType *player_ptr, int power, bool player_cast)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
bool is_special_floor = floor_ptr->inside_quest && !random_quest_number(player_ptr, floor_ptr->dun_level);
#include "system/angband.h"
-struct player_type;
-bool genocide_aux(player_type *player_ptr, MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
-bool symbol_genocide(player_type *player_ptr, int power, bool player_cast);
-bool mass_genocide(player_type *player_ptr, int power, bool player_cast);
-bool mass_genocide_undead(player_type *player_ptr, int power, bool player_cast);
+class PlayerType;
+bool genocide_aux(PlayerType *player_ptr, MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
+bool symbol_genocide(PlayerType *player_ptr, int power, bool player_cast);
+bool mass_genocide(PlayerType *player_ptr, int power, bool player_cast);
+bool mass_genocide_undead(PlayerType *player_ptr, int power, bool player_cast);
* Leave a "rune of protection" which prevents monster movement
* @return 実際に設置が行われた場合TRUEを返す
*/
-bool create_rune_protection_one(player_type *player_ptr)
+bool create_rune_protection_one(PlayerType *player_ptr)
{
if (!cave_clean_bold(player_ptr->current_floor_ptr, player_ptr->y, player_ptr->x)) {
msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
* @param x 設置場所
* @return 実際に設置が行われた場合TRUEを返す
*/
-bool create_rune_explosion(player_type *player_ptr, POSITION y, POSITION x)
+bool create_rune_explosion(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!cave_clean_bold(floor_ptr, y, x)) {
* @brief プレイヤーの手による能動的な階段生成処理 /
* Create stairs at or move previously created stairs into the player location.
*/
-void stair_creation(player_type *player_ptr)
+void stair_creation(PlayerType *player_ptr)
{
bool up = true;
if (ironman_downward)
#include "system/angband.h"
-struct player_type;
-bool create_rune_protection_one(player_type *player_ptr);
-bool create_rune_explosion(player_type *player_ptr, POSITION y, POSITION x);
-void stair_creation(player_type *player_ptr);
+class PlayerType;
+bool create_rune_protection_one(PlayerType *player_ptr);
+bool create_rune_explosion(PlayerType *player_ptr, POSITION y, POSITION x);
+void stair_creation(PlayerType *player_ptr);
* Affect grids, objects, and monsters
* </pre>
*/
-bool fire_ball(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_ball(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
if (typ == AttributeType::CHARM_LIVING)
* Affect grids, objects, and monsters
* </pre>
*/
-bool fire_breath(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_breath(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
{
return fire_ball(player_ptr, typ, dir, dam, -rad);
}
* Affect grids, objects, and monsters
* </pre>
*/
-bool fire_rocket(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_rocket(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
{
POSITION tx = player_ptr->x + 99 * ddx[dir];
POSITION ty = player_ptr->y + 99 * ddy[dir];
* Affect grids, objects, and monsters
* </pre>
*/
-bool fire_ball_hide(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_ball_hide(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
{
POSITION tx = player_ptr->x + 99 * ddx[dir];
POSITION ty = player_ptr->y + 99 * ddy[dir];
* Option to hurt the player.
* </pre>
*/
-bool fire_meteor(player_type *player_ptr, MONSTER_IDX who, AttributeType typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
+bool fire_meteor(PlayerType *player_ptr, MONSTER_IDX who, AttributeType typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return project(player_ptr, who, rad, y, x, dam, typ, flg).notice;
* @param dev 回数分散
* @return 作用が実際にあった場合TRUEを返す
*/
-bool fire_blast(player_type *player_ptr, AttributeType typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev)
+bool fire_blast(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev)
{
POSITION ty, tx, y, x;
POSITION ly, lx;
* Affect monsters and grids (not objects).
* </pre>
*/
-bool fire_bolt(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam)
+bool fire_bolt(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
if (typ != AttributeType::ARROW)
* Affect monsters, grids and objects.
* </pre>
*/
-bool fire_beam(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam)
+bool fire_beam(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(player_ptr, typ, dir, dam, flg));
* Affect monsters, grids and objects.
* </pre>
*/
-bool fire_bolt_or_beam(player_type *player_ptr, PERCENTAGE prob, AttributeType typ, DIRECTION dir, HIT_POINT dam)
+bool fire_bolt_or_beam(PlayerType *player_ptr, PERCENTAGE prob, AttributeType typ, DIRECTION dir, HIT_POINT dam)
{
if (randint0(100) < prob) {
return (fire_beam(player_ptr, typ, dir, dam));
* @param flg フラグ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool project_hook(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg)
+bool project_hook(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg)
{
flg |= (PROJECT_THRU);
POSITION tx = player_ptr->x + ddx[dir];
#include "system/angband.h"
#include "effect/attribute-types.h"
-struct player_type;
-bool fire_ball(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_breath(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_rocket(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_ball_hide(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_meteor(player_type *player_ptr, MONSTER_IDX who, AttributeType typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
-bool fire_bolt(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam);
-bool fire_blast(player_type *player_ptr, AttributeType typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
-bool fire_beam(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam);
-bool fire_bolt_or_beam(player_type *player_ptr, PERCENTAGE prob, AttributeType typ, DIRECTION dir, HIT_POINT dam);
-bool project_hook(player_type *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
+class PlayerType;
+bool fire_ball(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_breath(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_rocket(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_ball_hide(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_meteor(PlayerType *player_ptr, MONSTER_IDX who, AttributeType typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
+bool fire_bolt(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam);
+bool fire_blast(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
+bool fire_beam(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam);
+bool fire_bolt_or_beam(PlayerType *player_ptr, PERCENTAGE prob, AttributeType typ, DIRECTION dir, HIT_POINT dam);
+bool project_hook(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
* </pre>
* @todo この辺、xとyが引数になっているが、player_ptr->xとplayer_ptr->yで全て置き換えが効くはず……
*/
-static void cave_temp_room_lite(player_type *player_ptr, const std::vector<Pos2D> &points)
+static void cave_temp_room_lite(PlayerType *player_ptr, const std::vector<Pos2D> &points)
{
for (const auto &point : points) {
const POSITION y = point.y;
* </pre>
* @todo この辺、xとyが引数になっているが、player_ptr->xとplayer_ptr->yで全て置き換えが効くはず……
*/
-static void cave_temp_room_unlite(player_type *player_ptr, const std::vector<Pos2D> &points)
+static void cave_temp_room_unlite(PlayerType *player_ptr, const std::vector<Pos2D> &points)
{
for (const auto &point : points) {
const POSITION y = point.y;
* @param pass_bold 地形条件を返す関数ポインタ
*/
static void cave_temp_room_aux(
- player_type *player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x, const bool only_room, const PassBoldFunc pass_bold)
+ PlayerType *player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x, const bool only_room, const PassBoldFunc pass_bold)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
* @param y 指定Y座標
* @param x 指定X座標
*/
-static void cave_temp_lite_room_aux(player_type *player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x)
+static void cave_temp_lite_room_aux(PlayerType *player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x)
{
cave_temp_room_aux(player_ptr, points, y, x, false, cave_los_bold);
}
* @param y 指定Y座標
* @param x 指定X座標
*/
-static void cave_temp_unlite_room_aux(player_type *player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x)
+static void cave_temp_unlite_room_aux(PlayerType *player_ptr, std::vector<Pos2D> &points, const POSITION y, const POSITION x)
{
cave_temp_room_aux(player_ptr, points, y, x, true, cave_pass_dark_bold);
}
*
* NOTE: 部屋に限らないかも?
*/
-void lite_room(player_type *player_ptr, const POSITION y1, const POSITION x1)
+void lite_room(PlayerType *player_ptr, const POSITION y1, const POSITION x1)
{
// 明るくするマスを記録する配列。
std::vector<Pos2D> points;
* @param y1 指定Y座標
* @param x1 指定X座標
*/
-void unlite_room(player_type *player_ptr, const POSITION y1, const POSITION x1)
+void unlite_room(PlayerType *player_ptr, const POSITION y1, const POSITION x1)
{
// 暗くするマスを記録する配列。
std::vector<Pos2D> points;
* @param magic 魔法による効果であればTRUE、スターライトの杖による効果であればFALSE
* @return 常にTRUE
*/
-bool starlight(player_type *player_ptr, bool magic)
+bool starlight(PlayerType *player_ptr, bool magic)
{
if (!player_ptr->blind && !magic) {
msg_print(_("杖の先が明るく輝いた...", "The end of the staff glows brightly..."));
* @param rad 効果半径
* @return 作用が実際にあった場合TRUEを返す
*/
-bool lite_area(player_type *player_ptr, HIT_POINT dam, POSITION rad)
+bool lite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
{
if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS)) {
msg_print(_("ダンジョンが光を吸収した。", "The darkness of this dungeon absorbs your light."));
* @param rad 効果半径
* @return 作用が実際にあった場合TRUEを返す
*/
-bool unlite_area(player_type *player_ptr, HIT_POINT dam, POSITION rad)
+bool unlite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
{
if (!player_ptr->blind) {
msg_print(_("暗闇が辺りを覆った。", "Darkness surrounds you."));
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool lite_line(player_type *player_ptr, DIRECTION dir, HIT_POINT dam)
+bool lite_line(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
return (project_hook(player_ptr, AttributeType::LITE_WEAK, dir, dam, flg));
#include "system/angband.h"
-struct player_type;
-void lite_room(player_type *player_ptr, POSITION y1, POSITION x1);
-bool starlight(player_type *player_ptr, bool magic);
-void unlite_room(player_type *player_ptr, POSITION y1, POSITION x1);
-bool lite_area(player_type *player_ptr, HIT_POINT dam, POSITION rad);
-bool unlite_area(player_type *player_ptr, HIT_POINT dam, POSITION rad);
-bool lite_line(player_type *player_ptr, DIRECTION dir, HIT_POINT dam);
+class PlayerType;
+void lite_room(PlayerType *player_ptr, POSITION y1, POSITION x1);
+bool starlight(PlayerType *player_ptr, bool magic);
+void unlite_room(PlayerType *player_ptr, POSITION y1, POSITION x1);
+bool lite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad);
+bool unlite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad);
+bool lite_line(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool door_creation(player_type *player_ptr, POSITION y, POSITION x)
+bool door_creation(PlayerType *player_ptr, POSITION y, POSITION x)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return project(player_ptr, 0, 1, y, x, 0, AttributeType::MAKE_DOOR, flg).notice;
* @param x 起点X座標
* @return 作用が実際にあった場合TRUEを返す
*/
-bool trap_creation(player_type *player_ptr, POSITION y, POSITION x)
+bool trap_creation(PlayerType *player_ptr, POSITION y, POSITION x)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return project(player_ptr, 0, 1, y, x, 0, AttributeType::MAKE_TRAP, flg).notice;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool tree_creation(player_type *player_ptr, POSITION y, POSITION x)
+bool tree_creation(PlayerType *player_ptr, POSITION y, POSITION x)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return project(player_ptr, 0, 1, y, x, 0, AttributeType::MAKE_TREE, flg).notice;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool create_rune_protection_area(player_type *player_ptr, POSITION y, POSITION x)
+bool create_rune_protection_area(PlayerType *player_ptr, POSITION y, POSITION x)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM;
return project(player_ptr, 0, 1, y, x, 0, AttributeType::MAKE_RUNE_PROTECTION, flg).notice;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool wall_stone(player_type *player_ptr)
+bool wall_stone(PlayerType *player_ptr)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
bool dummy = project(player_ptr, 0, 1, player_ptr->y, player_ptr->x, 0, AttributeType::STONE_WALL, flg).notice;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool destroy_doors_touch(player_type *player_ptr)
+bool destroy_doors_touch(PlayerType *player_ptr)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return project(player_ptr, 0, 1, player_ptr->y, player_ptr->x, 0, AttributeType::KILL_DOOR, flg).notice;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool disarm_traps_touch(player_type *player_ptr)
+bool disarm_traps_touch(PlayerType *player_ptr)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return project(player_ptr, 0, 1, player_ptr->y, player_ptr->x, 0, AttributeType::KILL_TRAP, flg).notice;
* @param player_ptr プレイヤーへの参照ポインタ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool sleep_monsters_touch(player_type *player_ptr)
+bool sleep_monsters_touch(PlayerType *player_ptr)
{
BIT_FLAGS flg = PROJECT_KILL | PROJECT_HIDE;
return project(player_ptr, 0, 1, player_ptr->y, player_ptr->x, player_ptr->lev, AttributeType::OLD_SLEEP, flg).notice;
* @param x 起点X座標
* @return 作用が実際にあった場合TRUEを返す
*/
-bool animate_dead(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x)
+bool animate_dead(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x)
{
BIT_FLAGS flg = PROJECT_ITEM | PROJECT_HIDE;
return project(player_ptr, who, 5, y, x, 0, AttributeType::ANIM_DEAD, flg).notice;
* @brief 周辺破壊効果(プレイヤー中心)
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void wall_breaker(player_type *player_ptr)
+void wall_breaker(PlayerType *player_ptr)
{
POSITION y = 0, x = 0;
int attempts = 1000;
#include "system/angband.h"
-struct player_type;
-bool door_creation(player_type *player_ptr, POSITION y, POSITION x);
-bool trap_creation(player_type *player_ptr, POSITION y, POSITION x);
-bool tree_creation(player_type *player_ptr, POSITION y, POSITION x);
-bool create_rune_protection_area(player_type *player_ptr, POSITION y, POSITION x);
-bool wall_stone(player_type *player_ptr);
-bool destroy_doors_touch(player_type *player_ptr);
-bool disarm_traps_touch(player_type *player_ptr);
-bool sleep_monsters_touch(player_type *player_ptr);
-bool animate_dead(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x);
-void wall_breaker(player_type *player_ptr);
+class PlayerType;
+bool door_creation(PlayerType *player_ptr, POSITION y, POSITION x);
+bool trap_creation(PlayerType *player_ptr, POSITION y, POSITION x);
+bool tree_creation(PlayerType *player_ptr, POSITION y, POSITION x);
+bool create_rune_protection_area(PlayerType *player_ptr, POSITION y, POSITION x);
+bool wall_stone(PlayerType *player_ptr);
+bool destroy_doors_touch(PlayerType *player_ptr);
+bool disarm_traps_touch(PlayerType *player_ptr);
+bool sleep_monsters_touch(PlayerType *player_ptr);
+bool animate_dead(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x);
+void wall_breaker(PlayerType *player_ptr);
* Done by a potion of "self knowledge".
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void identify_pack(player_type *player_ptr)
+void identify_pack(PlayerType *player_ptr)
{
for (INVENTORY_IDX i = 0; i < INVEN_TOTAL; i++) {
object_type *o_ptr = &player_ptr->inventory_list[i];
* @param o_ptr 鑑定されるアイテムの情報参照ポインタ
* @return 実際に鑑定できたらTRUEを返す
*/
-bool identify_item(player_type *player_ptr, object_type *o_ptr)
+bool identify_item(PlayerType *player_ptr, object_type *o_ptr)
{
GAME_TEXT o_name[MAX_NLEN];
describe_flavor(player_ptr, o_name, o_ptr, 0);
* This routine does *not* automatically combine objects.
* Returns TRUE if something was identified, else FALSE.
*/
-bool ident_spell(player_type *player_ptr, bool only_equip)
+bool ident_spell(PlayerType *player_ptr, bool only_equip)
{
std::unique_ptr<ItemTester> item_tester = std::make_unique<FuncItemTester>(only_equip ? object_is_not_identified_weapon_armor : object_is_not_identified);
* Fully "identify" an object in the inventory -BEN-
* This routine returns TRUE if an item was identified.
*/
-bool identify_fully(player_type *player_ptr, bool only_equip)
+bool identify_fully(PlayerType *player_ptr, bool only_equip)
{
std::unique_ptr<ItemTester> item_tester
= std::make_unique<FuncItemTester>(only_equip ? object_is_not_fully_identified_weapon_armour : object_is_not_fully_identified);
#include "system/angband.h"
struct object_type;
-struct player_type;
-void identify_pack(player_type *player_ptr);
-bool identify_item(player_type *player_ptr, object_type *o_ptr);
-bool ident_spell(player_type *player_ptr, bool only_equip);
-bool identify_fully(player_type *player_ptr, bool only_equip);
+class PlayerType;
+void identify_pack(PlayerType *player_ptr);
+bool identify_item(PlayerType *player_ptr, object_type *o_ptr);
+bool ident_spell(PlayerType *player_ptr, bool only_equip);
+bool identify_fully(PlayerType *player_ptr, bool only_equip);
/*!
* @brief ペット爆破処理 /
*/
-void discharge_minion(player_type *player_ptr)
+void discharge_minion(PlayerType *player_ptr)
{
bool okay = true;
for (MONSTER_IDX i = 1; i < player_ptr->current_floor_ptr->m_max; i++) {
#pragma once
-struct player_type;
-void discharge_minion(player_type *player_ptr);
+class PlayerType;
+void discharge_minion(PlayerType *player_ptr);
* @details
* Note that this function is one of the more "dangerous" ones...
*/
-static MONRACE_IDX poly_r_idx(player_type *player_ptr, MONRACE_IDX r_idx)
+static MONRACE_IDX poly_r_idx(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags1 & RF1_QUESTOR))
* @param x 指定のX座標
* @return 実際に変身したらTRUEを返す
*/
-bool polymorph_monster(player_type *player_ptr, POSITION y, POSITION x)
+bool polymorph_monster(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
#include "system/angband.h"
-struct player_type;
-bool polymorph_monster(player_type *player_ptr, POSITION y, POSITION x);
+class PlayerType;
+bool polymorph_monster(PlayerType *player_ptr, POSITION y, POSITION x);
* @brief 混沌招来処理
* @return 作用が実際にあった場合TRUEを返す
*/
-void call_chaos(player_type *player_ptr)
+void call_chaos(PlayerType *player_ptr)
{
AttributeType hurt_types[31] = { AttributeType::ELEC, AttributeType::POIS, AttributeType::ACID, AttributeType::COLD, AttributeType::FIRE,
AttributeType::MISSILE, AttributeType::ARROW, AttributeType::PLASMA, AttributeType::HOLY_FIRE, AttributeType::WATER, AttributeType::LITE,
* or the player gets paralyzed.
* </pre>
*/
-bool activate_ty_curse(player_type *player_ptr, bool stop_ty, int *count)
+bool activate_ty_curse(PlayerType *player_ptr, bool stop_ty, int *count)
{
BIT_FLAGS flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
bool is_first_curse = true;
* @param player_ptr プレイヤーへの参照ポインタ
* @param spell ランダムな効果を選択するための基準ID
*/
-void wild_magic(player_type *player_ptr, int spell)
+void wild_magic(PlayerType *player_ptr, int spell)
{
int type = SUMMON_MOLD + randint0(6);
if (type < SUMMON_MOLD)
* while keeping the results quite random. It also allows some potent\n
* effects only at high level.
*/
-void cast_wonder(player_type *player_ptr, DIRECTION dir)
+void cast_wonder(PlayerType *player_ptr, DIRECTION dir)
{
PLAYER_LEVEL plev = player_ptr->lev;
int die = randint1(100) + plev / 5;
#include "system/angband.h"
-struct player_type;
-void wild_magic(player_type *player_ptr, int spell);
-void call_chaos(player_type *player_ptr);
-bool activate_ty_curse(player_type *player_ptr, bool stop_ty, int *count);
-void cast_wonder(player_type *player_ptr, DIRECTION dir);
+class PlayerType;
+void wild_magic(PlayerType *player_ptr, int spell);
+void call_chaos(PlayerType *player_ptr);
+bool activate_ty_curse(PlayerType *player_ptr, bool stop_ty, int *count);
+void cast_wonder(PlayerType *player_ptr, DIRECTION dir);
* this is done in two passes. -- JDL
* </pre>
*/
-bool project_all_los(player_type *player_ptr, AttributeType typ, HIT_POINT dam)
+bool project_all_los(PlayerType *player_ptr, AttributeType typ, HIT_POINT dam)
{
for (MONSTER_IDX i = 1; i < player_ptr->current_floor_ptr->m_max; i++) {
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[i];
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool speed_monsters(player_type *player_ptr)
+bool speed_monsters(PlayerType *player_ptr)
{
return (project_all_los(player_ptr, AttributeType::OLD_SPEED, player_ptr->lev));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool slow_monsters(player_type *player_ptr, int power)
+bool slow_monsters(PlayerType *player_ptr, int power)
{
return (project_all_los(player_ptr, AttributeType::OLD_SLOW, power));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool sleep_monsters(player_type *player_ptr, int power)
+bool sleep_monsters(PlayerType *player_ptr, int power)
{
return (project_all_los(player_ptr, AttributeType::OLD_SLEEP, power));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool banish_evil(player_type *player_ptr, int dist)
+bool banish_evil(PlayerType *player_ptr, int dist)
{
return (project_all_los(player_ptr, AttributeType::AWAY_EVIL, dist));
}
* @brief 視界内のアンデッド・モンスターを恐怖させる処理 / Turn undead
* @return 効力があった場合TRUEを返す
*/
-bool turn_undead(player_type *player_ptr)
+bool turn_undead(PlayerType *player_ptr)
{
bool tester = (project_all_los(player_ptr, AttributeType::TURN_UNDEAD, player_ptr->lev));
if (tester)
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool dispel_undead(player_type *player_ptr, HIT_POINT dam)
+bool dispel_undead(PlayerType *player_ptr, HIT_POINT dam)
{
bool tester = (project_all_los(player_ptr, AttributeType::DISP_UNDEAD, dam));
if (tester)
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool dispel_evil(player_type *player_ptr, HIT_POINT dam)
+bool dispel_evil(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::DISP_EVIL, dam));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool dispel_good(player_type *player_ptr, HIT_POINT dam)
+bool dispel_good(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::DISP_GOOD, dam));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool dispel_monsters(player_type *player_ptr, HIT_POINT dam)
+bool dispel_monsters(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::DISP_ALL, dam));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool dispel_living(player_type *player_ptr, HIT_POINT dam)
+bool dispel_living(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::DISP_LIVING, dam));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool dispel_demons(player_type *player_ptr, HIT_POINT dam)
+bool dispel_demons(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::DISP_DEMON, dam));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 効力があった場合TRUEを返す
*/
-bool crusade(player_type *player_ptr)
+bool crusade(PlayerType *player_ptr)
{
return (project_all_los(player_ptr, AttributeType::CRUSADE, player_ptr->lev * 4));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @param who 怒らせる原因を起こしたモンスター(0ならばプレイヤー)
*/
-void aggravate_monsters(player_type *player_ptr, MONSTER_IDX who)
+void aggravate_monsters(PlayerType *player_ptr, MONSTER_IDX who)
{
bool sleep = false;
bool speed = false;
* @param dam 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool confuse_monsters(player_type *player_ptr, HIT_POINT dam)
+bool confuse_monsters(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::OLD_CONF, dam));
}
* @param dam 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool charm_monsters(player_type *player_ptr, HIT_POINT dam)
+bool charm_monsters(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::CHARM, dam));
}
* @param dam 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool charm_animals(player_type *player_ptr, HIT_POINT dam)
+bool charm_animals(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::CONTROL_ANIMAL, dam));
}
* @param dam 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool stun_monsters(player_type *player_ptr, HIT_POINT dam)
+bool stun_monsters(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::STUN, dam));
}
* @param dam 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool stasis_monsters(player_type *player_ptr, HIT_POINT dam)
+bool stasis_monsters(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::STASIS, dam));
}
* @param dam 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool mindblast_monsters(player_type *player_ptr, HIT_POINT dam)
+bool mindblast_monsters(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::PSI, dam));
}
* @param dist 効力(距離)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool banish_monsters(player_type *player_ptr, int dist)
+bool banish_monsters(PlayerType *player_ptr, int dist)
{
return (project_all_los(player_ptr, AttributeType::AWAY_ALL, dist));
}
* @param dam 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool turn_evil(player_type *player_ptr, HIT_POINT dam)
+bool turn_evil(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::TURN_EVIL, dam));
}
* @param dam 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool turn_monsters(player_type *player_ptr, HIT_POINT dam)
+bool turn_monsters(PlayerType *player_ptr, HIT_POINT dam)
{
return (project_all_los(player_ptr, AttributeType::TURN_ALL, dam));
}
* @param player_ptr プレイヤーへの参照ポインタ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool deathray_monsters(player_type *player_ptr)
+bool deathray_monsters(PlayerType *player_ptr)
{
return (project_all_los(player_ptr, AttributeType::DEATH_RAY, player_ptr->lev * 200));
}
* @param m_ptr モンスター情報への参照ポインタ
* @param r_ptr モンスター種族への参照ポインタ
*/
-void probed_monster_info(char *buf, player_type *player_ptr, monster_type *m_ptr, monster_race *r_ptr)
+void probed_monster_info(char *buf, PlayerType *player_ptr, monster_type *m_ptr, monster_race *r_ptr)
{
if (!is_original_ap(m_ptr)) {
if (m_ptr->mflag2.has(MonsterConstantFlagType::KAGE))
* @brief 周辺モンスターを調査する / Probe nearby monsters
* @return 効力があった場合TRUEを返す
*/
-bool probing(player_type *player_ptr)
+bool probing(PlayerType *player_ptr)
{
bool cu = Term->scr->cu;
bool cv = Term->scr->cv;
struct monster_race;
struct monster_type;
-struct player_type;
-bool project_all_los(player_type *player_ptr, AttributeType typ, HIT_POINT dam);
-bool speed_monsters(player_type *player_ptr);
-bool slow_monsters(player_type *player_ptr, int power);
-bool sleep_monsters(player_type *player_ptr, int power);
-void aggravate_monsters(player_type *player_ptr, MONSTER_IDX who);
-bool banish_evil(player_type *player_ptr, int dist);
-bool turn_undead(player_type *player_ptr);
-bool dispel_evil(player_type *player_ptr, HIT_POINT dam);
-bool dispel_good(player_type *player_ptr, HIT_POINT dam);
-bool dispel_undead(player_type *player_ptr, HIT_POINT dam);
-bool dispel_monsters(player_type *player_ptr, HIT_POINT dam);
-bool dispel_living(player_type *player_ptr, HIT_POINT dam);
-bool dispel_demons(player_type *player_ptr, HIT_POINT dam);
-bool crusade(player_type *player_ptr);
-bool confuse_monsters(player_type *player_ptr, HIT_POINT dam);
-bool charm_monsters(player_type *player_ptr, HIT_POINT dam);
-bool charm_animals(player_type *player_ptr, HIT_POINT dam);
-bool stun_monsters(player_type *player_ptr, HIT_POINT dam);
-bool stasis_monsters(player_type *player_ptr, HIT_POINT dam);
-bool mindblast_monsters(player_type *player_ptr, HIT_POINT dam);
-bool banish_monsters(player_type *player_ptr, int dist);
-bool turn_evil(player_type *player_ptr, HIT_POINT dam);
-bool turn_monsters(player_type *player_ptr, HIT_POINT dam);
-bool deathray_monsters(player_type *player_ptr);
-void probed_monster_info(char *buf, player_type *player_ptr, monster_type *m_ptr, monster_race *r_ptr);
-bool probing(player_type *player_ptr);
+class PlayerType;
+bool project_all_los(PlayerType *player_ptr, AttributeType typ, HIT_POINT dam);
+bool speed_monsters(PlayerType *player_ptr);
+bool slow_monsters(PlayerType *player_ptr, int power);
+bool sleep_monsters(PlayerType *player_ptr, int power);
+void aggravate_monsters(PlayerType *player_ptr, MONSTER_IDX who);
+bool banish_evil(PlayerType *player_ptr, int dist);
+bool turn_undead(PlayerType *player_ptr);
+bool dispel_evil(PlayerType *player_ptr, HIT_POINT dam);
+bool dispel_good(PlayerType *player_ptr, HIT_POINT dam);
+bool dispel_undead(PlayerType *player_ptr, HIT_POINT dam);
+bool dispel_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool dispel_living(PlayerType *player_ptr, HIT_POINT dam);
+bool dispel_demons(PlayerType *player_ptr, HIT_POINT dam);
+bool crusade(PlayerType *player_ptr);
+bool confuse_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool charm_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool charm_animals(PlayerType *player_ptr, HIT_POINT dam);
+bool stun_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool stasis_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool mindblast_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool banish_monsters(PlayerType *player_ptr, int dist);
+bool turn_evil(PlayerType *player_ptr, HIT_POINT dam);
+bool turn_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool deathray_monsters(PlayerType *player_ptr);
+void probed_monster_info(char *buf, PlayerType *player_ptr, monster_type *m_ptr, monster_race *r_ptr);
+bool probing(PlayerType *player_ptr);
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool hypodynamic_bolt(player_type *player_ptr, DIRECTION dir, HIT_POINT dam)
+bool hypodynamic_bolt(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::HYPODYNAMIA, dir, dam, flg));
* @param plev プレイヤーレベル(効力はplev*200)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool death_ray(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+bool death_ray(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::DEATH_RAY, dir, plev * 200, flg));
#include "system/angband.h"
-struct player_type;
-bool hypodynamic_bolt(player_type *player_ptr, DIRECTION dir, HIT_POINT dam);
-bool death_ray(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+class PlayerType;
+bool hypodynamic_bolt(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam);
+bool death_ray(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool teleport_swap(player_type *player_ptr, DIRECTION dir)
+bool teleport_swap(PlayerType *player_ptr, DIRECTION dir)
{
POSITION tx, ty;
if ((dir == 5) && target_okay(player_ptr)) {
* @param distance 移動距離
* @return 作用が実際にあった場合TRUEを返す
*/
-bool teleport_monster(player_type *player_ptr, DIRECTION dir, int distance)
+bool teleport_monster(PlayerType *player_ptr, DIRECTION dir, int distance)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL;
return (project_hook(player_ptr, AttributeType::AWAY_ALL, dir, distance, flg));
* Attempt to move the monster at least "dis/2" grids away.
* But allow variation to prevent infinite loops.
*/
-bool teleport_away(player_type *player_ptr, MONSTER_IDX m_idx, POSITION dis, teleport_flags mode)
+bool teleport_away(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION dis, teleport_flags mode)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
if (!monster_is_valid(m_ptr))
* @param power テレポート成功確率
* @param mode オプション
*/
-void teleport_monster_to(player_type *player_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, teleport_flags mode)
+void teleport_monster_to(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, teleport_flags mode)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
if (!m_ptr->r_idx)
* of candidates has equal possibility to be choosen as a destination.
* </pre>
*/
-bool teleport_player_aux(player_type *player_ptr, POSITION dis, bool is_quantum_effect, teleport_flags mode)
+bool teleport_player_aux(PlayerType *player_ptr, POSITION dis, bool is_quantum_effect, teleport_flags mode)
{
if (player_ptr->wild_mode)
return false;
* @param dis 基本移動距離
* @param mode オプション
*/
-void teleport_player(player_type *player_ptr, POSITION dis, BIT_FLAGS mode)
+void teleport_player(PlayerType *player_ptr, POSITION dis, BIT_FLAGS mode)
{
const POSITION oy = player_ptr->y;
const POSITION ox = player_ptr->x;
* @param dis テレポート距離
* @param is_quantum_effect 量子的効果によるテレポートアウェイならばTRUE
*/
-void teleport_player_away(MONSTER_IDX m_idx, player_type *player_ptr, POSITION dis, bool is_quantum_effect)
+void teleport_player_away(MONSTER_IDX m_idx, PlayerType *player_ptr, POSITION dis, bool is_quantum_effect)
{
if (player_ptr->phase_out)
return;
* This function allows teleporting into vaults (!)
* </pre>
*/
-void teleport_player_to(player_type *player_ptr, POSITION ny, POSITION nx, teleport_flags mode)
+void teleport_player_to(PlayerType *player_ptr, POSITION ny, POSITION nx, teleport_flags mode)
{
if (player_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL)) {
msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
(void)move_player_effect(player_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
}
-void teleport_away_followable(player_type *player_ptr, MONSTER_IDX m_idx)
+void teleport_away_followable(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
POSITION oldfy = m_ptr->fy;
* @param y テレポート先のY座標
* @return 目標に指定通りテレポートできたならばTRUEを返す
*/
-bool exe_dimension_door(player_type *player_ptr, POSITION x, POSITION y)
+bool exe_dimension_door(PlayerType *player_ptr, POSITION x, POSITION y)
{
PLAYER_LEVEL plev = player_ptr->lev;
* Dimension Door
* @return ターンを消費した場合TRUEを返す
*/
-bool dimension_door(player_type *player_ptr)
+bool dimension_door(PlayerType *player_ptr)
{
DEPTH x = 0, y = 0;
if (!tgt_pt(player_ptr, &x, &y))
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-bool teleport_monster(player_type *player_ptr, DIRECTION dir, int distance);
-bool teleport_swap(player_type *player_ptr, DIRECTION dir);
-bool teleport_away(player_type *player_ptr, MONSTER_IDX m_idx, POSITION dis, teleport_flags mode);
-void teleport_monster_to(player_type *player_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, teleport_flags mode);
-bool teleport_player_aux(player_type *player_ptr, POSITION dis, bool is_quantum_effect, teleport_flags mode);
-void teleport_player(player_type *player_ptr, POSITION dis, BIT_FLAGS mode);
-void teleport_player_away(MONSTER_IDX m_idx, player_type *player_ptr, POSITION dis, bool is_quantum_effect);
-void teleport_player_to(player_type *player_ptr, POSITION ny, POSITION nx, teleport_flags mode);
-void teleport_away_followable(player_type *player_ptr, MONSTER_IDX m_idx);
-bool dimension_door(player_type *player_ptr);
-bool exe_dimension_door(player_type *player_ptr, POSITION x, POSITION y);
+class PlayerType;
+bool teleport_monster(PlayerType *player_ptr, DIRECTION dir, int distance);
+bool teleport_swap(PlayerType *player_ptr, DIRECTION dir);
+bool teleport_away(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION dis, teleport_flags mode);
+void teleport_monster_to(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, teleport_flags mode);
+bool teleport_player_aux(PlayerType *player_ptr, POSITION dis, bool is_quantum_effect, teleport_flags mode);
+void teleport_player(PlayerType *player_ptr, POSITION dis, BIT_FLAGS mode);
+void teleport_player_away(MONSTER_IDX m_idx, PlayerType *player_ptr, POSITION dis, bool is_quantum_effect);
+void teleport_player_to(PlayerType *player_ptr, POSITION ny, POSITION nx, teleport_flags mode);
+void teleport_away_followable(PlayerType *player_ptr, MONSTER_IDX m_idx);
+bool dimension_door(PlayerType *player_ptr);
+bool exe_dimension_door(PlayerType *player_ptr, POSITION x, POSITION y);
* @param idx テレポート・レベル対象のモンスター
* @todo 変数名が実態と合っているかどうかは要確認
*/
-bool is_teleport_level_ineffective(player_type *player_ptr, MONSTER_IDX idx)
+bool is_teleport_level_ineffective(PlayerType *player_ptr, MONSTER_IDX idx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
bool is_special_floor
* @param m_idx テレポートの対象となるモンスターID(0ならばプレイヤー) / If m_idx <= 0, target is player.
* @todo cmd-save.h への依存あり。コールバックで何とかしたい
*/
-void teleport_level(player_type *player_ptr, MONSTER_IDX m_idx)
+void teleport_level(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
GAME_TEXT m_name[160];
bool see_m = true;
sound(SOUND_TPLEVEL);
}
-bool teleport_level_other(player_type *player_ptr)
+bool teleport_level_other(PlayerType *player_ptr)
{
if (!target_set(player_ptr, TARGET_KILL))
return false;
* @param player_ptr プレイヤーへの参照ポインタ
* @return テレポート処理を決定したか否か
*/
-bool tele_town(player_type *player_ptr)
+bool tele_town(PlayerType *player_ptr)
{
if (player_ptr->current_floor_ptr->dun_level) {
msg_print(_("この魔法は地上でしか使えない!", "This spell can only be used on the surface!"));
* @brief 現実変容処理
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void reserve_alter_reality(player_type *player_ptr, TIME_EFFECT turns)
+void reserve_alter_reality(PlayerType *player_ptr, TIME_EFFECT turns)
{
if (player_ptr->current_floor_ptr->inside_arena || ironman_downward) {
msg_print(_("何も起こらなかった。", "Nothing happens."));
* @param turns 発動までのターン数
* @return 常にTRUEを返す
*/
-bool recall_player(player_type *player_ptr, TIME_EFFECT turns)
+bool recall_player(PlayerType *player_ptr, TIME_EFFECT turns)
{
/*
* TODO: Recall the player to the last
return true;
}
-bool free_level_recall(player_type *player_ptr)
+bool free_level_recall(PlayerType *player_ptr)
{
DUNGEON_IDX select_dungeon = choose_dungeon(_("にテレポート", "teleport"), 4, 0);
if (!select_dungeon)
* @param player_ptr プレイヤーへの参照ポインタ
* @return リセット処理が実際に行われたらTRUEを返す
*/
-bool reset_recall(player_type *player_ptr)
+bool reset_recall(PlayerType *player_ptr)
{
int select_dungeon, dummy = 0;
char ppp[80];
#include "system/angband.h"
-struct player_type;
-void teleport_level(player_type *player_ptr, MONSTER_IDX m_idx);
-bool teleport_level_other(player_type *player_ptr);
-bool tele_town(player_type *player_ptr);
-void reserve_alter_reality(player_type *player_ptr, TIME_EFFECT turns);
-bool is_teleport_level_ineffective(player_type *player_ptr, MONSTER_IDX idx);
-bool recall_player(player_type *player_ptr, TIME_EFFECT turns);
-bool free_level_recall(player_type *player_ptr);
-bool reset_recall(player_type *player_ptr);
+class PlayerType;
+void teleport_level(PlayerType *player_ptr, MONSTER_IDX m_idx);
+bool teleport_level_other(PlayerType *player_ptr);
+bool tele_town(PlayerType *player_ptr);
+void reserve_alter_reality(PlayerType *player_ptr, TIME_EFFECT turns);
+bool is_teleport_level_ineffective(PlayerType *player_ptr, MONSTER_IDX idx);
+bool recall_player(PlayerType *player_ptr, TIME_EFFECT turns);
+bool free_level_recall(PlayerType *player_ptr);
+bool reset_recall(PlayerType *player_ptr);
* @brief 寿命つき光源の燃素追加処理 /
* Charge a lite (torch or latern)
*/
-void phlogiston(player_type *player_ptr)
+void phlogiston(PlayerType *player_ptr)
{
GAME_TURN max_flog = 0;
object_type *o_ptr = &player_ptr->inventory_list[INVEN_LITE];
#pragma once
-struct player_type;
-void phlogiston(player_type *player_ptr);
+class PlayerType;
+void phlogiston(PlayerType *player_ptr);
* @details
* Sorry, it becomes not (void)...
*/
-void call_the_void(player_type *player_ptr)
+void call_the_void(PlayerType *player_ptr)
{
bool do_call = true;
auto *floor_ptr = player_ptr->current_floor_ptr;
* @param player_ptr 術者の参照ポインタ
* @return 実際に処理が反映された場合TRUE
*/
-bool vanish_dungeon(player_type *player_ptr)
+bool vanish_dungeon(PlayerType *player_ptr)
{
auto *floor_ptr = player_ptr->current_floor_ptr;
bool is_special_floor = floor_ptr->inside_quest && quest_type::is_fixed(floor_ptr->inside_quest);
* @param rad 効力の半径
* @details このファイルにいるのは、spells-trump.c と比べて行数が少なかったため。それ以上の意図はない
*/
-void cast_meteor(player_type *player_ptr, HIT_POINT dam, POSITION rad)
+void cast_meteor(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
{
int b = 10 + randint1(10);
for (int i = 0; i < b; i++) {
#include "system/angband.h"
-struct player_type;
-void call_the_void(player_type *player_ptr);
-bool vanish_dungeon(player_type *player_ptr);
-void cast_meteor(player_type *player_ptr, HIT_POINT dam, POSITION rad);
+class PlayerType;
+void call_the_void(PlayerType *player_ptr);
+bool vanish_dungeon(PlayerType *player_ptr);
+void cast_meteor(PlayerType *player_ptr, HIT_POINT dam, POSITION rad);
* @param v 継続時間
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_ele_attack(player_type *player_ptr, uint32_t attack_type, TIME_EFFECT v)
+bool set_ele_attack(PlayerType *player_ptr, uint32_t attack_type, TIME_EFFECT v)
{
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param v 継続時間
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_ele_immune(player_type *player_ptr, uint32_t immune_type, TIME_EFFECT v)
+bool set_ele_immune(PlayerType *player_ptr, uint32_t immune_type, TIME_EFFECT v)
{
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
/*
* Choose a warrior-mage elemental attack. -LM-
*/
-bool choose_ele_attack(player_type *player_ptr)
+bool choose_ele_attack(PlayerType *player_ptr)
{
if (!has_melee_weapon(player_ptr, INVEN_MAIN_HAND) && !has_melee_weapon(player_ptr, INVEN_SUB_HAND)) {
msg_format(_("武器を持たないと魔法剣は使えない。", "You cannot use temporary branding with no weapon."));
/*
* Choose a elemental immune. -LM-
*/
-bool choose_ele_immune(player_type *player_ptr, TIME_EFFECT immune_turn)
+bool choose_ele_immune(PlayerType *player_ptr, TIME_EFFECT immune_turn)
{
screen_save();
* pulish shield
* @return ターン消費を要する処理を行ったならばTRUEを返す
*/
-bool pulish_shield(player_type *player_ptr)
+bool pulish_shield(PlayerType *player_ptr)
{
concptr q = _("どの盾を磨きますか?", "Polish which shield? ");
concptr s = _("磨く盾がありません。", "You have no shield to polish.");
#include "system/angband.h"
-struct player_type;
-bool set_ele_attack(player_type *player_ptr, uint32_t attack_type, TIME_EFFECT v);
-bool set_ele_immune(player_type *player_ptr, uint32_t immune_type, TIME_EFFECT v);
-bool choose_ele_attack(player_type *player_ptr);
-bool choose_ele_immune(player_type *player_ptr, TIME_EFFECT turn);
-bool pulish_shield(player_type *player_ptr);
+class PlayerType;
+bool set_ele_attack(PlayerType *player_ptr, uint32_t attack_type, TIME_EFFECT v);
+bool set_ele_immune(PlayerType *player_ptr, uint32_t immune_type, TIME_EFFECT v);
+bool choose_ele_attack(PlayerType *player_ptr);
+bool choose_ele_immune(PlayerType *player_ptr, TIME_EFFECT turn);
+bool pulish_shield(PlayerType *player_ptr);
* @param rad 効力の半径
* @return ターゲットを指定し、実行したならばTRUEを返す。
*/
-bool cast_wrath_of_the_god(player_type *player_ptr, HIT_POINT dam, POSITION rad)
+bool cast_wrath_of_the_god(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
{
DIRECTION dir;
if (!get_aim_dir(player_ptr, &dir))
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_sh_holy(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_sh_holy(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す
* @details 呪術領域でも使えるが、汎用性と行数の兼ね合いを考えて破邪側に入れた
*/
-bool set_tim_eyeeye(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_eyeeye(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
#include "system/angband.h"
-struct player_type;
-bool cast_wrath_of_the_god(player_type *player_ptr, HIT_POINT dam, POSITION rad);
-bool set_tim_sh_holy(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_eyeeye(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+bool cast_wrath_of_the_god(PlayerType *player_ptr, HIT_POINT dam, POSITION rad);
+bool set_tim_sh_holy(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_eyeeye(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_sh_fire(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_sh_fire(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
#include "system/angband.h"
-struct player_type;
-bool set_tim_sh_fire(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+bool set_tim_sh_fire(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
/*!< 呪術の最大詠唱数 */
constexpr int MAX_KEEP = 4;
-SpellHex::SpellHex(player_type *player_ptr)
+SpellHex::SpellHex(PlayerType *player_ptr)
: player_ptr(player_ptr)
, spell_hex_data(PlayerClass(player_ptr).get_specific_data<spell_hex_data_type>())
{
}
}
-SpellHex::SpellHex(player_type *player_ptr, monap_type *monap_ptr)
+SpellHex::SpellHex(PlayerType *player_ptr, monap_type *monap_ptr)
: player_ptr(player_ptr)
, monap_ptr(monap_ptr)
{
};
struct monap_type;
-struct player_type;
+class PlayerType;
struct spell_hex_data_type;
class SpellHex {
public:
- SpellHex(player_type *player_ptr);
- SpellHex(player_type *player_ptr, monap_type *monap_ptr);
+ SpellHex(PlayerType *player_ptr);
+ SpellHex(PlayerType *player_ptr, monap_type *monap_ptr);
virtual ~SpellHex() = default;
bool stop_spells_with_selection();
void set_revenge_type(SpellHexRevengeType type);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
std::vector<int> casting_spells;
monap_type *monap_ptr = nullptr;
std::shared_ptr<spell_hex_data_type> spell_hex_data;
* @param player_ptr 錆止め実行者の参照ポインタ
* @return ターン消費を要する処理を行ったならばTRUEを返す
*/
-bool rustproof(player_type *player_ptr)
+bool rustproof(PlayerType *player_ptr)
{
concptr q = _("どの防具に錆止めをしますか?", "Rustproof which piece of armour? ");
concptr s = _("錆止めできるものがありません。", "You have nothing to rustproof.");
#pragma once
-struct player_type;
-bool rustproof(player_type *player_ptr);
+class PlayerType;
+bool rustproof(PlayerType *player_ptr);
/*!
* @brief プレイヤーの歌に関する継続処理
*/
-void check_music(player_type *player_ptr)
+void check_music(PlayerType *player_ptr)
{
if (player_ptr->pclass != PlayerClassType::BARD)
return;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_stealth(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_stealth(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
/*!
* @brief 歌の停止を処理する / Stop singing if the player is a Bard
*/
-void stop_singing(player_type *player_ptr)
+void stop_singing(PlayerType *player_ptr)
{
if (player_ptr->pclass != PlayerClassType::BARD)
return;
set_bits(player_ptr->redraw, PR_STATUS);
}
-bool music_singing(player_type *player_ptr, int music_songs)
+bool music_singing(PlayerType *player_ptr, int music_songs)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
return bird_data && (bird_data->singing_song == music_songs);
}
-bool music_singing_any(player_type *player_ptr)
+bool music_singing_any(PlayerType *player_ptr)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
return bird_data && (bird_data->singing_song != MUSIC_NONE);
}
-int32_t get_singing_song_effect(player_type *player_ptr)
+int32_t get_singing_song_effect(PlayerType *player_ptr)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
if (!bird_data) {
return bird_data->singing_song;
}
-void set_singing_song_effect(player_type *player_ptr, const int32_t magic_num)
+void set_singing_song_effect(PlayerType *player_ptr, const int32_t magic_num)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
if (!bird_data) {
bird_data->singing_song = i2enum<realm_song_type>(magic_num);
}
-int32_t get_interrupting_song_effect(player_type *player_ptr)
+int32_t get_interrupting_song_effect(PlayerType *player_ptr)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
if (!bird_data) {
return bird_data->interrputing_song;
}
-void set_interrupting_song_effect(player_type *player_ptr, const int32_t magic_num)
+void set_interrupting_song_effect(PlayerType *player_ptr, const int32_t magic_num)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
if (!bird_data) {
bird_data->interrputing_song = i2enum<realm_song_type>(magic_num);
}
-int32_t get_singing_count(player_type *player_ptr)
+int32_t get_singing_count(PlayerType *player_ptr)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
if (!bird_data) {
return bird_data->singing_duration;
}
-void set_singing_count(player_type *player_ptr, const int32_t magic_num)
+void set_singing_count(PlayerType *player_ptr, const int32_t magic_num)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
if (!bird_data) {
bird_data->singing_duration = magic_num;
}
-byte get_singing_song_id(player_type *player_ptr)
+byte get_singing_song_id(PlayerType *player_ptr)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
if (!bird_data) {
return bird_data->singing_song_spell_idx;
}
-void set_singing_song_id(player_type *player_ptr, const byte magic_num)
+void set_singing_song_id(PlayerType *player_ptr, const byte magic_num)
{
auto bird_data = PlayerClass(player_ptr).get_specific_data<bard_data_type>();
if (!bird_data) {
#include "system/angband.h"
-struct player_type;
-void check_music(player_type *player_ptr);
-bool set_tim_stealth(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-void stop_singing(player_type *player_ptr);
-bool music_singing(player_type *player_ptr, int music_songs);
-bool music_singing_any(player_type *player_ptr);
-int32_t get_singing_song_effect(player_type *player_ptr);
-void set_singing_song_effect(player_type *player_ptr, const int32_t magic_num);
-int32_t get_interrupting_song_effect(player_type *player_ptr);
-void set_interrupting_song_effect(player_type *player_ptr, const int32_t magic_num);
-int32_t get_singing_count(player_type *player_ptr);
-void set_singing_count(player_type *player_ptr, const int32_t magic_num);
-byte get_singing_song_id(player_type *player_ptr);
-void set_singing_song_id(player_type *player_ptr, const byte magic_num);
+class PlayerType;
+void check_music(PlayerType *player_ptr);
+bool set_tim_stealth(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+void stop_singing(PlayerType *player_ptr);
+bool music_singing(PlayerType *player_ptr, int music_songs);
+bool music_singing_any(PlayerType *player_ptr);
+int32_t get_singing_song_effect(PlayerType *player_ptr);
+void set_singing_song_effect(PlayerType *player_ptr, const int32_t magic_num);
+int32_t get_interrupting_song_effect(PlayerType *player_ptr);
+void set_interrupting_song_effect(PlayerType *player_ptr, const int32_t magic_num);
+int32_t get_singing_count(PlayerType *player_ptr);
+void set_singing_count(PlayerType *player_ptr, const int32_t magic_num);
+byte get_singing_song_id(PlayerType *player_ptr);
+void set_singing_song_id(PlayerType *player_ptr, const byte magic_num);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 処理が実際に行われたらTRUEを返す
*/
-bool alchemy(player_type *player_ptr)
+bool alchemy(PlayerType *player_ptr)
{
bool force = false;
if (command_arg > 0)
#pragma once
-struct player_type;
-bool alchemy(player_type *player_ptr);
+class PlayerType;
+bool alchemy(PlayerType *player_ptr);
* @brief トランプ領域の「シャッフル」の効果をランダムに決めて処理する。
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void cast_shuffle(player_type *player_ptr)
+void cast_shuffle(PlayerType *player_ptr)
{
PLAYER_LEVEL plev = player_ptr->lev;
DIRECTION dir;
gain_exp(player_ptr, ee);
}
-void become_living_trump(player_type *player_ptr)
+void become_living_trump(PlayerType *player_ptr)
{
/* 1/7 Teleport control and 6/7 Random teleportation (uncontrolled) */
MUTATION_IDX mutation = one_in_(7) ? 12 : 77;
#pragma once
-struct player_type;
-void cast_shuffle(player_type *player_ptr);
-void become_living_trump(player_type *player_ptr);
+class PlayerType;
+void cast_shuffle(PlayerType *player_ptr);
+void become_living_trump(PlayerType *player_ptr);
/*
* breath shape
*/
-void breath_shape(player_type *player_ptr, uint16_t *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, AttributeType typ)
+void breath_shape(PlayerType *player_ptr, uint16_t *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, AttributeType typ)
{
POSITION by = y1;
POSITION bx = x1;
#include "effect/attribute-types.h"
struct floor_type;
-struct player_type;
+class PlayerType;
bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-void breath_shape(player_type *player_ptr, uint16_t *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, AttributeType typ);
+void breath_shape(PlayerType *player_ptr, uint16_t *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, AttributeType typ);
POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
* @param realm 魔法領域
* @return 消費MP
*/
-MANA_POINT mod_need_mana(player_type *player_ptr, MANA_POINT need_mana, SPELL_IDX spell, int16_t realm)
+MANA_POINT mod_need_mana(PlayerType *player_ptr, MANA_POINT need_mana, SPELL_IDX spell, int16_t realm)
{
#define MANA_CONST 2400
#define MANA_DIV 4
* @return 失敗率(%)
* @todo 統合を検討
*/
-PERCENTAGE mod_spell_chance_1(player_type *player_ptr, PERCENTAGE chance)
+PERCENTAGE mod_spell_chance_1(PlayerType *player_ptr, PERCENTAGE chance)
{
chance += player_ptr->to_m_chance;
* Note: variable "chance" cannot be negative.
* @todo 統合を検討
*/
-PERCENTAGE mod_spell_chance_2(player_type *player_ptr, PERCENTAGE chance)
+PERCENTAGE mod_spell_chance_2(PlayerType *player_ptr, PERCENTAGE chance)
{
if (player_ptr->dec_mana)
chance--;
* @param use_realm 魔法領域ID
* @return 失敗率(%)
*/
-PERCENTAGE spell_chance(player_type *player_ptr, SPELL_IDX spell, int16_t use_realm)
+PERCENTAGE spell_chance(PlayerType *player_ptr, SPELL_IDX spell, int16_t use_realm)
{
if (mp_ptr->spell_book == ItemKindType::NONE)
return 100;
* @param x 表示メッセージ左上X座標
* @param use_realm 魔法領域ID
*/
-void print_spells(player_type *player_ptr, SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, int16_t use_realm)
+void print_spells(PlayerType *player_ptr, SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, int16_t use_realm)
{
if (((use_realm <= REALM_NONE) || (use_realm > MAX_REALM)) && allow_debug_options)
msg_print(_("警告! print_spell が領域なしに呼ばれた", "Warning! print_spells called with null realm"));
#include "system/angband.h"
-struct player_type;
-MANA_POINT mod_need_mana(player_type *player_ptr, MANA_POINT need_mana, SPELL_IDX spell, int16_t realm);
-PERCENTAGE mod_spell_chance_1(player_type *player_ptr, PERCENTAGE chance);
-PERCENTAGE mod_spell_chance_2(player_type *player_ptr, PERCENTAGE chance);
-PERCENTAGE spell_chance(player_type *player_ptr, SPELL_IDX spell, int16_t realm);
-void print_spells(player_type *player_ptr, SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, int16_t realm);
+class PlayerType;
+MANA_POINT mod_need_mana(PlayerType *player_ptr, MANA_POINT need_mana, SPELL_IDX spell, int16_t realm);
+PERCENTAGE mod_spell_chance_1(PlayerType *player_ptr, PERCENTAGE chance);
+PERCENTAGE mod_spell_chance_2(PlayerType *player_ptr, PERCENTAGE chance);
+PERCENTAGE spell_chance(PlayerType *player_ptr, SPELL_IDX spell, int16_t realm);
+void print_spells(PlayerType *player_ptr, SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, int16_t realm);
* @param m_ptr 対象モンスター
* @return 魅了に抵抗したらTRUE
*/
-bool common_saving_throw_charm(player_type *player_ptr, HIT_POINT pow, monster_type *m_ptr)
+bool common_saving_throw_charm(PlayerType *player_ptr, HIT_POINT pow, monster_type *m_ptr)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @param m_ptr 対象モンスター
* @return 服従に抵抗したらTRUE
*/
-bool common_saving_throw_control(player_type *player_ptr, HIT_POINT pow, monster_type *m_ptr)
+bool common_saving_throw_control(PlayerType *player_ptr, HIT_POINT pow, monster_type *m_ptr)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* ハードコーティングによる実装が行われている。
* メイジは(レベル)%、ハイメイジ、スペルマスターは(レベル)%、それ以外の職業は(レベル/2)%
*/
-PERCENTAGE beam_chance(player_type *player_ptr)
+PERCENTAGE beam_chance(PlayerType *player_ptr)
{
if (player_ptr->pclass == PlayerClassType::MAGE)
return (PERCENTAGE)(player_ptr->lev);
#include "system/angband.h"
struct monster_type;
-struct player_type;
-bool common_saving_throw_control(player_type *player_ptr, HIT_POINT pow, monster_type *m_ptr);
-bool common_saving_throw_charm(player_type *player_ptr, HIT_POINT pow, monster_type *m_ptr);
-PERCENTAGE beam_chance(player_type *player_ptr);
+class PlayerType;
+bool common_saving_throw_control(PlayerType *player_ptr, HIT_POINT pow, monster_type *m_ptr);
+bool common_saving_throw_charm(PlayerType *player_ptr, HIT_POINT pow, monster_type *m_ptr);
+PERCENTAGE beam_chance(PlayerType *player_ptr);
* @param mode 求める処理
* @return 各領域魔法に各種テキストを求めた場合は文字列参照ポインタ、そうでない場合はnullptrを返す。
*/
-concptr exe_spell(player_type *player_ptr, int16_t realm, SPELL_IDX spell, SpellProcessType mode)
+concptr exe_spell(PlayerType *player_ptr, int16_t realm, SPELL_IDX spell, SpellProcessType mode)
{
switch (realm)
{
#include "system/angband.h"
#include "spell/spells-util.h"
-struct player_type;
-concptr exe_spell(player_type *player_ptr, int16_t realm, SPELL_IDX spell, SpellProcessType mode);
+class PlayerType;
+concptr exe_spell(PlayerType *player_ptr, int16_t realm, SPELL_IDX spell, SpellProcessType mode);
* @param num 誰得の処理回数
* @param known TRUEならばオブジェクトが必ず*鑑定*済になる
*/
-void amusement(player_type *player_ptr, POSITION y1, POSITION x1, int num, bool known)
+void amusement(PlayerType *player_ptr, POSITION y1, POSITION x1, int num, bool known)
{
int t = 0;
for (int n = 0; amuse_info[n].tval != ItemKindType::NONE; n++) {
* @param special TRUEならば必ず特別品を落とす
* @param known TRUEならばオブジェクトが必ず*鑑定*済になる
*/
-void acquirement(player_type *player_ptr, POSITION y1, POSITION x1, int num, bool great, bool special, bool known)
+void acquirement(PlayerType *player_ptr, POSITION y1, POSITION x1, int num, bool great, bool special, bool known)
{
object_type *i_ptr;
object_type object_type_body;
* @return 何も持っていない場合を除き、常にTRUEを返す
* @todo 元のreturnは間違っているが、修正後の↓文がどれくらい正しいかは要チェック
*/
-bool curse_armor(player_type *player_ptr)
+bool curse_armor(PlayerType *player_ptr)
{
/* Curse the body armor */
object_type *o_ptr;
* @return 何も持っていない場合を除き、常にTRUEを返す
* @todo 元のreturnは間違っているが、修正後の↓文がどれくらい正しいかは要チェック
*/
-bool curse_weapon_object(player_type *player_ptr, bool force, object_type *o_ptr)
+bool curse_weapon_object(PlayerType *player_ptr, bool force, object_type *o_ptr)
{
if (!o_ptr->k_idx)
return false;
* Enchant some bolts
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void brand_bolts(player_type *player_ptr)
+void brand_bolts(PlayerType *player_ptr)
{
/* Use the first acceptable bolts */
for (int i = 0; i < INVEN_PACK; i++) {
* the larger the pile, the lower the chance of success.
* </pre>
*/
-bool enchant_equipment(player_type *player_ptr, object_type *o_ptr, int n, int eflag)
+bool enchant_equipment(PlayerType *player_ptr, object_type *o_ptr, int n, int eflag)
{
/* Large piles resist enchantment */
int prob = o_ptr->number * 100;
* Note that "num_ac" requires armour, else weapon
* Returns TRUE if attempted, FALSE if cancelled
*/
-bool enchant_spell(player_type *player_ptr, HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
+bool enchant_spell(PlayerType *player_ptr, HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
{
/* Assume enchant weapon */
FuncItemTester item_tester(&object_type::allow_enchant_weapon);
* @param player_ptr プレイヤーへの参照ポインタ
* @param brand_type エゴ化ID(e_info.txtとは連動していない)
*/
-void brand_weapon(player_type *player_ptr, int brand_type)
+void brand_weapon(PlayerType *player_ptr, int brand_type)
{
concptr q = _("どの武器を強化しますか? ", "Enchant which weapon? ");
concptr s = _("強化できる武器がない。", "You have nothing to enchant.");
#include "system/angband.h"
struct object_type;
-struct player_type;
-void amusement(player_type *player_ptr, POSITION y1, POSITION x1, int num, bool known);
-void acquirement(player_type *player_ptr, POSITION y1, POSITION x1, int num, bool great, bool special, bool known);
-bool curse_armor(player_type *player_ptr);
-bool curse_weapon_object(player_type *player_ptr, bool force, object_type *o_ptr);
-void brand_bolts(player_type *player_ptr);
+class PlayerType;
+void amusement(PlayerType *player_ptr, POSITION y1, POSITION x1, int num, bool known);
+void acquirement(PlayerType *player_ptr, POSITION y1, POSITION x1, int num, bool great, bool special, bool known);
+bool curse_armor(PlayerType *player_ptr);
+bool curse_weapon_object(PlayerType *player_ptr, bool force, object_type *o_ptr);
+void brand_bolts(PlayerType *player_ptr);
/*
* Bit flags for the "enchant()" function
#define ENCH_TODAM 0x02 /*!< 装備強化処理: ダメージ強化 / Enchant to damage */
#define ENCH_TOAC 0x04 /*!< 装備強化処理: AC強化 / Enchant to AC */
#define ENCH_FORCE 0x08 /*!< 装備強化処理: 無条件に成功させる / Force enchantment */
-bool enchant_equipment(player_type *player_ptr, object_type *o_ptr, int n, int eflag);
-bool enchant_spell(player_type *player_ptr, HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac);
-void brand_weapon(player_type *player_ptr, int brand_type);
+bool enchant_equipment(PlayerType *player_ptr, object_type *o_ptr, int n, int eflag);
+bool enchant_spell(PlayerType *player_ptr, HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac);
+void brand_weapon(PlayerType *player_ptr, int brand_type);
* @magic 魔法の効果である場合TRUE (杖と同じ効果の呪文はあったか? 要調査)
* @powerful 効果が増強される時TRUE (TRUEになるタイミングはあるか? 要調査)
*/
-bool cleansing_nova(player_type *player_ptr, bool magic, bool powerful)
+bool cleansing_nova(PlayerType *player_ptr, bool magic, bool powerful)
{
bool ident = false;
if (dispel_evil(player_ptr, powerful ? 225 : 150)) {
* @param player_ptr プレイヤーへの参照ポインタ
* @powerful 効果が増強される時TRUE (TRUEになるタイミングはあるか? 要調査)
*/
-bool unleash_mana_storm(player_type *player_ptr, bool powerful)
+bool unleash_mana_storm(PlayerType *player_ptr, bool powerful)
{
msg_print(_("強力な魔力が敵を引き裂いた!", "Mighty magics rend your enemies!"));
project(player_ptr, 0, (powerful ? 7 : 5), player_ptr->y, player_ptr->x, (randint1(200) + (powerful ? 500 : 300)) * 2, AttributeType::MANA,
#pragma once
-struct player_type;
-bool cleansing_nova(player_type *player_ptr, bool magic, bool powerful);
-bool unleash_mana_storm(player_type *player_ptr, bool powerful);
+class PlayerType;
+bool cleansing_nova(PlayerType *player_ptr, bool magic, bool powerful);
+bool unleash_mana_storm(PlayerType *player_ptr, bool powerful);
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool heal_monster(player_type *player_ptr, DIRECTION dir, HIT_POINT dam)
+bool heal_monster(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::OLD_HEAL, dir, dam, flg));
* @param power 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool speed_monster(player_type *player_ptr, DIRECTION dir, int power)
+bool speed_monster(PlayerType *player_ptr, DIRECTION dir, int power)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::OLD_SPEED, dir, power, flg));
* @param power 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool slow_monster(player_type *player_ptr, DIRECTION dir, int power)
+bool slow_monster(PlayerType *player_ptr, DIRECTION dir, int power)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::OLD_SLOW, dir, power, flg));
* @param power 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool sleep_monster(player_type *player_ptr, DIRECTION dir, int power)
+bool sleep_monster(PlayerType *player_ptr, DIRECTION dir, int power)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::OLD_SLEEP, dir, power, flg));
* @return 作用が実際にあった場合TRUEを返す
* @details 威力はプレイヤーレベル*2に固定
*/
-bool stasis_monster(player_type *player_ptr, DIRECTION dir)
+bool stasis_monster(PlayerType *player_ptr, DIRECTION dir)
{
return (fire_ball_hide(player_ptr, AttributeType::STASIS, dir, player_ptr->lev * 2, 0));
}
* @return 作用が実際にあった場合TRUEを返す
* @details 威力はプレイヤーレベル*2に固定
*/
-bool stasis_evil(player_type *player_ptr, DIRECTION dir)
+bool stasis_evil(PlayerType *player_ptr, DIRECTION dir)
{
return (fire_ball_hide(player_ptr, AttributeType::STASIS_EVIL, dir, player_ptr->lev * 2, 0));
}
* @param plev プレイヤーレベル(=効力)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool confuse_monster(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+bool confuse_monster(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::OLD_CONF, dir, plev, flg));
* @param plev プレイヤーレベル(=効力)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool stun_monster(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+bool stun_monster(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::STUN, dir, plev, flg));
* @param power 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool poly_monster(player_type *player_ptr, DIRECTION dir, int power)
+bool poly_monster(PlayerType *player_ptr, DIRECTION dir, int power)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
bool tester = (project_hook(player_ptr, AttributeType::OLD_POLY, dir, power, flg));
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool clone_monster(player_type *player_ptr, DIRECTION dir)
+bool clone_monster(PlayerType *player_ptr, DIRECTION dir)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::OLD_CLONE, dir, 0, flg));
* @param plev プレイヤーレベル(=効力)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool fear_monster(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+bool fear_monster(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(player_ptr, AttributeType::TURN_ALL, dir, plev, flg));
}
-bool time_walk(player_type *player_ptr)
+bool time_walk(PlayerType *player_ptr)
{
if (player_ptr->timewalk) {
msg_print(_("既に時は止まっている。", "Time is already stopped."));
* @param player_ptr プレイヤーへの参照ポインタ
* @param options スペル共通オプション
*/
-void roll_hitdice(player_type *player_ptr, spell_operation options)
+void roll_hitdice(PlayerType *player_ptr, spell_operation options)
{
HIT_POINT min_value = player_ptr->hitdie + ((PY_MAX_LEVEL + 2) * (player_ptr->hitdie + 1)) * 3 / 8;
HIT_POINT max_value = player_ptr->hitdie + ((PY_MAX_LEVEL + 2) * (player_ptr->hitdie + 1)) * 5 / 8;
msg_print(_("体力ランクが変わった。", "Life rate has changed."));
}
-bool life_stream(player_type *player_ptr, bool message, bool virtue_change)
+bool life_stream(PlayerType *player_ptr, bool message, bool virtue_change)
{
if (virtue_change) {
chg_virtue(player_ptr, V_VITALITY, 1);
return true;
}
-bool heroism(player_type *player_ptr, int base)
+bool heroism(PlayerType *player_ptr, int base)
{
auto ident = false;
if (BadStatusSetter(player_ptr).afraidness(0)) {
return ident;
}
-bool berserk(player_type *player_ptr, int base)
+bool berserk(PlayerType *player_ptr, int base)
{
auto ident = false;
if (BadStatusSetter(player_ptr).afraidness(0)) {
return ident;
}
-bool cure_light_wounds(player_type *player_ptr, DICE_NUMBER dice, DICE_SID sides)
+bool cure_light_wounds(PlayerType *player_ptr, DICE_NUMBER dice, DICE_SID sides)
{
auto ident = false;
if (hp_player(player_ptr, damroll(dice, sides))) {
return ident;
}
-bool cure_serious_wounds(player_type *player_ptr, DICE_NUMBER dice, DICE_SID sides)
+bool cure_serious_wounds(PlayerType *player_ptr, DICE_NUMBER dice, DICE_SID sides)
{
auto ident = false;
if (hp_player(player_ptr, damroll(dice, sides))) {
return ident;
}
-bool cure_critical_wounds(player_type *player_ptr, HIT_POINT pow)
+bool cure_critical_wounds(PlayerType *player_ptr, HIT_POINT pow)
{
auto ident = false;
if (hp_player(player_ptr, pow)) {
return ident;
}
-bool true_healing(player_type *player_ptr, HIT_POINT pow)
+bool true_healing(PlayerType *player_ptr, HIT_POINT pow)
{
auto ident = false;
if (hp_player(player_ptr, pow)) {
return ident;
}
-bool restore_mana(player_type *player_ptr, bool magic_eater)
+bool restore_mana(PlayerType *player_ptr, bool magic_eater)
{
if (player_ptr->pclass == PlayerClassType::MAGIC_EATER && magic_eater) {
// 魔力復活による、魔道具術師の取り込んだ魔法の回復量
return true;
}
-bool restore_all_status(player_type *player_ptr)
+bool restore_all_status(PlayerType *player_ptr)
{
bool ident = false;
if (do_res_stat(player_ptr, A_STR))
return ident;
}
-bool fishing(player_type *player_ptr)
+bool fishing(PlayerType *player_ptr)
{
DIRECTION dir;
if (!get_direction(player_ptr, &dir, false, false))
* @details
* 脱いで落とした装備にtimeoutを設定するために装備品のアドレスを返す。
*/
-bool cosmic_cast_off(player_type *player_ptr, object_type **o_ptr_ptr)
+bool cosmic_cast_off(PlayerType *player_ptr, object_type **o_ptr_ptr)
{
object_type *o_ptr = (*o_ptr_ptr);
* @brief プレイヤーの因果混乱処理 / Apply Nexus
* @param m_ptr 因果混乱をプレイヤーに与えたモンスターの情報参照ポインタ
*/
-void apply_nexus(monster_type *m_ptr, player_type *player_ptr)
+void apply_nexus(monster_type *m_ptr, PlayerType *player_ptr)
{
switch (randint1(7)) {
case 1:
* @brief プレイヤーのステータスシャッフル処理
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void status_shuffle(player_type *player_ptr)
+void status_shuffle(PlayerType *player_ptr)
{
/* Pick a pair of stats */
int i = randint0(A_MAX);
#include "spell/spells-util.h"
struct object_type;
-struct player_type;
+class PlayerType;
struct monster_type;
-bool heal_monster(player_type *player_ptr, DIRECTION dir, HIT_POINT dam);
-bool speed_monster(player_type *player_ptr, DIRECTION dir, int power);
-bool slow_monster(player_type *player_ptr, DIRECTION dir, int power);
-bool sleep_monster(player_type *player_ptr, DIRECTION dir, int power);
-bool stasis_monster(player_type *player_ptr, DIRECTION dir); /* Like sleep, affects undead as well */
-bool stasis_evil(player_type *player_ptr, DIRECTION dir); /* Like sleep, affects undead as well */
-bool confuse_monster(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-bool stun_monster(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-bool fear_monster(player_type *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-bool poly_monster(player_type *player_ptr, DIRECTION dir, int power);
-bool clone_monster(player_type *player_ptr, DIRECTION dir);
-bool time_walk(player_type *player_ptr);
-void roll_hitdice(player_type *player_ptr, spell_operation options);
-bool life_stream(player_type *player_ptr, bool message, bool virtue_change);
-bool heroism(player_type *player_ptr, int base);
-bool berserk(player_type *player_ptr, int base);
-bool cure_light_wounds(player_type *player_ptr, DICE_NUMBER dice, DICE_SID sides);
-bool cure_serious_wounds(player_type *player_ptr, DICE_NUMBER dice, DICE_SID sides);
-bool cure_critical_wounds(player_type *player_ptr, HIT_POINT pow);
-bool true_healing(player_type *player_ptr, HIT_POINT pow);
-bool restore_mana(player_type *player_ptr, bool magic_eater);
-bool restore_all_status(player_type *player_ptr);
+bool heal_monster(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam);
+bool speed_monster(PlayerType *player_ptr, DIRECTION dir, int power);
+bool slow_monster(PlayerType *player_ptr, DIRECTION dir, int power);
+bool sleep_monster(PlayerType *player_ptr, DIRECTION dir, int power);
+bool stasis_monster(PlayerType *player_ptr, DIRECTION dir); /* Like sleep, affects undead as well */
+bool stasis_evil(PlayerType *player_ptr, DIRECTION dir); /* Like sleep, affects undead as well */
+bool confuse_monster(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool stun_monster(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool fear_monster(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool poly_monster(PlayerType *player_ptr, DIRECTION dir, int power);
+bool clone_monster(PlayerType *player_ptr, DIRECTION dir);
+bool time_walk(PlayerType *player_ptr);
+void roll_hitdice(PlayerType *player_ptr, spell_operation options);
+bool life_stream(PlayerType *player_ptr, bool message, bool virtue_change);
+bool heroism(PlayerType *player_ptr, int base);
+bool berserk(PlayerType *player_ptr, int base);
+bool cure_light_wounds(PlayerType *player_ptr, DICE_NUMBER dice, DICE_SID sides);
+bool cure_serious_wounds(PlayerType *player_ptr, DICE_NUMBER dice, DICE_SID sides);
+bool cure_critical_wounds(PlayerType *player_ptr, HIT_POINT pow);
+bool true_healing(PlayerType *player_ptr, HIT_POINT pow);
+bool restore_mana(PlayerType *player_ptr, bool magic_eater);
+bool restore_all_status(PlayerType *player_ptr);
-bool fishing(player_type *player_ptr);
-bool cosmic_cast_off(player_type *player_ptr, object_type **o_ptr_ptr);
-void apply_nexus(monster_type *m_ptr, player_type *player_ptr);
-void status_shuffle(player_type *player_ptr);
+bool fishing(PlayerType *player_ptr);
+bool cosmic_cast_off(PlayerType *player_ptr, object_type **o_ptr_ptr);
+void apply_nexus(monster_type *m_ptr, PlayerType *player_ptr);
+void status_shuffle(PlayerType *player_ptr);
* @param mode モンスター生成条件フラグ
* @return モンスターが(敵対も含めて)召還されたならばTRUEを返す。
*/
-bool trump_summoning(player_type *player_ptr, int num, bool pet, POSITION y, POSITION x, DEPTH lev, summon_type type, BIT_FLAGS mode)
+bool trump_summoning(PlayerType *player_ptr, int num, bool pet, POSITION y, POSITION x, DEPTH lev, summon_type type, BIT_FLAGS mode)
{
/* Default level */
PLAYER_LEVEL plev = player_ptr->lev;
return success;
}
-bool cast_summon_demon(player_type *player_ptr, int power)
+bool cast_summon_demon(PlayerType *player_ptr, int power)
{
uint32_t flg = 0L;
bool pet = !one_in_(3);
return true;
}
-bool cast_summon_undead(player_type *player_ptr, int power)
+bool cast_summon_undead(PlayerType *player_ptr, int power)
{
bool pet = one_in_(3);
summon_type type = (player_ptr->lev > 47 ? SUMMON_HI_UNDEAD : SUMMON_UNDEAD);
return true;
}
-bool cast_summon_hound(player_type *player_ptr, int power)
+bool cast_summon_hound(PlayerType *player_ptr, int power)
{
BIT_FLAGS mode = PM_ALLOW_GROUP;
bool pet = !one_in_(5);
return true;
}
-bool cast_summon_elemental(player_type *player_ptr, int power)
+bool cast_summon_elemental(PlayerType *player_ptr, int power)
{
bool pet = one_in_(3);
BIT_FLAGS mode = 0L;
return true;
}
-bool cast_summon_octopus(player_type *player_ptr)
+bool cast_summon_octopus(PlayerType *player_ptr)
{
BIT_FLAGS mode = PM_ALLOW_GROUP;
bool pet = !one_in_(5);
* @brief 悪魔領域のグレーターデーモン召喚を処理する / Daemon spell Summon Greater Demon
* @return 処理を実行したならばTRUEを返す。
*/
-bool cast_summon_greater_demon(player_type *player_ptr)
+bool cast_summon_greater_demon(PlayerType *player_ptr)
{
concptr q = _("どの死体を捧げますか? ", "Sacrifice which corpse? ");
concptr s = _("捧げられる死体を持っていない。", "You have nothing to scrifice.");
* @param mode 召喚オプション
* @return ターンを消費した場合TRUEを返す
*/
-bool summon_kin_player(player_type *player_ptr, DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode)
+bool summon_kin_player(PlayerType *player_ptr, DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode)
{
bool pet = (bool)(mode & PM_FORCE_PET);
if (!pet)
* @param x 召喚位置X座標
* @return 作用が実際にあった場合TRUEを返す
*/
-int summon_cyber(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x)
+int summon_cyber(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x)
{
/* Summoned by a monster */
BIT_FLAGS mode = PM_ALLOW_GROUP;
return count;
}
-void mitokohmon(player_type *player_ptr)
+void mitokohmon(PlayerType *player_ptr)
{
int count = 0;
concptr sukekakusan = "";
* @return 作用が実際にあった場合TRUEを返す
* @todo 引数にPOSITION x/yは必要か? 要調査
*/
-int activate_hi_summon(player_type *player_ptr, POSITION y, POSITION x, bool can_pet)
+int activate_hi_summon(PlayerType *player_ptr, POSITION y, POSITION x, bool can_pet)
{
BIT_FLAGS mode = PM_ALLOW_GROUP;
bool pet = false;
* @param player_ptr プレイヤーへの参照ポインタ
* @param dir 方向ID
*/
-void cast_invoke_spirits(player_type *player_ptr, DIRECTION dir)
+void cast_invoke_spirits(PlayerType *player_ptr, DIRECTION dir)
{
PLAYER_LEVEL plev = player_ptr->lev;
int die = randint1(100) + plev / 5;
enum summon_type : int;
struct object_type;
-struct player_type;
-bool trump_summoning(player_type *player_ptr, int num, bool pet, POSITION y, POSITION x, DEPTH lev, summon_type type, BIT_FLAGS mode);
-bool cast_summon_demon(player_type *player_ptr, int power);
-bool cast_summon_undead(player_type *player_ptr, int power);
-bool cast_summon_hound(player_type *player_ptr, int power);
-bool cast_summon_elemental(player_type *player_ptr, int power);
-bool cast_summon_octopus(player_type *player_ptr);
-bool cast_summon_greater_demon(player_type *player_ptr);
-bool summon_kin_player(player_type *player_ptr, DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode);
-void mitokohmon(player_type *player_ptr);
-int summon_cyber(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x);
-int activate_hi_summon(player_type *player_ptr, POSITION y, POSITION x, bool can_pet);
-void cast_invoke_spirits(player_type *player_ptr, DIRECTION dir);
+class PlayerType;
+bool trump_summoning(PlayerType *player_ptr, int num, bool pet, POSITION y, POSITION x, DEPTH lev, summon_type type, BIT_FLAGS mode);
+bool cast_summon_demon(PlayerType *player_ptr, int power);
+bool cast_summon_undead(PlayerType *player_ptr, int power);
+bool cast_summon_hound(PlayerType *player_ptr, int power);
+bool cast_summon_elemental(PlayerType *player_ptr, int power);
+bool cast_summon_octopus(PlayerType *player_ptr);
+bool cast_summon_greater_demon(PlayerType *player_ptr);
+bool summon_kin_player(PlayerType *player_ptr, DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode);
+void mitokohmon(PlayerType *player_ptr);
+int summon_cyber(PlayerType *player_ptr, MONSTER_IDX who, POSITION y, POSITION x);
+int activate_hi_summon(PlayerType *player_ptr, POSITION y, POSITION x, bool can_pet);
+void cast_invoke_spirits(PlayerType *player_ptr, DIRECTION dir);
* #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_MONK_STANCE / #ACTION_SAMURAI_STANCE / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL
* から選択。
*/
-void set_action(player_type *player_ptr, uint8_t typ)
+void set_action(PlayerType *player_ptr, uint8_t typ)
{
int prev_typ = player_ptr->action;
if (typ == prev_typ) {
#include <stdint.h>
-struct player_type;
-void set_action(player_type *player_ptr, uint8_t typ);
+class PlayerType;
+void set_action(PlayerType *player_ptr, uint8_t typ);
#include "view/display-messages.h"
#include <algorithm>
-BadStatusSetter::BadStatusSetter(player_type *player_ptr)
+BadStatusSetter::BadStatusSetter(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
/*!
* @details 仮引数がtmpなのは、全て範囲外の値を範囲内に収める処理が含まれるため
- * @todo TIME_EFFECT型の引数はplayer_typeの時限ステータスをTimedEffectsクラスへ入れる時にshortへ差し替えること.
+ * @todo TIME_EFFECT型の引数はPlayerTypeの時限ステータスをTimedEffectsクラスへ入れる時にshortへ差し替えること.
*/
enum class PlayerCutRank;
enum class PlayerStunRank;
-struct player_type;
+class PlayerType;
class BadStatusSetter {
public:
- BadStatusSetter(player_type *player_ptr);
+ BadStatusSetter(PlayerType *player_ptr);
virtual ~BadStatusSetter() = default;
bool blindness(const TIME_EFFECT tmp_v);
bool mod_cut(const TIME_EFFECT tmp_v);
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
bool process_stun_effect(const short v);
void process_stun_status(const PlayerStunRank new_rank, const short v);
* Note that this function (used by stat potions) now restores\n
* the stat BEFORE increasing it.\n
*/
-bool inc_stat(player_type *player_ptr, int stat)
+bool inc_stat(PlayerType *player_ptr, int stat)
{
BASE_STATUS gain;
BASE_STATUS value = player_ptr->stat_cur[stat];
* if your stat is already drained, the "max" value will not drop all\n
* the way down to the "cur" value.\n
*/
-bool dec_stat(player_type *player_ptr, int stat, int amount, int permanent)
+bool dec_stat(PlayerType *player_ptr, int stat, int amount, int permanent)
{
bool res = false;
BASE_STATUS cur = player_ptr->stat_cur[stat];
* @param stat 回復ステータスID
* @return 実際に回復した場合TRUEを返す。
*/
-bool res_stat(player_type *player_ptr, int stat)
+bool res_stat(PlayerType *player_ptr, int stat)
{
if (player_ptr->stat_cur[stat] != player_ptr->stat_max[stat]) {
player_ptr->stat_cur[stat] = player_ptr->stat_max[stat];
/*
* Lose a "point"
*/
-bool do_dec_stat(player_type *player_ptr, int stat)
+bool do_dec_stat(PlayerType *player_ptr, int stat)
{
bool sust = false;
switch (stat) {
/*
* Restore lost "points" in a stat
*/
-bool do_res_stat(player_type *player_ptr, int stat)
+bool do_res_stat(PlayerType *player_ptr, int stat)
{
if (res_stat(player_ptr, stat)) {
msg_format(_("元通りに%sなった気がする。", "You feel %s."), desc_stat_pos[stat]);
/*
* Gain a "point" in a stat
*/
-bool do_inc_stat(player_type *player_ptr, int stat)
+bool do_inc_stat(PlayerType *player_ptr, int stat)
{
bool res = res_stat(player_ptr, stat);
if (inc_stat(player_ptr, stat)) {
/*
* Forget everything
*/
-bool lose_all_info(player_type *player_ptr)
+bool lose_all_info(PlayerType *player_ptr)
{
chg_virtue(player_ptr, V_KNOWLEDGE, -5);
chg_virtue(player_ptr, V_ENLIGHTEN, -5);
#pragma once
-struct player_type;
-bool inc_stat(player_type *player_ptr, int stat);
-bool dec_stat(player_type *player_ptr, int stat, int amount, int permanent);
-bool res_stat(player_type *player_ptr, int stat);
-bool do_dec_stat(player_type *player_ptr, int stat);
-bool do_res_stat(player_type *player_ptr, int stat);
-bool do_inc_stat(player_type *player_ptr, int stat);
-bool lose_all_info(player_type *player_ptr);
+class PlayerType;
+bool inc_stat(PlayerType *player_ptr, int stat);
+bool dec_stat(PlayerType *player_ptr, int stat, int amount, int permanent);
+bool res_stat(PlayerType *player_ptr, int stat);
+bool do_dec_stat(PlayerType *player_ptr, int stat);
+bool do_res_stat(PlayerType *player_ptr, int stat);
+bool do_inc_stat(PlayerType *player_ptr, int stat);
+bool lose_all_info(PlayerType *player_ptr);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_protevil(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_protevil(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_invuln(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_invuln(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_regen(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_regen(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_reflect(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_reflect(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_pass_wall(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_pass_wall(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
#include "system/angband.h"
-struct player_type;
-bool set_protevil(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_invuln(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_regen(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_reflect(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_pass_wall(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+bool set_protevil(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_invuln(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_regen(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_reflect(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_pass_wall(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
/*!
* @brief プレイヤーの全ての時限効果をリセットする。 / reset timed flags
*/
-void reset_tim_flags(player_type *player_ptr)
+void reset_tim_flags(PlayerType *player_ptr)
{
auto effects = player_ptr->effects();
player_ptr->fast = 0; /* Timed -- Fast */
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_fast(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_fast(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_shield(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_shield(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_magicdef(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_magicdef(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_blessed(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_blessed(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_hero(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_hero(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_mimic(player_type *player_ptr, TIME_EFFECT v, int16_t mimic_race_idx, bool do_dec)
+bool set_mimic(PlayerType *player_ptr, TIME_EFFECT v, int16_t mimic_race_idx, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec FALSEの場合現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_shero(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_shero(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_wraith_form(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_wraith_form(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tsuyoshi(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tsuyoshi(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
#include "system/angband.h"
-struct player_type;
-void reset_tim_flags(player_type *player_ptr);
-bool set_fast(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_shield(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_magicdef(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_blessed(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_hero(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_mimic(player_type *player_ptr, TIME_EFFECT v, int16_t mimic_race_idx, bool do_dec);
-bool set_shero(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_wraith_form(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tsuyoshi(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+void reset_tim_flags(PlayerType *player_ptr);
+bool set_fast(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_shield(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_magicdef(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_blessed(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_hero(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_mimic(PlayerType *player_ptr, TIME_EFFECT v, int16_t mimic_race_idx, bool do_dec);
+bool set_shero(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_wraith_form(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tsuyoshi(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_oppose_acid(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_oppose_acid(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_oppose_elec(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_oppose_elec(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_oppose_fire(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_oppose_fire(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_oppose_cold(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_oppose_cold(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_oppose_pois(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_oppose_pois(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
return true;
}
-bool is_oppose_acid(player_type *player_ptr)
+bool is_oppose_acid(PlayerType *player_ptr)
{
return player_ptr->oppose_acid || music_singing(player_ptr, MUSIC_RESIST) || PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::MUSOU);
}
-bool is_oppose_elec(player_type *player_ptr)
+bool is_oppose_elec(PlayerType *player_ptr)
{
return player_ptr->oppose_elec || music_singing(player_ptr, MUSIC_RESIST) || PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::MUSOU);
}
-bool is_oppose_fire(player_type *player_ptr)
+bool is_oppose_fire(PlayerType *player_ptr)
{
return player_ptr->oppose_fire || music_singing(player_ptr, MUSIC_RESIST)
|| (PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::MUSOU) || (player_ptr->mimic_form == MIMIC_DEMON)
|| (PlayerRace(player_ptr).equals(PlayerRaceType::BALROG) && player_ptr->lev > 44));
}
-bool is_oppose_cold(player_type *player_ptr)
+bool is_oppose_cold(PlayerType *player_ptr)
{
return player_ptr->oppose_cold || music_singing(player_ptr, MUSIC_RESIST) || PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::MUSOU);
}
-bool is_oppose_pois(player_type *player_ptr)
+bool is_oppose_pois(PlayerType *player_ptr)
{
return player_ptr->oppose_pois || music_singing(player_ptr, MUSIC_RESIST)
|| (PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::MUSOU) || (player_ptr->pclass == PlayerClassType::NINJA && player_ptr->lev > 44));
#include "system/angband.h"
-struct player_type;
-bool set_oppose_acid(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_oppose_elec(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_oppose_fire(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_oppose_cold(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_oppose_pois(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool is_oppose_acid(player_type *player_ptr);
-bool is_oppose_elec(player_type *player_ptr);
-bool is_oppose_fire(player_type *player_ptr);
-bool is_oppose_cold(player_type *player_ptr);
-bool is_oppose_pois(player_type *player_ptr);
+class PlayerType;
+bool set_oppose_acid(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_oppose_elec(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_oppose_fire(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_oppose_cold(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_oppose_pois(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool is_oppose_acid(PlayerType *player_ptr);
+bool is_oppose_elec(PlayerType *player_ptr);
+bool is_oppose_fire(PlayerType *player_ptr);
+bool is_oppose_cold(PlayerType *player_ptr);
+bool is_oppose_pois(PlayerType *player_ptr);
/*
* Gain experience
*/
-void gain_exp_64(player_type *player_ptr, int32_t amount, uint32_t amount_frac)
+void gain_exp_64(PlayerType *player_ptr, int32_t amount, uint32_t amount_frac)
{
if (player_ptr->is_dead)
return;
/*
* Gain experience
*/
-void gain_exp(player_type *player_ptr, int32_t amount) { gain_exp_64(player_ptr, amount, 0L); }
+void gain_exp(PlayerType *player_ptr, int32_t amount) { gain_exp_64(player_ptr, amount, 0L); }
/*
* Lose experience
*/
-void lose_exp(player_type *player_ptr, int32_t amount)
+void lose_exp(PlayerType *player_ptr, int32_t amount)
{
if (player_ptr->prace == PlayerRaceType::ANDROID)
return;
/*
* Restores any drained experience
*/
-bool restore_level(player_type *player_ptr)
+bool restore_level(PlayerType *player_ptr)
{
if (player_ptr->exp < player_ptr->max_exp) {
msg_print(_("経験値が戻ってきた気がする。", "You feel your experience returning."));
* Drain experience
* If resisted to draining, return FALSE
*/
-bool drain_exp(player_type *player_ptr, int32_t drain, int32_t slip, int hold_exp_prob)
+bool drain_exp(PlayerType *player_ptr, int32_t drain, int32_t slip, int hold_exp_prob)
{
if (player_ptr->prace == PlayerRaceType::ANDROID)
return false;
#include "system/angband.h"
-struct player_type;
-void gain_exp_64(player_type *player_ptr, int32_t amount, uint32_t amount_frac);
-void gain_exp(player_type *player_ptr, int32_t amount);
-bool restore_level(player_type *player_ptr);
-void lose_exp(player_type *player_ptr, int32_t amount);
-bool drain_exp(player_type *player_ptr, int32_t drain, int32_t slip, int hold_exp_prob);
+class PlayerType;
+void gain_exp_64(PlayerType *player_ptr, int32_t amount, uint32_t amount_frac);
+void gain_exp(PlayerType *player_ptr, int32_t amount);
+bool restore_level(PlayerType *player_ptr);
+void lose_exp(PlayerType *player_ptr, int32_t amount);
+bool drain_exp(PlayerType *player_ptr, int32_t drain, int32_t slip, int hold_exp_prob);
#include "util/enum-converter.h"
#include "view/display-messages.h"
-void do_poly_wounds(player_type *player_ptr)
+void do_poly_wounds(PlayerType *player_ptr)
{
int16_t hit_p = (player_ptr->mhp - player_ptr->chp);
int16_t change = damroll(player_ptr->lev, 5);
/*
* Change player race
*/
-void change_race(player_type *player_ptr, PlayerRaceType new_race, concptr effect_msg)
+void change_race(PlayerType *player_ptr, PlayerRaceType new_race, concptr effect_msg)
{
concptr title = race_info[enum2i(new_race)].title;
PlayerRaceType old_race = player_ptr->prace;
lite_spot(player_ptr, player_ptr->y, player_ptr->x);
}
-void do_poly_self(player_type *player_ptr)
+void do_poly_self(PlayerType *player_ptr)
{
int power = player_ptr->lev;
#include "player-info/race-types.h"
#include "system/angband.h"
-struct player_type;
-void do_poly_self(player_type *player_ptr);
-void do_poly_wounds(player_type *player_ptr);
-void change_race(player_type *player_ptr, PlayerRaceType new_race, concptr effect_msg);
+class PlayerType;
+void do_poly_self(PlayerType *player_ptr);
+void do_poly_wounds(PlayerType *player_ptr);
+void change_race(PlayerType *player_ptr, PlayerRaceType new_race, concptr effect_msg);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_esp(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_esp(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_invis(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_invis(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_infra(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_infra(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
#include "system/angband.h"
-struct player_type;
-bool set_tim_esp(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_invis(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_infra(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+bool set_tim_esp(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_invis(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_infra(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_tim_levitation(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_levitation(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
return true;
}
-bool set_ultimate_res(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_ultimate_res(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
return true;
}
-bool set_tim_res_nether(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_res_nether(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
return true;
}
-bool set_tim_res_time(player_type *player_ptr, TIME_EFFECT v, bool do_dec)
+bool set_tim_res_time(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = false;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
#include "system/angband.h"
-struct player_type;
-bool set_tim_levitation(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_ultimate_res(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_res_nether(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_res_time(player_type *player_ptr, TIME_EFFECT v, bool do_dec);
+class PlayerType;
+bool set_tim_levitation(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_ultimate_res(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_res_nether(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_res_time(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
* Based on a suggestion by "Lee Vogt" <lvogt@cig.mcel.mot.com>
* </pre>
*/
-bool black_market_crap(player_type *player_ptr, object_type *o_ptr)
+bool black_market_crap(PlayerType *player_ptr, object_type *o_ptr)
{
if (o_ptr->is_ego())
return false;
#pragma once
struct object_type;
-struct player_type;
-bool black_market_crap(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool black_market_crap(PlayerType *player_ptr, object_type *o_ptr);
* (cast magic) into "g" (get), and "s" (search) into "d" (drop).
* </pre>
*/
-void do_cmd_store(player_type *player_ptr)
+void do_cmd_store(PlayerType *player_ptr)
{
if (player_ptr->wild_mode)
return;
#pragma once
-struct player_type;
-void do_cmd_store(player_type *player_ptr);
+class PlayerType;
+void do_cmd_store(PlayerType *player_ptr);
* known, the player may have to pick stuff up and drop it again.
* </pre>
*/
-int home_carry(player_type *player_ptr, object_type *o_ptr)
+int home_carry(PlayerType *player_ptr, object_type *o_ptr)
{
bool old_stack_force_notes = stack_force_notes;
bool old_stack_force_costs = stack_force_costs;
}
}
-static void exe_reorder_store_item(player_type *player_ptr, bool *flag)
+static void exe_reorder_store_item(PlayerType *player_ptr, bool *flag)
{
for (int i = 0; i < st_ptr->stock_num; i++) {
object_type *o_ptr;
* @param store_num 店舗ID
* @return 実際に整理が行われたならばTRUEを返す。
*/
-bool combine_and_reorder_home(player_type *player_ptr, const StoreSaleType store_num)
+bool combine_and_reorder_home(PlayerType *player_ptr, const StoreSaleType store_num)
{
bool old_stack_force_notes = stack_force_notes;
bool old_stack_force_costs = stack_force_costs;
#pragma once
struct object_type;
-struct player_type;
+class PlayerType;
enum class StoreSaleType;
-int home_carry(player_type *player_ptr, object_type *o_ptr);
-bool combine_and_reorder_home(player_type *player_ptr, const StoreSaleType store_num);
+int home_carry(PlayerType *player_ptr, object_type *o_ptr);
+bool combine_and_reorder_home(PlayerType *player_ptr, const StoreSaleType store_num);
* Remove an item from museum (Originally from TOband)
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void museum_remove_object(player_type *player_ptr)
+void museum_remove_object(PlayerType *player_ptr)
{
if (st_ptr->stock_num <= 0) {
msg_print(_("博物館には何も置いてありません。", "The Museum is empty."));
#pragma once
-struct player_type;
-void museum_remove_object(player_type *player_ptr);
+class PlayerType;
+void museum_remove_object(PlayerType *player_ptr);
* "greed" value is always something (?).
* </pre>
*/
-PRICE price_item(player_type *player_ptr, object_type *o_ptr, int greed, bool flip)
+PRICE price_item(PlayerType *player_ptr, object_type *o_ptr, int greed, bool flip)
{
PRICE price = object_value(o_ptr);
if (price <= 0)
#define LOW_PRICE_THRESHOLD 10L
struct object_type;
-struct player_type;
-PRICE price_item(player_type *player_ptr, object_type *o_ptr, int greed, bool flip);
+class PlayerType;
+PRICE price_item(PlayerType *player_ptr, object_type *o_ptr, int greed, bool flip);
* @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
* Return TRUE if purchase is NOT successful
*/
-static std::optional<PRICE> prompt_to_buy(player_type *player_ptr, object_type *o_ptr)
+static std::optional<PRICE> prompt_to_buy(PlayerType *player_ptr, object_type *o_ptr)
{
auto price_ask = price_item(player_ptr, o_ptr, ot_ptr->inflate, false);
* @param i お店のストック数(アドレス渡し)
* @param 取得元インベントリ番号
*/
-static void take_item_from_home(player_type *player_ptr, object_type *o_ptr, object_type *j_ptr, const COMMAND_CODE item)
+static void take_item_from_home(PlayerType *player_ptr, object_type *o_ptr, object_type *j_ptr, const COMMAND_CODE item)
{
const int amt = j_ptr->number;
distribute_charges(o_ptr, j_ptr, amt);
chg_virtue(player_ptr, V_SACRIFICE, 1);
}
-static void shuffle_store(player_type *player_ptr)
+static void shuffle_store(PlayerType *player_ptr)
{
if (!one_in_(STORE_SHUFFLE)) {
msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
prt(buf, 3, 50);
}
-static void switch_store_stock(player_type *player_ptr, const int i, const COMMAND_CODE item)
+static void switch_store_stock(PlayerType *player_ptr, const int i, const COMMAND_CODE item)
{
if (st_ptr->stock_num == 0) {
shuffle_store(player_ptr);
* Buy an item from a store -RAK-
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void store_purchase(player_type *player_ptr)
+void store_purchase(PlayerType *player_ptr)
{
if (cur_store_num == StoreSaleType::MUSEUM) {
msg_print(_("博物館から取り出すことはできません。", "Items cannot be taken out of the Museum."));
#pragma once
-struct player_type;
-void store_purchase(player_type *player_ptr);
+class PlayerType;
+void store_purchase(PlayerType *player_ptr);
return v;
}
-void display_rumor(player_type *player_ptr, bool ex)
+void display_rumor(PlayerType *player_ptr, bool ex)
{
char rumor[1024];
int section = (ex && (randint0(3) == 0)) ? 1 : 0;
#pragma once
-struct player_type;
-void display_rumor(player_type *player_ptr, bool ex);
+class PlayerType;
+void display_rumor(PlayerType *player_ptr, bool ex);
* Successful haggle.
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void store_owner_says_comment(player_type *player_ptr)
+void store_owner_says_comment(PlayerType *player_ptr)
{
if (cur_store_num == StoreSaleType::BLACK)
msg_print(comment_1_B[randint0(MAX_COMMENT_1)]);
* @details
* We paid "price", it was worth "value", and we thought it was worth "guess"
*/
-void purchase_analyze(player_type *player_ptr, PRICE price, PRICE value, PRICE guess)
+void purchase_analyze(PlayerType *player_ptr, PRICE price, PRICE value, PRICE guess)
{
/* Item was worthless, but we bought it */
if ((value <= 0) && (price > value)) {
#include "system/angband.h"
-struct player_type;
-void store_owner_says_comment(player_type *player_ptr);
-void purchase_analyze(player_type *player_ptr, PRICE price, PRICE value, PRICE guess);
+class PlayerType;
+void store_owner_says_comment(PlayerType *player_ptr);
+void purchase_analyze(PlayerType *player_ptr, PRICE price, PRICE value, PRICE guess);
* @param o_ptr オブジェクトの構造体参照ポインタ
* @return 売るなら(true,売値)、売らないなら(false,0)のタプル
*/
-static std::optional<PRICE> prompt_to_sell(player_type *player_ptr, object_type *o_ptr)
+static std::optional<PRICE> prompt_to_sell(PlayerType *player_ptr, object_type *o_ptr)
{
auto price_ask = price_item(player_ptr, o_ptr, ot_ptr->inflate, true);
* Sell an item to the store (or home)
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void store_sell(player_type *player_ptr)
+void store_sell(PlayerType *player_ptr)
{
concptr q; //!< @note プロンプトメッセージ
concptr s_none; //!< @note 売る/置くものがない場合のメッセージ
#pragma once
-struct player_type;
-void store_sell(player_type *player_ptr);
+class PlayerType;
+void store_sell(PlayerType *player_ptr);
* @note
* Note that a shop-keeper must refuse to buy "worthless" items
*/
-bool store_will_buy(player_type *, const object_type *o_ptr)
+bool store_will_buy(PlayerType *, const object_type *o_ptr)
{
if ((cur_store_num == StoreSaleType::HOME) || (cur_store_num == StoreSaleType::MUSEUM))
return true;
* Some objects can be sold at a "discount" (in small piles)
* </pre>
*/
-void mass_produce(player_type *, object_type *o_ptr)
+void mass_produce(PlayerType *, object_type *o_ptr)
{
const PRICE cost = object_value(o_ptr);
int size = switch_mass_production(o_ptr, cost);
#pragma once
struct object_type;
-struct player_type;
-bool store_will_buy(player_type *player_ptr, const object_type *o_ptr);
-void mass_produce(player_type *player_ptr, object_type *o_ptr);
+class PlayerType;
+bool store_will_buy(PlayerType *player_ptr, const object_type *o_ptr);
+void mass_produce(PlayerType *player_ptr, object_type *o_ptr);
* but not in the stores, to prevent chaos.
* </pre>
*/
-void store_process_command(player_type *player_ptr)
+void store_process_command(PlayerType *player_ptr)
{
repeat_check();
if (rogue_like_commands && (command_cmd == 'l'))
extern bool leave_store;
-struct player_type;
-void store_process_command(player_type *player_ptr);
+class PlayerType;
+void store_process_command(PlayerType *player_ptr);
* </pre>
*/
void store_create(
- player_type *player_ptr, KIND_OBJECT_IDX fix_k_idx, black_market_crap_pf black_market_crap, store_will_buy_pf store_will_buy, mass_produce_pf mass_produce)
+ PlayerType *player_ptr, KIND_OBJECT_IDX fix_k_idx, black_market_crap_pf black_market_crap, store_will_buy_pf store_will_buy, mass_produce_pf mass_produce)
{
if (st_ptr->stock_num >= st_ptr->stock_size)
return;
extern StoreSaleType cur_store_num;
extern store_type *st_ptr;
-struct player_type;
-typedef bool (*black_market_crap_pf)(player_type *, object_type *);
-typedef bool (*store_will_buy_pf)(player_type *, const object_type *);
-typedef void (*mass_produce_pf)(player_type *, object_type *);
+class PlayerType;
+typedef bool (*black_market_crap_pf)(PlayerType *, object_type *);
+typedef bool (*store_will_buy_pf)(PlayerType *, const object_type *);
+typedef void (*mass_produce_pf)(PlayerType *, object_type *);
void store_delete(void);
-void store_create(player_type *player_ptr, KIND_OBJECT_IDX k_idx, black_market_crap_pf black_market_crap, store_will_buy_pf store_will_buy, mass_produce_pf mass_produce);
+void store_create(PlayerType *player_ptr, KIND_OBJECT_IDX k_idx, black_market_crap_pf black_market_crap, store_will_buy_pf store_will_buy, mass_produce_pf mass_produce);
void store_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
void store_item_optimize(INVENTORY_IDX item);
int store_carry(object_type *o_ptr);
* @brief 店のアイテムを調べるコマンドのメインルーチン /
* Examine an item in a store -JDL-
*/
-void store_examine(player_type *player_ptr)
+void store_examine(PlayerType *player_ptr)
{
if (st_ptr->stock_num <= 0) {
if (cur_store_num == StoreSaleType::HOME)
* Shuffle one of the stores.
* @param which 店舗種類のID
*/
-void store_shuffle(player_type *player_ptr, StoreSaleType which)
+void store_shuffle(PlayerType *player_ptr, StoreSaleType which)
{
if ((which == StoreSaleType::HOME) || (which == StoreSaleType::MUSEUM))
return;
* @param store_num 店舗種類のID
* @param chance 更新商品数
*/
-void store_maintenance(player_type *player_ptr, int town_num, StoreSaleType store_num, int chance)
+void store_maintenance(PlayerType *player_ptr, int town_num, StoreSaleType store_num, int chance)
{
cur_store_num = store_num;
if ((store_num == StoreSaleType::HOME) || (store_num == StoreSaleType::MUSEUM))
extern int cur_store_feat;
extern bool allow_inc;
-struct player_type;
+class PlayerType;
int16_t store_get_stock_max(StoreSaleType sst, bool powerup = true);
-void store_shuffle(player_type *player_ptr, StoreSaleType which);
-void store_maintenance(player_type *player_ptr, int town_num, StoreSaleType store_num, int chance);
+void store_shuffle(PlayerType *player_ptr, StoreSaleType which);
+void store_maintenance(PlayerType *player_ptr, int town_num, StoreSaleType store_num, int chance);
void store_init(int town_num, StoreSaleType store_num);
-void store_examine(player_type *player_ptr);
+void store_examine(PlayerType *player_ptr);
int store_check_num(object_type *o_ptr);
int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j);
enum class SmithEffectType : int16_t;
enum class RandomArtActType : short;
-struct player_type;
+class PlayerType;
typedef struct object_type {
KIND_OBJECT_IDX k_idx{}; /*!< Kind index (zero if "dead") */
POSITION iy{}; /*!< Y-position on map, or zero */
/*!
* @brief プレイヤー構造体実体 / Static player info record
*/
-player_type p_body;
+PlayerType p_body;
/*!
* @brief プレイヤー構造体へのグローバル参照ポインタ / Pointer to the player info
*/
-player_type *p_ptr = &p_body;
+PlayerType *p_ptr = &p_body;
-player_type::player_type()
+PlayerType::PlayerType()
: timed_effects(std::make_shared<TimedEffects>())
{
}
-std::shared_ptr<TimedEffects> player_type::effects() const
+std::shared_ptr<TimedEffects> PlayerType::effects() const
{
return this->timed_effects;
}
struct floor_type;
struct object_type;
class TimedEffects;
-struct player_type {
+class PlayerType {
public:
- player_type();
+ PlayerType();
int player_uid{};
int player_euid{};
int player_egid{};
std::shared_ptr<TimedEffects> timed_effects;
};
-extern player_type *p_ptr;
+extern PlayerType *p_ptr;
* XAngband: determine if a given location is "interesting"
* based on target_set_accept function.
*/
-static bool tgt_pt_accept(player_type *player_ptr, POSITION y, POSITION x)
+static bool tgt_pt_accept(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!(in_bounds(floor_ptr, y, x)))
* XAngband: Prepare the "temp" array for "tget_pt"
* based on target_set_prepare funciton.
*/
-static void tgt_pt_prepare(player_type *player_ptr, std::vector<POSITION> &ys, std::vector<POSITION> &xs)
+static void tgt_pt_prepare(PlayerType *player_ptr, std::vector<POSITION> &ys, std::vector<POSITION> &xs)
{
if (!expand_list)
return;
char prev_ch; //<! 前回入力キー
std::function<bool(grid_type *)> callback; //<! 条件判定コールバック
- void move_to_symbol(player_type *player_ptr);
+ void move_to_symbol(PlayerType *player_ptr);
};
/*!
* @details 自分 (@)の位置に戻ってくるような処理に見える.
* コールバックにも依る?
*/
-void tgt_pt_info::move_to_symbol(player_type *player_ptr)
+void tgt_pt_info::move_to_symbol(PlayerType *player_ptr)
{
if (!expand_list || this->ys.empty())
return;
* @param y_ptr y座標への参照ポインタ
* @return 指定したらTRUE、キャンセルしたらFALSE
*/
-bool tgt_pt(player_type *player_ptr, POSITION *x_ptr, POSITION *y_ptr)
+bool tgt_pt(PlayerType *player_ptr, POSITION *x_ptr, POSITION *y_ptr)
{
tgt_pt_info info;
get_screen_size(&info.wid, &info.hgt);
#include "system/angband.h"
-struct player_type;
-bool tgt_pt(player_type *player_ptr, POSITION *x, POSITION *y);
+class PlayerType;
+bool tgt_pt(PlayerType *player_ptr, POSITION *x, POSITION *y);
pp_ptr->k++;
}
-static void calc_projection_to_target(player_type *player_ptr, projection_path_type *pp_ptr, bool is_vertical)
+static void calc_projection_to_target(PlayerType *player_ptr, projection_path_type *pp_ptr, bool is_vertical)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
while (true) {
}
}
-static bool calc_vertical_projection(player_type *player_ptr, projection_path_type *pp_ptr)
+static bool calc_vertical_projection(PlayerType *player_ptr, projection_path_type *pp_ptr)
{
if (pp_ptr->ay <= pp_ptr->ax)
return false;
return true;
}
-static bool calc_horizontal_projection(player_type *player_ptr, projection_path_type *pp_ptr)
+static bool calc_horizontal_projection(PlayerType *player_ptr, projection_path_type *pp_ptr)
{
if (pp_ptr->ax <= pp_ptr->ay)
return false;
return true;
}
-static void calc_projection_others(player_type *player_ptr, projection_path_type *pp_ptr)
+static void calc_projection_others(PlayerType *player_ptr, projection_path_type *pp_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
while (true) {
* @param flag フラグID
* @return リストの長さ
*/
-int projection_path(player_type *player_ptr, uint16_t *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flag)
+int projection_path(PlayerType *player_ptr, uint16_t *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flag)
{
if ((x1 == x2) && (y1 == y2))
return 0;
*
* This is slightly (but significantly) different from "los(y1,x1,y2,x2)".
*/
-bool projectable(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+bool projectable(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
uint16_t grid_g[512];
int grid_n = projection_path(player_ptr, grid_g, (project_length ? project_length : get_max_range(player_ptr)), y1, x1, y2, x2, 0);
* @param player_ptr プレイヤーへの参照ポインタ
* @return 射程
*/
-int get_max_range(player_type *player_ptr) { return player_ptr->phase_out ? 36 : 18; }
+int get_max_range(PlayerType *player_ptr) { return player_ptr->phase_out ? 36 : 18; }
/*
* Convert a "grid" (G) into a "location" (Y)
#include "system/angband.h"
-struct player_type;
-int projection_path(player_type *player_ptr, uint16_t *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
-bool projectable(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-int get_max_range(player_type *player_ptr);
+class PlayerType;
+int projection_path(PlayerType *player_ptr, uint16_t *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
+bool projectable(PlayerType *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
+int get_max_range(PlayerType *player_ptr);
POSITION get_grid_y(uint16_t grid);
POSITION get_grid_x(uint16_t grid);
* The map is reprinted if necessary, and "TRUE" is returned.
* @return 実際に再描画が必要だった場合TRUEを返す
*/
-void verify_panel(player_type *player_ptr)
+void verify_panel(PlayerType *player_ptr)
{
POSITION y = player_ptr->y;
POSITION x = player_ptr->x;
* Update (if necessary) and verify (if possible) the target.
* We return TRUE if the target is "okay" and FALSE otherwise.
*/
-bool target_okay(player_type *player_ptr)
+bool target_okay(PlayerType *player_ptr)
{
if (target_who < 0)
return true;
extern POSITION target_col;
extern POSITION target_row;
-struct player_type;
-void verify_panel(player_type *player_ptr);
-bool target_okay(player_type *player_ptr);
+class PlayerType;
+void verify_panel(PlayerType *player_ptr);
+bool target_okay(PlayerType *player_ptr);
concptr name;
} eg_type;
-static eg_type *initialize_eg_type(player_type *player_ptr, eg_type *eg_ptr, POSITION y, POSITION x, target_type mode, concptr info)
+static eg_type *initialize_eg_type(PlayerType *player_ptr, eg_type *eg_ptr, POSITION y, POSITION x, target_type mode, concptr info)
{
eg_ptr->y = y;
eg_ptr->x = x;
/*
* Evaluate number of kill needed to gain level
*/
-static void evaluate_monster_exp(player_type *player_ptr, char *buf, monster_type *m_ptr)
+static void evaluate_monster_exp(PlayerType *player_ptr, char *buf, monster_type *m_ptr)
{
monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
if ((player_ptr->lev >= PY_MAX_LEVEL) || (player_ptr->prace == PlayerRaceType::ANDROID)) {
sprintf(buf, "%03ld", (long int)num);
}
-static void describe_scan_result(player_type *player_ptr, eg_type *eg_ptr)
+static void describe_scan_result(PlayerType *player_ptr, eg_type *eg_ptr)
{
if (!easy_floor)
return;
eg_ptr->x_info = _("x物 ", "x,");
}
-static void describe_target(player_type *player_ptr, eg_type *eg_ptr)
+static void describe_target(PlayerType *player_ptr, eg_type *eg_ptr)
{
if (!player_bold(player_ptr, eg_ptr->y, eg_ptr->x)) {
eg_ptr->s1 = _("ターゲット:", "Target:");
#endif
}
-static process_result describe_hallucinated_target(player_type *player_ptr, eg_type *eg_ptr)
+static process_result describe_hallucinated_target(PlayerType *player_ptr, eg_type *eg_ptr)
{
if (!player_ptr->hallucinated)
return PROCESS_CONTINUE;
return PROCESS_FALSE;
}
-static bool describe_grid_lore(player_type *player_ptr, eg_type *eg_ptr)
+static bool describe_grid_lore(PlayerType *player_ptr, eg_type *eg_ptr)
{
screen_save();
screen_roff(player_ptr, eg_ptr->m_ptr->ap_r_idx, MONSTER_LORE_NORMAL);
return eg_ptr->query != 'r';
}
-static void describe_grid_monster(player_type *player_ptr, eg_type *eg_ptr)
+static void describe_grid_monster(PlayerType *player_ptr, eg_type *eg_ptr)
{
bool recall = false;
GAME_TEXT m_name[MAX_NLEN];
#endif
}
-static uint16_t describe_monster_item(player_type *player_ptr, eg_type *eg_ptr)
+static uint16_t describe_monster_item(PlayerType *player_ptr, eg_type *eg_ptr)
{
for (const auto this_o_idx : eg_ptr->m_ptr->hold_o_idx_list) {
GAME_TEXT o_name[MAX_NLEN];
return (input > -127) && (input < 128);
}
-static int16_t describe_grid(player_type *player_ptr, eg_type *eg_ptr)
+static int16_t describe_grid(PlayerType *player_ptr, eg_type *eg_ptr)
{
if ((eg_ptr->g_ptr->m_idx == 0) || !player_ptr->current_floor_ptr->m_list[eg_ptr->g_ptr->m_idx].ml)
return CONTINUOUS_DESCRIPTION;
return CONTINUOUS_DESCRIPTION;
}
-static int16_t describe_footing(player_type *player_ptr, eg_type *eg_ptr)
+static int16_t describe_footing(PlayerType *player_ptr, eg_type *eg_ptr)
{
if (eg_ptr->floor_num != 1)
return CONTINUOUS_DESCRIPTION;
return CONTINUOUS_DESCRIPTION;
}
-static char describe_footing_many_items(player_type *player_ptr, eg_type *eg_ptr, int *min_width)
+static char describe_footing_many_items(PlayerType *player_ptr, eg_type *eg_ptr, int *min_width)
{
while (true) {
screen_save();
}
}
-static int16_t loop_describing_grid(player_type *player_ptr, eg_type *eg_ptr)
+static int16_t loop_describing_grid(PlayerType *player_ptr, eg_type *eg_ptr)
{
if (eg_ptr->floor_num == 0)
return CONTINUOUS_DESCRIPTION;
}
}
-static int16_t describe_footing_sight(player_type *player_ptr, eg_type *eg_ptr, object_type *o_ptr)
+static int16_t describe_footing_sight(PlayerType *player_ptr, eg_type *eg_ptr, object_type *o_ptr)
{
if ((o_ptr->marked & OM_FOUND) == 0)
return CONTINUOUS_DESCRIPTION;
return CONTINUOUS_DESCRIPTION;
}
-static int16_t sweep_footing_items(player_type *player_ptr, eg_type *eg_ptr)
+static int16_t sweep_footing_items(PlayerType *player_ptr, eg_type *eg_ptr)
{
for (const auto this_o_idx : eg_ptr->g_ptr->o_idx_list) {
object_type *o_ptr;
return CONTINUOUS_DESCRIPTION;
}
-static concptr decide_target_floor(player_type *player_ptr, eg_type *eg_ptr)
+static concptr decide_target_floor(PlayerType *player_ptr, eg_type *eg_ptr)
{
if (eg_ptr->f_ptr->flags.has(FloorFeatureType::QUEST_ENTER)) {
QUEST_IDX old_quest = player_ptr->current_floor_ptr->inside_quest;
* @return 入力キー
* @todo xとlで処理を分ける?
*/
-char examine_grid(player_type *player_ptr, const POSITION y, const POSITION x, target_type mode, concptr info)
+char examine_grid(PlayerType *player_ptr, const POSITION y, const POSITION x, target_type mode, concptr info)
{
eg_type tmp_eg;
eg_type *eg_ptr = initialize_eg_type(player_ptr, &tmp_eg, y, x, mode, info);
extern bool show_gold_on_floor;
enum target_type : uint32_t;
-struct player_type;
-char examine_grid(player_type *player_ptr, const POSITION y, const POSITION x, target_type mode, concptr info);
+class PlayerType;
+char examine_grid(PlayerType *player_ptr, const POSITION y, const POSITION x, target_type mode, concptr info);
*
* Note that confusion over-rides any (explicit?) user choice.
*/
-bool get_aim_dir(player_type *player_ptr, DIRECTION *dp)
+bool get_aim_dir(PlayerType *player_ptr, DIRECTION *dp)
{
DIRECTION dir = command_dir;
if (use_old_target && target_okay(player_ptr))
return true;
}
-bool get_direction(player_type *player_ptr, DIRECTION *dp, bool allow_under, bool with_steed)
+bool get_direction(PlayerType *player_ptr, DIRECTION *dp, bool allow_under, bool with_steed)
{
DIRECTION dir = command_dir;
COMMAND_CODE code;
* This function tracks and uses the "global direction", and uses
* that as the "desired direction", to which "confusion" is applied.
*/
-bool get_rep_dir(player_type *player_ptr, DIRECTION *dp, bool under)
+bool get_rep_dir(PlayerType *player_ptr, DIRECTION *dp, bool under)
{
DIRECTION dir = command_dir;
COMMAND_CODE code;
#include "system/angband.h"
-struct player_type;
-bool get_aim_dir(player_type *player_ptr, DIRECTION *dp);
-bool get_direction(player_type *player_ptr, DIRECTION *dp, bool allow_under, bool with_steed);
-bool get_rep_dir(player_type *player_ptr, DIRECTION *dp, bool under);
+class PlayerType;
+bool get_aim_dir(PlayerType *player_ptr, DIRECTION *dp);
+bool get_direction(PlayerType *player_ptr, DIRECTION *dp, bool allow_under, bool with_steed);
+bool get_rep_dir(PlayerType *player_ptr, DIRECTION *dp, bool under);
* Future versions may restrict the ability to target "trappers"
* and "mimics", but the semantics is a little bit weird.
*/
-bool target_able(player_type *player_ptr, MONSTER_IDX m_idx)
+bool target_able(PlayerType *player_ptr, MONSTER_IDX m_idx)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
/*
* Determine if a given location is "interesting"
*/
-static bool target_set_accept(player_type *player_ptr, POSITION y, POSITION x)
+static bool target_set_accept(PlayerType *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!(in_bounds(floor_ptr, y, x)))
*
* ys, xs は処理開始時にクリアされる。
*/
-void target_set_prepare(player_type *player_ptr, std::vector<POSITION> &ys, std::vector<POSITION> &xs, const BIT_FLAGS mode)
+void target_set_prepare(PlayerType *player_ptr, std::vector<POSITION> &ys, std::vector<POSITION> &xs, const BIT_FLAGS mode)
{
POSITION min_hgt, max_hgt, min_wid, max_wid;
if (mode & TARGET_KILL) {
std::swap(xs[0], xs[1]);
}
-void target_sensing_monsters_prepare(player_type *player_ptr, std::vector<MONSTER_IDX> &monster_list)
+void target_sensing_monsters_prepare(PlayerType *player_ptr, std::vector<MONSTER_IDX> &monster_list)
{
monster_list.clear();
#include "system/angband.h"
-struct player_type;
-bool target_able(player_type *player_ptr, MONSTER_IDX m_idx);
-void target_set_prepare(player_type *player_ptr, std::vector<POSITION> &ys, std::vector<POSITION> &xs, BIT_FLAGS mode);
-void target_sensing_monsters_prepare(player_type *player_ptr, std::vector<MONSTER_IDX> &monster_list);
+class PlayerType;
+bool target_able(PlayerType *player_ptr, MONSTER_IDX m_idx);
+void target_set_prepare(PlayerType *player_ptr, std::vector<POSITION> &ys, std::vector<POSITION> &xs, BIT_FLAGS mode);
+void target_sensing_monsters_prepare(PlayerType *player_ptr, std::vector<MONSTER_IDX> &monster_list);
bool move_fast; // カーソル移動を粗くする(1マスずつ移動しない)
} ts_type;
-static ts_type *initialize_target_set_type(player_type *player_ptr, ts_type *ts_ptr, target_type mode)
+static ts_type *initialize_target_set_type(PlayerType *player_ptr, ts_type *ts_ptr, target_type mode)
{
ts_ptr->mode = mode;
ts_ptr->y = player_ptr->y;
* Also used in do_cmd_locate
* @return 実際に再描画が必要だった場合TRUEを返す
*/
-static bool change_panel_xy(player_type *player_ptr, POSITION y, POSITION x)
+static bool change_panel_xy(PlayerType *player_ptr, POSITION y, POSITION x)
{
POSITION dy = 0, dx = 0;
TERM_LEN wid, hgt;
return b_i;
}
-static void describe_projectablity(player_type *player_ptr, ts_type *ts_ptr)
+static void describe_projectablity(PlayerType *player_ptr, ts_type *ts_ptr)
{
ts_ptr->y = ys_interest[ts_ptr->m];
ts_ptr->x = xs_interest[ts_ptr->m];
ts_ptr->query = 't';
}
-static void switch_target_input(player_type *player_ptr, ts_type *ts_ptr)
+static void switch_target_input(PlayerType *player_ptr, ts_type *ts_ptr)
{
ts_ptr->distance = 0;
switch (ts_ptr->query) {
* @brief カーソル移動に伴い、描画範囲、"interesting" 座標リスト、現在のターゲットを更新する。
* @return カーソル移動によって描画範囲が変化したかどうか
*/
-static bool check_panel_changed(player_type *player_ptr, ts_type *ts_ptr)
+static bool check_panel_changed(PlayerType *player_ptr, ts_type *ts_ptr)
{
// カーソル移動によって描画範囲が変化しないなら何もせずその旨を返す。
if (!change_panel(player_ptr, ddy[ts_ptr->distance], ddx[ts_ptr->distance]))
*
* 既に "interesting" な座標を発見している場合、この関数は何もしない。
*/
-static void sweep_targets(player_type *player_ptr, ts_type *ts_ptr)
+static void sweep_targets(PlayerType *player_ptr, ts_type *ts_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
while (ts_ptr->flag && (ts_ptr->target_num < 0)) {
}
}
-static bool set_target_grid(player_type *player_ptr, ts_type *ts_ptr)
+static bool set_target_grid(PlayerType *player_ptr, ts_type *ts_ptr)
{
if (!ts_ptr->flag || ys_interest.empty())
return false;
return true;
}
-static void describe_grid_wizard(player_type *player_ptr, ts_type *ts_ptr)
+static void describe_grid_wizard(PlayerType *player_ptr, ts_type *ts_ptr)
{
if (!cheat_sight)
return;
strcat(ts_ptr->info, cheatinfo);
}
-static void switch_next_grid_command(player_type *player_ptr, ts_type *ts_ptr)
+static void switch_next_grid_command(PlayerType *player_ptr, ts_type *ts_ptr)
{
switch (ts_ptr->query) {
case ESCAPE:
}
}
-static void decide_change_panel(player_type *player_ptr, ts_type *ts_ptr)
+static void decide_change_panel(PlayerType *player_ptr, ts_type *ts_ptr)
{
if (ts_ptr->distance == 0)
return;
ts_ptr->y = 1;
}
-static void sweep_target_grids(player_type *player_ptr, ts_type *ts_ptr)
+static void sweep_target_grids(PlayerType *player_ptr, ts_type *ts_ptr)
{
while (!ts_ptr->done) {
if (set_target_grid(player_ptr, ts_ptr))
/*
* Handle "target" and "look".
*/
-bool target_set(player_type *player_ptr, target_type mode)
+bool target_set(PlayerType *player_ptr, target_type mode)
{
ts_type tmp_ts;
ts_type *ts_ptr = initialize_target_set_type(player_ptr, &tmp_ts, mode);
#include<stdint.h>
enum target_type : uint32_t;
-struct player_type;
-bool target_set(player_type *player_ptr, target_type mode);
+class PlayerType;
+bool target_set(PlayerType *player_ptr, target_type mode);
* @param j_ptr 比較対象オブジェクトの構造体参照ポインタ2
* @return o_ptrの方が上位ならばTRUEを返す。
*/
-bool object_sort_comp(player_type *player_ptr, object_type *o_ptr, int32_t o_value, object_type *j_ptr)
+bool object_sort_comp(PlayerType *player_ptr, object_type *o_ptr, int32_t o_value, object_type *j_ptr)
{
int o_type, j_type;
if (!j_ptr->k_idx)
#include "system/angband.h"
struct object_type;
-struct player_type;
-bool object_sort_comp(player_type *player_ptr, object_type *o_ptr, int32_t o_value, object_type *j_ptr);
+class PlayerType;
+bool object_sort_comp(PlayerType *player_ptr, object_type *o_ptr, int32_t o_value, object_type *j_ptr);
* @param ang_sort_comp 比較用の関数ポインタ
* @param ang_sort_swap スワップ用の関数ポインタ
*/
-static void exe_ang_sort(player_type *player_ptr, vptr u, vptr v, int p, int q, bool (*ang_sort_comp)(player_type *, vptr, vptr, int, int),
- void (*ang_sort_swap)(player_type *, vptr, vptr, int, int))
+static void exe_ang_sort(PlayerType *player_ptr, vptr u, vptr v, int p, int q, bool (*ang_sort_comp)(PlayerType *, vptr, vptr, int, int),
+ void (*ang_sort_swap)(PlayerType *, vptr, vptr, int, int))
{
if (p >= q)
return;
* @param ang_sort_comp 比較用の関数ポインタ
* @param ang_sort_swap スワップ用の関数ポインタ
*/
-void ang_sort(player_type *player_ptr, vptr u, vptr v, int n, bool (*ang_sort_comp)(player_type *, vptr, vptr, int, int),
- void (*ang_sort_swap)(player_type *, vptr, vptr, int, int))
+void ang_sort(PlayerType *player_ptr, vptr u, vptr v, int n, bool (*ang_sort_comp)(PlayerType *, vptr, vptr, int, int),
+ void (*ang_sort_swap)(PlayerType *, vptr, vptr, int, int))
{
exe_ang_sort(player_ptr, u, v, 0, n - 1, ang_sort_comp, ang_sort_swap);
}
* We use "u" and "v" to point to arrays of "x" and "y" positions,
* and sort the arrays by double-distance to the player.
*/
-bool ang_sort_comp_distance(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_comp_distance(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
POSITION *x = (POSITION *)(u);
POSITION *y = (POSITION *)(v);
* We use "u" and "v" to point to arrays of "x" and "y" positions,
* and sort the arrays by level of monster
*/
-bool ang_sort_comp_importance(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_comp_importance(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
POSITION *x = (POSITION *)(u);
POSITION *y = (POSITION *)(v);
* We use "u" and "v" to point to arrays of "x" and "y" positions,
* and sort the arrays by distance to the player.
*/
-void ang_sort_swap_position(player_type *player_ptr, vptr u, vptr v, int a, int b)
+void ang_sort_swap_position(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform on "u".
*/
-bool ang_sort_art_comp(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_art_comp(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform.
*/
-void ang_sort_art_swap(player_type *player_ptr, vptr u, vptr v, int a, int b)
+void ang_sort_art_swap(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
who[b] = holder;
}
-bool ang_sort_comp_quest_num(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_comp_quest_num(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
return (qa->comptime != qb->comptime) ? (qa->comptime < qb->comptime) : (qa->level <= qb->level);
}
-void ang_sort_swap_quest_num(player_type *player_ptr, vptr u, vptr v, int a, int b)
+void ang_sort_swap_quest_num(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
* @param b 所持品ID2
* @return 1の方が大であればTRUE
*/
-bool ang_sort_comp_pet(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_comp_pet(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)v;
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform on "u".
*/
-bool ang_sort_comp_hook(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_comp_hook(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
* We use "u" to point to array of monster indexes,
* and "v" to select the type of sorting to perform.
*/
-void ang_sort_swap_hook(player_type *player_ptr, vptr u, vptr v, int a, int b)
+void ang_sort_swap_hook(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
/*
* hook function to sort monsters by level
*/
-bool ang_sort_comp_monster_level(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_comp_monster_level(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
* @param b 比較対象のモンスターID2
* @return 2番目が大ならばTRUEを返す
*/
-bool ang_sort_comp_pet_dismiss(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_comp_pet_dismiss(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)v;
* @param b スワップするモンスター種族のID2
* @return aの方が大きければtrue
*/
-bool ang_sort_comp_cave_temp(player_type *player_ptr, vptr u, vptr v, int a, int b)
+bool ang_sort_comp_cave_temp(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
* @param a スワップするモンスター種族のID1
* @param b スワップするモンスター種族のID2
*/
-void ang_sort_swap_cave_temp(player_type *player_ptr, vptr u, vptr v, int a, int b)
+void ang_sort_swap_cave_temp(PlayerType *player_ptr, vptr u, vptr v, int a, int b)
{
/* Unused */
(void)player_ptr;
#include "system/angband.h"
#include "system/player-type-definition.h"
-void ang_sort(player_type *player_ptr, vptr u, vptr v, int n, bool (*ang_sort_comp)(player_type *, vptr, vptr, int, int),
- void (*ang_sort_swap)(player_type *, vptr, vptr, int, int));
+void ang_sort(PlayerType *player_ptr, vptr u, vptr v, int n, bool (*ang_sort_comp)(PlayerType *, vptr, vptr, int, int),
+ void (*ang_sort_swap)(PlayerType *, vptr, vptr, int, int));
-bool ang_sort_comp_distance(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_importance(player_type *player_ptr, vptr u, vptr v, int a, int b);
-void ang_sort_swap_position(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_distance(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_importance(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_position(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_art_comp(player_type *player_ptr, vptr u, vptr v, int a, int b);
-void ang_sort_art_swap(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_art_comp(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_art_swap(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_quest_num(player_type *player_ptr, vptr u, vptr v, int a, int b);
-void ang_sort_swap_quest_num(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_quest_num(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_quest_num(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_pet(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_pet(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_hook(player_type *player_ptr, vptr u, vptr v, int a, int b);
-void ang_sort_swap_hook(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_hook(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_hook(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_monster_level(player_type *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_pet_dismiss(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_monster_level(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_pet_dismiss(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
-bool ang_sort_comp_cave_temp(player_type *player_ptr, vptr u, vptr v, int a, int b);
-void ang_sort_swap_cave_temp(player_type *player_ptr, vptr u, vptr v, int a, int b);
+bool ang_sort_comp_cave_temp(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
+void ang_sort_swap_cave_temp(PlayerType *player_ptr, vptr u, vptr v, int a, int b);
* @brief オートロール中のステータスを表示する / Display stat values, subset of "put_stats()"
* @details See 'display_player(p_ptr, )' for screen layout constraints.
*/
-void birth_put_stats(player_type *player_ptr)
+void birth_put_stats(PlayerType *player_ptr)
{
if (!autoroller)
return;
#pragma once
-struct player_type;
-void birth_put_stats(player_type *player_ptr);
+class PlayerType;
+void birth_put_stats(PlayerType *player_ptr);
* @param char_stat その行の特性の状況(参照渡し)
* その行の表示色用の判定も行う
*/
-static void process_cursed_equipment_characteristics(player_type *player_ptr, uint16_t mode, char_stat &char_stat)
+static void process_cursed_equipment_characteristics(PlayerType *player_ptr, uint16_t mode, char_stat &char_stat)
{
int max_i = (mode & DP_WP) ? INVEN_BOW + 1 : INVEN_TOTAL;
for (int i = INVEN_MAIN_HAND; i < max_i; i++) {
* @details
* その行の表示色用の判定も行う
*/
-static void process_light_equipment_characteristics(player_type *player_ptr, all_player_flags *f, uint16_t mode, char_stat &char_stat)
+static void process_light_equipment_characteristics(PlayerType *player_ptr, all_player_flags *f, uint16_t mode, char_stat &char_stat)
{
int max_i = (mode & DP_WP) ? INVEN_BOW + 1 : INVEN_TOTAL;
for (int i = INVEN_MAIN_HAND; i < max_i; i++) {
* @details
* その行の表示色用の判定も行う
*/
-static void process_inventory_characteristic(player_type *player_ptr, tr_type flag, all_player_flags *f, uint16_t mode, char_stat &char_stat)
+static void process_inventory_characteristic(PlayerType *player_ptr, tr_type flag, all_player_flags *f, uint16_t mode, char_stat &char_stat)
{
int max_i = (mode & DP_WP) ? INVEN_BOW + 1 : INVEN_TOTAL;
for (int i = INVEN_MAIN_HAND; i < max_i; i++) {
* @param f プレイヤーの特性情報構造体
* @param mode 表示オプション
*/
-static void process_one_characteristic(player_type *player_ptr, TERM_LEN row, TERM_LEN col, std::string_view header, tr_type flag, all_player_flags *f, uint16_t mode)
+static void process_one_characteristic(PlayerType *player_ptr, TERM_LEN row, TERM_LEN col, std::string_view header, tr_type flag, all_player_flags *f, uint16_t mode)
{
char_stat char_stat;
* @param f 特性フラグへの参照ポインタ
*/
static void display_basic_resistance_info(
- player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+ PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 12;
TERM_LEN col = 1;
* @param f 特性フラグへの参照ポインタ
*/
static void display_advanced_resistance_info(
- player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+ PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 12;
TERM_LEN col = 26;
* @param f 特性フラグへの参照ポインタ
*/
static void display_other_resistance_info(
- player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+ PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 12;
TERM_LEN col = 51;
* @param player_ptr プレイヤーへの参照ポインタ
* @todo 将来的には装備系とまとめたいが、乗馬による特性変化や一時能力変化等の扱いがあるので据え置き。
*/
- all_player_flags get_player_state_flags(player_type *player_ptr)
+ all_player_flags get_player_state_flags(PlayerType *player_ptr)
{
all_player_flags f;
player_flags(player_ptr, f.player_flags);
* @param display_player_equippy 表示へのコールバック
* Special display, part 1
*/
-void display_player_flag_info_1(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16))
+void display_player_flag_info_1(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16))
{
all_player_flags f = get_player_state_flags(player_ptr);
* @param display_player_equippy 表示へのコールバック
* @param f 特性フラグへの参照ポインタ
*/
-static void display_slay_info(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+static void display_slay_info(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 3;
TERM_LEN col = 1;
* @param display_player_equippy 表示へのコールバック
* @param f 特性フラグへの参照ポインタ
*/
-static void display_brand_info(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+static void display_brand_info(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 3;
TERM_LEN col = 1;
* @param f 特性フラグへの参照ポインタ
*/
static void display_tval_misc_info(
- player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+ PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 3;
TERM_LEN col = 49;
* @param display_player_equippy 表示へのコールバック
* @param f 特性フラグへの参照ポインタ
*/
-static void display_esc_info(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+static void display_esc_info(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 3;
TERM_LEN col = 21;
* @param f 特性フラグへの参照ポインタ
*/
static void display_stustain_aura_info(
- player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+ PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 3;
TERM_LEN col = 21;
* @param display_player_equippy 表示へのコールバック
* @param f 特性フラグへの参照ポインタ
*/
-static void display_curse_info(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
+static void display_curse_info(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16), all_player_flags *f)
{
TERM_LEN row = 3;
TERM_LEN col = 49;
* @param player_ptr プレイヤーへの参照ポインタ
* Special display, part 2
*/
-void display_player_flag_info_2(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16))
+void display_player_flag_info_2(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16))
{
/* Extract flags and store */
all_player_flags f = get_player_state_flags(player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* Special display, part 3
*/
-void display_player_flag_info_3(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16))
+void display_player_flag_info_3(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16))
{
/* Extract flags and store */
all_player_flags f = get_player_state_flags(player_ptr);
#define DP_CURSE 1<<1L
#define DP_LITE 1<<2L
-struct player_type;
-void display_player_flag_info_1(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16));
-void display_player_flag_info_2(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16));
-void display_player_flag_info_3(player_type *player_ptr, void (*display_player_equippy)(player_type *, TERM_LEN, TERM_LEN, BIT_FLAGS16));
+class PlayerType;
+void display_player_flag_info_1(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16));
+void display_player_flag_info_2(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16));
+void display_player_flag_info_3(PlayerType *player_ptr, void (*display_player_equippy)(PlayerType *, TERM_LEN, TERM_LEN, BIT_FLAGS16));
* @details
* Hack -- do not display "trailing" empty slots
*/
-COMMAND_CODE show_inventory(player_type *player_ptr, int target_item, BIT_FLAGS mode, const ItemTester &item_tester)
+COMMAND_CODE show_inventory(PlayerType *player_ptr, int target_item, BIT_FLAGS mode, const ItemTester &item_tester)
{
COMMAND_CODE i;
int k, l, z = 0;
* @brief 所持アイテム一覧を表示する /
* Choice window "shadow" of the "show_inven()" function
*/
-void display_inventory(player_type *player_ptr, const ItemTester &item_tester)
+void display_inventory(PlayerType *player_ptr, const ItemTester &item_tester)
{
int i, n, z = 0;
TERM_COLOR attr = TERM_WHITE;
#include "system/angband.h"
-struct player_type;
+class PlayerType;
class ItemTester;
-COMMAND_CODE show_inventory(player_type *player_ptr, int target_item, BIT_FLAGS mode, const ItemTester& item_tester);
-COMMAND_CODE show_equipment(player_type *player_ptr, int target_item, BIT_FLAGS mode, const ItemTester& item_tester);
+COMMAND_CODE show_inventory(PlayerType *player_ptr, int target_item, BIT_FLAGS mode, const ItemTester& item_tester);
+COMMAND_CODE show_equipment(PlayerType *player_ptr, int target_item, BIT_FLAGS mode, const ItemTester& item_tester);
* @param r_idx モンスターの種族ID
* @param mode 表示オプション
*/
-void screen_roff(player_type *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode)
+void screen_roff(PlayerType *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode)
{
msg_erase();
term_erase(0, 1, 255);
* Hack -- describe the given monster race in the current "term" window
* @param r_idx モンスターの種族ID
*/
-void display_roff(player_type *player_ptr)
+void display_roff(PlayerType *player_ptr)
{
for (int y = 0; y < Term->hgt; y++) {
term_erase(0, y, 255);
void output_monster_spoiler(MONRACE_IDX r_idx, void (*roff_func)(TERM_COLOR attr, concptr str))
{
hook_c_roff = roff_func;
- player_type dummy;
+ PlayerType dummy;
dummy.lev = 1;
dummy.max_plv = 1;
* @param player_ptr プレイヤーの情報へのポインター
* @param lore_ptr モンスターの思い出の情報へのポインター
*/
-void display_monster_exp(player_type *player_ptr, lore_type *lore_ptr)
+void display_monster_exp(PlayerType *player_ptr, lore_type *lore_ptr)
{
#ifdef JP
hooked_roff("を倒すことは");
hook_c_roff(TERM_L_BLUE, format(_("%^sはスパークに包まれている。", "%^s is surrounded by electricity. "), Who::who(lore_ptr->msex)));
}
-void display_lore_this(player_type *player_ptr, lore_type *lore_ptr)
+void display_lore_this(PlayerType *player_ptr, lore_type *lore_ptr)
{
if ((lore_ptr->r_ptr->r_tkills == 0) && !lore_ptr->know_everything)
return;
* a monster.
* @todo max_blows はゲームの中核的なパラメータの1つなのでどこかのヘッダに定数宣言しておきたい
*/
-void display_monster_launching(player_type *player_ptr, lore_type *lore_ptr)
+void display_monster_launching(PlayerType *player_ptr, lore_type *lore_ptr)
{
if (lore_ptr->ability_flags.has(MonsterAbilityType::ROCKET)) {
set_damage(player_ptr, lore_ptr, MonsterAbilityType::ROCKET, _("ロケット%sを発射する", "shoot a rocket%s"));
#include "system/angband.h"
struct lore_type;
-struct player_type;
+class PlayerType;
void roff_top(MONRACE_IDX r_idx);
-void screen_roff(player_type *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode);
-void display_roff(player_type *player_ptr);
+void screen_roff(PlayerType *player_ptr, MONRACE_IDX r_idx, monster_lore_mode mode);
+void display_roff(PlayerType *player_ptr);
void output_monster_spoiler(MONRACE_IDX r_idx, void (*roff_func)(TERM_COLOR attr, concptr str));
void display_kill_numbers(lore_type *lore_ptr);
bool display_where_to_appear(lore_type *lore_ptr);
void display_monster_never_move(lore_type *lore_ptr);
void display_monster_kind(lore_type *lore_ptr);
void display_monster_alignment(lore_type *lore_ptr);
-void display_monster_exp(player_type *player_ptr, lore_type *lore_ptr);
+void display_monster_exp(PlayerType *player_ptr, lore_type *lore_ptr);
void display_monster_aura(lore_type *lore_ptr);
-void display_lore_this(player_type *player_ptr, lore_type *lore_ptr);
+void display_lore_this(PlayerType *player_ptr, lore_type *lore_ptr);
void display_monster_collective(lore_type *lore_ptr);
-void display_monster_launching(player_type *player_ptr, lore_type *lore_ptr);
+void display_monster_launching(PlayerType *player_ptr, lore_type *lore_ptr);
void display_monster_sometimes(lore_type *lore_ptr);
void display_monster_guardian(lore_type *lore_ptr);
* @param tap 文字色属性(タイル)
* @param tcp 文字種属性(タイル)
*/
-void map_info(player_type *player_ptr, POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
+void map_info(PlayerType *player_ptr, POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
extern char image_object_hack[MAX_IMAGE_OBJECT_HACK];
extern char image_monster_hack[MAX_IMAGE_MONSTER_HACK];
-struct player_type;
-void map_info(player_type *player_ptr, POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp);
+class PlayerType;
+void map_info(PlayerType *player_ptr, POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp);
/*
* Hack -- flush
*/
-static void msg_flush(player_type *player_ptr, int x)
+static void msg_flush(PlayerType *player_ptr, int x)
{
byte a = TERM_L_BLUE;
bool show_more = (num_more >= 0);
* @param hand 武器の装備部位ID
* @param hand_entry 項目ID
*/
-static void display_player_melee_bonus(player_type *player_ptr, int hand, int hand_entry)
+static void display_player_melee_bonus(PlayerType *player_ptr, int hand, int hand_entry)
{
HIT_PROB show_tohit = player_ptr->dis_to_h[hand];
HIT_POINT show_todam = player_ptr->dis_to_d[hand];
* @brief 右手に比べて左手の表示ルーチンが複雑なので分離
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_sub_hand(player_type *player_ptr)
+static void display_sub_hand(PlayerType *player_ptr)
{
if (can_attack_with_sub_hand(player_ptr)) {
display_player_melee_bonus(player_ptr, 1, left_hander ? ENTRY_RIGHT_HAND2 : ENTRY_LEFT_HAND2);
* @brief 武器による命中率とダメージの補正を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_hit_damage(player_type *player_ptr)
+static void display_hit_damage(PlayerType *player_ptr)
{
object_type *o_ptr = &player_ptr->inventory_list[INVEN_BOW];
HIT_PROB show_tohit = player_ptr->dis_to_h_b;
* @brief 射撃武器倍率を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_shoot_magnification(player_type *player_ptr)
+static void display_shoot_magnification(PlayerType *player_ptr)
{
int tmul = 0;
if (player_ptr->inventory_list[INVEN_BOW].k_idx) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param base_speed プレイヤーの速度
*/
-static TERM_COLOR decide_speed_color(player_type *player_ptr, const int base_speed)
+static TERM_COLOR decide_speed_color(PlayerType *player_ptr, const int base_speed)
{
TERM_COLOR attr;
if (base_speed > 0) {
* @param player_ptr プレイヤーへの参照ポインタ
* @return プレイヤーの速度
*/
-static int calc_temporary_speed(player_type *player_ptr)
+static int calc_temporary_speed(PlayerType *player_ptr)
{
int tmp_speed = 0;
if (!player_ptr->riding) {
* @param base_speed プレイヤーの素の速度
* @param tmp_speed アイテム等で一時的に変化した速度量
*/
-static void display_player_speed(player_type *player_ptr, TERM_COLOR attr, int base_speed, int tmp_speed)
+static void display_player_speed(PlayerType *player_ptr, TERM_COLOR attr, int base_speed, int tmp_speed)
{
char buf[160];
if (tmp_speed) {
* @brief プレイヤーの現在経験値・最大経験値・次のレベルまでに必要な経験値を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_player_exp(player_type *player_ptr)
+static void display_player_exp(PlayerType *player_ptr)
{
int e = (player_ptr->prace == PlayerRaceType::ANDROID) ? ENTRY_EXP_ANDR : ENTRY_CUR_EXP;
if (player_ptr->exp >= player_ptr->max_exp)
* @brief ゲーム内の経過時間を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_playtime_in_game(player_type *player_ptr)
+static void display_playtime_in_game(PlayerType *player_ptr)
{
int day, hour, min;
extract_day_hour_min(player_ptr, &day, &hour, &min);
* @param player_ptr プレイヤーへの参照ポインタ
* Prints the following information on the screen.
*/
-void display_player_middle(player_type *player_ptr)
+void display_player_middle(PlayerType *player_ptr)
{
if (can_attack_with_main_hand(player_ptr))
display_player_melee_bonus(player_ptr, 0, left_hander ? ENTRY_LEFT_HAND1 : ENTRY_RIGHT_HAND1);
#pragma once
-struct player_type;
-void display_player_middle(player_type *player_ptr);
+class PlayerType;
+void display_player_middle(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* Special display, part 2a
*/
-void display_player_misc_info(player_type *player_ptr)
+void display_player_misc_info(PlayerType *player_ptr)
{
put_str(_("名前 :", "Name :"), 1, 26);
put_str(_("性別 :", "Sex :"), 3, 1);
#pragma once
-struct player_type;
-void display_player_misc_info(player_type *player_ptr);
+class PlayerType;
+void display_player_misc_info(PlayerType *player_ptr);
* @return 基礎値
* @details 最大が18になるのはD&D由来
*/
-static int calc_basic_stat(player_type *player_ptr, int stat_num)
+static int calc_basic_stat(PlayerType *player_ptr, int stat_num)
{
int e_adj = 0;
if ((player_ptr->stat_max[stat_num] > 18) && (player_ptr->stat_top[stat_num] > 18))
* @param stat_num 能力値番号
* @return 補正後の基礎パラメータ
*/
-static int compensate_special_race(player_type *player_ptr, int stat_num)
+static int compensate_special_race(PlayerType *player_ptr, int stat_num)
{
if (!PlayerRace(player_ptr).equals(PlayerRaceType::ENT))
return 0;
* @param row 行数
* @param stat_col 列数
*/
-static void display_basic_stat_name(player_type *player_ptr, int stat_num, int row, int stat_col)
+static void display_basic_stat_name(PlayerType *player_ptr, int stat_num, int row, int stat_col)
{
if (player_ptr->stat_cur[stat_num] < player_ptr->stat_max[stat_num])
c_put_str(TERM_WHITE, stat_names_reduced[stat_num], row + stat_num + 1, stat_col + 1);
* @param stat_col 列数
* @param buf 能力値の数値
*/
-static void display_basic_stat_value(player_type *player_ptr, int stat_num, int r_adj, int e_adj, int row, int stat_col, char *buf)
+static void display_basic_stat_value(PlayerType *player_ptr, int stat_num, int r_adj, int e_adj, int row, int stat_col, char *buf)
{
(void)sprintf(buf, "%3d", r_adj);
c_put_str(TERM_L_BLUE, buf, row + stat_num + 1, stat_col + 13);
* @param row 行数
* @param stat_col 列数
*/
-static void process_stats(player_type *player_ptr, int row, int stat_col)
+static void process_stats(PlayerType *player_ptr, int row, int stat_col)
{
char buf[80];
for (int i = 0; i < A_MAX; i++) {
* @param row 行数
* @param col 列数
*/
-static void display_equipments_compensation(player_type *player_ptr, int row, int *col)
+static void display_equipments_compensation(PlayerType *player_ptr, int row, int *col)
{
for (int i = INVEN_MAIN_HAND; i < INVEN_TOTAL; i++) {
object_type *o_ptr;
* @param player_ptr プレイヤーへの参照ポインタ
* @param stat 能力値番号
*/
-static int compensation_stat_by_mutation(player_type *player_ptr, int stat)
+static int compensation_stat_by_mutation(PlayerType *player_ptr, int stat)
{
int compensation = 0;
if (stat == A_STR) {
* @param c 補正後の表示記号
* @param a 表示色
*/
-static void change_display_by_mutation(player_type *player_ptr, int stat, char *c, TERM_COLOR *a)
+static void change_display_by_mutation(PlayerType *player_ptr, int stat, char *c, TERM_COLOR *a)
{
int compensation = compensation_stat_by_mutation(player_ptr, stat);
if (compensation == 0)
* @param col 列数
* @param row 行数
*/
-static void display_mutation_compensation(player_type *player_ptr, int row, int col)
+static void display_mutation_compensation(PlayerType *player_ptr, int row, int col)
{
TrFlags flags;
player_flags(player_ptr, flags);
* No mod, no sustain, will be a slate '.'
* </pre>
*/
-void display_player_stat_info(player_type *player_ptr)
+void display_player_stat_info(PlayerType *player_ptr)
{
int stat_col = 22;
int row = 3;
#pragma once
-struct player_type;
-void display_player_stat_info(player_type *player_ptr);
+class PlayerType;
+void display_player_stat_info(PlayerType *player_ptr);
* @param mode ステータス表示モード
* @return どれかの処理をこなしたらTRUE、何もしなかったらFALSE
*/
-static bool display_player_info(player_type *player_ptr, int mode)
+static bool display_player_info(PlayerType *player_ptr, int mode)
{
if (mode == 2) {
display_player_misc_info(player_ptr);
* @brief 名前、性別、種族、職業を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_player_basic_info(player_type *player_ptr)
+static void display_player_basic_info(PlayerType *player_ptr)
{
char tmp[64];
#ifdef JP
* @brief 魔法領域を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_magic_realms(player_type *player_ptr)
+static void display_magic_realms(PlayerType *player_ptr)
{
if (player_ptr->realm1 == REALM_NONE && player_ptr->element == REALM_NONE)
return;
* @details
* 日本語版では、身長はcmに、体重はkgに変更してある
*/
-static void display_phisique(player_type *player_ptr)
+static void display_phisique(PlayerType *player_ptr)
{
#ifdef JP
display_player_one_line(ENTRY_AGE, format("%d才", (int)player_ptr->age), TERM_L_BLUE);
* @brief 能力値を (減少していたら色を変えて)表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-static void display_player_stats(player_type *player_ptr)
+static void display_player_stats(PlayerType *player_ptr)
{
char buf[80];
for (int i = 0; i < A_MAX; i++) {
* @param statmsg メッセージバッファ
* @return 生きていたらFALSE、死んでいたらTRUE
*/
-static bool search_death_cause(player_type *player_ptr, char *statmsg)
+static bool search_death_cause(PlayerType *player_ptr, char *statmsg)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!player_ptr->is_dead)
* @param statmsg メッセージバッファ
* @return クエスト内であればTRUE、いなければFALSE
*/
-static bool decide_death_in_quest(player_type *player_ptr, char *statmsg)
+static bool decide_death_in_quest(PlayerType *player_ptr, char *statmsg)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (!floor_ptr->inside_quest || !quest_type::is_fixed(floor_ptr->inside_quest))
* @param player_ptr プレイヤーへの参照ポインタ
* @param statmsg メッセージバッファ
*/
-static void decide_current_floor(player_type *player_ptr, char *statmsg)
+static void decide_current_floor(PlayerType *player_ptr, char *statmsg)
{
if (search_death_cause(player_ptr, statmsg))
return;
* Mode 4 = mutations
* </pre>
*/
-void display_player(player_type *player_ptr, int mode)
+void display_player(PlayerType *player_ptr, int mode)
{
if ((player_ptr->muta.any() || has_good_luck(player_ptr)) && display_mutations)
mode = (mode % 6);
* @param mode オプション
* @todo y = 6、x = 0、mode = 0で固定。何とかする
*/
-void display_player_equippy(player_type *player_ptr, TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode)
+void display_player_equippy(PlayerType *player_ptr, TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode)
{
int max_i = (mode & DP_WP) ? INVEN_BOW + 1 : INVEN_TOTAL;
for (int i = INVEN_MAIN_HAND; i < max_i; i++) {
#include "system/angband.h"
-struct player_type;
-void display_player(player_type *player_ptr, int mode);
-void display_player_equippy(player_type *player_ptr, TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode);
+class PlayerType;
+void display_player(PlayerType *player_ptr, int mode);
+void display_player_equippy(PlayerType *player_ptr, TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode);
#include "term/screen-processor.h"
#include <string>
-void display_life_rating(player_type *player_ptr, self_info_type *self_ptr)
+void display_life_rating(PlayerType *player_ptr, self_info_type *self_ptr)
{
player_ptr->knowledge |= KNOW_STAT | KNOW_HPRATE;
strcpy(self_ptr->plev_buf, "");
self_ptr->info[self_ptr->line++] = "";
}
-void display_max_base_status(player_type *player_ptr, self_info_type *self_ptr)
+void display_max_base_status(PlayerType *player_ptr, self_info_type *self_ptr)
{
self_ptr->info[self_ptr->line++] = _("能力の最大値", "Limits of maximum stats");
for (int v_nr = 0; v_nr < A_MAX; v_nr++) {
}
}
-void display_virtue(player_type *player_ptr, self_info_type *self_ptr)
+void display_virtue(PlayerType *player_ptr, self_info_type *self_ptr)
{
self_ptr->info[self_ptr->line++] = "";
std::string alg = PlayerAlignment(player_ptr).get_alignment_description(true);
}
}
-void display_mimic_race_ability(player_type *player_ptr, self_info_type *self_ptr)
+void display_mimic_race_ability(PlayerType *player_ptr, self_info_type *self_ptr)
{
switch (player_ptr->mimic_form) {
case MIMIC_DEMON:
#pragma once
-struct player_type;
+class PlayerType;
struct self_info_type;
-void display_life_rating(player_type *player_ptr, self_info_type *self_ptr);
-void display_max_base_status(player_type *player_ptr, self_info_type *self_ptr);
-void display_virtue(player_type *player_ptr, self_info_type *self_ptr);
-void display_mimic_race_ability(player_type *player_ptr, self_info_type *self_ptr);
+void display_life_rating(PlayerType *player_ptr, self_info_type *self_ptr);
+void display_max_base_status(PlayerType *player_ptr, self_info_type *self_ptr);
+void display_virtue(PlayerType *player_ptr, self_info_type *self_ptr);
+void display_mimic_race_ability(PlayerType *player_ptr, self_info_type *self_ptr);
void display_self_info(self_info_type *self_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @details
*/
-void store_prt_gold(player_type *player_ptr)
+void store_prt_gold(PlayerType *player_ptr)
{
prt(_("手持ちのお金: ", "Gold Remaining: "), 19 + xtra_stock, 53);
char out_val[64];
* @param player_ptr プレイヤーへの参照ポインタ
* @param pos 表示行
*/
-void display_entry(player_type *player_ptr, int pos)
+void display_entry(PlayerType *player_ptr, int pos)
{
object_type *o_ptr;
o_ptr = &st_ptr->stock[pos];
* @details
* All prices are listed as "per individual object". -BEN-
*/
-void display_store_inventory(player_type *player_ptr)
+void display_store_inventory(PlayerType *player_ptr)
{
int k;
for (k = 0; k < store_bottom; k++) {
* @param player_ptr プレイヤーへの参照ポインタ
* @details
*/
-void display_store(player_type *player_ptr)
+void display_store(PlayerType *player_ptr)
{
term_clear();
if (cur_store_num == StoreSaleType::HOME) {
#pragma once
-struct player_type;
-void store_prt_gold(player_type *player_ptr);
-void display_entry(player_type *player_ptr, int pos);
-void display_store_inventory(player_type *player_ptr);
-void display_store(player_type *player_ptr);
+class PlayerType;
+void store_prt_gold(PlayerType *player_ptr);
+void display_entry(PlayerType *player_ptr, int pos);
+void display_store_inventory(PlayerType *player_ptr);
+void display_store(PlayerType *player_ptr);
* @param player_ptr プレイヤーへの参照ポインタ
* @param item 残量を表示したいプレイヤーのアイテム所持スロット
*/
-void inven_item_charges(player_type *player_ptr, INVENTORY_IDX item)
+void inven_item_charges(PlayerType *player_ptr, INVENTORY_IDX item)
{
object_type *o_ptr = &player_ptr->inventory_list[item];
if ((o_ptr->tval != ItemKindType::STAFF) && (o_ptr->tval != ItemKindType::WAND))
* @param player_ptr プレイヤーへの参照ポインタ
* @param item 残量を表示したいプレイヤーのアイテム所持スロット
*/
-void inven_item_describe(player_type *player_ptr, INVENTORY_IDX item)
+void inven_item_describe(PlayerType *player_ptr, INVENTORY_IDX item)
{
object_type *o_ptr = &player_ptr->inventory_list[item];
GAME_TEXT o_name[MAX_NLEN];
* @details
* Include list of usable spells for readible books
*/
-void display_koff(player_type *player_ptr, KIND_OBJECT_IDX k_idx)
+void display_koff(PlayerType *player_ptr, KIND_OBJECT_IDX k_idx)
{
object_type forge;
object_type *q_ptr;
#include "system/angband.h"
-struct player_type;
-void inven_item_charges(player_type *player_ptr, INVENTORY_IDX item);
-void inven_item_describe(player_type *player_ptr, INVENTORY_IDX item);
-void display_koff(player_type *player_ptr, KIND_OBJECT_IDX k_idx);
+class PlayerType;
+void inven_item_charges(PlayerType *player_ptr, INVENTORY_IDX item);
+void inven_item_describe(PlayerType *player_ptr, INVENTORY_IDX item);
+void display_koff(PlayerType *player_ptr, KIND_OBJECT_IDX k_idx);
* @param shots 射撃回数
* @param shot_frac 射撃速度
*/
-static void calc_shot_params(player_type *player_ptr, object_type *o_ptr, int *shots, int *shot_frac)
+static void calc_shot_params(PlayerType *player_ptr, object_type *o_ptr, int *shots, int *shot_frac)
{
if (o_ptr->k_idx == 0)
return;
* @param o_ptr 装備中の武器への参照ポインタ
* @return 利き手ならTRUE、反対の手ならFALSE
*/
-static bool calc_weapon_damage_limit(player_type *player_ptr, int hand, int *damage, int *basedam, object_type *o_ptr)
+static bool calc_weapon_damage_limit(PlayerType *player_ptr, int hand, int *damage, int *basedam, object_type *o_ptr)
{
PLAYER_LEVEL level = player_ptr->lev;
if (hand > 0) {
* @param flgs オブジェクトフラグ群
* @return 強化後の素手ダメージ
*/
-static int strengthen_basedam(player_type *player_ptr, object_type *o_ptr, int basedam, const TrFlags &flgs)
+static int strengthen_basedam(PlayerType *player_ptr, object_type *o_ptr, int basedam, const TrFlags &flgs)
{
if (o_ptr->is_fully_known() && ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))) {
/* vorpal blade */
* @param damage 直接攻撃のダメージ
* @param to_h 命中補正
*/
-static void calc_two_hands(player_type *player_ptr, int *damage, int *to_h)
+static void calc_two_hands(PlayerType *player_ptr, int *damage, int *to_h)
{
object_type *o_ptr;
o_ptr = &player_ptr->inventory_list[INVEN_BOW];
* @param shot_frac 射撃速度
* @param display_player_one_line 1行表示用のコールバック関数
*/
-static void display_first_page(player_type *player_ptr, int xthb, int *damage, int shots, int shot_frac)
+static void display_first_page(PlayerType *player_ptr, int xthb, int *damage, int shots, int shot_frac)
{
int xthn = player_ptr->skill_thn + (player_ptr->to_h_m * BTH_PLUS_ADJ);
* @details
* This code is "imitated" elsewhere to "dump" a character sheet.
*/
-void display_player_various(player_type *player_ptr)
+void display_player_various(PlayerType *player_ptr)
{
object_type *o_ptr;
o_ptr = &player_ptr->inventory_list[INVEN_BOW];
#define ENTRY_EXP_ANDR 43
#define ENTRY_EXP_TO_ADV_ANDR 44
-struct player_type;
-void display_player_various(player_type *player_ptr);
+class PlayerType;
+void display_player_various(PlayerType *player_ptr);
* Need to analyze size of the window.
* Need more color coding.
*/
-static void display_spell_list(player_type *player_ptr)
+static void display_spell_list(PlayerType *player_ptr)
{
TERM_LEN y, x;
int m[9];
* @param player_ptr プレイヤーへの参照ポインタ
* Hack -- display spells in sub-windows
*/
-void fix_spell(player_type *player_ptr)
+void fix_spell(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
#pragma once
-struct player_type;
-void fix_spell(player_type *player_ptr);
+class PlayerType;
+void fix_spell(PlayerType *player_ptr);
* @brief サブウィンドウに所持品一覧を表示する / Hack -- display inventory in sub-windows
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void fix_inventory(player_type *player_ptr)
+void fix_inventory(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
* @brief 出現中モンスターのリストをサブウィンドウに表示する / Hack -- display monster list in sub-windows
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void fix_monster_list(player_type *player_ptr)
+void fix_monster_list(PlayerType *player_ptr)
{
static std::vector<MONSTER_IDX> monster_list;
std::once_flag once;
* @brief 装備アイテム一覧を表示する /
* Choice window "shadow" of the "show_equip()" function
*/
-static void display_equipment(player_type *player_ptr, const ItemTester &item_tester)
+static void display_equipment(PlayerType *player_ptr, const ItemTester &item_tester)
{
if (!player_ptr || !player_ptr->inventory_list)
return;
* Hack -- display equipment in sub-windows
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void fix_equip(player_type *player_ptr)
+void fix_equip(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
* @param player_ptr プレイヤーへの参照ポインタ
* Hack -- display character in sub-windows
*/
-void fix_player(player_type *player_ptr)
+void fix_player(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
* @details
* Note that the "player" symbol does NOT appear on the map.
*/
-void fix_overhead(player_type *player_ptr)
+void fix_overhead(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
* @brief 自分の周辺の地形をTermに表示する
* @param プレイヤー情報への参照ポインタ
*/
-static void display_dungeon(player_type *player_ptr)
+static void display_dungeon(PlayerType *player_ptr)
{
TERM_COLOR ta = 0;
SYMBOL_CODE tc = '\0';
* @brief 自分の周辺のダンジョンの地形をサブウィンドウに表示する / display dungeon view around player in a sub window
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void fix_dungeon(player_type *player_ptr)
+void fix_dungeon(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
* Hack -- display dungeon view in sub-windows
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void fix_monster(player_type *player_ptr)
+void fix_monster(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
* Hack -- display object recall in sub-windows
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void fix_object(player_type *player_ptr)
+void fix_object(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
* @param y 参照する座標グリッドのy座標
* @param x 参照する座標グリッドのx座標
*/
-static void display_floor_item_list(player_type *player_ptr, const int y, const int x)
+static void display_floor_item_list(PlayerType *player_ptr, const int y, const int x)
{
// Term の行数を取得。
TERM_LEN term_h;
/*!
* @brief (y,x) のアイテム一覧をサブウィンドウに表示する / display item at (y,x) in sub-windows
*/
-void fix_floor_item_list(player_type *player_ptr, const int y, const int x)
+void fix_floor_item_list(PlayerType *player_ptr, const int y, const int x)
{
for (int j = 0; j < 8; j++) {
if (!angband_term[j])
* @brief サブウィンドウに所持品、装備品リストの表示を行う /
* Flip "inven" and "equip" in any sub-windows
*/
-void toggle_inventory_equipment(player_type *player_ptr)
+void toggle_inventory_equipment(PlayerType *player_ptr)
{
for (int j = 0; j < 8; j++) {
if (!angband_term[j])
#include <vector>
struct floor_type;
-struct player_type;
+class PlayerType;
class ItemTester;
-void fix_inventory(player_type *player_ptr);
+void fix_inventory(PlayerType *player_ptr);
void print_monster_list(floor_type *floor_ptr, const std::vector<MONSTER_IDX> &monster_list, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
-void fix_monster_list(player_type *player_ptr);
-void fix_equip(player_type *player_ptr);
-void fix_player(player_type *player_ptr);
+void fix_monster_list(PlayerType *player_ptr);
+void fix_equip(PlayerType *player_ptr);
+void fix_player(PlayerType *player_ptr);
void fix_message(void);
-void fix_overhead(player_type *player_ptr);
-void fix_dungeon(player_type *player_ptr);
-void fix_monster(player_type *player_ptr);
-void fix_object(player_type *player_ptr);
-void fix_floor_item_list(player_type *player_ptr, const int y, const int x);
-void toggle_inventory_equipment(player_type *player_ptr);
+void fix_overhead(PlayerType *player_ptr);
+void fix_dungeon(PlayerType *player_ptr);
+void fix_monster(PlayerType *player_ptr);
+void fix_object(PlayerType *player_ptr);
+void fix_floor_item_list(PlayerType *player_ptr, const int y, const int x);
+void toggle_inventory_equipment(PlayerType *player_ptr);
/*!
* @brief サブウィンドウ表示用の ItemTester オブジェクトを設定するクラス
* @param target_item アイテムの選択処理を行うか否か。
* @return 選択したアイテムのタグ
*/
-COMMAND_CODE show_equipment(player_type *player_ptr, int target_item, BIT_FLAGS mode, const ItemTester &item_tester)
+COMMAND_CODE show_equipment(PlayerType *player_ptr, int target_item, BIT_FLAGS mode, const ItemTester &item_tester)
{
COMMAND_CODE i;
int j, k, l;
#include "object/tval-types.h"
-struct player_type;
+class PlayerType;
class ItemTester;
-void display_inventory(player_type *player_ptr, const ItemTester& item_tester);
+void display_inventory(PlayerType *player_ptr, const ItemTester& item_tester);
/*!
* @brief プレイヤーの称号を表示する / Prints "title", including "wizard" or "winner" as needed.
*/
-void print_title(player_type *player_ptr)
+void print_title(PlayerType *player_ptr)
{
GAME_TEXT str[14];
concptr p = "";
/*!
* @brief プレイヤーのレベルを表示する / Prints level
*/
-void print_level(player_type *player_ptr)
+void print_level(PlayerType *player_ptr)
{
char tmp[32];
sprintf(tmp, "%5d", player_ptr->lev);
/*!
* @brief プレイヤーの経験値を表示する / Display the experience
*/
-void print_exp(player_type *player_ptr)
+void print_exp(PlayerType *player_ptr)
{
char out_val[32];
/*!
* @brief プレイヤーのACを表示する / Prints current AC
*/
-void print_ac(player_type *player_ptr)
+void print_ac(PlayerType *player_ptr)
{
char tmp[32];
/*!
* @brief プレイヤーのHPを表示する / Prints Cur/Max hit points
*/
-void print_hp(player_type *player_ptr)
+void print_hp(PlayerType *player_ptr)
{
char tmp[32];
put_str("HP", ROW_CURHP, COL_CURHP);
/*!
* @brief プレイヤーのMPを表示する / Prints players max/cur spell points
*/
-void print_sp(player_type *player_ptr)
+void print_sp(PlayerType *player_ptr)
{
char tmp[32];
byte color;
* @brief プレイヤーの所持金を表示する / Prints current gold
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_gold(player_type *player_ptr)
+void print_gold(PlayerType *player_ptr)
{
char tmp[32];
put_str(_("$ ", "AU "), ROW_GOLD, COL_GOLD);
* @brief 現在のフロアの深さを表示する / Prints depth in stat area
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_depth(player_type *player_ptr)
+void print_depth(PlayerType *player_ptr)
{
char depths[32];
TERM_COLOR attr = TERM_WHITE;
* @brief プレイヤーのステータスを一括表示する(左側部分) / Display basic info (mostly left of map)
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_frame_basic(player_type *player_ptr)
+void print_frame_basic(PlayerType *player_ptr)
{
if (player_ptr->mimic_form) {
print_field(mimic_info[player_ptr->mimic_form].title, ROW_RACE, COL_RACE);
* health-bar stops tracking any monster that "disappears".
* </pre>
*/
-void health_redraw(player_type *player_ptr, bool riding)
+void health_redraw(PlayerType *player_ptr, bool riding)
{
int16_t health_who;
int row, col;
#pragma once
-struct player_type;
-void print_title(player_type *player_ptr);
-void print_level(player_type *player_ptr);
-void print_exp(player_type *player_ptr);
-void print_ac(player_type *player_ptr);
-void print_hp(player_type *player_ptr);
-void print_sp(player_type *player_ptr);
-void print_gold(player_type *player_ptr);
-void print_depth(player_type *player_ptr);
-void print_frame_basic(player_type *player_ptr);
-void health_redraw(player_type *player_ptr, bool riding);
+class PlayerType;
+void print_title(PlayerType *player_ptr);
+void print_level(PlayerType *player_ptr);
+void print_exp(PlayerType *player_ptr);
+void print_ac(PlayerType *player_ptr);
+void print_hp(PlayerType *player_ptr);
+void print_sp(PlayerType *player_ptr);
+void print_gold(PlayerType *player_ptr);
+void print_depth(PlayerType *player_ptr);
+void print_frame_basic(PlayerType *player_ptr);
+void health_redraw(PlayerType *player_ptr, bool riding);
* @brief プレイヤー能力値を描画する / Print character stat in given row, column
* @param stat 描画するステータスのID
*/
-void print_stat(player_type *player_ptr, int stat)
+void print_stat(PlayerType *player_ptr, int stat)
{
GAME_TEXT tmp[32];
if (player_ptr->stat_cur[stat] < player_ptr->stat_max[stat]) {
/*!
* @brief プレイヤーの負傷状態を表示する
*/
-void print_cut(player_type *player_ptr)
+void print_cut(PlayerType *player_ptr)
{
auto player_cut = player_ptr->effects()->cut();
if (!player_cut->is_cut()) {
* @brief プレイヤーの朦朧状態を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_stun(player_type *player_ptr)
+void print_stun(PlayerType *player_ptr)
{
auto player_stun = player_ptr->effects()->stun();
if (!player_stun->is_stunned()) {
* @brief プレイヤーの空腹状態を表示する / Prints status of hunger
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_hunger(player_type *player_ptr)
+void print_hunger(PlayerType *player_ptr)
{
if (allow_debug_options && player_ptr->current_floor_ptr->inside_arena)
return;
* This function was a major bottleneck when resting, so a lot of
* the text formatting code was optimized in place below.
*/
-void print_state(player_type *player_ptr)
+void print_state(PlayerType *player_ptr)
{
TERM_COLOR attr = TERM_WHITE;
GAME_TEXT text[16];
* @brief プレイヤーの行動速度を表示する / Prints the speed_value of a character. -CJS-
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_speed(player_type *player_ptr)
+void print_speed(PlayerType *player_ptr)
{
TERM_LEN wid, hgt;
term_get_size(&wid, &hgt);
* @brief プレイヤーの呪文学習可能状態を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_study(player_type *player_ptr)
+void print_study(PlayerType *player_ptr)
{
TERM_LEN wid, hgt;
term_get_size(&wid, &hgt);
* @brief プレイヤーのものまね可能状態を表示する
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_imitation(player_type *player_ptr)
+void print_imitation(PlayerType *player_ptr)
{
TERM_LEN wid, hgt;
term_get_size(&wid, &hgt);
* @param player_ptr プレイヤーへの参照ポインタ
* @bar_flags 表示可否を決めるためのフラグ群
*/
-static void add_hex_status_flags(player_type *player_ptr, BIT_FLAGS *bar_flags)
+static void add_hex_status_flags(PlayerType *player_ptr, BIT_FLAGS *bar_flags)
{
if (player_ptr->realm1 != REALM_HEX) {
return;
/*!
* @brief 下部に状態表示を行う / Show status bar
*/
-void print_status(player_type *player_ptr)
+void print_status(PlayerType *player_ptr)
{
TERM_LEN wid, hgt;
term_get_size(&wid, &hgt);
* @brief プレイヤーのステータスを一括表示する(下部分) / Display extra info (mostly below map)
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void print_frame_extra(player_type *player_ptr)
+void print_frame_extra(PlayerType *player_ptr)
{
print_cut(player_ptr);
print_stun(player_ptr);
#pragma once
-struct player_type;
-void print_stat(player_type *player_ptr, int stat);
-void print_cut(player_type *player_ptr);
-void print_stun(player_type *player_ptr);
-void print_hunger(player_type *player_ptr);
-void print_state(player_type *player_ptr);
-void print_speed(player_type *player_ptr);
-void print_study(player_type *player_ptr);
-void print_imitation(player_type *player_ptr);
-void print_status(player_type *player_ptr);
-void print_frame_extra(player_type *player_ptr);
+class PlayerType;
+void print_stat(PlayerType *player_ptr, int stat);
+void print_cut(PlayerType *player_ptr);
+void print_stun(PlayerType *player_ptr);
+void print_hunger(PlayerType *player_ptr);
+void print_state(PlayerType *player_ptr);
+void print_speed(PlayerType *player_ptr);
+void print_study(PlayerType *player_ptr);
+void print_imitation(PlayerType *player_ptr);
+void print_status(PlayerType *player_ptr);
+void print_frame_extra(PlayerType *player_ptr);
* of both "lite_spot()" and "print_rel()", and that we use the
* "lite_spot()" function to display the player grid, if needed.
*/
-void print_map(player_type *player_ptr)
+void print_map(PlayerType *player_ptr)
{
TERM_LEN wid, hgt;
term_get_size(&wid, &hgt);
(void)term_set_cursor(v);
}
-static void display_shortened_item_name(player_type *player_ptr, object_type *o_ptr, int y)
+static void display_shortened_item_name(PlayerType *player_ptr, object_type *o_ptr, int y)
{
char buf[MAX_NLEN];
describe_flavor(player_ptr, buf, o_ptr, (OD_NO_FLAVOR | OD_OMIT_PREFIX | OD_NAME_ONLY));
* メインウィンドウ('M'コマンド)、サブウィンドウ兼(縮小図)用。
* use_bigtile時に横の描画列数は1/2になる。
*/
-void display_map(player_type *player_ptr, int *cy, int *cx)
+void display_map(PlayerType *player_ptr, int *cy, int *cx)
{
int i, j, x, y;
view_granite_lite = old_view_granite_lite;
}
-void set_term_color(player_type *player_ptr, POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp)
+void set_term_color(PlayerType *player_ptr, POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp)
{
if (!player_bold(player_ptr, y, x))
return;
extern int match_autopick;
extern int feat_priority;
-struct player_type;
+class PlayerType;
void print_field(concptr info, TERM_LEN row, TERM_LEN col);
-void print_map(player_type *player_ptr);
-void display_map(player_type *player_ptr, int *cy, int *cx);
-void set_term_color(player_type *player_ptr, POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp);
+void print_map(PlayerType *player_ptr);
+void display_map(PlayerType *player_ptr, int *cy, int *cx);
+void set_term_color(PlayerType *player_ptr, POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp);
int panel_col_of(int col);
* @param o_ptr 記述を得たいオブジェクトの参照ポインタ
* @param desc_ptr 記述内容を返すための文字列参照ポインタ
*/
-static void analyze_general(player_type *player_ptr, object_type *o_ptr, char *desc_ptr)
+static void analyze_general(PlayerType *player_ptr, object_type *o_ptr, char *desc_ptr)
{
describe_flavor(player_ptr, desc_ptr, o_ptr, OD_NAME_AND_ENCHANT | OD_STORE | OD_DEBUG);
}
* @param o_ptr オブジェクト構造体の参照ポインタ
* @param desc_ptr 全アーティファクト情報を収める文字列参照ポインタ
*/
-void object_analyze(player_type *player_ptr, object_type *o_ptr, obj_desc_list *desc_ptr)
+void object_analyze(PlayerType *player_ptr, object_type *o_ptr, obj_desc_list *desc_ptr)
{
analyze_general(player_ptr, o_ptr, desc_ptr->description);
analyze_pval(o_ptr, &desc_ptr->pval_info);
* @param o_ptr ランダムアーティファクトのオブジェクト構造体参照ポインタ
* @param desc_ptr 記述内容を収める構造体参照ポインタ
*/
-void random_artifact_analyze(player_type *player_ptr, object_type *o_ptr, obj_desc_list *desc_ptr)
+void random_artifact_analyze(PlayerType *player_ptr, object_type *o_ptr, obj_desc_list *desc_ptr)
{
analyze_general(player_ptr, o_ptr, desc_ptr->description);
analyze_pval(o_ptr, &desc_ptr->pval_info);
struct object_type;
typedef struct obj_desc_list obj_desc_list;
-struct player_type;
-void object_analyze(player_type *player_ptr, object_type *o_ptr, obj_desc_list *desc_ptr);
-void random_artifact_analyze(player_type *player_ptr, object_type *o_ptr, obj_desc_list *desc_ptr);
+class PlayerType;
+void object_analyze(PlayerType *player_ptr, object_type *o_ptr, obj_desc_list *desc_ptr);
+void random_artifact_analyze(PlayerType *player_ptr, object_type *o_ptr, obj_desc_list *desc_ptr);
* @param cmd コマンドキー
* @return コマンド終了ならTRUE、ページ送りならFALSE
*/
-bool exe_cmd_debug(player_type *player_ptr, char cmd)
+bool exe_cmd_debug(PlayerType *player_ptr, char cmd)
{
switch (cmd) {
case ' ':
* @details
* 番号を指定するには、それをN及びデバッグコマンドをXとしてとして「0N^aX」とする
*/
-void do_cmd_debug(player_type *player_ptr)
+void do_cmd_debug(PlayerType *player_ptr)
{
TERM_LEN hgt, wid;
term_get_size(&wid, &hgt);
#pragma once
-struct player_type;
-void do_cmd_debug(player_type *player_ptr);
+class PlayerType;
+void do_cmd_debug(PlayerType *player_ptr);
if (!make_fake_artifact(&obj, a_ref.idx))
continue;
- player_type dummy;
+ PlayerType dummy;
obj_desc_list artifact;
object_analyze(&dummy, &obj, &artifact);
spoiler_print_art(&artifact);
* @param val 価値を返すバッファ参照ポインタ
* @param k ベースアイテムID
*/
-static void kind_info(player_type *player_ptr, char *buf, char *dam, char *wgt, char *chance, DEPTH *lev, PRICE *val, KIND_OBJECT_IDX k)
+static void kind_info(PlayerType *player_ptr, char *buf, char *dam, char *wgt, char *chance, DEPTH *lev, PRICE *val, KIND_OBJECT_IDX k)
{
object_type forge;
object_type *q_ptr = &forge;
}
std::stable_sort(whats.begin(), whats.end(), [](auto k1_idx, auto k2_idx) {
- player_type dummy;
+ PlayerType dummy;
DEPTH d1, d2;
PRICE p1, p2;
kind_info(&dummy, nullptr, nullptr, nullptr, nullptr, &d1, &p1, k1_idx);
char wgt[80];
char chance[80];
char dam[80];
- player_type dummy;
+ PlayerType dummy;
kind_info(&dummy, buf, dam, wgt, chance, &e, &v, k_idx);
fprintf(spoiler_file, " %-35s%8s%7s%5d %-40s%9ld\n", buf, dam, wgt, static_cast<int>(e), chance, static_cast<long>(v));
}
SpoilerOutputResultType spoil_mon_desc(concptr fname, std::function<bool(const monster_race *)> filter_monster)
{
- player_type dummy;
+ PlayerType dummy;
uint16_t why = 2;
char buf[1024];
char nam[MAX_MONSTER_NAME + 10]; // ユニークには[U] が付くので少し伸ばす
*/
SpoilerOutputResultType spoil_mon_info(concptr fname)
{
- player_type dummy;
+ PlayerType dummy;
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
spoiler_file = angband_fopen(buf, "w");
#include <tuple>
#include <vector>
-void wiz_enter_quest(player_type *player_ptr);
-void wiz_complete_quest(player_type *player_ptr);
+void wiz_enter_quest(PlayerType *player_ptr);
+void wiz_complete_quest(PlayerType *player_ptr);
void wiz_restore_monster_max_num();
/*!
* @brief ゲーム設定コマンドの入力を受け付ける
* @param player_ptr プレイヤーの情報へのポインタ
*/
-void wizard_game_modifier(player_type *player_ptr)
+void wizard_game_modifier(PlayerType *player_ptr)
{
screen_save();
display_wizard_game_modifier_menu();
* @brief 指定したクエストに突入する
* @param プレイヤーの情報へのポインタ
*/
-void wiz_enter_quest(player_type* player_ptr)
+void wiz_enter_quest(PlayerType* player_ptr)
{
char ppp[30];
char tmp_val[5];
* @brief 指定したクエストを完了させる
* @param プレイヤーの情報へのポインタ
*/
-void wiz_complete_quest(player_type *player_ptr)
+void wiz_complete_quest(PlayerType *player_ptr)
{
if (!player_ptr->current_floor_ptr->inside_quest) {
msg_print("No current quest");
#pragma once
-struct player_type;
-void wizard_game_modifier(player_type *player_ptr);
+class PlayerType;
+void wizard_game_modifier(PlayerType *player_ptr);
}
void wiz_restore_aware_flag_of_fixed_arfifact(ARTIFACT_IDX a_idx, bool aware = false);
-void wiz_modify_item_activation(player_type *player_ptr);
-void wiz_identify_full_inventory(player_type *player_ptr);
+void wiz_modify_item_activation(PlayerType *player_ptr);
+void wiz_identify_full_inventory(PlayerType *player_ptr);
/*!
* @brief ゲーム設定コマンドの入力を受け付ける
* @param player_ptr プレイヤーの情報へのポインタ
*/
-void wizard_item_modifier(player_type *player_ptr)
+void wizard_item_modifier(PlayerType *player_ptr)
{
screen_save();
display_wizard_sub_menu();
* @brief オブジェクトに発動を追加する/変更する
* @param catser_ptr プレイヤー情報への参照ポインタ
*/
-void wiz_modify_item_activation(player_type *player_ptr)
+void wiz_modify_item_activation(PlayerType *player_ptr)
{
auto q = _("どのアイテムの発動を変更しますか? ", "Which object? ");
auto s = _("発動を変更するアイテムがない。", "Nothing to do with.");
* @brief インベントリ内のアイテムを全て*鑑定*済みにする
* @param catser_ptr プレイヤー情報への参照ポインタ
*/
-void wiz_identify_full_inventory(player_type *player_ptr)
+void wiz_identify_full_inventory(PlayerType *player_ptr)
{
for (int i = 0; i < INVEN_TOTAL; i++) {
object_type *o_ptr = &player_ptr->inventory_list[i];
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr 詳細を表示するアイテム情報の参照ポインタ
*/
-static void wiz_display_item(player_type *player_ptr, object_type *o_ptr)
+static void wiz_display_item(PlayerType *player_ptr, object_type *o_ptr)
{
auto flgs = object_flags(o_ptr);
auto get_seq_32bits = [](const TrFlags &flgs, uint start) {
* counter flags to prevent weirdness. We use the items to collect
* statistics on item creation relative to the initial item.
*/
-static void wiz_statistics(player_type *player_ptr, object_type *o_ptr)
+static void wiz_statistics(PlayerType *player_ptr, object_type *o_ptr)
{
concptr q = "Rolls: %ld Correct: %ld Matches: %ld Better: %ld Worse: %ld Other: %ld";
concptr p = "Enter number of items to roll: ";
* Apply magic to an item or turn it into an artifact. -Bernd-
* @param o_ptr 再生成の対象となるアイテム情報の参照ポインタ
*/
-static void wiz_reroll_item(player_type *player_ptr, object_type *o_ptr)
+static void wiz_reroll_item(PlayerType *player_ptr, object_type *o_ptr)
{
if (o_ptr->is_artifact())
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr 調整するアイテムの参照ポインタ
*/
-static void wiz_tweak_item(player_type *player_ptr, object_type *o_ptr)
+static void wiz_tweak_item(PlayerType *player_ptr, object_type *o_ptr)
{
if (o_ptr->is_artifact())
return;
* - Change properties (via wiz_tweak_item)<br>
* - Change the number of items (via wiz_quantity_item)<br>
*/
-void wiz_modify_item(player_type *player_ptr)
+void wiz_modify_item(PlayerType *player_ptr)
{
concptr q = "Play with which object? ";
concptr s = "You have nothing to play with.";
/*!
* @brief オブジェクトの装備スロットがエゴが有効なスロットかどうか判定
*/
-static int is_slot_able_to_be_ego(player_type *player_ptr, object_type *o_ptr)
+static int is_slot_able_to_be_ego(PlayerType *player_ptr, object_type *o_ptr)
{
int slot = wield_slot(player_ptr, o_ptr);
* @param confirm 願わない場合に確認するかどうか
* @return 願った結果
*/
-WishResultType do_cmd_wishing(player_type *player_ptr, int prob, bool allow_art, bool allow_ego, bool confirm)
+WishResultType do_cmd_wishing(PlayerType *player_ptr, int prob, bool allow_art, bool allow_ego, bool confirm)
{
concptr fixed_str[] = {
#ifdef JP
enum class WishResultType { FAIL = -1, NOTHING = 0, NORMAL = 1, EGO = 2, ARTIFACT = 3, MAX };
-struct player_type;
-void wizard_item_modifier(player_type *player_ptr);
-void wiz_modify_item(player_type *player_ptr);
-WishResultType do_cmd_wishing(player_type *player_ptr, int prob, bool art_ok, bool ego_ok, bool confirm);
-void wiz_identify_full_inventory(player_type *player_ptr);
+class PlayerType;
+void wizard_item_modifier(PlayerType *player_ptr);
+void wiz_modify_item(PlayerType *player_ptr);
+WishResultType do_cmd_wishing(PlayerType *player_ptr, int prob, bool art_ok, bool ego_ok, bool confirm);
+void wiz_identify_full_inventory(PlayerType *player_ptr);
#include "io/write-diary.h"
#include "view/display-messages.h"
-void msg_print_wizard(player_type *player_ptr, int cheat_type, concptr msg)
+void msg_print_wizard(PlayerType *player_ptr, int cheat_type, concptr msg)
{
if (!cheat_room && cheat_type == CHEAT_DUNGEON)
return;
/*
* Display a formatted message, using "vstrnfmt()" and "msg_print()".
*/
-void msg_format_wizard(player_type *player_ptr, int cheat_type, concptr fmt, ...)
+void msg_format_wizard(PlayerType *player_ptr, int cheat_type, concptr fmt, ...)
{
if (!cheat_room && cheat_type == CHEAT_DUNGEON)
return;
#include "system/angband.h"
-struct player_type;
-void msg_print_wizard(player_type *player_ptr, int cheat_type, concptr msg);
-void msg_format_wizard(player_type *player_ptr, int cheat_type, concptr fmt, ...);
+class PlayerType;
+void msg_print_wizard(PlayerType *player_ptr, int cheat_type, concptr msg);
+void msg_format_wizard(PlayerType *player_ptr, int cheat_type, concptr fmt, ...);
* @brief プレイヤー設定コマンドの入力を受け付ける
* @param player_ptr プレイヤーの情報へのポインタ
*/
-void wizard_player_modifier(player_type *player_ptr)
+void wizard_player_modifier(PlayerType *player_ptr)
{
screen_save();
display_wizard_player_modifier_menu();
#pragma once
-struct player_type;
-void wizard_player_modifier(player_type *player_ptr);
+class PlayerType;
+void wizard_player_modifier(PlayerType *player_ptr);
* @brief プレイヤーを完全回復する /
* Cure everything instantly
*/
-void wiz_cure_all(player_type *player_ptr)
+void wiz_cure_all(PlayerType *player_ptr)
{
(void)life_stream(player_ptr, false, false);
(void)restore_mana(player_ptr, true);
* Hack -- this routine always makes a "dungeon object", and applies
* magic to it, and attempts to decline cursed items.
*/
-void wiz_create_item(player_type *player_ptr)
+void wiz_create_item(PlayerType *player_ptr)
{
screen_save();
OBJECT_IDX k_idx = wiz_create_itemtype();
* @param a_idx 固定アーティファクトのID
* @return 固定アーティファクトの名称(Ex. ★ロング・ソード『リンギル』)を保持する std::string オブジェクト
*/
-static std::string wiz_make_named_artifact_desc(player_type *player_ptr, ARTIFACT_IDX a_idx)
+static std::string wiz_make_named_artifact_desc(PlayerType *player_ptr, ARTIFACT_IDX a_idx)
{
const auto &a_ref = a_info[a_idx];
object_type obj;
* @param a_idx_list 選択する候補となる固定アーティファクトのIDのリスト
* @return 選択した固定アーティファクトのIDを返す。但しキャンセルした場合は std::nullopt を返す。
*/
-static std::optional<ARTIFACT_IDX> wiz_select_named_artifact(player_type *player_ptr, const std::vector<ARTIFACT_IDX> &a_idx_list)
+static std::optional<ARTIFACT_IDX> wiz_select_named_artifact(PlayerType *player_ptr, const std::vector<ARTIFACT_IDX> &a_idx_list)
{
constexpr auto MAX_PER_PAGE = 20UL;
const auto page_max = (a_idx_list.size() - 1) / MAX_PER_PAGE + 1;
/*!
* @brief 固定アーティファクトを生成する / Create the artifact
*/
-void wiz_create_named_art(player_type *player_ptr)
+void wiz_create_named_art(PlayerType *player_ptr)
{
screen_save();
* @brief プレイヤーの現能力値を調整する / Change various "permanent" player variables.
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void wiz_change_status(player_type *player_ptr)
+void wiz_change_status(PlayerType *player_ptr)
{
int tmp_int;
char tmp_val[160];
* Create desired feature
* @param creaturer_ptr プレイヤーへの参照ポインタ
*/
-void wiz_create_feature(player_type *player_ptr)
+void wiz_create_feature(PlayerType *player_ptr)
{
POSITION y, x;
if (!tgt_pt(player_ptr, &x, &y))
* @details 0を指定すると地上に飛ぶが、元いた場所にしか飛ばない
* @todo 可能ならダンジョンの入口 (例:ルルイエなら大洋の真ん中)へ飛べるようにしたい
*/
-static bool select_debugging_floor(player_type *player_ptr, int dungeon_type)
+static bool select_debugging_floor(PlayerType *player_ptr, int dungeon_type)
{
auto max_depth = d_info[dungeon_type].maxdepth;
if ((max_depth == 0) || (dungeon_type > static_cast<int>(d_info.size()))) {
* @param player_ptr プレイヤーへの参照ポインタ
* @details 範囲外の値が選択されたら再入力を促す
*/
-static bool select_debugging_dungeon(player_type *player_ptr, DUNGEON_IDX *dungeon_type)
+static bool select_debugging_dungeon(PlayerType *player_ptr, DUNGEON_IDX *dungeon_type)
{
if (command_arg > 0) {
return true;
* @brief 任意のダンジョン及び階層に飛ぶtための選択処理
* Go to any level
*/
-void wiz_jump_to_dungeon(player_type *player_ptr)
+void wiz_jump_to_dungeon(PlayerType *player_ptr)
{
DUNGEON_IDX dungeon_type = 1;
if (!select_debugging_dungeon(player_ptr, &dungeon_type)) {
* Become aware of a lot of objects
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void wiz_learn_items_all(player_type *player_ptr)
+void wiz_learn_items_all(PlayerType *player_ptr)
{
object_type forge;
object_type *q_ptr;
/*!
* @brief プレイヤーの種族を変更する
*/
-void wiz_reset_race(player_type *player_ptr)
+void wiz_reset_race(PlayerType *player_ptr)
{
char ppp[80];
sprintf(ppp, "Race (0-%d): ", MAX_RACES - 1);
* @brief プレイヤーの職業を変更する
* @todo 魔法領域の再選択などがまだ不完全、要実装。
*/
-void wiz_reset_class(player_type *player_ptr)
+void wiz_reset_class(PlayerType *player_ptr)
{
char ppp[80];
sprintf(ppp, "Class (0-%d): ", PLAYER_CLASS_TYPE_MAX - 1);
* @brief プレイヤーの領域を変更する
* @todo 存在有無などは未判定。そのうちすべき。
*/
-void wiz_reset_realms(player_type *player_ptr)
+void wiz_reset_realms(PlayerType *player_ptr)
{
char ppp[80];
char tmp_val[160];
/*!
* @brief プレイヤー近辺の全モンスターを消去する / Delete all nearby monsters
*/
-void wiz_zap_surrounding_monsters(player_type *player_ptr)
+void wiz_zap_surrounding_monsters(PlayerType *player_ptr)
{
for (MONSTER_IDX i = 1; i < player_ptr->current_floor_ptr->m_max; i++) {
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[i];
* @brief フロアに存在する全モンスターを消去する / Delete all monsters
* @param player_ptr 術者の参照ポインタ
*/
-void wiz_zap_floor_monsters(player_type *player_ptr)
+void wiz_zap_floor_monsters(PlayerType *player_ptr)
{
for (MONSTER_IDX i = 1; i < player_ptr->current_floor_ptr->m_max; i++) {
monster_type *m_ptr = &player_ptr->current_floor_ptr->m_list[i];
}
}
-void cheat_death(player_type *player_ptr)
+void cheat_death(PlayerType *player_ptr)
{
if (player_ptr->sc)
player_ptr->sc = player_ptr->age = 0;
#include "system/angband.h"
-struct player_type;
-void wiz_cure_all(player_type *player_ptr);
-void wiz_create_item(player_type *player_ptr);
-void wiz_create_named_art(player_type *player_ptr);
-void wiz_change_status(player_type *player_ptr);
-void wiz_create_feature(player_type *player_ptr);
-void wiz_jump_to_dungeon(player_type *player_ptr);
-void wiz_learn_items_all(player_type *player_ptr);
-void wiz_reset_race(player_type *player_ptr);
-void wiz_reset_class(player_type *player_ptr);
-void wiz_reset_realms(player_type *player_ptr);
+class PlayerType;
+void wiz_cure_all(PlayerType *player_ptr);
+void wiz_create_item(PlayerType *player_ptr);
+void wiz_create_named_art(PlayerType *player_ptr);
+void wiz_change_status(PlayerType *player_ptr);
+void wiz_create_feature(PlayerType *player_ptr);
+void wiz_jump_to_dungeon(PlayerType *player_ptr);
+void wiz_learn_items_all(PlayerType *player_ptr);
+void wiz_reset_race(PlayerType *player_ptr);
+void wiz_reset_class(PlayerType *player_ptr);
+void wiz_reset_realms(PlayerType *player_ptr);
void wiz_dump_options(void);
void set_gametime(void);
-void wiz_zap_surrounding_monsters(player_type *player_ptr);
-void wiz_zap_floor_monsters(player_type *player_ptr);
-extern void cheat_death(player_type *player_ptr);
+void wiz_zap_surrounding_monsters(PlayerType *player_ptr);
+void wiz_zap_floor_monsters(PlayerType *player_ptr);
+extern void cheat_death(PlayerType *player_ptr);
* @brief コマンド入力により任意にスペル効果を起こす / Wizard spells
* @return 実際にテレポートを行ったらTRUEを返す
*/
-bool wiz_debug_spell(player_type *player_ptr)
+bool wiz_debug_spell(PlayerType *player_ptr)
{
char tmp_val[50] = "\0";
int tmp_int;
* @brief 必ず成功するウィザードモード用次元の扉処理 / Wizard Dimension Door
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void wiz_dimension_door(player_type *player_ptr)
+void wiz_dimension_door(PlayerType *player_ptr)
{
POSITION x = 0, y = 0;
if (!tgt_pt(player_ptr, &x, &y))
* @brief ウィザードモード用モンスターの群れ生成 / Summon a horde of monsters
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void wiz_summon_horde(player_type *player_ptr)
+void wiz_summon_horde(PlayerType *player_ptr)
{
POSITION wy = player_ptr->y, wx = player_ptr->x;
int attempts = 1000;
/*!
* @brief ウィザードモード用処理としてターゲット中の相手をテレポートバックする / Hack -- Teleport to the target
*/
-void wiz_teleport_back(player_type *player_ptr)
+void wiz_teleport_back(PlayerType *player_ptr)
{
if (!target_who)
return;
* @brief 青魔導師の魔法を全て習得済みにする /
* debug command for blue mage
*/
-void wiz_learn_blue_magic_all(player_type *player_ptr)
+void wiz_learn_blue_magic_all(PlayerType *player_ptr)
{
auto bluemage_data = PlayerClass(player_ptr).get_specific_data<bluemage_data_type>();
if (!bluemage_data) {
/*!
* @brief 鍛冶師の全てのエッセンスを最大所持量にする
*/
-void wiz_fillup_all_smith_essences(player_type *player_ptr)
+void wiz_fillup_all_smith_essences(PlayerType *player_ptr)
{
auto smith_data = PlayerClass(player_ptr).get_specific_data<smith_data_type>();
if (!smith_data) {
* @param player_ptr プレイヤーへの参照ポインタ
* @param num 生成処理回数
*/
-void wiz_summon_random_enemy(player_type *player_ptr, int num)
+void wiz_summon_random_enemy(PlayerType *player_ptr, int num)
{
for (int i = 0; i < num; i++)
(void)summon_specific(player_ptr, 0, player_ptr->y, player_ptr->x, player_ptr->current_floor_ptr->dun_level, SUMMON_NONE, PM_ALLOW_GROUP | PM_ALLOW_UNIQUE);
* @details
* This function is rather dangerous
*/
-void wiz_summon_specific_enemy(player_type *player_ptr, MONRACE_IDX r_idx)
+void wiz_summon_specific_enemy(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
if (r_idx <= 0) {
int val = 1;
* @details
* This function is rather dangerous
*/
-void wiz_summon_pet(player_type *player_ptr, MONRACE_IDX r_idx)
+void wiz_summon_pet(PlayerType *player_ptr, MONRACE_IDX r_idx)
{
if (r_idx <= 0) {
int val = 1;
* @param effect_idx 属性ID
* @details デフォルトは100万・GF_ARROW(射撃)。RES_ALL持ちも一撃で殺せる。
*/
-void wiz_kill_enemy(player_type *player_ptr, HIT_POINT dam, AttributeType effect_idx)
+void wiz_kill_enemy(PlayerType *player_ptr, HIT_POINT dam, AttributeType effect_idx)
{
if (dam <= 0) {
char tmp[80] = "";
* @param dam ダメージ量
* @param effect_idx 属性ID
*/
-void wiz_kill_me(player_type *player_ptr, HIT_POINT dam, AttributeType effect_idx)
+void wiz_kill_me(PlayerType *player_ptr, HIT_POINT dam, AttributeType effect_idx)
{
if (dam <= 0) {
char tmp[80] = "";
#define SPELL_MAX 5
struct floor_type;
-struct player_type;
+class PlayerType;
typedef union spell_functions {
struct debug_spell_type1 {
- bool (*spell_function)(player_type *, floor_type *);
+ bool (*spell_function)(PlayerType *, floor_type *);
} spell1;
struct debug_spell_type2 {
- bool (*spell_function)(player_type *);
+ bool (*spell_function)(PlayerType *);
} spell2;
struct debug_spell_type3 {
- bool (*spell_function)(player_type *, HIT_POINT);
+ bool (*spell_function)(PlayerType *, HIT_POINT);
} spell3;
struct debug_spell_type4 { // 実質 ty curse
- bool (*spell_function)(player_type *, bool, int*);
+ bool (*spell_function)(PlayerType *, bool, int*);
} spell4;
struct debug_spell_type5 {
- void (*spell_function)(player_type *);
+ void (*spell_function)(PlayerType *);
} spell5;
} spell_functions;
extern debug_spell_command debug_spell_commands_list[SPELL_MAX];
-bool wiz_debug_spell(player_type *player_ptr);
-void wiz_dimension_door(player_type *player_ptr);
-void wiz_summon_horde(player_type *player_ptr);
-void wiz_teleport_back(player_type *player_ptr);
-void wiz_learn_blue_magic_all(player_type *player_ptr);
-void wiz_fillup_all_smith_essences(player_type *player_ptr);
-void wiz_summon_random_enemy(player_type *player_ptr, int num);
-void wiz_summon_specific_enemy(player_type *player_ptr, MONRACE_IDX r_idx);
-void wiz_summon_pet(player_type *player_ptr, MONRACE_IDX r_idx);
-void wiz_kill_enemy(player_type *player_ptr, HIT_POINT dam = 1000000, AttributeType effect_idx = AttributeType::ARROW);
-void wiz_kill_me(player_type *player_ptr, HIT_POINT dam, AttributeType effect_idx);
+bool wiz_debug_spell(PlayerType *player_ptr);
+void wiz_dimension_door(PlayerType *player_ptr);
+void wiz_summon_horde(PlayerType *player_ptr);
+void wiz_teleport_back(PlayerType *player_ptr);
+void wiz_learn_blue_magic_all(PlayerType *player_ptr);
+void wiz_fillup_all_smith_essences(PlayerType *player_ptr);
+void wiz_summon_random_enemy(PlayerType *player_ptr, int num);
+void wiz_summon_specific_enemy(PlayerType *player_ptr, MONRACE_IDX r_idx);
+void wiz_summon_pet(PlayerType *player_ptr, MONRACE_IDX r_idx);
+void wiz_kill_enemy(PlayerType *player_ptr, HIT_POINT dam = 1000000, AttributeType effect_idx = AttributeType::ARROW);
+void wiz_kill_me(PlayerType *player_ptr, HIT_POINT dam, AttributeType effect_idx);
spoil_out(buf);
spoil_out("------------------------------------------\n\n");
- player_type dummy_p;
+ PlayerType dummy_p;
dummy_p.lev = 1;
for (int c = 0; c < PLAYER_CLASS_TYPE_MAX; c++) {
* @brief プレイヤーの現在ダンジョンIDと階層に応じて、ダンジョン内ランクエの自動放棄を行う
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void check_random_quest_auto_failure(player_type *player_ptr)
+void check_random_quest_auto_failure(PlayerType *player_ptr)
{
if (player_ptr->dungeon_idx != DUNGEON_ANGBAND) {
return;
* Autosave BEFORE resetting the recall counter (rr9)
* The player is yanked up/down as soon as he loads the autosaved game.
*/
-void execute_recall(player_type *player_ptr)
+void execute_recall(PlayerType *player_ptr)
{
if (player_ptr->word_recall == 0)
return;
* / Handle involuntary movement once every 10 game turns
* @param player_ptr プレイヤーへの参照ポインタ
*/
-void execute_floor_reset(player_type *player_ptr)
+void execute_floor_reset(PlayerType *player_ptr)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (player_ptr->alter_reality == 0)
#pragma once
-struct player_type;
-void check_random_quest_auto_failure(player_type *player_ptr);
-void execute_recall(player_type *player_ptr);
-void execute_floor_reset(player_type* player_ptr);
+class PlayerType;
+void check_random_quest_auto_failure(PlayerType *player_ptr);
+void execute_recall(PlayerType *player_ptr);
+void execute_floor_reset(PlayerType* player_ptr);
* Note that if no objects are "appropriate", then this function will\n
* fail, and return zero, but this should *almost* never happen.\n
*/
-OBJECT_IDX get_obj_num(player_type *player_ptr, DEPTH level, BIT_FLAGS mode)
+OBJECT_IDX get_obj_num(PlayerType *player_ptr, DEPTH level, BIT_FLAGS mode)
{
if (level > MAX_DEPTH - 1)
level = MAX_DEPTH - 1;
#include "system/angband.h"
struct floor_type;
-struct player_type;
+class PlayerType;
OBJECT_IDX o_pop(floor_type *floor_ptr);
-OBJECT_IDX get_obj_num(player_type *player_ptr, DEPTH level, BIT_FLAGS mode);
+OBJECT_IDX get_obj_num(PlayerType *player_ptr, DEPTH level, BIT_FLAGS mode);
#include "world/world-movement-processor.h"
#include "world/world.h"
-WorldTurnProcessor::WorldTurnProcessor(player_type *player_ptr)
+WorldTurnProcessor::WorldTurnProcessor(PlayerType *player_ptr)
: player_ptr(player_ptr)
{
}
#pragma once
-struct player_type;
+class PlayerType;
class WorldTurnProcessor {
public:
- WorldTurnProcessor(player_type *player_ptr);
+ WorldTurnProcessor(PlayerType *player_ptr);
virtual ~WorldTurnProcessor() = default;
void process_world();
void print_time();
private:
- player_type *player_ptr;
+ PlayerType *player_ptr;
int hour = 0;
int min = 0;
* @param hour 時数を返すための参照ポインタ
* @param min 分数を返すための参照ポインタ
*/
-void extract_day_hour_min(player_type *player_ptr, int *day, int *hour, int *min)
+void extract_day_hour_min(PlayerType *player_ptr, int *day, int *hour, int *min)
{
const int32_t A_DAY = TURNS_PER_TICK * TOWN_DAWN;
int32_t turn_in_today = (w_ptr->game_turn + A_DAY / 4) % A_DAY;
extern world_type *w_ptr;
-struct player_type;
+class PlayerType;
bool is_daytime(void);
-void extract_day_hour_min(player_type *player_ptr, int *day, int *hour, int *min);
+void extract_day_hour_min(PlayerType *player_ptr, int *day, int *hour, int *min);
void update_playtime(void);
void add_winner_class(PlayerClassType c);
void add_retired_class(PlayerClassType c);