* are included in all such copies. Other copyrights may also apply.
*/
-#include "angband.h"
-#include "util.h"
-#include "core.h"
-#include "term.h"
-
-#include "cmd-dump.h"
-#include "chest.h"
-#include "trap.h"
-#include "dungeon.h"
-#include "feature.h"
-#include "floor.h"
+#include "system/angband.h"
+#include "main/music-definitions-table.h"
+#include "main/sound-definitions-table.h"
+#include "system/system-variables.h"
+#include "core/stuff-handler.h"
+#include "gameterm.h"
+
+#include "io/write-diary.h"
+#include "cmd/cmd-dump.h"
+#include "cmd/cmd-save.h"
+#include "object/chest.h"
+#include "grid/trap.h"
+#include "dungeon/dungeon.h"
#include "melee.h"
-#include "object-hook.h"
-#include "spells.h"
-#include "spells-summon.h"
-#include "spells-status.h"
-#include "monster.h"
-#include "monster-status.h"
+#include "object/object-hook.h"
+#include "monster/monster-status.h"
#include "quest.h"
-#include "artifact.h"
-#include "avatar.h"
-#include "player-status.h"
-#include "realm-hex.h"
-#include "realm-song.h"
+#include "object/artifact.h"
+#include "player/avatar.h"
+#include "player/player-status.h"
+#include "realm/realm-hex.h"
#include "geometry.h"
#include "wild.h"
-#include "grid.h"
-#include "feature.h"
-#include "player-move.h"
-#include "player-effects.h"
-#include "player-class.h"
-#include "player-personality.h"
-#include "player-inventory.h"
-#include "objectkind.h"
-#include "object-broken.h"
-#include "object-flavor.h"
+#include "grid/grid.h"
+#include "player/player-move.h"
+#include "player/player-effects.h"
+#include "player/player-personality.h"
+#include "inventory/player-inventory.h"
+#include "object/object-kind.h"
+#include "object/object-broken.h"
+#include "object/object-flavor.h"
#include "shoot.h"
#include "snipe.h"
#include "cmd-basic.h"
-#include "cmd-item.h"
-#include "floor-save.h"
-#include "dungeon-file.h"
-#include "files.h"
+#include "dungeon/dungeon-file.h"
+#include "io/files.h"
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
#include "targeting.h"
-#include "world.h"
+#include "world/world.h"
+#include "effect/spells-effect-util.h"
+#include "spell/spells3.h"
+#include "core/output-updater.h"
/*!
* @brief フロア脱出時に出戻りが不可能だった場合に警告を加える処理
{
if (creature_ptr->image)
{
- msg_print(_("幻覚が見えて集中できない!", "You are too hallucinated!"));
+ msg_print(_("幻覚が見えて集中できない!", "Your hallucinations prevent you from concentrating!"));
return TRUE;
}
return FALSE;
{
if (creature_ptr->stun)
{
- msg_print(_("頭が朦朧としていて集中できない!", "You are too stuned!"));
+ msg_print(_("頭が朦朧としていて集中できない!", "You are too stunned!"));
return TRUE;
}
return FALSE;
if (!confirm_leave_level(creature_ptr, FALSE)) return;
/* Success */
- if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+ if (IS_ECHIZEN(creature_ptr))
msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
else
msg_print(_("上の階に登った。", "You enter the up staircase."));
if (creature_ptr->current_floor_ptr->dun_level - up_num < d_info[creature_ptr->dungeon_idx].mindepth)
up_num = creature_ptr->current_floor_ptr->dun_level;
}
- if (record_stair) exe_write_diary(creature_ptr, NIKKI_STAIR, 0-up_num, _("階段を上った", "climbed up the stairs to"));
+ if (record_stair) exe_write_diary(creature_ptr, DIARY_STAIR, 0-up_num, _("階段を上った", "climbed up the stairs to"));
/* Success */
- if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+ if (IS_ECHIZEN(creature_ptr))
msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
else if (up_num == creature_ptr->current_floor_ptr->dun_level)
msg_print(_("地上に戻った。", "You go back to the surface."));
/* Confirm Leaving */
if(!confirm_leave_level(creature_ptr, TRUE)) return;
- if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+ if (IS_ECHIZEN(creature_ptr))
msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
else
msg_print(_("下の階に降りた。", "You enter the down staircase."));
if (record_stair)
{
- if (fall_trap) exe_write_diary(creature_ptr, NIKKI_STAIR, down_num, _("落とし戸に落ちた", "fell through a trap door"));
- else exe_write_diary(creature_ptr, NIKKI_STAIR, down_num, _("階段を下りた", "climbed down the stairs to"));
+ if (fall_trap) exe_write_diary(creature_ptr, DIARY_STAIR, down_num, _("落とし戸に落ちた", "fell through a trap door"));
+ else exe_write_diary(creature_ptr, DIARY_STAIR, down_num, _("階段を下りた", "climbed down the stairs to"));
}
if (fall_trap)
}
else
{
- if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+ if (IS_ECHIZEN(creature_ptr))
msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
else
msg_print(_("階段を下りて新たなる迷宮へと足を踏み入れた。", "You enter a maze of down staircases."));
* @details Return the number of features around (or under) the character.
* Usually look for doors and floor traps.
*/
-static int count_dt(player_type *creature_ptr, POSITION *y, POSITION *x, bool (*test)(FEAT_IDX feat), bool under)
+static int count_dt(player_type *creature_ptr, POSITION *y, POSITION *x, bool (*test)(player_type*, FEAT_IDX feat), bool under)
{
/* Check around (and under) the character */
int count = 0;
feat = get_feat_mimic(g_ptr);
/* Not looking for this feature */
- if (!((*test)(feat))) continue;
+ if (!((*test)(creature_ptr, feat))) continue;
/* OK */
++count;
}
/* Get a "repeated" direction */
- if (get_rep_dir(&dir, TRUE))
+ if (get_rep_dir(creature_ptr, &dir, TRUE))
{
FEAT_IDX feat;
grid_type *g_ptr;
return more;
}
- s16b closed_feat = feat_state(old_feat, FF_CLOSE);
+ s16b closed_feat = feat_state(creature_ptr, old_feat, FF_CLOSE);
/* Hack -- object in the way */
if ((g_ptr->o_idx || (g_ptr->info & CAVE_OBJECT)) &&
(closed_feat != old_feat) && !have_flag(f_info[closed_feat].flags, FF_DROP))
{
- msg_print(_("何かがつっかえて閉まらない。", "There seems stuck."));
+ msg_print(_("何かがつっかえて閉まらない。", "Something prevents it from closing."));
}
else
{
}
/* Get a "repeated" direction */
- if (get_rep_dir(&dir, FALSE))
+ if (get_rep_dir(creature_ptr, &dir, FALSE))
{
grid_type *g_ptr;
FEAT_IDX feat;
}
}
- if (is_hidden_door(g_ptr))
+ if (is_hidden_door(creature_ptr, g_ptr))
{
/* Occasional Search XXX XXX */
if (randint0(100) < 25) search(creature_ptr);
}
/* Get a direction to tunnel, or Abort */
- if (get_rep_dir(&dir,FALSE))
+ if (get_rep_dir(creature_ptr, &dir,FALSE))
{
/* Get location */
y = creature_ptr->y + ddy[dir];
feature_type *f_ptr = &f_info[g_ptr->feat];
/* Must be a closed door */
- if (!is_closed_door(g_ptr->feat))
+ if (!is_closed_door(creature_ptr, g_ptr->feat))
{
return FALSE;
}
}
/* Get a direction (or abort) */
- if (get_rep_dir(&dir,TRUE))
+ if (get_rep_dir(creature_ptr, &dir,TRUE))
{
grid_type *g_ptr;
FEAT_IDX feat;
o_idx = chest_check(creature_ptr->current_floor_ptr, y, x, TRUE);
/* Disarm a trap */
- if (!is_trap(feat) && !o_idx)
+ if (!is_trap(creature_ptr, feat) && !o_idx)
{
msg_print(_("そこには解除するものが見当たらない。", "You see nothing there to disarm."));
}
sound(have_flag(f_ptr->flags, FF_GLASS) ? SOUND_GLASS : SOUND_OPENDOOR);
/* Break down the door */
- if ((randint0(100) < 50) || (feat_state(g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))
+ if ((randint0(100) < 50) || (feat_state(creature_ptr, g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))
{
cave_alter_feat(creature_ptr, y, x, FF_BASH);
}
}
/* Get a "repeated" direction */
- if (get_rep_dir(&dir,FALSE))
+ if (get_rep_dir(creature_ptr, &dir,FALSE))
{
FEAT_IDX feat;
}
/* Get a direction */
- if (get_rep_dir(&dir,TRUE))
+ if (get_rep_dir(creature_ptr, &dir,TRUE))
{
FEAT_IDX feat;
feature_type *f_ptr;
}
/* Get a "repeated" direction */
- if (!get_rep_dir(&dir, FALSE)) return;
+ if (!get_rep_dir(creature_ptr, &dir, FALSE)) return;
POSITION y = creature_ptr->y + ddy[dir];
POSITION x = creature_ptr->x + ddx[dir];
/* Get a "repeated" direction */
bool more = FALSE;
DIRECTION dir;
- if (get_rep_dir(&dir, FALSE))
+ if (get_rep_dir(creature_ptr, &dir, FALSE))
{
take_turn(creature_ptr, 100);
}
/* Get a "repeated" direction */
- if (get_rep_dir(&dir,FALSE))
+ if (get_rep_dir(creature_ptr, &dir,FALSE))
{
/* Hack -- Set the run counter */
creature_ptr->running = (command_arg ? command_arg : 1000);
if (j_ptr->sval == SV_CRIMSON)
{
- msg_print(_("この武器は発動して使うもののようだ。", "Do activate."));
+ msg_print(_("この武器は発動して使うもののようだ。", "It's already activated."));
flush();
return;
}
/* Sniper actions after some shootings */
if (snipe_type == SP_AWAY)
{
- teleport_player(creature_ptr, 10 + (creature_ptr->concent * 2), 0L);
+ teleport_player(creature_ptr, 10 + (creature_ptr->concent * 2), TELEPORT_SPONTANEOUS);
}
if (snipe_type == SP_FINAL)
{
- msg_print(_("射撃の反動が体を襲った。", "A reactionary of shooting attacked you. "));
+ msg_print(_("射撃の反動が体を襲った。", "The weapon's recoil stuns you. "));
(void)set_slow(creature_ptr, creature_ptr->slow + randint0(7) + 7, FALSE);
(void)set_stun(creature_ptr, creature_ptr->stun + randint1(25));
}
/* Single object */
q_ptr->number = 1;
- object_desc(o_name, q_ptr, OD_OMIT_PREFIX);
+ object_desc(creature_ptr, o_name, q_ptr, OD_OMIT_PREFIX);
if (creature_ptr->mighty_throw) mult += 3;
project_length = tdis + 1;
/* Get a direction (or cancel) */
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
/* Predict the "target" location */
tx = creature_ptr->x + 99 * ddx[dir];
ty = creature_ptr->y + 99 * ddy[dir];
/* Check for "target request" */
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(creature_ptr))
{
tx = target_col;
ty = target_row;
else
{
floor_item_increase(creature_ptr->current_floor_ptr, 0 - item, -1);
- floor_item_optimize(creature_ptr->current_floor_ptr, 0 - item);
+ floor_item_optimize(creature_ptr, 0 - item);
}
if (item >= INVEN_RARM)
move_cursor_relative(ny[cur_dis], nx[cur_dis]);
Term_fresh();
Term_xtra(TERM_XTRA_DELAY, msec);
- lite_spot(ny[cur_dis], nx[cur_dis]);
+ lite_spot(creature_ptr, ny[cur_dis], nx[cur_dis]);
Term_fresh();
}
grid_type *g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
GAME_TEXT m_name[MAX_NLEN];
- monster_name(g_ptr->m_idx, m_name);
+ monster_name(creature_ptr, g_ptr->m_idx, m_name);
/* Check the visibility */
visible = m_ptr->ml;
if (tdam < 0) tdam = 0;
/* Modify the damage */
- tdam = mon_damage_mod(m_ptr, tdam, FALSE);
+ tdam = mon_damage_mod(creature_ptr, m_ptr, tdam, FALSE);
msg_format_wizard(CHEAT_MONSTER, _("%dのダメージを与えた。(残りHP %d/%d(%d))", "You do %d damage. (left HP %d/%d(%d))"),
tdam, m_ptr->hp - tdam, m_ptr->maxhp, m_ptr->max_maxhp);
/* No death */
else
{
- message_pain(g_ptr->m_idx, tdam);
+ message_pain(creature_ptr, g_ptr->m_idx, tdam);
/* Anger the monster */
if ((tdam > 0) && !object_is_potion(q_ptr))
- anger_monster(m_ptr);
+ anger_monster(creature_ptr, m_ptr);
if (fear && m_ptr->ml)
{
if (hit_body) torch_lost_fuel(q_ptr);
/* Chance of breakage (during attacks) */
- j = (hit_body ? breakage_chance(q_ptr, creature_ptr->pclass == CLASS_ARCHER, 0) : 0);
+ j = (hit_body ? breakage_chance(creature_ptr, q_ptr, creature_ptr->pclass == CLASS_ARCHER, 0) : 0);
/* Figurines transform */
if ((q_ptr->tval == TV_FIGURINE) && !(creature_ptr->current_floor_ptr->inside_arena))
{
j = 100;
- if (!(summon_named_creature(0, y, x, q_ptr->pval, !(object_is_cursed(q_ptr)) ? PM_FORCE_PET : 0L)))
+ if (!(summon_named_creature(creature_ptr, 0, y, x, q_ptr->pval, !(object_is_cursed(q_ptr)) ? PM_FORCE_PET : 0L)))
msg_print(_("人形は捻じ曲がり砕け散ってしまった!", "The Figurine writhes and then shatters."));
else if (object_is_cursed(q_ptr))
msg_print(_("これはあまり良くない気がする。", "You have a bad feeling about this."));
{
msg_format(_("%sは砕け散った!", "The %s shatters!"), o_name);
- if (potion_smash_effect(0, y, x, q_ptr->k_idx))
+ if (potion_smash_effect(creature_ptr, 0, y, x, q_ptr->k_idx))
{
monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[creature_ptr->current_floor_ptr->grid_array[y][x].m_idx];
if (creature_ptr->current_floor_ptr->grid_array[y][x].m_idx && is_friendly(m_ptr) && !MON_INVULNER(m_ptr))
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, 0);
+ monster_desc(creature_ptr, m_name, m_ptr, 0);
msg_format(_("%sは怒った!", "%^s gets angry!"), m_name);
- set_hostile(&creature_ptr->current_floor_ptr->m_list[creature_ptr->current_floor_ptr->grid_array[y][x].m_idx]);
+ set_hostile(creature_ptr, &creature_ptr->current_floor_ptr->m_list[creature_ptr->current_floor_ptr->grid_array[y][x].m_idx]);
}
}
do_drop = FALSE;
j = -1;
if (boomerang) back_chance += 4+randint1(5);
if (super_boomerang) back_chance += 100;
- object_desc(o2_name, q_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
+ object_desc(creature_ptr, o2_name, q_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
if((back_chance > 30) && (!one_in_(100) || super_boomerang))
{
move_cursor_relative(ny[i], nx[i]);
Term_fresh();
Term_xtra(TERM_XTRA_DELAY, msec);
- lite_spot(ny[i], nx[i]);
+ lite_spot(creature_ptr, ny[i], nx[i]);
Term_fresh();
}
else
{
if (item >= 0)
{
- msg_format(_("%sを受け損ねた!", "%s comes backs, but you can't catch!"), o2_name);
+ msg_format(_("%sを受け損ねた!", "%s comes back, but you can't catch!"), o2_name);
}
else
{
if (!current_world_ptr->total_winner)
{
- exe_write_diary(creature_ptr, NIKKI_BUNSHOU, 0, _("ダンジョンの探索に絶望して自殺した。", "give up all hope to commit suicide."));
- exe_write_diary(creature_ptr, NIKKI_GAMESTART, 1, _("-------- ゲームオーバー --------", "-------- Game Over --------"));
- exe_write_diary(creature_ptr, NIKKI_BUNSHOU, 1, "\n\n\n\n");
+ exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 0, _("ダンジョンの探索に絶望して自殺した。", "gave up all hope to commit suicide."));
+ exe_write_diary(creature_ptr, DIARY_GAMESTART, 1, _("-------- ゲームオーバー --------", "-------- Game Over --------"));
+ exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, "\n\n\n\n");
}
/* Cause of death */