OSDN Git Service

[Refactor] #37353 爆発の薬の効果を detonation() に分離。 / Separate implementation of 'potion...
authorDeskull <deskull@users.sourceforge.jp>
Sun, 20 Jan 2019 12:55:44 +0000 (21:55 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 20 Jan 2019 12:55:44 +0000 (21:55 +0900)
src/cmd-quaff.c
src/externs.h
src/spells3.c

index 7f101a4..4d93aa0 100644 (file)
@@ -224,12 +224,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
                        break;\r
 \r
                case SV_POTION_DETONATIONS:\r
-                       msg_print(_("体の中で激しい爆発が起きた!", "Massive explosions rupture your body!"));\r
-                       take_hit(DAMAGE_NOESCAPE, damroll(50, 20), _("爆発の薬", "a potion of Detonation"), -1);\r
-\r
-                       (void)set_stun(p_ptr->stun + 75);\r
-                       (void)set_cut(p_ptr->cut + 5000);\r
-                       ident = TRUE;\r
+                       ident = detonation(p_ptr);\r
                        break;\r
 \r
                case SV_POTION_DEATH:\r
index dc51b81..2d3c8c9 100644 (file)
@@ -1063,6 +1063,8 @@ extern void massacre(void);
 extern bool eat_lock(void);
 extern bool shock_power(void);
 extern bool booze(player_type *creature_ptr);
+extern bool detonation(player_type *creature_ptr);
+
 
 /* bldg.c */
 extern void battle_monsters(void);
index 41f4f09..367d9c8 100644 (file)
@@ -4758,4 +4758,13 @@ bool booze(player_type *creature_ptr)
                }
        }
        return ident;
+}
+
+bool detonation(player_type *creature_ptr)
+{
+       msg_print(_("体の中で激しい爆発が起きた!", "Massive explosions rupture your body!"));
+       take_hit(DAMAGE_NOESCAPE, damroll(50, 20), _("爆発の薬", "a potion of Detonation"), -1);
+       (void)set_stun(creature_ptr->stun + 75);
+       (void)set_cut(creature_ptr->cut + 5000);
+       return TRUE;
 }
\ No newline at end of file