Integrate effect of heroism to berserk().
/* Drop the artifact from heaven */
return drop_near(q_ptr, -1, y, x) ? TRUE : FALSE;
}
+
/*対邪平均ダメージの計算処理*/
int calc_arm_avgdamage(object_type *o_ptr)
{
case ACT_BERSERK:
{
- (void)set_afraid(0);
- (void)set_shero(randint1(25) + 25, FALSE);
- /* (void)set_afraid(0);
- (void)set_hero(randint1(50) + 50, FALSE);
- (void)set_blessed(randint1(50) + 50, FALSE);
- o_ptr->timeout = 100 + randint1(100); */
+ (void)berserk(randint1(25) + 25);
break;
}
break;\r
\r
case SV_POTION_BESERK_STRENGTH:\r
- if (set_afraid(0)) ident = TRUE;\r
- if (set_shero(p_ptr->shero + randint1(25) + 25, FALSE)) ident = TRUE;\r
- if (hp_player(30)) ident = TRUE;\r
+ ident = berserk(randint1(25) + 25);\r
break;\r
\r
case SV_POTION_CURE_LIGHT:\r
/*!
* @brief 狂戦士化の継続時間をセットする / Set "p_ptr->shero", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @param v 継続時間/ 0ならば無条件にリセット
+ * @param do_dec FALSEの場合現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
bool set_shero(TIME_EFFECT v, bool do_dec)
extern void cast_shuffle(void);
extern bool_hack life_stream(bool_hack message, bool_hack virtue);
extern bool_hack heroism(int base);
+extern bool_hack berserk(int base);
extern bool_hack cure_light_wounds(int dice, int sides);
extern bool_hack cure_serious_wounds(int dice, int sides);
extern bool_hack cure_critical_wounds(HIT_POINT pow);
break;
case MUT1_BERSERK:
- (void)set_shero(randint1(25) + 25, FALSE);
- (void)hp_player(30);
- (void)set_afraid(0);
+ (void)berserk(randint1(25) + 25);
break;
case MUT1_POLYMORPH:
case RACE_HALF_TROLL:
msg_print(_("うがぁぁ!", "RAAAGH!"));
- (void)set_afraid(0);
- (void)set_shero(10 + randint1(plev), FALSE);
- (void)hp_player(30);
+ (void)berserk(10 + randint1(plev));
break;
case RACE_AMBERITE:
case RACE_BARBARIAN:
msg_print(_("うぉぉおお!", "Raaagh!"));
- (void)set_afraid(0);
- (void)set_shero(10 + randint1(plev), FALSE);
- (void)hp_player(30);
+ (void)berserk(10 + randint1(plev));
break;
case RACE_HALF_OGRE:
\r
if (cast)\r
{\r
- set_shero(randint1(base) + base, FALSE);\r
- hp_player(30);\r
- set_afraid(0);\r
+ (void)berserk(base + randint1(base));\r
}\r
}\r
break;\r
\r
if (cast)\r
{\r
- set_shero(randint1(base) + base, FALSE);\r
- hp_player(30);\r
- set_afraid(0);\r
+ (void)berserk(base + randint1(base));\r
}\r
}\r
break;\r
\r
if (cast)\r
{\r
- set_shero(randint1(25) + 25, FALSE);\r
- hp_player(30);\r
- set_afraid(0);\r
+ (void)berserk(b_base + randint1(b_base));\r
set_fast(randint1(sp_sides) + sp_base, FALSE);\r
}\r
}\r
return ident;
}
+bool_hack berserk(int base)
+{
+ bool_hack ident = FALSE;
+ if (set_afraid(0)) ident = TRUE;
+ if (set_shero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
+ if (hp_player(30)) ident = TRUE;
+ return ident;
+}
+
bool_hack cure_light_wounds(int dice, int sides)
{
bool_hack ident = FALSE;