#include "angband.h"
#include "cmd-spell.h"
-#include "monster-hook.h"
+#include "melee.h"
+#include "monsterrace-hook.h"
+#include "projection.h"
+#include "artifact.h"
+#include "player-status.h"
/*!
* @brief 剣術の各処理を行う
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST)
* @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
*/
-cptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
y = p_ptr->y + ddy_cdd[cdir];
x = p_ptr->x + ddx_cdd[cdir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, 0);
else
msg_print(_("攻撃は空を切った。", "You attack the empty air."));
y = p_ptr->y + ddy_cdd[(cdir + 7) % 8];
x = p_ptr->x + ddx_cdd[(cdir + 7) % 8];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, 0);
else
msg_print(_("攻撃は空を切った。", "You attack the empty air."));
y = p_ptr->y + ddy_cdd[(cdir + 1) % 8];
x = p_ptr->x + ddx_cdd[(cdir + 1) % 8];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, 0);
else
msg_print(_("攻撃は空を切った。", "You attack the empty air."));
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_FIRE);
else
{
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_MINEUCHI);
else
{
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (!cave[y][x].m_idx)
+ if (!grid_array[y][x].m_idx)
{
msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
return NULL;
py_attack(y, x, 0);
- if (!player_can_enter(cave[y][x].feat, 0) || is_trap(cave[y][x].feat))
+ if (!player_can_enter(grid_array[y][x].feat, 0) || is_trap(grid_array[y][x].feat))
break;
y += ddy[dir];
x += ddx[dir];
- if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
+ if (player_can_enter(grid_array[y][x].feat, 0) && !is_trap(grid_array[y][x].feat) && !grid_array[y][x].m_idx)
{
msg_print(NULL);
-
- /* Move the player */
(void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
}
}
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_POISON);
else
{
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_ZANMA);
else
{
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, 0);
else
{
msg_print(_("その方向にはモンスターはいません。", "There is no monster."));
return NULL;
}
- if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
{
return "";
}
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
{
int i;
POSITION ty = y, tx = x;
POSITION oy = y, ox = x;
- MONSTER_IDX m_idx = cave[y][x].m_idx;
+ MONSTER_IDX m_idx = grid_array[y][x].m_idx;
monster_type *m_ptr = &m_list[m_idx];
- char m_name[80];
+ GAME_TEXT m_name[MAX_NLEN];
monster_desc(m_name, m_ptr, 0);
if ((ty != oy) || (tx != ox))
{
msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name);
- cave[oy][ox].m_idx = 0;
- cave[ty][tx].m_idx = m_idx;
+ grid_array[oy][ox].m_idx = 0;
+ grid_array[ty][tx].m_idx = m_idx;
m_ptr->fy = ty;
m_ptr->fx = tx;
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_HAGAN);
if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break;
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_COLD);
else
{
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_KYUSHO);
else
{
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_MAJIN);
else
{
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_SUTEMI);
else
{
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_ELEC);
else
{
{
POSITION y = 0, x = 0;
- cave_type *c_ptr;
+ grid_type *g_ptr;
monster_type *m_ptr;
if (p_ptr->cut < 300)
{
y = p_ptr->y + ddy_ddd[dir];
x = p_ptr->x + ddx_ddd[dir];
- c_ptr = &cave[y][x];
-
- /* Get the monster */
- m_ptr = &m_list[c_ptr->m_idx];
+ g_ptr = &grid_array[y][x];
+ m_ptr = &m_list[g_ptr->m_idx];
/* Hack -- attack monsters */
- if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
+ if (g_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
{
if (!monster_living(m_ptr->r_idx))
{
- char m_name[80];
+ GAME_TEXT m_name[MAX_NLEN];
monster_desc(m_name, m_ptr, 0);
msg_format(_("%sには効果がない!", "%s is unharmed!"), m_name);
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_QUAKE);
else
earthquake(p_ptr->y, p_ptr->x, 10);
{
int damage;
- if (!buki_motteruka(INVEN_RARM + i)) break;
+ if (!has_melee_weapon(INVEN_RARM + i)) break;
o_ptr = &inventory[INVEN_RARM + i];
basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
damage = o_ptr->to_d * 100;
if (cast)
{
msg_print(_("雄叫びをあげた!", "You roar out!"));
- project_hack(GF_SOUND, randint1(plev * 3));
+ project_all_los(GF_SOUND, randint1(plev * 3));
aggravate_monsters(0);
}
break;
POSITION y, x;
POSITION ny, nx;
MONSTER_IDX m_idx;
- cave_type *c_ptr;
+ grid_type *g_ptr;
monster_type *m_ptr;
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- c_ptr = &cave[y][x];
+ g_ptr = &grid_array[y][x];
- if (c_ptr->m_idx)
+ if (g_ptr->m_idx)
py_attack(y, x, HISSATSU_3DAN);
else
{
return NULL;
}
- if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
{
return "";
}
/* Monster is dead? */
- if (!c_ptr->m_idx) break;
+ if (!g_ptr->m_idx) break;
ny = y + ddy[dir];
nx = x + ddx[dir];
- m_idx = c_ptr->m_idx;
+ m_idx = g_ptr->m_idx;
m_ptr = &m_list[m_idx];
/* Monster cannot move back? */
continue;
}
- c_ptr->m_idx = 0;
- cave[ny][nx].m_idx = m_idx;
+ g_ptr->m_idx = 0;
+ grid_array[ny][nx].m_idx = m_idx;
m_ptr->fy = ny;
m_ptr->fx = nx;
lite_spot(ny, nx);
/* Player can move forward? */
- if (player_can_enter(c_ptr->feat, 0))
+ if (player_can_enter(g_ptr->feat, 0))
{
- /* Move the player */
if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
}
else
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_DRAIN);
else
{
if (cast)
{
msg_print(_("武器を不規則に揺らした...", "You irregularly wave your weapon..."));
- project_hack(GF_ENGETSU, plev * 4);
- project_hack(GF_ENGETSU, plev * 4);
- project_hack(GF_ENGETSU, plev * 4);
+ project_all_los(GF_ENGETSU, plev * 4);
+ project_all_los(GF_ENGETSU, plev * 4);
+ project_all_los(GF_ENGETSU, plev * 4);
}
break;
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
{
py_attack(y, x, 0);
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
{
handle_stuff();
py_attack(y, x, 0);
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
{
msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
return "";
for (i = 0; i < 2; i++)
{
int damage;
- if (!buki_motteruka(INVEN_RARM + i)) break;
+ if (!has_melee_weapon(INVEN_RARM + i)) break;
o_ptr = &inventory[INVEN_RARM + i];
basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
damage = o_ptr->to_d * 100;
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
+ if (grid_array[y][x].m_idx)
py_attack(y, x, HISSATSU_UNDEAD);
else
{