*/
#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) /*!< モンスター魔法をプレイヤーが使用する場合の換算レベル */
* @param tmp 返すメッセージを格納する配列
* @return なし
*/
-void set_bluemage_damage(int SPELL_NUM, int plev, cptr msg, char* tmp)
+void set_bluemage_damage(int SPELL_NUM, PLAYER_LEVEL plev, concptr msg, char* tmp)
{
int base_damage = monspell_bluemage_damage(SPELL_NUM, plev, BASE_DAM);
int dice_num = monspell_bluemage_damage(SPELL_NUM, plev, DICE_NUM);
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);
}
/*!
*/
static void learned_info(char *p, int power)
{
- int plev = pseudo_plev();
-
-#ifdef JP
- cptr s_dam = " 損傷:%s";
- cptr s_dur = "期間:";
- cptr s_range = "範囲:";
- cptr s_heal = " 回復:%s";
-#else
- cptr s_dam = " dam %s";
- cptr s_dur = "dur ";
- cptr s_range = "range ";
- cptr s_heal = " heal %s";
-#endif
+ PLAYER_LEVEL plev = pseudo_plev();
strcpy(p, "");
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;
* when you run it. It's probably easy to fix but I haven't tried,\n
* sorry.\n
*/
-static int get_learned_power(IDX *sn)
+static bool get_learned_power(SPELL_IDX *sn)
{
int i = 0;
int num = 0;
- int y = 1;
- int x = 18;
- int minfail = 0;
- int plev = p_ptr->lev;
- int chance = 0;
+ TERM_LEN y = 1;
+ TERM_LEN x = 18;
+ PERCENTAGE minfail = 0;
+ PLAYER_LEVEL plev = p_ptr->lev;
+ PERCENTAGE chance = 0;
int ask = TRUE, mode = 0;
int spellnum[MAX_MONSPELLS];
char ch;
char choice;
char out_val[160];
char comment[80];
- s32b f4 = 0, f5 = 0, f6 = 0;
- cptr p = _("魔法", "magic");
-
+ BIT_FLAGS f4 = 0L, f5 = 0L, f6 = 0L;
+ concptr p = _("魔法", "magic");
+ COMMAND_CODE code;
monster_power spell;
bool flag, redraw;
int menu_line = (use_menu ? 1 : 0);
/* No redraw yet */
redraw = FALSE;
-#ifdef ALLOW_REPEAT /* TNB */
-
/* Get the spell, if available */
- if (repeat_pull(sn))
+
+ if (repeat_pull(&code))
{
- /* Success */
+ *sn = (SPELL_IDX)code;
return (TRUE);
}
-#endif /* ALLOW_REPEAT -- TNB */
-
if (use_menu)
{
screen_save();
while(!mode)
{
-#ifdef JP
- prt(format(" %s ボルト", (menu_line == 1) ? "》" : " "), 2, 14);
- prt(format(" %s ボール", (menu_line == 2) ? "》" : " "), 3, 14);
- prt(format(" %s ブレス", (menu_line == 3) ? "》" : " "), 4, 14);
- prt(format(" %s 召喚", (menu_line == 4) ? "》" : " "), 5, 14);
- prt(format(" %s その他", (menu_line == 5) ? "》" : " "), 6, 14);
- prt("どの種類の魔法を使いますか?", 0, 0);
-#else
- prt(format(" %s bolt", (menu_line == 1) ? "> " : " "), 2, 14);
- prt(format(" %s ball", (menu_line == 2) ? "> " : " "), 3, 14);
- prt(format(" %s breath", (menu_line == 3) ? "> " : " "), 4, 14);
- prt(format(" %s sommoning", (menu_line == 4) ? "> " : " "), 5, 14);
- prt(format(" %s others", (menu_line == 5) ? "> " : " "), 6, 14);
- prt("use which type of magic? ", 0, 0);
-#endif
+ prt(format(_(" %s ボルト", " %s bolt"), (menu_line == 1) ? _("》", "> ") : " "), 2, 14);
+ prt(format(_(" %s ボール", " %s ball"), (menu_line == 2) ? _("》", "> ") : " "), 3, 14);
+ prt(format(_(" %s ブレス", " %s breath"), (menu_line == 3) ? _("》", "> ") : " "), 4, 14);
+ prt(format(_(" %s 召喚", " %s sommoning"), (menu_line == 4) ? _("》", "> ") : " "), 5, 14);
+ prt(format(_(" %s その他", " %s others"), (menu_line == 5) ? _("》", "> ") : " "), 6, 14);
+ prt(_("どの種類の魔法を使いますか?", "use which type of magic? "), 0, 0);
+
choice = inkey();
switch(choice)
{
}
/* Build a prompt (accept all spells) */
- (void)strnfmt(out_val, 78,
- _("(%c-%c, '*'で一覧, ESC) どの%sを唱えますか?", "(%c-%c, *=List, ESC=exit) Use which %s? "),
- I2A(0), I2A(num - 1), p);
+ (void)strnfmt(out_val, 78, _("(%c-%c, '*'で一覧, ESC) どの%sを唱えますか?", "(%c-%c, *=List, ESC=exit) Use which %s? "),
+ I2A(0), I2A(num - 1), p);
if (use_menu) screen_save();
if (!redraw || use_menu)
{
char psi_desc[80];
-
- /* Show list */
redraw = TRUE;
-
- /* Save the screen */
if (!use_menu) screen_save();
/* Display a list of spells */
{
/* Hide list */
redraw = FALSE;
-
- /* Restore the screen */
screen_load();
}
ask = isupper(choice);
/* Lowercase */
- if (ask) choice = tolower(choice);
+ if (ask) choice = (char)tolower(choice);
/* Extract request */
i = (islower(choice) ? A2I(choice) : -1);
/* Stop the loop */
flag = TRUE;
}
-
- /* Restore the screen */
if (redraw) screen_load();
- /* Show choices */
p_ptr->window |= (PW_SPELL);
-
- /* Window stuff */
- window_stuff();
+ handle_stuff();
/* Abort if needed */
if (!flag) return (FALSE);
/* Save the choice */
(*sn) = spellnum[i];
-#ifdef ALLOW_REPEAT /* TNB */
-
- repeat_push(*sn);
-
-#endif /* ALLOW_REPEAT -- TNB */
+ repeat_push((COMMAND_CODE)spellnum[i]);
/* Success */
return (TRUE);
*/
static bool cast_learned_spell(int spell, bool success)
{
- int dir;
- int plev = pseudo_plev();
- int summon_lev = p_ptr->lev * 2 / 3 + randint1(p_ptr->lev/2);
- int damage = 0;
- bool pet = success;
- bool no_trump = FALSE;
- u32b p_mode, u_mode = 0L, g_mode;
+ DIRECTION dir;
+ PLAYER_LEVEL plev = pseudo_plev();
+ PLAYER_LEVEL summon_lev = p_ptr->lev * 2 / 3 + randint1(p_ptr->lev/2);
+ HIT_POINT damage = 0;
+ bool pet = success;
+ bool no_trump = FALSE;
+ BIT_FLAGS p_mode, u_mode = 0L, g_mode;
if (pet)
{
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;
msg_print(_("酸のブレスを吐いた。", "You breathe acid."));
damage = monspell_bluemage_damage((MS_BR_ACID), plev, DAM_ROLL);
- fire_ball(GF_ACID, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_ACID, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_ELEC:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("稲妻のブレスを吐いた。", "You breathe lightning."));
damage = monspell_bluemage_damage((MS_BR_ELEC), plev, DAM_ROLL);
- fire_ball(GF_ELEC, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_ELEC, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_FIRE:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("火炎のブレスを吐いた。", "You breathe fire."));
damage = monspell_bluemage_damage((MS_BR_FIRE), plev, DAM_ROLL);
- fire_ball(GF_FIRE, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_FIRE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_COLD:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("冷気のブレスを吐いた。", "You breathe frost."));
damage = monspell_bluemage_damage((MS_BR_COLD), plev, DAM_ROLL);
- fire_ball(GF_COLD, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_COLD, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_POIS:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("ガスのブレスを吐いた。", "You breathe gas."));
damage = monspell_bluemage_damage((MS_BR_POIS), plev, DAM_ROLL);
- fire_ball(GF_POIS, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_POIS, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_NETHER:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("地獄のブレスを吐いた。", "You breathe nether."));
damage = monspell_bluemage_damage((MS_BR_NETHER), plev, DAM_ROLL);
- fire_ball(GF_NETHER, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_NETHER, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_LITE:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("閃光のブレスを吐いた。", "You breathe light."));
damage = monspell_bluemage_damage((MS_BR_LITE), plev, DAM_ROLL);
- fire_ball(GF_LITE, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_LITE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_DARK:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("暗黒のブレスを吐いた。", "You breathe darkness."));
damage = monspell_bluemage_damage((MS_BR_DARK), plev, DAM_ROLL);
- fire_ball(GF_DARK, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_DARK, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_CONF:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("混乱のブレスを吐いた。", "You breathe confusion."));
damage = monspell_bluemage_damage((MS_BR_CONF), plev, DAM_ROLL);
- fire_ball(GF_CONFUSION, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_CONFUSION, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_SOUND:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("轟音のブレスを吐いた。", "You breathe sound."));
damage = monspell_bluemage_damage((MS_BR_SOUND), plev, DAM_ROLL);
- fire_ball(GF_SOUND, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_SOUND, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_CHAOS:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("カオスのブレスを吐いた。", "You breathe chaos."));
damage = monspell_bluemage_damage((MS_BR_CHAOS), plev, DAM_ROLL);
- fire_ball(GF_CHAOS, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_CHAOS, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_DISEN:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("劣化のブレスを吐いた。", "You breathe disenchantment."));
damage = monspell_bluemage_damage((MS_BR_DISEN), plev, DAM_ROLL);
- fire_ball(GF_DISENCHANT, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_DISENCHANT, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_NEXUS:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("因果混乱のブレスを吐いた。", "You breathe nexus."));
damage = monspell_bluemage_damage((MS_BR_NEXUS), plev, DAM_ROLL);
- fire_ball(GF_NEXUS, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_NEXUS, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_TIME:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
damage = monspell_bluemage_damage((MS_BR_TIME), plev, DAM_ROLL);
- fire_ball(GF_TIME, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_TIME, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_INERTIA:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
damage = monspell_bluemage_damage((MS_BR_INERTIA), plev, DAM_ROLL);
- fire_ball(GF_INERTIAL, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_INERTIAL, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_GRAVITY:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));
damage = monspell_bluemage_damage((MS_BR_GRAVITY), plev, DAM_ROLL);
- fire_ball(GF_GRAVITY, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_GRAVITY, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_SHARDS:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
damage = monspell_bluemage_damage((MS_BR_SHARDS), plev, DAM_ROLL);
- fire_ball(GF_SHARDS, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_SHARDS, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_PLASMA:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
damage = monspell_bluemage_damage((MS_BR_PLASMA), plev, DAM_ROLL);
- fire_ball(GF_PLASMA, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_PLASMA, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_FORCE:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
damage = monspell_bluemage_damage((MS_BR_FORCE), plev, DAM_ROLL);
- fire_ball(GF_FORCE, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_FORCE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_MANA:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
damage = monspell_bluemage_damage((MS_BR_MANA), plev, DAM_ROLL);
- fire_ball(GF_MANA, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_MANA, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BALL_NUKE:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
damage = monspell_bluemage_damage((MS_BR_NUKE), plev, DAM_ROLL);
- fire_ball(GF_NUKE, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_NUKE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BALL_CHAOS:
if (!get_aim_dir(&dir)) return FALSE;
msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
damage = monspell_bluemage_damage((MS_BR_DISI), plev, DAM_ROLL);
- fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 40 ? -3 : -2));
+ fire_breath(GF_DISINTEGRATE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BALL_ACID:
if (!get_aim_dir(&dir)) return FALSE;
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;
-
- /* Redraw map */
- p_ptr->redraw |= (PR_MAP);
-
- /* Update monsters */
- p_ptr->update |= (PU_MONSTERS);
-
- /* Window stuff */
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
- handle_stuff();
+ (void)time_walk(p_ptr);
break;
case MS_SPECIAL:
break;
{
monster_type *m_ptr;
monster_race *r_ptr;
- char m_name[80];
+ 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 = ¤t_floor_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:
- {
- int target_m_idx;
- monster_type *m_ptr;
- monster_race *r_ptr;
- char m_name[80];
- 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;
msg_print(_("サイバーデーモンを召喚した!", "You summon a Cyberdemon!"));
for (k = 0 ;k < 1 ; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_CYBER, p_mode))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_CYBER, p_mode, '\0'))
{
if (!pet)
msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon are angry!"));
int k;
msg_print(_("仲間を召喚した。", "You summon help."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, 0, p_mode))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, 0, p_mode, '\0'))
{
if (!pet)
msg_print(_("召喚されたモンスターは怒っている!", "The summoned monster is angry!"));
int k;
msg_print(_("モンスターを召喚した!", "You summon monsters!"));
for (k = 0;k < plev / 15 + 2; k++)
- if(summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, 0, (p_mode | u_mode)))
+ if(summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, 0, (p_mode | u_mode), '\0'))
{
if (!pet)
msg_print(_("召喚されたモンスターは怒っている!", "The summoned monsters are angry!"));
{
int k;
msg_print(_("アリを召喚した。", "You summon ants."));
- 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)))
+ 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)
msg_print(_("召喚されたアリは怒っている!", "The summoned ants are angry!"));
int k;
msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode), '\0'))
{
if (!pet)
msg_print(_("召喚された蜘蛛は怒っている!", "Summoned spiders are angry!"));
int k;
msg_print(_("ハウンドを召喚した。", "You summon hounds."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode), '\0'))
{
if (!pet)
msg_print(_("召喚されたハウンドは怒っている!", "Summoned hounds are angry!"));
int k;
msg_print(_("ヒドラを召喚した。", "You summon a hydras."));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HYDRA, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HYDRA, (g_mode | p_mode), '\0'))
{
if (!pet)
msg_print(_("召喚されたヒドラは怒っている!", "Summoned hydras are angry!"));
int k;
msg_print(_("天使を召喚した!", "You summon an angel!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_ANGEL, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_ANGEL, (g_mode | p_mode), '\0'))
{
if (!pet)
msg_print(_("召喚された天使は怒っている!", "Summoned angels are angry!"));
int k;
msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_DEMON, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_DEMON, (g_mode | p_mode), '\0'))
{
if (!pet)
msg_print(_("召喚されたデーモンは怒っている!", "Summoned demons are angry!"));
int k;
msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode), '\0'))
{
if (!pet)
msg_print(_("召喚されたアンデッドは怒っている!", "Summoned undeads are angry!"));
int k;
msg_print(_("ドラゴンを召喚した!", "You summon a dragon!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_DRAGON, (g_mode | p_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_DRAGON, (g_mode | p_mode), '\0'))
{
if (!pet)
msg_print(_("召喚されたドラゴンは怒っている!", "Summoned dragons are angry!"));
int k;
msg_print(_("強力なアンデッドを召喚した!", "You summon a greater undead!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode), '\0'))
{
if (!pet)
msg_print(_("召喚された上級アンデッドは怒っている!", "Summoned greater undeads are angry!"));
int k;
msg_print(_("古代ドラゴンを召喚した!", "You summon an ancient dragon!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode), '\0'))
{
if (!pet)
msg_print(_("召喚された古代ドラゴンは怒っている!", "Summoned ancient dragons are angry!"));
int k;
msg_print(_("アンバーの王族を召喚した!", "You summon a Lord of Amber!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode), '\0'))
{
if (!pet)
msg_print(_("召喚されたアンバーの王族は怒っている!", "Summoned Lords of Amber are angry!"));
int k, count = 0;
msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
for (k = 0;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_UNIQUE, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_UNIQUE, (g_mode | p_mode | PM_ALLOW_UNIQUE), '\0'))
{
count++;
if (!pet)
msg_print(_("召喚されたユニーク・モンスターは怒っている!", "Summoned special opponents are angry!"));
}
for (k = count;k < 1; k++)
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE), '\0'))
{
count++;
if (!pet)
*/
bool do_cmd_cast_learned(void)
{
- int n = 0;
- int chance;
- int minfail = 0;
- int plev = p_ptr->lev;
- monster_power spell;
- bool cast;
- int need_mana;
+ SPELL_IDX n = 0;
+ PERCENTAGE chance;
+ PERCENTAGE minfail = 0;
+ PLAYER_LEVEL plev = p_ptr->lev;
+ monster_power spell;
+ 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->csp = 0;
p_ptr->csp_frac = 0;
- /* Message */
msg_print(_("精神を集中しすぎて気を失ってしまった!", "You faint from the effort!"));
/* Hack -- Bypass free action */
{
bool perm = (randint0(100) < 25);
- /* Message */
msg_print(_("体を悪くしてしまった!", "You have damaged your health!"));
/* Reduce constitution */
}
}
- /* Take a turn */
- p_ptr->energy_use = 100;
+ take_turn(p_ptr, 100);
- /* Window stuff */
p_ptr->redraw |= (PR_MANA);
- p_ptr->window |= (PW_PLAYER);
- p_ptr->window |= (PW_SPELL);
+ p_ptr->window |= (PW_PLAYER | PW_SPELL);
return TRUE;
}
msg_format(_("%sを学習した!", "You have learned %s!"), monster_powers[monspell].name);
gain_exp(monster_powers[monspell].level * monster_powers[monspell].smana);
- /* Sound */
sound(SOUND_STUDY);
new_mane = TRUE;
*/
/*
*/
-void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode)
+void set_rf_masks(BIT_FLAGS *f4, BIT_FLAGS *f5, BIT_FLAGS *f6, BIT_FLAGS mode)
{
switch (mode)
{