#include "cmd-spell.h"
#include "cmd-quaff.h"
#include "object-hook.h"
+#include "object-curse.h"
+#include "projection.h"
+#include "spells-status.h"
+#include "player-status.h"
#define MAX_KEEP 4 /*!<呪術の最大詠唱数 */
*/
bool stop_hex_spell_all(void)
{
- int i;
+ SPELL_IDX i;
for (i = 0; i < 32; i++)
{
CASTING_HEX_FLAGS(p_ptr) = 0;
CASTING_HEX_NUM(p_ptr) = 0;
- /* Print message */
if (p_ptr->action == ACTION_SPELL) set_action(ACTION_NONE);
- /* Redraw status */
p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
bool stop_hex_spell(void)
{
int spell;
- char choice;
+ char choice = 0;
char out_val[160];
bool flag = FALSE;
- TERM_POSITION y = 1;
- TERM_POSITION x = 20;
+ TERM_LEN y = 1;
+ TERM_LEN x = 20;
int sp[MAX_KEEP];
if (!hex_spelling_any())
}
else
{
-#ifdef JP
- strnfmt(out_val, 78, "どの呪文の詠唱を中断しますか?(呪文 %c-%c, 'l'全て, 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)",
+ 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));
-#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))
CASTING_HEX_NUM(p_ptr)--;
}
- /* Redraw status */
p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
void check_hex(void)
{
int spell;
- s32b need_mana;
+ MANA_POINT need_mana;
u32b need_mana_frac;
bool res = FALSE;
}
}
-
/* Culcurates final mana cost */
need_mana_frac = 0;
s64b_div(&need_mana, &need_mana_frac, 0, 3); /* Divide by 3 */
need_mana += (CASTING_HEX_NUM(p_ptr) - 1);
-
/* Not enough mana */
if (s64b_cmp(p_ptr->csp, p_ptr->csp_frac, need_mana, need_mana_frac) < 0)
{
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);
}
}
if (p_ptr->spell_exp[spell] < SPELL_EXP_BEGINNER)
p_ptr->spell_exp[spell] += 5;
else if(p_ptr->spell_exp[spell] < SPELL_EXP_SKILLED)
- { if (one_in_(2) && (dun_level > 4) && ((dun_level + 10) > p_ptr->lev)) p_ptr->spell_exp[spell] += 1; }
+ { if (one_in_(2) && (current_floor_ptr->dun_level > 4) && ((current_floor_ptr->dun_level + 10) > p_ptr->lev)) p_ptr->spell_exp[spell] += 1; }
else if(p_ptr->spell_exp[spell] < SPELL_EXP_EXPERT)
- { if (one_in_(5) && ((dun_level + 5) > p_ptr->lev) && ((dun_level + 5) > s_ptr->slevel)) p_ptr->spell_exp[spell] += 1; }
+ { if (one_in_(5) && ((current_floor_ptr->dun_level + 5) > p_ptr->lev) && ((current_floor_ptr->dun_level + 5) > s_ptr->slevel)) p_ptr->spell_exp[spell] += 1; }
else if(p_ptr->spell_exp[spell] < SPELL_EXP_MASTER)
- { if (one_in_(5) && ((dun_level + 5) > p_ptr->lev) && (dun_level > s_ptr->slevel)) p_ptr->spell_exp[spell] += 1; }
+ { if (one_in_(5) && ((current_floor_ptr->dun_level + 5) > p_ptr->lev) && (current_floor_ptr->dun_level > s_ptr->slevel)) p_ptr->spell_exp[spell] += 1; }
}
/* Do any effects of continual spells */
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;
}
*/
bool teleport_barrier(MONSTER_IDX m_idx)
{
- monster_type *m_ptr = &m_list[m_idx];
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (!hex_spelling(HEX_ANTI_TELE)) return FALSE;
*/
bool magic_barrier(MONSTER_IDX m_idx)
{
- monster_type *m_ptr = &m_list[m_idx];
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (!hex_spelling(HEX_ANTI_MAGIC)) return FALSE;
*/
bool multiply_barrier(MONSTER_IDX m_idx)
{
- monster_type *m_ptr = &m_list[m_idx];
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (!hex_spelling(HEX_ANTI_MULTI)) return FALSE;
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_CONT / SPELL_STOP)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
*/
-cptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
if (desc) return _("炎のオーラを身にまとい、回復速度が速くなる。", "Gives fire aura and regeneration.");
if (cast)
{
- msg_print(_("体が炎のオーラで覆われた。", "You have enveloped by fiery aura!"));
+ msg_print(_("体が炎のオーラで覆われた。", "You are enveloped by a fiery aura!"));
}
if (stop)
{
- msg_print(_("炎のオーラが消え去った。", "Fiery aura disappeared."));
+ msg_print(_("炎のオーラが消え去った。", "The fiery aura disappeared."));
}
break;
case 3:
if (name) return _("悪臭霧", "Stinking mist");
- if (desc) return _("視界内のモンスターに微弱量の毒のダメージを与える。", "Deals few damages of poison to all monsters in your sight.");
+ if (desc) return _("視界内のモンスターに微弱量の毒のダメージを与える。", "Deals a little poison damage to all monsters in your sight.");
power = plev / 2 + 5;
if (info) return info_damage(1, power, 0);
if (cast || cont)
{
- project_hack(GF_POIS, randint1(power));
+ project_all_los(GF_POIS, randint1(power));
}
break;
if (cast)
{
OBJECT_IDX item;
- cptr q, s;
- char o_name[MAX_NLEN];
+ concptr q, s;
+ GAME_TEXT o_name[MAX_NLEN];
object_type *o_ptr;
u32b f[TR_FLAG_SIZE];
item_tester_hook = item_tester_hook_weapon_except_bow;
q = _("どれを呪いますか?", "Which weapon do you curse?");
- s = _("武器を装備していない。", "You wield no weapons.");
+ s = _("武器を装備していない。", "You're not wielding a weapon.");
- if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
+ o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+ if (!o_ptr) return FALSE;
- o_ptr = &inventory[item];
object_desc(o_name, o_ptr, OD_NAME_ONLY);
object_flags(o_ptr, f);
case 7:
if (name) return _("我慢", "Patience");
if (desc) return _("数ターン攻撃を耐えた後、受けたダメージを地獄の業火として周囲に放出する。",
- "Bursts hell fire strongly after patients any damage while few turns.");
+ "Bursts hell fire strongly after enduring damage for a few turns.");
power = MIN(200, (HEX_REVENGE_POWER(p_ptr) * 2));
if (info) return info_damage(0, 0, power);
if (cast)
if (HEX_REVENGE_TURN(p_ptr) > 0)
{
- msg_print(_("すでに我慢をしている。", "You are already patienting."));
+ msg_print(_("すでに我慢をしている。", "You are already biding your time for vengeance."));
return NULL;
}
HEX_REVENGE_TYPE(p_ptr) = 1;
HEX_REVENGE_TURN(p_ptr) = r;
HEX_REVENGE_POWER(p_ptr) = 0;
- msg_print(_("じっと耐えることにした。", "You decide to patient all damages."));
+ msg_print(_("じっと耐えることにした。", "You decide to endure damage for future retribution."));
add = FALSE;
}
if (cont)
if ((HEX_REVENGE_TURN(p_ptr) <= 0) || (power >= 200))
{
- msg_print(_("我慢が解かれた!", "Time for end of patioence!"));
+ msg_print(_("我慢が解かれた!", "My patience is at an end!"));
if (power)
{
project(0, rad, p_ptr->y, p_ptr->x, power, GF_HELL_FIRE,
/*** 2nd book (8-15) ***/
case 8:
if (name) return _("氷の鎧", "Ice armor");
- if (desc) return _("氷のオーラを身にまとい、防御力が上昇する。", "Gives fire aura and bonus to AC.");
+ if (desc) return _("氷のオーラを身にまとい、防御力が上昇する。", "Surrounds you with an icy aura and gives a bonus to AC.");
if (cast)
{
- msg_print(_("体が氷の鎧で覆われた。", "You have enveloped by ice armor!"));
+ msg_print(_("体が氷の鎧で覆われた。", "You are enveloped by icy armor!"));
}
if (stop)
{
- msg_print(_("氷の鎧が消え去った。", "Ice armor disappeared."));
+ msg_print(_("氷の鎧が消え去った。", "The icy armor disappeared."));
}
break;
break;
case 10:
- if (name) return _("薬品吸入", "Inhail potion");
+ if (name) return _("薬品吸入", "Inhale potion");
if (desc) return _("呪文詠唱を中止することなく、薬の効果を得ることができる。", "Quaffs a potion without canceling of casting a spell.");
if (cast)
{
if (info) return info_damage(1, power, 0);
if (cast || cont)
{
- project_hack(GF_HYPODYNAMIA, randint1(power));
+ project_all_los(GF_HYPODYNAMIA, randint1(power));
}
break;
#ifdef JP
msg_print("武器の輝きが消え去った。");
#else
- msg_format("Brightness of weapon%s disappeared.", (empty_hands(FALSE)) ? "" : "s");
+ msg_format("Your weapon%s.", (empty_hands(FALSE)) ? " no longer glows" : "s no longer glow");
#endif
}
break;
}
if (stop)
{
- msg_print(_("手の輝きがなくなった。", "Brightness on your hands disappeard."));
+ msg_print(_("手の輝きがなくなった。", "Your hands no longer glow."));
}
break;
if (desc) return _("電気のオーラを身にまとい、動きが速くなる。", "Gives lightning aura and a bonus to speed.");
if (cast)
{
- msg_print(_("体が稲妻のオーラで覆われた。", "You have enveloped by electrical aura!"));
+ msg_print(_("体が稲妻のオーラで覆われた。", "You are enveloped by an electrical aura!"));
}
if (stop)
{
- msg_print(_("稲妻のオーラが消え去った。", "Electrical aura disappeared."));
+ msg_print(_("稲妻のオーラが消え去った。", "The electrical aura disappeared."));
}
break;
if (cast)
{
OBJECT_IDX item;
- cptr q, s;
- char o_name[MAX_NLEN];
+ concptr q, s;
+ GAME_TEXT o_name[MAX_NLEN];
object_type *o_ptr;
u32b f[TR_FLAG_SIZE];
item_tester_hook = object_is_armour;
q = _("どれを呪いますか?", "Which piece of armour do you curse?");
- s = _("防具を装備していない。", "You wield no piece of armours.");
+ s = _("防具を装備していない。", "You're not wearing any armor.");
- if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
+ o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+ if (!o_ptr) return FALSE;
o_ptr = &inventory[item];
object_desc(o_name, o_ptr, OD_NAME_ONLY);
if (!o_ptr->k_idx)
{
- msg_print(_("クロークを身につけていない!", "You don't ware any cloak."));
+ msg_print(_("クロークを身につけていない!", "You are not wearing a cloak."));
return NULL;
}
else if (!object_is_cursed(o_ptr))
}
else
{
- msg_print(_("影のオーラを身にまとった。", "You have enveloped by shadow aura!"));
+ msg_print(_("影のオーラを身にまとった。", "You are enveloped by a shadowy aura!"));
}
}
if (cont)
}
if (stop)
{
- msg_print(_("影のオーラが消え去った。", "Shadow aura disappeared."));
+ msg_print(_("影のオーラが消え去った。", "The shadowy aura disappeared."));
}
break;
if (info) return info_damage(1, power, 0);
if (cast || cont)
{
- project_hack(GF_PSI_DRAIN, randint1(power));
+ project_all_los(GF_PSI_DRAIN, randint1(power));
}
break;
flag = TRUE;
}
- for (i = A_STR; i < 6; i++)
+ for (i = A_STR; i < A_MAX; i++)
{
if (p_ptr->stat_cur[i] < p_ptr->stat_max[i])
{
if (p_ptr->stat_cur[i] > p_ptr->stat_max[i])
p_ptr->stat_cur[i] = p_ptr->stat_max[i];
-
- /* Recalculate bonuses */
p_ptr->update |= (PU_BONUS);
flag = TRUE;
if (cont) CASTING_HEX_NUM(p_ptr)--;
if (CASTING_HEX_NUM(p_ptr)) p_ptr->action = ACTION_NONE;
- /* Redraw status */
p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
p_ptr->redraw |= (PR_EXTRA);
if (cast)
{
OBJECT_IDX item;
- cptr s, q;
+ concptr s, q;
u32b f[TR_FLAG_SIZE];
object_type *o_ptr;
q = _("どの装備品から吸収しますか?", "Which cursed equipment do you drain mana from?");
s = _("呪われたアイテムを装備していない。", "You have no cursed equipment.");
- if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
+ o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+ if (!o_ptr) return FALSE;
- o_ptr = &inventory[item];
object_flags(o_ptr, f);
p_ptr->csp += (p_ptr->lev / 5) + randint1(p_ptr->lev / 5);
#ifdef JP
msg_print("武器の渇望が消え去った。");
#else
- msg_format("Thirsty of weapon%s disappeared.", (empty_hands(FALSE)) ? "" : "s");
+ msg_format("Your weapon%s less thirsty now.", (empty_hands(FALSE)) ? " is" : "s are");
#endif
}
break;
int dy = y + ddy_ddd[dir];
int dx = x + ddx_ddd[dir];
if (dir == 5) continue;
- if (cave[dy][dx].m_idx) flag = TRUE;
+ if (current_floor_ptr->grid_array[dy][dx].m_idx) flag = TRUE;
}
- if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
+ if (!cave_empty_bold(y, x) || (current_floor_ptr->grid_array[y][x].info & CAVE_ICKY) ||
(distance(y, x, p_ptr->y, p_ptr->x) > plev + 2))
{
msg_print(_("そこには移動できない。", "Can not teleport to there."));
}
else
{
- msg_print(_("復讐する気が失せた。", "You are not a mood to revenge."));
+ msg_print(_("復讐する気が失せた。", "You are not in the mood for revenge."));
}
HEX_REVENGE_POWER(p_ptr) = 0;
}
if (p_ptr->action != ACTION_SPELL) set_action(ACTION_SPELL);
}
- /* Redraw status */
if (!info)
{
p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);