*/
#include "angband.h"
+#include "player-status.h"
#define MAX_SNIPE_POWERS 16
{
int min_lev;
int mana_cost;
- const char *name;
+ concptr name;
};
/*! スナイパー技能の解説メッセージ */
-static cptr const snipe_tips[MAX_SNIPE_POWERS] =
+static concptr const snipe_tips[MAX_SNIPE_POWERS] =
{
#ifdef JP
"精神を集中する。射撃の威力、精度が上がり、高度な射撃術が使用できるようになる。",
msg_format(_("集中した。(集中度 %d)", "You concentrate deeply. (lvl %d)"), p_ptr->concent);
reset_concent = FALSE;
- /* Recalculate bonuses */
- p_ptr->update |= (PU_BONUS);
-
+ p_ptr->update |= (PU_BONUS | PU_MONSTERS);
p_ptr->redraw |= (PR_STATUS);
-
- /* Update the monsters */
- p_ptr->update |= (PU_MONSTERS);
-
return (TRUE);
}
p_ptr->concent = 0;
reset_concent = FALSE;
- /* Recalculate bonuses */
- p_ptr->update |= (PU_BONUS);
-
+ p_ptr->update |= (PU_BONUS | PU_MONSTERS);
p_ptr->redraw |= (PR_STATUS);
-
- /* Update the monsters */
- p_ptr->update |= (PU_MONSTERS);
}
/*!
int i;
int y = 1;
int x = 1;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
snipe_power spell;
char psi_desc[80];
* when you run it. It's probably easy to fix but I haven't tried,\n
* sorry.\n
*/
-static int get_snipe_power(int *sn, bool only_browse)
+static int get_snipe_power(COMMAND_CODE *sn, bool only_browse)
{
- int i;
+ COMMAND_CODE i;
int num = 0;
int y = 1;
int x = 20;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
int ask;
char choice;
char out_val[160];
- cptr p = _("射撃術", "power");
+ concptr p = _("射撃術", "power");
snipe_power spell;
bool flag, redraw;
-#ifdef ALLOW_REPEAT /* TNB */
-
repeat_push(*sn);
/* Assume cancelled */
}
}
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Nothing chosen yet */
flag = FALSE;
/* Show list */
redraw = TRUE;
-
- /* Save the screen */
if (!only_browse) screen_save();
/* Display a list of spells */
{
/* Hide list */
redraw = FALSE;
-
- /* Restore the screen */
if (!only_browse) 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 && !only_browse) 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) = i;
-#ifdef ALLOW_REPEAT /* TNB */
-
repeat_push(*sn);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Success */
return (TRUE);
}
{
case 0: /* Concentration */
if (!snipe_concentrate()) return (FALSE);
- p_ptr->energy_use = 100;
+ take_turn(p_ptr, 100);;
return (TRUE);
case 1: snipe_type = SP_LITE; break;
case 2: snipe_type = SP_AWAY; break;
*/
void do_cmd_snipe(void)
{
- int n = 0;
+ COMMAND_CODE n = 0;
bool cast;
-
- /* not if confused */
- if (p_ptr->confused)
- {
- msg_print(_("混乱していて集中できない!", "You are too confused!"));
- return;
- }
+ if (cmd_limit_confused(p_ptr)) return;
/* not if hullucinated */
if (p_ptr->image)
cast = cast_sniper_spell(n);
if (!cast) return;
-#if 0
- /* Take a turn */
- p_ptr->energy_use = 100;
-#endif
- /* Redraw mana */
p_ptr->redraw |= (PR_HP | PR_MANA);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER);
p_ptr->window |= (PW_SPELL);
}
*/
void do_cmd_snipe_browse(void)
{
- int n = 0;
+ COMMAND_CODE n = 0;
int j, line;
char temp[62 * 4];