OSDN Git Service
(root)
/
hengband
/
hengband.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Refactor] #37353 monster1~monster-hook間整理。 / Refactor between monster1 and monster...
[hengband/hengband.git]
/
src
/
hissatsu.c
diff --git
a/src/hissatsu.c
b/src/hissatsu.c
index
292d768
..
5851735
100644
(file)
--- a/
src/hissatsu.c
+++ b/
src/hissatsu.c
@@
-11,6
+11,7
@@
*/
#include "angband.h"
*/
#include "angband.h"
+#include "monster-hook.h"
#define TECHNIC_HISSATSU (REALM_HISSATSU - MIN_TECHNIC)
#define TECHNIC_HISSATSU (REALM_HISSATSU - MIN_TECHNIC)
@@
-36,28
+37,27
@@
static int get_hissatsu_power(SPELL_IDX *sn)
{
SPELL_IDX i;
int j = 0;
{
SPELL_IDX i;
int j = 0;
- int
num = 0;
-
int
y = 1;
-
int
x = 15;
-
int
plev = p_ptr->lev;
- int
ask = TRUE;
- char
choice;
- char
out_val[160];
+ int num = 0;
+
POSITION
y = 1;
+
POSITION
x = 15;
+
PLAYER_LEVEL
plev = p_ptr->lev;
+ int ask = TRUE;
+ char choice;
+ char out_val[160];
SPELL_IDX sentaku[32];
SPELL_IDX sentaku[32];
- cptr
p = _("必殺剣", "special attack");
-
+ cptr p = _("必殺剣", "special attack");
+ COMMAND_CODE code;
magic_type spell;
magic_type spell;
- bool
flag, redraw;
+ bool flag, redraw;
int menu_line = (use_menu ? 1 : 0);
/* Assume cancelled */
*sn = (-1);
int menu_line = (use_menu ? 1 : 0);
/* Assume cancelled */
*sn = (-1);
-#ifdef ALLOW_REPEAT /* TNB */
-
/* Get the spell, if available */
/* Get the spell, if available */
- if (repeat_pull(
sn
))
+ if (repeat_pull(
&code
))
{
{
+ *sn = (SPELL_IDX)code;
/* Verify the spell */
if (technic_info[TECHNIC_HISSATSU][*sn].slevel <= plev)
{
/* Verify the spell */
if (technic_info[TECHNIC_HISSATSU][*sn].slevel <= plev)
{
@@
-66,8
+66,6
@@
static int get_hissatsu_power(SPELL_IDX *sn)
}
}
}
}
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Nothing chosen yet */
flag = FALSE;
/* Nothing chosen yet */
flag = FALSE;
@@
-298,7
+296,6
@@
static int get_hissatsu_power(SPELL_IDX *sn)
/* Show choices */
p_ptr->window |= (PW_SPELL);
/* Show choices */
p_ptr->window |= (PW_SPELL);
- /* Window stuff */
window_stuff();
window_stuff();
@@
-308,11
+305,7
@@
static int get_hissatsu_power(SPELL_IDX *sn)
/* Save the choice */
(*sn) = j;
/* Save the choice */
(*sn) = j;
-#ifdef ALLOW_REPEAT /* TNB */
-
- repeat_push(*sn);
-
-#endif /* ALLOW_REPEAT -- TNB */
+ repeat_push((COMMAND_CODE)j);
/* Success */
return (TRUE);
/* Success */
return (TRUE);
@@
-328,7
+321,6
@@
void do_cmd_hissatsu(void)
SPELL_IDX n = 0;
magic_type spell;
SPELL_IDX n = 0;
magic_type spell;
-
/* not if confused */
if (p_ptr->confused)
{
/* not if confused */
if (p_ptr->confused)
{
@@
-372,7
+364,6
@@
void do_cmd_hissatsu(void)
/* Cast the spell */
if (!do_spell(REALM_HISSATSU, n, SPELL_CAST)) return;
/* Cast the spell */
if (!do_spell(REALM_HISSATSU, n, SPELL_CAST)) return;
- /* Take a turn */
p_ptr->energy_use = 100;
/* Use some mana */
p_ptr->energy_use = 100;
/* Use some mana */
@@
-384,7
+375,6
@@
void do_cmd_hissatsu(void)
/* Redraw mana */
p_ptr->redraw |= (PR_MANA);
/* Redraw mana */
p_ptr->redraw |= (PR_MANA);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER);
p_ptr->window |= (PW_SPELL);
}
p_ptr->window |= (PW_PLAYER);
p_ptr->window |= (PW_SPELL);
}
@@
-440,7
+430,6
@@
void do_cmd_gain_hissatsu(void)
item_tester_tval = TV_HISSATSU_BOOK;
item_tester_tval = TV_HISSATSU_BOOK;
- /* Get an item */
q = _("どの書から学びますか? ", "Study which book? ");
s = _("読める書がない。", "You have no books that you can read.");
q = _("どの書から学びますか? ", "Study which book? ");
s = _("読める書がない。", "You have no books that you can read.");
@@
-479,7
+468,6
@@
void do_cmd_gain_hissatsu(void)
if (!gain)
msg_print(_("何も覚えられなかった。", "You were not able to learn any special attacks."));
if (!gain)
msg_print(_("何も覚えられなかった。", "You were not able to learn any special attacks."));
- /* Take a turn */
else
p_ptr->energy_use = 100;
else
p_ptr->energy_use = 100;
@@
-496,7
+484,7
@@
void do_cmd_gain_hissatsu(void)
* @param mode 剣術のスレイ型ID
* @return スレイの倍率(/10倍)
*/
* @param mode 剣術のスレイ型ID
* @return スレイの倍率(/10倍)
*/
-MULTIPLY mult_hissatsu(MULTIPLY mult, BIT_FLAGS *flgs, monster_type *m_ptr,
int
mode)
+MULTIPLY mult_hissatsu(MULTIPLY mult, BIT_FLAGS *flgs, monster_type *m_ptr,
BIT_FLAGS
mode)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];