* 特殊技能を揃えて実装している。
*/
-
-
#include "angband.h"
+#include "melee.h"
+#include "projection.h"
+#include "spells-summon.h"
+#include "avatar.h"
+#include "player-status.h"
+#include "spells-status.h"
+#include "cmd-spell.h"
/*! 特殊技能の一覧テーブル */
mind_power const mind_powers[5] =
};
/*! 特殊能力の解説文字列 */
-static cptr const mind_tips[5][MAX_MIND_POWERS] =
+static concptr const mind_tips[5][MAX_MIND_POWERS] =
{
#ifdef JP
{
"1体のモンスターと位置を交換する。",
"自分のいる床の上に、モンスターが通ると爆発してダメージを与えるルーンを描く。",
"一定時間、半物質化し壁を通り抜けられるようになる。さらに、一定時間酸への耐性を得る。装備による耐性に累積する。",
- "自分を中心とした超巨大な毒、生命力吸収、混乱の球を発生させ、テレポートする。",
+ "自分を中心とした超巨大な毒、衰弱、混乱の球を発生させ、テレポートする。",
"ランダムな方向に何回か炎か地獄かプラズマのビームを放つ。",
"全ての攻撃が、1/2の確率で無効になる。",
"",
"Generate a ball centered on you which inflict monster with PSI damage. Or inflict all monsters with PSI damage at level 25.",
"Removes fear and stun. Gives heroism and speed. Heals HP a little unless you already have heroism and temporal speed boost.",
"Pulls a distant item close to you.",
- "Fires a ball which damages monsters and absorbs monsters' mind power. Absorbing is takes more turns which from 0 to 1.5.",
+ "Fires a ball which damages, co. Absorbing is takes more turns which from 0 to 1.5.",
"Fires a beam of pure energy which penetrate the invulnerability barrier.",
"Stops time. Consumes all of your SP. The more consumes SP, the longer duration of spell.",
"",
*/
void mindcraft_info(char *p, int use_mind, int power)
{
-#ifdef JP
- cptr s_dam = "損傷:";
- cptr s_dur = "期間:";
- cptr s_range = "範囲:";
-#else
- cptr s_dam = "dam ";
- cptr s_dur = "dur ";
- cptr s_range = "range ";
-#endif
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
strcpy(p, "");
switch (power)
{
case 0: break;
- case 1: sprintf(p, " %s%dd%d", s_dam, 3 + ((plev - 1) / 4), 3 + plev/15); break;
- case 2: sprintf(p, " %s10", s_range); break;
- case 3: sprintf(p, " %s%d", s_range, plev * 5); break;
+ case 1: sprintf(p, " %s%dd%d", KWD_DAM, 3 + ((plev - 1) / 4), 3 + plev/15); break;
+ case 2: sprintf(p, " %s10", KWD_SPHERE); break;
+ case 3: sprintf(p, " %s%d", KWD_SPHERE, plev * 5); break;
case 4: break;
- case 5: sprintf(p, " %s%dd8", s_dam, 8 + ((plev - 5) / 4)); break;
- case 6: sprintf(p, " %s%d", s_dur, plev); break;
+ case 5: sprintf(p, " %s%dd8", KWD_DAM, 8 + ((plev - 5) / 4)); break;
+ case 6: sprintf(p, " %s%d", KWD_DURATION, plev); break;
case 7: break;
- case 8: sprintf(p, (plev < 25 ? " %s%d" : " %sd%d"), s_dam, (plev < 25 ? plev * 3 / 2 : plev * ((plev - 5) / 10 + 1))); break;
- case 9: sprintf(p, " %s10+d%d", s_dur, plev * 3 / 2); break;
+ case 8: sprintf(p, (plev < 25 ? " %s%d" : " %sd%d"), KWD_DAM, (plev < 25 ? plev * 3 / 2 : plev * ((plev - 5) / 10 + 1))); break;
+ case 9: sprintf(p, " %s10+d%d", KWD_DURATION, plev * 3 / 2); break;
#ifdef JP
case 10: sprintf(p, " 最大重量:%d.%dkg", lbtokg1(plev * 15),lbtokg2(plev * 15)); break;
#else
case 10: sprintf(p, " max wgt %d", plev * 15); break;
#endif
- case 11: sprintf(p, " %s%dd6", s_dam, plev / 2); break;
- case 12: sprintf(p, " %sd%d+%d", s_dam, plev * 3, plev * 3); break;
+ case 11: sprintf(p, " %s%dd6", KWD_DAM, plev / 2); break;
+ case 12: sprintf(p, " %sd%d+%d", KWD_DAM, plev * 3, plev * 3); break;
case 13: sprintf(p, _(" 行動:%ld回", " %ld acts."), (long int)(p_ptr->csp + 100-p_ptr->energy_need - 50)/100); break;
}
break;
switch (power)
{
- case 0: sprintf(p, " %s%dd4", s_dam, 3 + ((plev - 1) / 5) + boost / 12); break;
+ case 0: sprintf(p, " %s%dd4", KWD_DAM, 3 + ((plev - 1) / 5) + boost / 12); break;
case 1: break;
- case 2: sprintf(p, " %s%d+d30", s_dur, 30 + boost / 5); break;
- case 3: sprintf(p, " %s%dd5", s_dam, 5 + ((plev - 1) / 5) + boost / 10); break;
- case 4: sprintf(p, " %s%d+d20", s_dur, 20 + boost / 5); break;
+ case 2: sprintf(p, " %s%d+d30", KWD_DURATION, 30 + boost / 5); break;
+ case 3: sprintf(p, " %s%dd5", KWD_DAM, 5 + ((plev - 1) / 5) + boost / 10); break;
+ case 4: sprintf(p, " %s%d+d20", KWD_DURATION, 20 + boost / 5); break;
case 5: break;
- case 6: sprintf(p, " %s%d+d%d", s_dur, 15 + boost / 7, plev / 2); break;
- case 7: sprintf(p, " %s%dd8", s_dam, 8 + ((plev - 5) / 5) + boost / 12); break;
- case 8: sprintf(p, " %s10d6+%d", s_dam, plev * 3 / 2 + boost * 3 / 5); break;
+ case 6: sprintf(p, " %s%d+d%d", KWD_DURATION, 15 + boost / 7, plev / 2); break;
+ case 7: sprintf(p, " %s%dd8", KWD_DAM, 8 + ((plev - 5) / 4) + boost / 12); break;
+ case 8: sprintf(p, " %s10d6+%d", KWD_DAM, plev * 3 / 2 + boost * 3 / 5); break;
case 9: break;
case 10: sprintf(p, _(" 最大%d体", " max %d"), 1+boost/100); break;
- case 11: sprintf(p, " %s%d", s_dam, 100 + plev + boost); break;
- case 12: sprintf(p, " %s%dd15", s_dam, 10 + plev / 2 + boost * 3 / 10); break;
+ case 11: sprintf(p, " %s%d", KWD_DAM, 100 + plev + boost); break;
+ case 12: sprintf(p, " %s%dd15", KWD_DAM, 10 + plev / 2 + boost * 3 / 10); break;
case 13: sprintf(p, _(" 行動:%d+d16回", " %d+d16 acts"), 16+boost/20); break;
}
break;
{
case 0: break;
case 1: break;
- case 2: sprintf(p, " %s%dd4", s_dam, 3 + ((plev - 1) / 5) ); break;
- case 3: sprintf(p, " %s10", s_range); break;
+ case 2: sprintf(p, " %s%dd4", KWD_DAM, 3 + ((plev - 1) / 5) ); break;
+ case 3: sprintf(p, " %s10", KWD_SPHERE); break;
case 4: break;
- case 5: sprintf(p, " %s%d", s_range, plev *5); break;
- case 6: sprintf(p, " %s20+d20", s_dur); break;
+ case 5: sprintf(p, " %s%d", KWD_SPHERE, plev *5); break;
+ case 6: sprintf(p, " %s20+d20", KWD_DURATION); break;
case 7: break;
- case 8: sprintf(p, " %s%dd8", s_dam, 8+((plev -5)/4) ); break;
+ case 8: sprintf(p, " %s%dd8", KWD_DAM, 8+((plev -5)/4) ); break;
case 9: break;
- case 10: sprintf(p, " %s%dd8", s_dam, 11+(plev-5)/4 ); break;
+ case 10: sprintf(p, " %s%dd8", KWD_DAM, 11+(plev-5)/4 ); break;
case 11: break;
- case 12: sprintf(p, " %s20+d20", s_dur); break;
- case 13: sprintf(p, " %s150+d%d", s_dam, plev*2 ); break;
+ case 12: sprintf(p, " %s20+d20", KWD_DURATION); break;
+ case 13: sprintf(p, " %s150+d%d", KWD_DAM, plev*2 ); break;
case 14: break;
case 15: break;
- case 16: sprintf(p, " %s%d", s_range, plev/2 +10); break;
+ case 16: sprintf(p, " %s%d", KWD_SPHERE, plev/2 +10); break;
case 17: break;
- case 18: sprintf(p, " %s6+d6", s_dur); break;
- case 19: sprintf(p, " %s%d", s_dam, plev*11+5 ); break;
- case 20: sprintf(p, " %s4+d4", s_dur); break;
+ case 18: sprintf(p, " %s6+d6", KWD_DURATION); break;
+ case 19: sprintf(p, " %s%d", KWD_DAM, plev*11+5 ); break;
+ case 20: sprintf(p, " %s4+d4", KWD_DURATION); break;
}
break;
}
{
case 0: break;
case 1: break;
- case 2: sprintf(p, " %s10", s_range); break;
+ case 2: sprintf(p, " %s10", KWD_SPHERE); break;
case 3: break;
- case 4: sprintf(p, " %s%d", s_range , plev *5); break;
- case 5: sprintf(p, " %s30", s_range); break;
+ case 4: sprintf(p, " %s%d", KWD_SPHERE , plev *5); break;
+ case 5: sprintf(p, " %s30", KWD_SPHERE); break;
case 6: break;
case 7: break;
- case 8: sprintf(p, " %s20+d20", s_dur); break;
- case 9: sprintf(p, " %s%d", s_dam, (50+plev)/2 ); break;
+ case 8: sprintf(p, " %s20+d20", KWD_DURATION); break;
+ case 9: sprintf(p, " %s%d", KWD_DAM, (50+plev)/2 ); break;
case 10: break;
case 11: break;
case 12: break;
case 13: break;
case 14: break;
case 15: break;
- case 16: sprintf(p, " %s%d+d%d", s_dur, plev/2, plev/2); break;
- case 17: sprintf(p, " %s%d*3", s_dam, (75+plev*2/3)/2 ); break;
- case 18: sprintf(p, " %s%dd10", s_dam, 6+plev/8 ); break;
- case 19: sprintf(p, " %s6+d6", s_dur); break;
+ case 16: sprintf(p, " %s%d+d%d", KWD_DURATION, plev/2, plev/2); break;
+ case 17: sprintf(p, " %s%d*3", KWD_DAM, (75+plev*2/3)/2 ); break;
+ case 18: sprintf(p, " %s%dd10", KWD_DAM, 6+plev/8 ); break;
+ case 19: sprintf(p, " %s6+d6", KWD_DURATION); break;
}
break;
}
* when you run it. It's probably easy to fix but I haven't tried,\n
* sorry.\n
*/
-static int get_mind_power(COMMAND_CODE *sn, bool only_browse)
+static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse)
{
- COMMAND_CODE i;
+ SPELL_IDX i;
int num = 0;
- int y = 1;
- int x = 10;
+ TERM_LEN y = 1;
+ TERM_LEN x = 10;
int minfail = 0;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
int chance = 0;
int ask = TRUE;
char choice;
char out_val[160];
char comment[80];
- cptr p;
-
+ concptr p;
+ COMMAND_CODE code;
mind_type spell;
const mind_power *mind_ptr;
bool flag, redraw;
/* Assume cancelled */
*sn = (-1);
-#ifdef ALLOW_REPEAT /* TNB */
-
/* Get the spell, if available */
- if (repeat_pull(sn))
+
+ if (repeat_pull(&code))
{
+ *sn = (SPELL_IDX)code;
/* Hack -- If requested INVEN_FORCE(1111), pull again */
- if (*sn == INVEN_FORCE) repeat_pull(sn);
+ if (*sn == INVEN_FORCE) repeat_pull(&code);
+ *sn = (SPELL_IDX)code;
/* Verify the spell */
if (mind_ptr->info[*sn].min_lev <= plev)
}
}
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Nothing chosen yet */
flag = FALSE;
/* Show list */
redraw = TRUE;
-
- /* Save the screen */
if (!only_browse && !use_menu) screen_save();
/* Display a list of spells */
prt("", y, x);
put_str(_("名前", "Name"), y, x + 5);
-#ifdef JP
-put_str(format("Lv %s 失率 効果", ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35);
-#else
-put_str(format("Lv %s Fail Info", ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35);
-#endif
- has_weapon[0] = buki_motteruka(INVEN_RARM);
- has_weapon[1] = buki_motteruka(INVEN_LARM);
+ put_str(format(_("Lv %s 失率 効果", "Lv %s Fail Info"),
+ ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35);
+
+ has_weapon[0] = has_melee_weapon(INVEN_RARM);
+ has_weapon[1] = has_melee_weapon(INVEN_LARM);
/* Dump the spells */
for (i = 0; i < MAX_MIND_POWERS; i++)
else strcpy(psi_desc, " ");
}
else
- sprintf(psi_desc, " %c) ",I2A(i));
+ sprintf(psi_desc, " %c) ", I2A(i));
/* Dump the spell --(-- */
strcat(psi_desc,
format("%-30s%2d %4d%s %3d%%%s",
spell.name, spell.min_lev, mana_cost,
-#ifdef JP
- (((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? "~" : " "),
-#else
- (((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? "~ " : " "),
-#endif
+ (((use_mind == MIND_MINDCRAFTER) && (i == 13)) ? _("~", "~ ") : " "),
chance, comment));
prt(psi_desc, y + i + 1, x);
}
{
/* Hide list */
redraw = FALSE;
-
- /* Restore the screen */
screen_load();
}
/* Stop the loop */
flag = TRUE;
}
-
- /* Restore the screen */
if (redraw && !only_browse) screen_load();
- /* Show choices */
p_ptr->window |= (PW_SPELL);
-
- /* Window stuff */
- window_stuff();
+ handle_stuff();
/* Abort if needed */
if (!flag) return (FALSE);
/* Save the choice */
(*sn) = i;
-#ifdef ALLOW_REPEAT /* TNB */
-
- repeat_push(*sn);
-
-#endif /* ALLOW_REPEAT -- TNB */
+ repeat_push((COMMAND_CODE)i);
/* Success */
return (TRUE);
break;
case 13:
{
- if (world_player)
- {
- msg_print(_("既に時は止まっている。", "Time is already stopped."));
- return (FALSE);
- }
- world_player = TRUE;
- msg_print(_("「時よ!」", "You yell 'Time!'"));
- msg_print(NULL);
-
- /* Hack */
- p_ptr->energy_need -= 1000 + (100 + p_ptr->csp - 50)*TURNS_PER_TICK/10;
-
- /* Redraw map */
- p_ptr->redraw |= (PR_MAP);
-
- /* Update monsters */
- p_ptr->update |= (PU_MONSTERS);
-
- /* Window stuff */
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
- handle_stuff();
+ time_walk(p_ptr);
break;
}
default:
static bool cast_force_spell(int spell)
{
DIRECTION dir;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
int boost = P_PTR_KI;
if (heavy_armor()) boost /= 2;
set_tim_sh_touki(randint1(plev / 2) + 15 + boost / 7, FALSE);
break;
case 7:
- {
- int y, x, dam;
- project_length = 1;
- if (!get_aim_dir(&dir)) return FALSE;
-
- y = p_ptr->y + ddy[dir];
- x = p_ptr->x + ddx[dir];
- dam = damroll(8 + ((plev - 5) / 4) + boost / 12, 8);
- fire_beam(GF_MISSILE, dir, dam);
- if (cave[y][x].m_idx)
- {
- int i;
- int ty = y, tx = x;
- int oy = y, ox = x;
- MONSTER_IDX m_idx = cave[y][x].m_idx;
- monster_type *m_ptr = &m_list[m_idx];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
- char m_name[80];
-
- monster_desc(m_name, m_ptr, 0);
-
- if (randint1(r_ptr->level * 3 / 2) > randint0(dam / 2) + dam/2)
- {
- msg_format(_("%sは飛ばされなかった。", "%^s was not blown away."), m_name);
- }
- else
- {
- for (i = 0; i < 5; i++)
- {
- y += ddy[dir];
- x += ddx[dir];
- if (cave_empty_bold(y, x))
- {
- ty = y;
- tx = x;
- }
- else break;
- }
- 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 = (s16b)m_idx;
- m_ptr->fy = (byte_hack)ty;
- m_ptr->fx = (byte_hack)tx;
-
- update_mon(m_idx, TRUE);
- lite_spot(oy, ox);
- lite_spot(ty, tx);
-
- if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
- p_ptr->update |= (PU_MON_LITE);
- }
- }
- }
+ return shock_power();
break;
- }
case 8:
if (!get_aim_dir(&dir)) return FALSE;
fire_ball(GF_MISSILE, dir, damroll(10, 6) + plev * 3 / 2 + boost * 3 / 5, (plev < 30) ? 2 : 3);
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))
+ if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_PHANTOM, PM_FORCE_PET, '\0'))
success = TRUE;
if (success)
{
* @brief 現在フロアに存在している鏡の数を数える / calculate mirrors
* @return 鏡の枚数
*/
-static int number_of_mirrors( void )
+static int number_of_mirrors(void)
{
- int x,y;
- int val=0;
- for( x=0 ; x < cur_wid ; x++ ){
- for( y=0 ; y < cur_hgt ; y++ ){
- if (is_mirror_grid(&cave[y][x])) val++;
- }
- }
- return val;
+ POSITION x, y;
+ int val = 0;
+ for (x = 0; x < cur_wid; x++) {
+ for (y = 0; y < cur_hgt; y++) {
+ if (is_mirror_grid(&cave[y][x])) val++;
+ }
+ }
+ return val;
}
/*!
/* mirror of recall */
case 17:
- return word_of_recall();
+ return recall_player(p_ptr, randint0(21) + 15);
/* multi-shadow */
case 18:
set_multishadow(6 + randint1(6), FALSE);
return FALSE;
}
- if (!get_rep_dir2(&dir)) return FALSE;
+ if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
if (dir == 5) return FALSE;
y = p_ptr->y + ddy[dir];
if (player_can_enter(cave[y][x].feat, 0) && !is_trap(cave[y][x].feat) && !cave[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);
}
break;
}
case 2:
{
- if (!get_rep_dir2(&dir)) return FALSE;
+ if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
move_player(dir, easy_disarm, TRUE);
*/
static bool cast_ninja_spell(int spell)
{
- POSITION x, y;
- int dir;
- int plev = p_ptr->lev;
+ POSITION x = 0, y = 0;
+ DIRECTION dir;
+ PLAYER_LEVEL plev = p_ptr->lev;
/* spell code */
switch (spell)
}
case 5:
{
- if (!get_rep_dir(&dir, FALSE)) return FALSE;
- y = p_ptr->y + ddy[dir];
- x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
- {
- py_attack(y, x, 0);
- if (randint0(p_ptr->skill_dis) < 7)
- msg_print(_("うまく逃げられなかった。", "You failed to run away."));
- else
- teleport_player(30, 0L);
- }
- else
- {
- msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
- msg_print(NULL);
- }
+ if(!panic_hit()) return FALSE;
break;
}
case 6:
}
if (slot == INVEN_PACK)
{
-#ifdef JP
- if (!i) msg_print("くさびを持っていない。");
- else msg_print("くさびがなくなった。");
-#else
- if (!i) msg_print("You have no Iron Spikes.");
- else msg_print("You have no more Iron Spikes.");
-#endif
+ if (!i) msg_print(_("くさびを持っていない。", "You have no Iron Spikes."));
+ else msg_print(_("くさびがなくなった。", "You have no more Iron Spikes."));
return FALSE;
}
/* Gives a multiplier of 2 at first, up to 3 at 40th */
- do_cmd_throw_aux(1, FALSE, slot);
+ do_cmd_throw(1, FALSE, slot);
p_ptr->energy_use = 100;
}
{
monster_type *m_ptr;
MONSTER_IDX m_idx;
- char m_name[80];
+ GAME_TEXT m_name[MAX_NLEN];
int i;
int path_n;
u16b path_g[512];
ty = target_row, tx = target_col;
for (i = 1; i < path_n; i++)
{
- int ny = GRID_Y(path_g[i]);
- int nx = GRID_X(path_g[i]);
+ POSITION ny = GRID_Y(path_g[i]);
+ POSITION nx = GRID_X(path_g[i]);
cave_type *c_ptr = &cave[ny][nx];
if (in_bounds(ny, nx) && cave_empty_bold(ny, nx) &&
/* Wake the monster up */
(void)set_monster_csleep(m_idx, 0);
- /* Update the monster (new location) */
- update_mon(m_idx, TRUE);
-
- /* Redraw the old grid */
+ update_monster(m_idx, TRUE);
lite_spot(target_row, target_col);
-
- /* Redraw the new grid */
lite_spot(ty, tx);
if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
break;
case 17:
fire_ball(GF_POIS, 0, 75+plev*2/3, plev/5+2);
- fire_ball(GF_OLD_DRAIN, 0, 75+plev*2/3, plev/5+2);
+ fire_ball(GF_HYPODYNAMIA, 0, 75+plev*2/3, plev/5+2);
fire_ball(GF_CONFUSION, 0, 75+plev*2/3, plev/5+2);
teleport_player(30, 0L);
break;
for (k = 0; k < num; k++)
{
- int typ = one_in_(2) ? GF_FIRE : one_in_(3) ? GF_NETHER : GF_PLASMA;
+ EFFECT_ID typ = one_in_(2) ? GF_FIRE : one_in_(3) ? GF_NETHER : GF_PLASMA;
int attempts = 1000;
while (attempts--)
int b = 0;
int chance;
int minfail = 0;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
int old_csp = p_ptr->csp;
mind_type spell;
bool cast;
int use_mind, mana_cost;
- cptr p;
+ concptr p;
bool on_mirror = FALSE;
- /* not if confused */
- if (p_ptr->confused)
- {
- msg_print(_("混乱していて集中できない!", "You are too confused!"));
- return;
- }
+ if (cmd_limit_confused(p_ptr)) return;
/* get power */
if (!get_mind_power(&n, FALSE)) return;
#ifdef JP
switch(p_ptr->pclass)
{
- case CLASS_MINDCRAFTER: use_mind = MIND_MINDCRAFTER;p = "精神";break;
- case CLASS_FORCETRAINER: use_mind = MIND_KI;p = "気";break;
- case CLASS_BERSERKER: use_mind = MIND_BERSERKER;p = "怒り";break;
- case CLASS_MIRROR_MASTER: use_mind = MIND_MIRROR_MASTER;p = "鏡魔法";break;
- case CLASS_NINJA: use_mind = MIND_NINJUTSU;p = "精神";break;
- default: use_mind = 0;p = "超能力";break;
+ case CLASS_MINDCRAFTER: use_mind = MIND_MINDCRAFTER; p = "精神";break;
+ case CLASS_FORCETRAINER: use_mind = MIND_KI; p = "気";break;
+ case CLASS_BERSERKER: use_mind = MIND_BERSERKER; p = "怒り";break;
+ case CLASS_MIRROR_MASTER: use_mind = MIND_MIRROR_MASTER; p = "鏡魔法";break;
+ case CLASS_NINJA: use_mind = MIND_NINJUTSU; p = "精神";break;
+ default: use_mind = 0 ;p = "超能力"; break;
}
#else
switch(p_ptr->pclass)
{
- case CLASS_MINDCRAFTER: use_mind = MIND_MINDCRAFTER;break;
- case CLASS_FORCETRAINER: use_mind = MIND_KI;break;
- case CLASS_BERSERKER: use_mind = MIND_BERSERKER;break;
- case CLASS_MIRROR_MASTER: use_mind = MIND_MIRROR_MASTER;break;
- case CLASS_NINJA: use_mind = MIND_NINJUTSU;break;
- default: use_mind = 0;break;
+ case CLASS_MINDCRAFTER: use_mind = MIND_MINDCRAFTER; break;
+ case CLASS_FORCETRAINER: use_mind = MIND_KI; break;
+ case CLASS_BERSERKER: use_mind = MIND_BERSERKER; break;
+ case CLASS_MIRROR_MASTER: use_mind = MIND_MIRROR_MASTER; break;
+ case CLASS_NINJA: use_mind = MIND_NINJUTSU; break;
+ default: use_mind = 0; break;
}
#endif
spell = mind_powers[use_mind].info[n];
{
if (heavy_armor()) chance += 20;
if (p_ptr->icky_wield[0]) chance += 20;
- else if (buki_motteruka(INVEN_RARM)) chance += 10;
+ else if (has_melee_weapon(INVEN_RARM)) chance += 10;
if (p_ptr->icky_wield[1]) chance += 20;
- else if (buki_motteruka(INVEN_LARM)) chance += 10;
+ else if (has_melee_weapon(INVEN_LARM)) chance += 10;
if (n == 5)
{
int j;
}
- /* Take a turn */
p_ptr->energy_use = 100;
/* teleport from mirror costs small energy */
if( on_mirror && p_ptr->pclass == CLASS_MIRROR_MASTER )
if ((p_ptr->csp - mana_cost) < 0) p_ptr->csp_frac = 0;
p_ptr->csp = MAX(0, p_ptr->csp - mana_cost);
- /* Message */
msg_format(_("%sを集中しすぎて気を失ってしまった!", "You faint from the effort!"),p);
/* Hack -- Bypass free action */
{
bool perm = (randint0(100) < 25);
- /* Message */
msg_print(_("自分の精神を攻撃してしまった!", "You have damaged your mind!"));
/* Reduce constitution */
(void)dec_stat(A_WIS, 15 + randint1(10), perm);
}
}
-
- /* Redraw mana */
p_ptr->redraw |= (PR_MANA);
-
- /* Window stuff */
p_ptr->window |= (PW_PLAYER);
p_ptr->window |= (PW_SPELL);
}