#include "angband.h"
#include "spells-summon.h"
+#include "projection.h"
+#include "avatar.h"
+#include "spells-status.h"
+#include "cmd-spell.h"
+#include "player-status.h"
#define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) /*!< モンスター魔法をプレイヤーが使用する場合の換算レベル */
int dice_div = monspell_bluemage_damage(SPELL_NUM, plev, DICE_DIV);
char dmg_str[80];
dice_to_string(base_damage, dice_num, dice_side, dice_mult, dice_div, dmg_str);
- sprintf(tmp, msg, dmg_str);
+ sprintf(tmp, " %s %s", msg, dmg_str);
}
/*!
{
PLAYER_LEVEL plev = pseudo_plev();
-#ifdef JP
- concptr s_dam = " 損傷:%s";
- concptr s_dur = "期間:";
- concptr s_range = "範囲:";
- concptr s_heal = " 回復:%s";
-#else
- concptr s_dam = " dam %s";
- concptr s_dur = "dur ";
- concptr s_range = "range ";
- concptr s_heal = " heal %s";
-#endif
-
strcpy(p, "");
switch (power)
case MS_BALL_MANA:
case MS_BALL_DARK:
case MS_STARBURST:
- set_bluemage_damage((power), plev, s_dam, p); break;
+ set_bluemage_damage((power), plev, KWD_DAM, p); break;
case MS_DISPEL:
break;
case MS_ROCKET:
case MS_BALL_POIS:
case MS_BALL_NETHER:
case MS_BALL_WATER:
- set_bluemage_damage((power), plev, s_dam, p); break;
+ set_bluemage_damage((power), plev, KWD_DAM, p); break;
case MS_DRAIN_MANA:
- set_bluemage_damage((power), plev, s_heal, p); break;
+ set_bluemage_damage((power), plev, KWD_HEAL, p); break;
case MS_MIND_BLAST:
case MS_BRAIN_SMASH:
case MS_CAUSE_1:
case MS_BOLT_PLASMA:
case MS_BOLT_ICE:
case MS_MAGIC_MISSILE:
- set_bluemage_damage((power), plev, s_dam, p); break;
+ set_bluemage_damage((power), plev, KWD_DAM, p); break;
case MS_SPEED:
- sprintf(p, " %sd%d+%d", s_dur, 20+plev, plev);
+ sprintf(p, " %sd%d+%d", KWD_DURATION, 20+plev, plev);
break;
case MS_HEAL:
- set_bluemage_damage((power), plev, s_heal, p); break;
+ set_bluemage_damage((power), plev, KWD_HEAL, p); break;
case MS_INVULNER:
- sprintf(p, " %sd7+7", s_dur);
+ sprintf(p, " %sd7+7", KWD_DURATION);
break;
case MS_BLINK:
- sprintf(p, " %s10", s_range);
+ sprintf(p, " %s10", KWD_SPHERE);
break;
case MS_TELEPORT:
- sprintf(p, " %s%d", s_range, plev * 5);
+ sprintf(p, " %s%d", KWD_SPHERE, plev * 5);
break;
case MS_PSY_SPEAR:
- set_bluemage_damage((power), plev, s_dam, p); break;
+ set_bluemage_damage((power), plev, KWD_DAM, p); break;
break;
case MS_RAISE_DEAD:
- sprintf(p, " %s5", s_range);
+ sprintf(p, " %s5", KWD_SPHERE);
break;
default:
break;
MONSTER_IDX m_idx;
if (!target_set(TARGET_KILL)) return FALSE;
- m_idx = cave[target_row][target_col].m_idx;
+ m_idx = current_floor_ptr->grid_array[target_row][target_col].m_idx;
if (!m_idx) break;
if (!player_has_los_bold(target_row, target_col)) break;
if (!projectable(p_ptr->y, p_ptr->x, target_row, target_col)) break;
teleport_player(plev * 5, 0L);
break;
case MS_WORLD:
- world_player = TRUE;
- msg_print(_("「時よ!」", "'Time!'"));
- msg_print(NULL);
-
- /* Hack */
- p_ptr->energy_need -= 1000 + (100 + randint1(200)+200)*TURNS_PER_TICK/10;
-
- p_ptr->redraw |= (PR_MAP);
- p_ptr->update |= (PU_MONSTERS);
-
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
- handle_stuff();
+ (void)time_walk(p_ptr);
break;
case MS_SPECIAL:
break;
GAME_TEXT m_name[MAX_NLEN];
if (!target_set(TARGET_KILL)) return FALSE;
- if (!cave[target_row][target_col].m_idx) break;
+ if (!current_floor_ptr->grid_array[target_row][target_col].m_idx) break;
if (!player_has_los_bold(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];
+ m_ptr = &m_list[current_floor_ptr->grid_array[target_row][target_col].m_idx];
r_ptr = &r_info[m_ptr->r_idx];
monster_desc(m_name, m_ptr, 0);
if (r_ptr->flagsr & RFR_RES_TELE)
}
}
msg_format(_("%sを引き戻した。", "You command %s to return."), m_name);
- teleport_monster_to(cave[target_row][target_col].m_idx, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
+ teleport_monster_to(current_floor_ptr->grid_array[target_row][target_col].m_idx, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
break;
}
case MS_TELE_AWAY:
(void)fire_beam(GF_AWAY_ALL, dir, 100);
break;
- case MS_TELE_LEVEL:
- {
- MONSTER_IDX target_m_idx;
- monster_type *m_ptr;
- monster_race *r_ptr;
- GAME_TEXT m_name[MAX_NLEN];
-
- if (!target_set(TARGET_KILL)) return FALSE;
- 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(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);
- msg_format(_("%^sの足を指さした。", "You gesture at %^s's feet."), m_name);
- if ((r_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE)) ||
- (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint1(50) > plev + randint1(60)))
- {
- msg_format(_("しかし効果がなかった!", "%^s is unaffected!"), m_name);
- }
- else teleport_level(target_m_idx);
+ case MS_TELE_LEVEL:
+ return teleport_level_other(p_ptr);
break;
- }
+
case MS_PSY_SPEAR:
if (!get_aim_dir(&dir)) return FALSE;
{
int k;
msg_print(_("アリを召喚した。", "You summon ants."));
- for (k = 0;k < 1; k++)
+ for (k = 0; k < 1; k++)
if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode), '\0'))
{
if (!pet)
bool cast;
MANA_POINT need_mana;
-
- /* not if confused */
- if (p_ptr->confused)
- {
- msg_print(_("混乱していて唱えられない!", "You are too confused!"));
- return TRUE;
- }
+ if (cmd_limit_confused(p_ptr)) return FALSE;
/* get power */
if (!get_learned_power(&n)) return FALSE;
}
}
- p_ptr->energy_use = 100;
+ take_turn(p_ptr, 100);
p_ptr->redraw |= (PR_MANA);
- p_ptr->window |= (PW_PLAYER);
- p_ptr->window |= (PW_SPELL);
+ p_ptr->window |= (PW_PLAYER | PW_SPELL);
return TRUE;
}