#include "angband.h"
#include "cmd-spell.h"
#include "cmd-quaff.h"
+#include "object-hook.h"
+#include "object-curse.h"
#define MAX_KEEP 4 /*!<呪術の最大詠唱数 */
- /*!
- * @brief 呪術領域の武器呪縛の対象にできる武器かどうかを返す。 / An "item_tester_hook" for offer
- * @param o_ptr オブジェクト構造体の参照ポインタ
- * @return 呪縛可能な武器ならばTRUEを返す
- */
-static bool item_tester_hook_weapon_except_bow(object_type *o_ptr)
-{
- switch (o_ptr->tval)
- {
- case TV_SWORD:
- case TV_HAFTED:
- case TV_POLEARM:
- case TV_DIGGING:
- {
- return (TRUE);
- }
- }
-
- return (FALSE);
-}
-
-/*!
-* @brief 呪術領域の各処理に使える呪われた装備かどうかを返す。 / An "item_tester_hook" for offer
-* @param o_ptr オブジェクト構造体の参照ポインタ
-* @return 使える装備ならばTRUEを返す
-*/
-static bool item_tester_hook_cursed(object_type *o_ptr)
-{
- return (bool)(object_is_cursed(o_ptr));
-}
-
/*!
* @brief プレイヤーが詠唱中の全呪術を停止する
* @return なし
bool stop_hex_spell(void)
{
int spell;
- char choice;
+ char choice = 0;
char out_val[160];
bool flag = FALSE;
- int y = 1;
- int x = 20;
+ TERM_LEN y = 1;
+ TERM_LEN x = 20;
int sp[MAX_KEEP];
if (!hex_spelling_any())
{
-#ifdef JP
- msg_print("呪文を詠唱していません。");
-#else
- msg_print("You are casting no spell.");
-#endif
+ msg_print(_("呪文を詠唱していません。", "You are casting no spell."));
return FALSE;
}
}
else
{
-#ifdef JP
- strnfmt(out_val, 78, "どの呪文の詠唱を中断しますか?(呪文 %c-%c, 'l'全て, ESC)",
+ strnfmt(out_val, 78, _("どの呪文の詠唱を中断しますか?(呪文 %c-%c, 'l'全て, ESC)", "Which spell do you stop casting? (Spell %c-%c, 'l' to all, ESC)"),
I2A(0), I2A(CASTING_HEX_NUM(p_ptr) - 1));
-#else
- strnfmt(out_val, 78, "Which spell do you stop casting? (Spell %c-%c, 'l' to all, ESC)",
- I2A(0), I2A(CASTING_HEX_NUM(p_ptr) - 1));
-#endif
screen_save();
{
int n = 0;
Term_erase(x, y, 255);
- prt(" 名前", y, x + 5);
+ prt(_(" 名前", " Name"), y, x + 5);
for (spell = 0; spell < 32; spell++)
{
if (hex_spelling(spell))
void check_hex(void)
{
int spell;
- s32b need_mana;
+ MANA_POINT need_mana;
u32b need_mana_frac;
bool res = FALSE;
p_ptr->redraw |= PR_MANA;
if (res)
{
-#ifdef JP
- msg_print("詠唱を再開した。");
-#else
- msg_print("You restart spelling.");
-#endif
+ msg_print(_("詠唱を再開した。", "You restart spelling."));
+
p_ptr->action = ACTION_SPELL;
- /* Recalculate bonuses */
p_ptr->update |= (PU_BONUS | PU_HP);
-
- /* Redraw map and status bar */
p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
-
- /* Update monsters */
p_ptr->update |= (PU_MONSTERS);
-
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
}
bool hex_spell_fully(void)
{
int k_max = 0;
-
k_max = (p_ptr->lev / 15) + 1;
-
- /* Paranoia */
k_max = MIN(k_max, MAX_KEEP);
-
if (CASTING_HEX_NUM(p_ptr) < k_max) return FALSE;
-
return TRUE;
}
{
msg_print(_("気分が良くなってくる。", "You feel better and better."));
}
- if (cast || cont)
- {
- hp_player(damroll(1, 10));
- set_cut(p_ptr->cut - 10);
- }
+ if (cast || cont) (void)cure_light_wounds(1, 10);
break;
case 2:
}
if (cont)
{
- int rad = 2 + (power / 50);
+ POSITION rad = 2 + (power / 50);
HEX_REVENGE_TURN(p_ptr)--;
{
msg_print(_("気分が良くなってくる。", "You feel better and better."));
}
- if (cast || cont)
- {
- hp_player(damroll(2, 10));
- set_cut((p_ptr->cut / 2) - 10);
- }
+ if (cast || cont) (void)cure_serious_wounds(2, 10);
break;
case 10:
{
msg_print(_("気分が良くなってくる。", "You feel better and better."));
}
- if (cast || cont)
- {
- hp_player(damroll(4, 10));
- set_stun(0);
- set_cut(0);
- set_poisoned(0);
- }
+ if (cast || cont) (void)cure_critical_wounds(damroll(4, 10));
break;
case 18:
if (HEX_REVENGE_TURN(p_ptr) <= 0)
{
- int dir;
+ DIRECTION dir;
if (power)
{