*/
#include "angband.h"
+#include "core.h"
+#include "util.h"
+
+#include "mind.h"
+
#include "floor.h"
#include "melee.h"
#include "spells.h"
#include "avatar.h"
#include "player-move.h"
#include "player-status.h"
+#include "player-class.h"
#include "spells-status.h"
#include "cmd-spell.h"
#include "spells-floor.h"
#include "grid.h"
#include "cmd-basic.h"
#include "monster-status.h"
+#include "player-effects.h"
+#include "player-damage.h"
+#include "view-mainwindow.h"
+#include "targeting.h"
+#include "realm-song.h"
/*! 特殊技能の一覧テーブル */
mind_power const mind_powers[5] =
break;
case 6:
/* Character Armour */
- set_shield((TIME_EFFECT)plev, FALSE);
- if (plev > 14) set_oppose_acid((TIME_EFFECT)plev, FALSE);
- if (plev > 19) set_oppose_fire((TIME_EFFECT)plev, FALSE);
- if (plev > 24) set_oppose_cold((TIME_EFFECT)plev, FALSE);
- if (plev > 29) set_oppose_elec((TIME_EFFECT)plev, FALSE);
- if (plev > 34) set_oppose_pois((TIME_EFFECT)plev, FALSE);
+ set_shield(p_ptr, (TIME_EFFECT)plev, FALSE);
+ if (plev > 14) set_oppose_acid(p_ptr, (TIME_EFFECT)plev, FALSE);
+ if (plev > 19) set_oppose_fire(p_ptr, (TIME_EFFECT)plev, FALSE);
+ if (plev > 24) set_oppose_cold(p_ptr, (TIME_EFFECT)plev, FALSE);
+ if (plev > 29) set_oppose_elec(p_ptr, (TIME_EFFECT)plev, FALSE);
+ if (plev > 34) set_oppose_pois(p_ptr, (TIME_EFFECT)plev, FALSE);
break;
case 7:
/* Psychometry */
break;
case 9:
/* Adrenaline */
- set_afraid(0);
+ set_afraid(p_ptr, 0);
set_stun(0);
/*
*/
if (!IS_FAST() || !IS_HERO())
{
- hp_player(plev);
+ hp_player(p_ptr, plev);
}
t = 10 + randint1((plev * 3) / 2);
- set_hero(t, FALSE);
+ set_hero(p_ptr, t, FALSE);
/* Haste */
- (void)set_fast(t, FALSE);
+ (void)set_fast(p_ptr, t, FALSE);
break;
case 10:
/* Telekinesis */
(void)lite_area(damroll(2, (plev / 2)), (plev / 10) + 1);
break;
case 2:
- set_tim_levitation(randint1(30) + 30 + boost / 5, FALSE);
+ set_tim_levitation(p_ptr, randint1(30) + 30 + boost / 5, FALSE);
break;
case 3:
project_length = plev / 8 + 3;
fire_beam(GF_MISSILE, dir, damroll(5 + ((plev - 1) / 5) + boost / 10, 5));
break;
case 4:
- set_resist_magic(randint1(20) + 20 + boost / 5, FALSE);
+ set_resist_magic(p_ptr, randint1(20) + 20 + boost / 5, FALSE);
break;
case 5:
msg_print(_("気を練った。", "You improved the Force."));
else return TRUE;
break;
case 6:
- set_tim_sh_touki(randint1(plev / 2) + 15 + boost / 7, FALSE);
+ set_tim_sh_touki(p_ptr, randint1(plev / 2) + 15 + boost / 7, FALSE);
break;
case 7:
return shock_power();
bool success = FALSE;
for (i = 0; i < 1 + boost/100; i++)
- if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_PHANTOM, PM_FORCE_PET, '\0'))
+ if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_PHANTOM, PM_FORCE_PET))
success = TRUE;
if (success)
{
fire_beam(GF_MANA, dir, damroll(10 + (plev / 2) + boost * 3 / 10, 15));
break;
case 13:
- set_lightspeed(randint1(16) + 16 + boost / 20, FALSE);
+ set_lightspeed(p_ptr, randint1(16) + 16 + boost / 20, FALSE);
break;
default:
msg_print(_("なに?", "Zap?"));
{
DIRECTION dir;
PLAYER_LEVEL plev = p_ptr->lev;
- int tmp;
+ int tmp;
TIME_EFFECT t;
- int x, y;
+ POSITION x, y;
/* spell code */
switch (spell)
break;
/* robe of dust */
case 6:
- set_dustrobe(20 + randint1(20), FALSE);
+ set_dustrobe(p_ptr, 20 + randint1(20), FALSE);
break;
/* banishing mirror */
case 7:
/* shield of water */
case 12:
t = 20 + randint1(20);
- set_shield(t, FALSE);
- if (plev > 31)set_tim_reflect(t, FALSE);
- if (plev > 39)set_resist_magic(t, FALSE);
+ set_shield(p_ptr, t, FALSE);
+ if (plev > 31)set_tim_reflect(p_ptr, t, FALSE);
+ if (plev > 39)set_resist_magic(p_ptr, t, FALSE);
break;
/* super ray */
case 13:
return recall_player(p_ptr, randint0(21) + 15);
/* multi-shadow */
case 18:
- set_multishadow(6 + randint1(6), FALSE);
+ set_multishadow(p_ptr, 6 + randint1(6), FALSE);
break;
/* binding field */
case 19:
break;
/* mirror of Ruffnor */
case 20:
- (void)set_invuln(randint1(4) + 4, FALSE);
+ (void)set_invuln(p_ptr, randint1(4) + 4, FALSE);
break;
default:
msg_print(_("なに?", "Zap?"));
break;
}
case 3:
- earthquake(p_ptr->y, p_ptr->x, 8+randint0(5));
+ earthquake(p_ptr->y, p_ptr->x, 8+randint0(5), 0);
break;
case 4:
massacre();
case 7:
return ident_spell(FALSE);
case 8:
- set_tim_levitation(randint1(20) + 20, FALSE);
+ set_tim_levitation(p_ptr, randint1(20) + 20, FALSE);
break;
case 9:
fire_ball(GF_FIRE, 0, 50+plev, plev/10+2);
teleport_player(30, 0L);
- set_oppose_fire((TIME_EFFECT)plev, FALSE);
+ set_oppose_fire(p_ptr, (TIME_EFFECT)plev, FALSE);
break;
case 10:
return rush_attack(NULL);
for (slot = 0; slot < INVEN_PACK; slot++)
{
- if (inventory[slot].tval == TV_SPIKE) break;
+ if (p_ptr->inventory_list[slot].tval == TV_SPIKE) break;
}
if (slot == INVEN_PACK)
{
{
/* Auto-Recall if possible and visible */
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
-
- /* Track a new monster */
health_track(m_idx);
}
explosive_rune();
break;
case 16:
- (void)set_kabenuke(randint1(plev/2) + plev/2, FALSE);
- set_oppose_acid((TIME_EFFECT)plev, FALSE);
+ (void)set_kabenuke(p_ptr, randint1(plev/2) + plev/2, FALSE);
+ set_oppose_acid(p_ptr, (TIME_EFFECT)plev, FALSE);
break;
case 17:
fire_ball(GF_POIS, 0, 75+plev*2/3, plev/5+2);
break;
}
case 19:
- set_multishadow(6+randint1(6), FALSE);
+ set_multishadow(p_ptr, 6+randint1(6), FALSE);
break;
default:
msg_print(_("なに?", "Zap?"));
else if (b < 15)
{
msg_print(_("奇妙な光景が目の前で踊っている...", "Weird visions seem to dance before your eyes..."));
- set_image(p_ptr->image + 5 + randint1(10));
+ set_image(p_ptr, p_ptr->image + 5 + randint1(10));
}
else if (b < 45)
{
msg_print(_("あなたの頭は混乱した!", "Your brain is addled!"));
- set_confused(p_ptr->confused + randint1(8));
+ set_confused(p_ptr, p_ptr->confused + randint1(8));
}
else if (b < 90)
{
else if (b < 96)
{
msg_print(_("まわりのものがキラキラ輝いている!", "Your brain is addled!"));
- set_image(p_ptr->image + 5 + randint1(10));
+ set_image(p_ptr, p_ptr->image + 5 + randint1(10));
}
else
{
msg_format(_("%sを集中しすぎて気を失ってしまった!", "You faint from the effort!"),p);
/* Hack -- Bypass free action */
- (void)set_paralyzed(p_ptr->paralyzed + randint1(5 * oops + 1));
+ (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint1(5 * oops + 1));
/* Damage WIS (possibly permanently) */
if (randint0(100) < 50)
msg_print(_("自分の精神を攻撃してしまった!", "You have damaged your mind!"));
/* Reduce constitution */
- (void)dec_stat(A_WIS, 15 + randint1(10), perm);
+ (void)dec_stat(p_ptr, A_WIS, 15 + randint1(10), perm);
}
}
p_ptr->redraw |= (PR_MANA);