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 snipe_type をグローバル変数から、引数へ置換 / Replace snipe_type from global to...
[hengband/hengband.git]
/
src
/
snipe.c
diff --git
a/src/snipe.c
b/src/snipe.c
index
623263e
..
9372b88
100644
(file)
--- a/
src/snipe.c
+++ b/
src/snipe.c
@@
-391,7
+391,7
@@
static int get_snipe_power(COMMAND_CODE *sn, bool only_browse)
* @param m_ptr 目標となるモンスターの構造体参照ポインタ
* @return スレイの倍率(/10倍)
*/
* @param m_ptr 目標となるモンスターの構造体参照ポインタ
* @return スレイの倍率(/10倍)
*/
-MULTIPLY tot_dam_aux_snipe(MULTIPLY mult, monster_type *m_ptr)
+MULTIPLY tot_dam_aux_snipe(MULTIPLY mult, monster_type *m_ptr
, SPELL_IDX snipe_type
)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
bool seen = is_seen(m_ptr);
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
bool seen = is_seen(m_ptr);
@@
-492,6
+492,7
@@
MULTIPLY tot_dam_aux_snipe(MULTIPLY mult, monster_type *m_ptr)
static bool cast_sniper_spell(int spell)
{
object_type *o_ptr = &inventory[INVEN_BOW];
static bool cast_sniper_spell(int spell)
{
object_type *o_ptr = &inventory[INVEN_BOW];
+ SPELL_IDX snipe_type = SP_NONE;
if (o_ptr->tval != TV_BOW)
{
if (o_ptr->tval != TV_BOW)
{
@@
-526,8
+527,7
@@
static bool cast_sniper_spell(int spell)
}
command_cmd = 'f';
}
command_cmd = 'f';
- do_cmd_fire();
- snipe_type = 0;
+ do_cmd_fire(snipe_type);
return (is_fired);
}
return (is_fired);
}