if (s_ptr->slevel >= 99) continue;
spell_exp = p_ptr->spell_exp[i];
exp_level = spell_exp_level(spell_exp);
- fprintf(fff, "%-25s ", do_spell(p_ptr->realm1, i, SPELL_NAME));
+ fprintf(fff, "%-25s ", exe_spell(p_ptr->realm1, i, SPELL_NAME));
if (p_ptr->realm1 == REALM_HISSATSU)
fprintf(fff, "[--]");
else
spell_exp = p_ptr->spell_exp[i + 32];
exp_level = spell_exp_level(spell_exp);
- fprintf(fff, "%-25s ", do_spell(p_ptr->realm2, i, SPELL_NAME));
+ fprintf(fff, "%-25s ", exe_spell(p_ptr->realm2, i, SPELL_NAME));
if (exp_level >= EXP_LEVEL_EXPERT) fprintf(fff, "!");
else fprintf(fff, " ");
fprintf(fff, "%s", exp_level_str[exp_level]);
/* Dump the spell --(-- */
strcat(psi_desc, format(" %-18s%2d %3d",
- do_spell(REALM_HISSATSU, i, SPELL_NAME),
+ exe_spell(REALM_HISSATSU, i, SPELL_NAME),
spell.slevel, spell.smana));
prt(psi_desc, y + (line%17) + (line >= 17), x+(line/17)*30);
prt("", y + (line%17) + (line >= 17) + 1, x+(line/17)*30);
char tmp_val[160];
/* Prompt */
- (void) strnfmt(tmp_val, 78, _("%sを使いますか?", "Use %s? "), do_spell(REALM_HISSATSU, j, SPELL_NAME));
+ (void) strnfmt(tmp_val, 78, _("%sを使いますか?", "Use %s? "), exe_spell(REALM_HISSATSU, j, SPELL_NAME));
/* Belay that order */
if (!get_check(tmp_val)) continue;
sound(SOUND_ZAP);
- if (!do_spell(REALM_HISSATSU, n, SPELL_CAST)) return;
+ if (!exe_spell(REALM_HISSATSU, n, SPELL_CAST)) return;
take_turn(p_ptr, 100);
p_ptr->spell_learned1 |= (1L << i);
p_ptr->spell_worked1 |= (1L << i);
- msg_format(_("%sの技を覚えた。", "You have learned the special attack of %s."), do_spell(REALM_HISSATSU, i, SPELL_NAME));
+ msg_format(_("%sの技を覚えた。", "You have learned the special attack of %s."), exe_spell(REALM_HISSATSU, i, SPELL_NAME));
for (j = 0; j < 64; j++)
{
/* Stop at the first empty space */
* @param mode 求める処理
* @return 各領域魔法に各種テキストを求めた場合は文字列参照ポインタ、そうでない場合はNULLポインタを返す。
*/
-concptr do_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode)
+concptr exe_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode)
{
switch (realm)
{
jverb(prompt, jverb_buf, JVERB_AND);
/* 英日切り替え機能に対応 */
(void)strnfmt(tmp_val, 78, "%s(MP%d, 失敗率%d%%)を%sますか? ",
- do_spell(use_realm, spell, SPELL_NAME), need_mana,
+ exe_spell(use_realm, spell, SPELL_NAME), need_mana,
spell_chance(spell, use_realm), jverb_buf);
#else
(void)strnfmt(tmp_val, 78, "%^s %s (%d mana, %d%% fail)? ",
- prompt, do_spell(use_realm, spell, SPELL_NAME), need_mana,
+ prompt, exe_spell(use_realm, spell, SPELL_NAME), need_mana,
spell_chance(spell, use_realm));
#endif
Term_erase(14, 12, 255);
Term_erase(14, 11, 255);
- roff_to_buf(do_spell(use_realm, spell, SPELL_DESC), 62, temp, sizeof(temp));
+ roff_to_buf(exe_spell(use_realm, spell, SPELL_DESC), 62, temp, sizeof(temp));
for (j = 0, line = 11; temp[j]; j += 1 + strlen(&temp[j]))
{
int max_exp = (spell < 32) ? SPELL_EXP_MASTER : SPELL_EXP_EXPERT;
int old_exp = p_ptr->spell_exp[spell];
int new_rank = EXP_LEVEL_UNSKILLED;
- concptr name = do_spell(increment ? p_ptr->realm2 : p_ptr->realm1, spell % 32, SPELL_NAME);
+ concptr name = exe_spell(increment ? p_ptr->realm2 : p_ptr->realm1, spell % 32, SPELL_NAME);
if (old_exp >= max_exp)
{
if (mp_ptr->spell_book == TV_MUSIC_BOOK)
{
msg_format("%sを学んだ。",
- do_spell(increment ? p_ptr->realm2 : p_ptr->realm1, spell % 32, SPELL_NAME));
+ exe_spell(increment ? p_ptr->realm2 : p_ptr->realm1, spell % 32, SPELL_NAME));
}
else
{
msg_format("%sの%sを学んだ。",
- do_spell(increment ? p_ptr->realm2 : p_ptr->realm1, spell % 32, SPELL_NAME), p);
+ exe_spell(increment ? p_ptr->realm2 : p_ptr->realm1, spell % 32, SPELL_NAME), p);
}
#else
msg_format("You have learned the %s of %s.",
- p, do_spell(increment ? p_ptr->realm2 : p_ptr->realm1, spell % 32, SPELL_NAME));
+ p, exe_spell(increment ? p_ptr->realm2 : p_ptr->realm1, spell % 32, SPELL_NAME));
#endif
}
}
/* Failure casting may activate some side effect */
- do_spell(realm, spell, SPELL_FAIL);
+ exe_spell(realm, spell, SPELL_FAIL);
if ((o_ptr->tval == TV_CHAOS_BOOK) && (randint1(100) < spell))
else
{
/* Canceled spells cost neither a current_world_ptr->game_turn nor mana */
- if (!do_spell(realm, spell, SPELL_CAST)) return;
+ if (!exe_spell(realm, spell, SPELL_CAST)) return;
if (randint1(100) < chance)
chg_virtue(p_ptr, V_CHANCE, 1);
#define SPELL_FAIL 4
#define SPELL_STOP 5
#define SPELL_CONT 6
-extern concptr do_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode);
+extern concptr exe_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode);
extern concptr info_string_dice(concptr str, DICE_NUMBER dice, DICE_SID sides, int base);
extern concptr info_damage(DICE_NUMBER dice, DICE_SID sides, int base);
{ 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 song */
- do_spell(REALM_MUSIC, spell, SPELL_CONT);
+ exe_spell(REALM_MUSIC, spell, SPELL_CONT);
}
/*!
}
#ifdef JP
- msg_format("%sの%sを忘れてしまった。", do_spell(which, j % 32, SPELL_NAME), p);
+ msg_format("%sの%sを忘れてしまった。", exe_spell(which, j % 32, SPELL_NAME), p);
#else
- msg_format("You have forgotten the %s of %s.", p, do_spell(which, j % 32, SPELL_NAME));
+ msg_format("You have forgotten the %s of %s.", p, exe_spell(which, j % 32, SPELL_NAME));
#endif
}
#ifdef JP
- msg_format("%sの%sを忘れてしまった。", do_spell(which, j % 32, SPELL_NAME), p);
+ msg_format("%sの%sを忘れてしまった。", exe_spell(which, j % 32, SPELL_NAME), p);
#else
- msg_format("You have forgotten the %s of %s.", p, do_spell(which, j % 32, SPELL_NAME));
+ msg_format("You have forgotten the %s of %s.", p, exe_spell(which, j % 32, SPELL_NAME));
#endif
}
#ifdef JP
- msg_format("%sの%sを思い出した。", do_spell(which, j % 32, SPELL_NAME), p);
+ msg_format("%sの%sを思い出した。", exe_spell(which, j % 32, SPELL_NAME), p);
#else
- msg_format("You have remembered the %s of %s.", p, do_spell(which, j % 32, SPELL_NAME));
+ msg_format("You have remembered the %s of %s.", p, exe_spell(which, j % 32, SPELL_NAME));
#endif
for (i = 0; i < 32; i++)
{
- if (hex_spelling(i)) do_spell(REALM_HEX, i, SPELL_STOP);
+ if (hex_spelling(i)) exe_spell(REALM_HEX, i, SPELL_STOP);
}
CASTING_HEX_FLAGS(p_ptr) = 0;
if (hex_spelling(spell))
{
Term_erase(x, y + n + 1, 255);
- put_str(format("%c) %s", I2A(n), do_spell(REALM_HEX, spell, SPELL_NAME)), y + n + 1, x + 2);
+ put_str(format("%c) %s", I2A(n), exe_spell(REALM_HEX, spell, SPELL_NAME)), y + n + 1, x + 2);
sp[n++] = spell;
}
}
{
int n = sp[A2I(choice)];
- do_spell(REALM_HEX, n, SPELL_STOP);
+ exe_spell(REALM_HEX, n, SPELL_STOP);
CASTING_HEX_FLAGS(p_ptr) &= ~(1L << n);
CASTING_HEX_NUM(p_ptr)--;
}
{
if (hex_spelling(spell))
{
- do_spell(REALM_HEX, spell, SPELL_CONT);
+ exe_spell(REALM_HEX, spell, SPELL_CONT);
}
}
}
switch(HEX_REVENGE_TYPE(p_ptr))
{
- case 1: do_spell(REALM_HEX, HEX_PATIENCE, SPELL_CONT); break;
- case 2: do_spell(REALM_HEX, HEX_REVENGE, SPELL_CONT); break;
+ case 1: exe_spell(REALM_HEX, HEX_PATIENCE, SPELL_CONT); break;
+ case 2: exe_spell(REALM_HEX, HEX_REVENGE, SPELL_CONT); break;
}
}
if ((!o_ptr->k_idx) || (!object_is_cursed(o_ptr)))
{
- do_spell(REALM_HEX, spell, SPELL_STOP);
+ exe_spell(REALM_HEX, spell, SPELL_STOP);
CASTING_HEX_FLAGS(p_ptr) &= ~(1L << spell);
CASTING_HEX_NUM(p_ptr)--;
if (!SINGING_SONG_ID(p_ptr)) set_action(p_ptr, ACTION_NONE);
if (!flag)
{
- msg_format(_("%sの呪文の詠唱をやめた。", "Finish casting '%^s'."), do_spell(REALM_HEX, HEX_RESTORE, SPELL_NAME));
+ msg_format(_("%sの呪文の詠唱をやめた。", "Finish casting '%^s'."), exe_spell(REALM_HEX, HEX_RESTORE, SPELL_NAME));
CASTING_HEX_FLAGS(p_ptr) &= ~(1L << HEX_RESTORE);
if (cont) CASTING_HEX_NUM(p_ptr)--;
if (CASTING_HEX_NUM(p_ptr)) p_ptr->action = ACTION_NONE;
if (creature_ptr->action == ACTION_SING) set_action(p_ptr, ACTION_NONE);
/* Message text of each song or etc. */
- do_spell(REALM_MUSIC, SINGING_SONG_ID(creature_ptr), SPELL_STOP);
+ exe_spell(REALM_MUSIC, SINGING_SONG_ID(creature_ptr), SPELL_STOP);
SINGING_SONG_EFFECT(creature_ptr) = MUSIC_NONE;
SINGING_SONG_ID(creature_ptr) = 0;
s_ptr = &mp_ptr->info[((j < 1) ? p_ptr->realm1 : p_ptr->realm2) - 1][i % 32];
}
- strcpy(name, do_spell((j < 1) ? p_ptr->realm1 : p_ptr->realm2, i % 32, SPELL_NAME));
+ strcpy(name, exe_spell((j < 1) ? p_ptr->realm1 : p_ptr->realm2, i % 32, SPELL_NAME));
/* Illegible */
if (s_ptr->slevel >= 99)
/* XXX XXX Could label spells above the players level */
/* Get extra info */
- strcpy(info, do_spell(use_realm, spell, SPELL_INFO));
+ strcpy(info, exe_spell(use_realm, spell, SPELL_INFO));
/* Use that info */
comment = info;
if (use_realm == REALM_HISSATSU)
{
strcat(out_val, format("%-25s %2d %4d",
- do_spell(use_realm, spell, SPELL_NAME), /* realm, spell */
+ exe_spell(use_realm, spell, SPELL_NAME), /* realm, spell */
s_ptr->slevel, need_mana));
}
else
{
strcat(out_val, format("%-25s%c%-4s %2d %4d %3d%% %s",
- do_spell(use_realm, spell, SPELL_NAME), /* realm, spell */
+ exe_spell(use_realm, spell, SPELL_NAME), /* realm, spell */
(max ? '!' : ' '), ryakuji,
s_ptr->slevel, need_mana, spell_chance(spell, use_realm), comment));
}