/*!
* @brief 文字列に青魔導師の呪文の攻撃力を加える
-* @param r_idx モンスターの種族ID
* @param SPELL_NUM 呪文番号
+* @param plev プレイヤーレベル
* @param msg 表示する文字列
* @param tmp 返すメッセージを格納する配列
* @return なし
static void learned_info(char *p, int power)
{
int plev = pseudo_plev();
- int hp = p_ptr->chp;
#ifdef JP
cptr s_dam = " 損傷:%s";
* when you run it. It's probably easy to fix but I haven't tried,\n
* sorry.\n
*/
-static int get_learned_power(int *sn)
+static int get_learned_power(SPELL_IDX *sn)
{
int i = 0;
int num = 0;
char out_val[160];
char comment[80];
s32b f4 = 0, f5 = 0, f6 = 0;
-#ifdef JP
-cptr p = "魔法";
-#else
- cptr p = "magic";
-#endif
+ cptr p = _("魔法", "magic");
monster_power spell;
bool flag, redraw;
}
else
{
-#ifdef JP
- sprintf(comment, "[A]ボルト, [B]ボール, [C]ブレス, [D]召喚, [E]その他:");
-#else
- sprintf(comment, "[A] bolt, [B] ball, [C] breath, [D] summoning, [E] others:");
-#endif
+ sprintf(comment, _("[A]ボルト, [B]ボール, [C]ブレス, [D]召喚, [E]その他:", "[A] bolt, [B] ball, [C] breath, [D] summoning, [E] others:"));
while (TRUE)
{
if (!get_com(comment, &ch, TRUE))
}
if (i == num)
{
-#ifdef JP
- msg_print("その種類の魔法は覚えていない!");
-#else
- msg_print("You don't know any spell of this type.");
-#endif
+ msg_print(_("その種類の魔法は覚えていない!", "You don't know any spell of this type."));
return (FALSE);
}
/* Build a prompt (accept all spells) */
(void)strnfmt(out_val, 78,
-#ifdef JP
- "(%c-%c, '*'で一覧, ESC) どの%sを唱えますか?",
-#else
- "(%c-%c, *=List, ESC=exit) Use which %s? ",
-#endif
+ _("(%c-%c, '*'で一覧, ESC) どの%sを唱えますか?", "(%c-%c, *=List, ESC=exit) Use which %s? "),
I2A(0), I2A(num - 1), p);
if (use_menu) screen_save();
/* Display a list of spells */
prt("", y, x);
-#ifdef JP
-put_str("名前", y, x + 5);
-#else
- put_str("Name", y, x + 5);
-#endif
-
-#ifdef JP
-put_str("MP 失率 効果", y, x + 33);
-#else
- put_str("SP Fail Info", y, x + 32);
-#endif
+ put_str(_("名前", "Name"), y, x + 5);
+ put_str(_("MP 失率 効果", "SP Fail Info"), y, x + 33);
/* Dump the spells */
if (use_menu)
{
-#ifdef JP
- if (i == (menu_line-1)) strcpy(psi_desc, " 》");
-#else
- if (i == (menu_line-1)) strcpy(psi_desc, " > ");
-#endif
+ if (i == (menu_line-1)) strcpy(psi_desc, _(" 》", " > "));
else strcpy(psi_desc, " ");
}
else sprintf(psi_desc, " %c)", I2A(i));
ask = isupper(choice);
/* Lowercase */
- if (ask) choice = tolower(choice);
+ if (ask) choice = (char)tolower(choice);
/* Extract request */
i = (islower(choice) ? A2I(choice) : -1);
char tmp_val[160];
/* Prompt */
-#ifdef JP
- (void) strnfmt(tmp_val, 78, "%sの魔法を唱えますか?", monster_powers[spellnum[i]].name);
-#else
- (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[spellnum[i]].name);
-#endif
-
+ (void) strnfmt(tmp_val, 78, _("%sの魔法を唱えますか?", "Use %s? "), monster_powers[spellnum[i]].name);
/* Belay that order */
if (!get_check(tmp_val)) continue;
int dir;
int plev = pseudo_plev();
int summon_lev = p_ptr->lev * 2 / 3 + randint1(p_ptr->lev/2);
- int hp = p_ptr->chp;
int damage = 0;
bool pet = success;
bool no_trump = FALSE;
break;
case MS_DISPEL:
{
- int m_idx;
+ MONSTER_IDX m_idx;
if (!target_set(TARGET_KILL)) return FALSE;
m_idx = cave[target_row][target_col].m_idx;
if (!m_idx) break;
if (!player_has_los_bold(target_row, target_col)) break;
- if (!projectable(py, px, target_row, target_col)) break;
+ if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
dispel_monster_status(m_idx);
break;
}
break;
case MS_SHOOT:
{
- object_type *o_ptr = NULL;
-
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("矢を放った。", "You fire an arrow."));
msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
damage = monspell_bluemage_damage((MS_BR_INERTIA), plev, DAM_ROLL);
- fire_ball(GF_INERTIA, dir, damage, (plev > 40 ? -3 : -2));
+ fire_ball(GF_INERTIAL, dir, damage, (plev > 40 ? -3 : -2));
break;
case MS_BR_GRAVITY:
if (!get_aim_dir(&dir)) return FALSE;
if (!target_set(TARGET_KILL)) return FALSE;
if (!cave[target_row][target_col].m_idx) break;
if (!player_has_los_bold(target_row, target_col)) break;
- if (!projectable(py, px, target_row, target_col)) break;
+ if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
m_ptr = &m_list[cave[target_row][target_col].m_idx];
r_ptr = &r_info[m_ptr->r_idx];
monster_desc(m_name, m_ptr, 0);
}
}
msg_format(_("%sを引き戻した。", "You command %s to return."), m_name);
- teleport_monster_to(cave[target_row][target_col].m_idx, py, px, 100, TELEPORT_PASSIVE);
+ teleport_monster_to(cave[target_row][target_col].m_idx, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
break;
}
case MS_TELE_AWAY:
break;
case MS_TELE_LEVEL:
{
- int target_m_idx;
+ MONSTER_IDX target_m_idx;
monster_type *m_ptr;
monster_race *r_ptr;
char m_name[80];
target_m_idx = cave[target_row][target_col].m_idx;
if (!target_m_idx) break;
if (!player_has_los_bold(target_row, target_col)) break;
- if (!projectable(py, px, target_row, target_col)) break;
+ if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
m_ptr = &m_list[target_m_idx];
r_ptr = &r_info[m_ptr->r_idx];
monster_desc(m_name, m_ptr, 0);
break;
case MS_RAISE_DEAD:
msg_print(_("死者復活の呪文を唱えた。", "You cast a animate dead."));
- (void)animate_dead(0, py, px);
+ (void)animate_dead(0, p_ptr->y, p_ptr->x);
break;
case MS_S_KIN:
{
msg_print(_("援軍を召喚した。", "You summon minions."));
for (k = 0;k < 1; k++)
{
- if (summon_kin_player(summon_lev, py, px, (pet ? PM_FORCE_PET : 0L)))
+ if (summon_kin_player(summon_lev, p_ptr->y, p_ptr->x, (pet ? PM_FORCE_PET : 0L)))
{
if (!pet) msg_print(_("召喚された仲間は怒っている!", "Summoned fellows are angry!"));
}
msg_print(_("サイバーデーモンを召喚した!", "You summon a Cyberdemon!"));
for (k = 0 ;k < 1 ; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_CYBER, p_mode))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_CYBER, p_mode))
{
if (!pet)
msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon are angry!"));
int k;
msg_print(_("仲間を召喚した。", "You summon help."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, p_mode))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, 0, p_mode))
{
if (!pet)
msg_print(_("召喚されたモンスターは怒っている!", "The summoned monster is angry!"));
int k;
msg_print(_("モンスターを召喚した!", "You summon monsters!"));
for (k = 0;k < plev / 15 + 2; k++)
- if(summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, (p_mode | u_mode)))
+ if(summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, 0, (p_mode | u_mode)))
{
if (!pet)
msg_print(_("召喚されたモンスターは怒っている!", "The summoned monsters are angry!"));
int k;
msg_print(_("アリを召喚した。", "You summon ants."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode)))
{
if (!pet)
msg_print(_("召喚されたアリは怒っている!", "The summoned ants are angry!"));
int k;
msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode)))
{
if (!pet)
msg_print(_("召喚された蜘蛛は怒っている!", "Summoned spiders are angry!"));
int k;
msg_print(_("ハウンドを召喚した。", "You summon hounds."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode)))
{
if (!pet)
msg_print(_("召喚されたハウンドは怒っている!", "Summoned hounds are angry!"));
int k;
msg_print(_("ヒドラを召喚した。", "You summon a hydras."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HYDRA, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HYDRA, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚されたヒドラは怒っている!", "Summoned hydras are angry!"));
int k;
msg_print(_("天使を召喚した!", "You summon an angel!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANGEL, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_ANGEL, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚された天使は怒っている!", "Summoned angels are angry!"));
int k;
msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DEMON, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_DEMON, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚されたデーモンは怒っている!", "Summoned demons are angry!"));
int k;
msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚されたアンデッドは怒っている!", "Summoned undeads are angry!"));
int k;
msg_print(_("ドラゴンを召喚した!", "You summon a dragon!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DRAGON, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_DRAGON, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚されたドラゴンは怒っている!", "Summoned dragons are angry!"));
int k;
msg_print(_("強力なアンデッドを召喚した!", "You summon a greater undead!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode)))
{
if (!pet)
msg_print(_("召喚された上級アンデッドは怒っている!", "Summoned greater undeads are angry!"));
int k;
msg_print(_("古代ドラゴンを召喚した!", "You summon an ancient dragon!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode)))
{
if (!pet)
msg_print(_("召喚された古代ドラゴンは怒っている!", "Summoned ancient dragons are angry!"));
int k;
msg_print(_("アンバーの王族を召喚した!", "You summon a Lord of Amber!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode)))
{
if (!pet)
msg_print(_("召喚されたアンバーの王族は怒っている!", "Summoned Lords of Amber are angry!"));
case MS_S_UNIQUE:
{
int k, count = 0;
- msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
+ msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNIQUE, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_UNIQUE, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
{
count++;
- if (!pet)
- msg_print(_("召喚されたユニーク・モンスターは怒っている!", "Summoned special opponents are angry!"));
+ if (!pet)
+ msg_print(_("召喚されたユニーク・モンスターは怒っている!", "Summoned special opponents are angry!"));
}
for (k = count;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
{
count++;
- if (!pet)
- msg_print(_("召喚された上級アンデッドは怒っている!", "Summoned greater undeads are angry!"));
+ if (!pet)
+ msg_print(_("召喚された上級アンデッドは怒っている!", "Summoned greater undeads are angry!"));
}
if (!count)
{
*/
bool do_cmd_cast_learned(void)
{
- int n = 0;
+ SPELL_IDX n = 0;
int chance;
int minfail = 0;
int plev = p_ptr->lev;
/* not if confused */
if (p_ptr->confused)
{
-#ifdef JP
-msg_print("混乱していて唱えられない!");
-#else
- msg_print("You are too confused!");
-#endif
-
+ msg_print(_("混乱していて唱えられない!", "You are too confused!"));
return TRUE;
}
if (need_mana > p_ptr->csp)
{
/* Warning */
-#ifdef JP
-msg_print("MPが足りません。");
-#else
- msg_print("You do not have enough mana to use this power.");
-#endif
-
+ msg_print(_("MPが足りません。", "You do not have enough mana to use this power."));
if (!over_exert) return FALSE;
/* Verify */
-#ifdef JP
-if (!get_check("それでも挑戦しますか? ")) return FALSE;
-#else
- if (!get_check("Attempt it anyway? ")) return FALSE;
-#endif
-
+ if (!get_check(_("それでも挑戦しますか? ", "Attempt it anyway? "))) return FALSE;
}
/* Spell failure chance */
if (randint0(100) < chance)
{
if (flush_failure) flush();
-#ifdef JP
-msg_print("魔法をうまく唱えられなかった。");
-#else
- msg_print("You failed to concentrate hard enough!");
-#endif
+ msg_print(_("魔法をうまく唱えられなかった。", "You failed to concentrate hard enough!"));
sound(SOUND_FAIL);
p_ptr->csp_frac = 0;
/* Message */
-#ifdef JP
-msg_print("精神を集中しすぎて気を失ってしまった!");
-#else
- msg_print("You faint from the effort!");
-#endif
-
+ msg_print(_("精神を集中しすぎて気を失ってしまった!", "You faint from the effort!"));
/* Hack -- Bypass free action */
(void)set_paralyzed(p_ptr->paralyzed + randint1(5 * oops + 1));
bool perm = (randint0(100) < 25);
/* Message */
-#ifdef JP
-msg_print("体を悪くしてしまった!");
-#else
- msg_print("You have damaged your health!");
-#endif
-
+ msg_print(_("体を悪くしてしまった!", "You have damaged your health!"));
/* Reduce constitution */
(void)dec_stat(A_CON, 15 + randint1(10), perm);
}
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Window stuff */
p_ptr->redraw |= (PR_MANA);
if (randint1(p_ptr->lev + 70) > monster_powers[monspell].level + 40)
{
p_ptr->magic_num2[monspell] = 1;
-#ifdef JP
- msg_format("%sを学習した!", monster_powers[monspell].name);
-#else
- msg_format("You have learned %s!", monster_powers[monspell].name);
-#endif
+ msg_format(_("%sを学習した!", "You have learned %s!"), monster_powers[monspell].name);
gain_exp(monster_powers[monspell].level * monster_powers[monspell].smana);
/* Sound */