Integrate some effects to cure_serious_wounds().
case ACT_CURE_MW:
{
msg_print(_("深紫色の光を発している...", "It radiates deep purple..."));
- hp_player(damroll(4, 8));
- (void)set_cut((p_ptr->cut / 2) - 50);
+ (void)cure_serious_wound(4, 8);
break;
}
\r
case SV_FOOD_CURE_SERIOUS:\r
{\r
- if (hp_player(damroll(4, 8))) ident = TRUE;\r
+ ident = cure_serious_wound(4, 8);\r
break;\r
}\r
\r
break;\r
\r
case SV_POTION_CURE_SERIOUS:\r
- if (hp_player(damroll(4, 8))) ident = TRUE;\r
- if (set_blind(0)) ident = TRUE;\r
- if (set_confused(0)) ident = TRUE;\r
- if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;\r
- if (set_shero(0, TRUE)) ident = TRUE;\r
+ ident = cure_light_wound(4, 8);\r
break;\r
\r
case SV_POTION_CURE_CRITICAL:\r
extern bool_hack life_stream(bool_hack message, bool_hack virtue);
extern bool_hack heroism(int base);
extern bool_hack cure_light_wound(int dice, int sides);
+extern bool_hack cure_serious_wound(int dice, int sides);
/* spells3.c */
extern bool teleport_away(MONSTER_IDX m_idx, int dis, BIT_FLAGS mode);
int sides = 8;\r
\r
if (info) return info_heal(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- hp_player(damroll(dice, sides));\r
- set_cut((p_ptr->cut / 2) - 50);\r
- }\r
+ if (cast) (void)cure_serious_wound(4, 8);\r
}\r
break;\r
\r
{
msg_print(_("気分が良くなってくる。", "You feel better and better."));
}
- if (cast || cont)
- {
- hp_player(damroll(2, 10));
- set_cut((p_ptr->cut / 2) - 10);
- }
+ if (cast || cont) (void)cure_serious_wound(2, 10);
break;
case 10:
int sides = 10;\r
\r
if (info) return info_heal(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- hp_player(damroll(dice, sides));\r
- set_cut((p_ptr->cut / 2) - 20);\r
- }\r
+ if (cast) (void)cure_serious_wound(dice, sides);\r
}\r
break;\r
\r
if (set_cut(p_ptr->cut - 10)) ident = TRUE;
if (set_shero(0, TRUE)) ident = TRUE;
return ident;
-}
\ No newline at end of file
+}
+
+bool_hack cure_serious_wound(int dice, int sides)
+{
+ bool_hack ident = FALSE;
+ if (hp_player(damroll(dice, sides))) ident = TRUE;
+ if (set_blind(0)) ident = TRUE;
+ if (set_confused(0)) ident = TRUE;
+ if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;
+ if (set_shero(0, TRUE)) ident = TRUE;
+ return ident;
+}