Integrate some effects to cure_critical_wounds().
break;\r
\r
case SV_POTION_CURE_CRITICAL:\r
- if (hp_player(damroll(6, 8))) ident = TRUE;\r
- if (set_blind(0)) ident = TRUE;\r
- if (set_confused(0)) ident = TRUE;\r
- if (set_poisoned(0)) ident = TRUE;\r
- if (set_stun(0)) ident = TRUE;\r
- if (set_cut(0)) ident = TRUE;\r
- if (set_shero(0,TRUE)) ident = TRUE;\r
+ ident = cure_serious_wounds(6, 8);\r
break;\r
\r
case SV_POTION_HEALING:\r
{
msg_print(_("気分が良くなってくる。", "You feel better and better."));
}
- if (cast || cont)
- {
- hp_player(damroll(4, 10));
- set_stun(0);
- set_cut(0);
- set_poisoned(0);
- }
+ if (cast || cont) (void)cure_serious_wounds(4, 10);
break;
case 18:
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_stun(0);\r
- set_cut(0);\r
- }\r
+ if (cast) (void)cure_serious_wounds(dice, sides);\r
}\r
break;\r
\r
if (set_shero(0, TRUE)) ident = TRUE;
return ident;
}
+
+bool_hack cure_critical_wounds(int dice, int sides)
+{
+ bool_hack ident = FALSE;
+ if (hp_player(damroll(6, 8))) ident = TRUE;
+ if (set_blind(0)) ident = TRUE;
+ if (set_confused(0)) ident = TRUE;
+ if (set_poisoned(0)) ident = TRUE;
+ if (set_stun(0)) ident = TRUE;
+ if (set_cut(0)) ident = TRUE;
+ if (set_shero(0, TRUE)) ident = TRUE;
+}
\ No newline at end of file