#include "angband.h"
#include "cmd-spell.h"
+#include "spells-status.h"
+#include "projection.h"
/*!
* @brief 歌の開始を処理する / Start singing if the player is a Bard
/* Now the player is singing */
set_action(ACTION_SING);
-
- /* Recalculate bonuses */
- p_ptr->update |= (PU_BONUS);
-
- /* Redraw status bar */
- p_ptr->redraw |= (PR_STATUS);
-}
-
-/*!
-* @brief 歌の停止を処理する / Stop singing if the player is a Bard
-* @return なし
-*/
-void stop_singing(void)
-{
- if (p_ptr->pclass != CLASS_BARD) return;
-
- /* Are there interupted song? */
- if (INTERUPTING_SONG_EFFECT(p_ptr))
- {
- /* Forget interupted song */
- INTERUPTING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
- return;
- }
-
- /* The player is singing? */
- if (!SINGING_SONG_EFFECT(p_ptr)) return;
-
- /* Hack -- if called from set_action(), avoid recursive loop */
- if (p_ptr->action == ACTION_SING) set_action(ACTION_NONE);
-
- /* Message text of each song or etc. */
- do_spell(REALM_MUSIC, SINGING_SONG_ID(p_ptr), SPELL_STOP);
-
- SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
- SINGING_SONG_ID(p_ptr) = 0;
-
- /* Recalculate bonuses */
p_ptr->update |= (PU_BONUS);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
}
* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP)
* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
*/
-cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
{
bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
bool cont = (mode == SPELL_CONT) ? TRUE : FALSE;
bool stop = (mode == SPELL_STOP) ? TRUE : FALSE;
- static const char s_dam[] = _("損傷:", "dam ");
DIRECTION dir;
PLAYER_LEVEL plev = p_ptr->lev;
}
{
- int power = plev;
+ POWER power = plev;
if (info) return info_power(power);
{
DICE_NUMBER dice = 4 + (plev - 1) / 5;
- int sides = 4;
+ DICE_SID sides = 4;
if (info) return info_damage(dice, sides, 0);
{
DICE_NUMBER dice = plev / 10;
- int sides = 2;
+ DICE_SID sides = 2;
if (info) return info_power_dice(dice, sides);
{
DICE_NUMBER dice = 2;
- int sides = 6;
+ DICE_SID sides = 6;
if (info) return info_heal(dice, sides, 0);
{
DICE_NUMBER dice = 2;
- int sides = plev / 2;
+ DICE_SID sides = plev / 2;
POSITION rad = plev / 10 + 1;
if (info) return info_damage(dice, sides, 0);
}
{
- int power = plev;
+ POWER power = plev;
if (info) return info_power(power);
if (cont)
{
- project_hack(GF_TURN_ALL, power);
+ project_all_los(GF_TURN_ALL, power);
}
}
detect_monsters_invis(rad);
detect_monsters_normal(rad);
- if (plev > 19 && count < 6)
+ if (plev > 19 && count < A_MAX)
SINGING_COUNT(p_ptr) = count + 1;
}
detect_traps(rad, TRUE);
{
DICE_NUMBER dice = 1;
- int sides = plev * 3 / 2;
+ DICE_SID sides = plev * 3 / 2;
if (info) return info_damage(dice, sides, 0);
if (cont)
{
- project_hack(GF_PSI, damroll(dice, sides));
+ project_all_los(GF_PSI, damroll(dice, sides));
}
}
}
{
- int power = plev * 2;
+ POWER power = plev * 2;
if (info) return info_power(power);
{
DICE_NUMBER dice = 10 + plev / 5;
- int sides = 7;
+ DICE_SID sides = 7;
if (info) return info_damage(dice, sides, 0);
if (cont)
{
- project_hack(GF_SOUND, damroll(dice, sides));
+ project_all_los(GF_SOUND, damroll(dice, sides));
}
}
{
DICE_NUMBER dice = 10 + plev / 15;
- int sides = 6;
+ DICE_SID sides = 6;
if (info) return info_power_dice(dice, sides);
{
POSITION rad = plev / 15 + 1;
- int power = plev * 3 + 1;
+ POWER power = plev * 3 + 1;
if (info) return info_radius(rad);
}
{
- int m_sides = plev * 3;
- int e_sides = plev * 3;
+ DICE_SID m_sides = plev * 3;
+ DICE_SID e_sides = plev * 3;
if (info) return format("%s1d%d+1d%d", s_dam, m_sides, e_sides);
}
{
- int power = plev;
+ POWER power = plev;
if (info) return info_power(power);
{
DICE_NUMBER dice = 15 + (plev - 1) / 2;
- int sides = 10;
+ DICE_SID sides = 10;
if (info) return info_damage(dice, sides, 0);
{
int base = 15;
- int sides = 20;
+ DICE_SID sides = 20;
if (info) return info_delay(base, sides);
}
{
- int power = plev * 4;
+ POWER power = plev * 4;
if (info) return info_power(power);
{
DICE_NUMBER dice = 1;
- int sides = plev * 3;
+ DICE_SID sides = plev * 3;
if (info) return info_damage(dice, sides, 0);
{
DICE_NUMBER dice = 15;
- int sides = 10;
+ DICE_SID sides = 10;
if (info) return info_heal(dice, sides, 0);
{
DICE_NUMBER dice = 50 + plev;
- int sides = 10;
+ DICE_SID sides = 10;
POSITION rad = 0;
if (info) return info_damage(dice, sides, 0);
msg_print(_("フィンゴルフィンの冥王への挑戦を歌った...",
"You recall the valor of Fingolfin's challenge to the Dark Lord..."));
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
-
- /* Update monsters */
p_ptr->update |= (PU_MONSTERS);
-
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
start_singing(spell, MUSIC_INVULN);
if (!p_ptr->invuln)
{
msg_print(_("無敵ではなくなった。", "The invulnerability wears off."));
- /* Redraw map */
- p_ptr->redraw |= (PR_MAP);
- /* Update monsters */
+ p_ptr->redraw |= (PR_MAP);
p_ptr->update |= (PU_MONSTERS);
-
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
}