case ACT_BERSERK:
{
- (void)berserk(randint1(25) + 25);
+ (void)berserk(p_ptr, randint1(25) + 25);
break;
}
break;
case SV_POTION_BESERK_STRENGTH:
- ident = berserk(randint1(25) + 25);
+ ident = berserk(p_ptr, randint1(25) + 25);
break;
case SV_POTION_CURE_LIGHT:
break;
case MUT1_BERSERK:
- (void)berserk(randint1(25) + 25);
+ (void)berserk(p_ptr, randint1(25) + 25);
break;
case MUT1_POLYMORPH:
case RACE_HALF_TROLL:
msg_print(_("うがぁぁ!", "RAAAGH!"));
- (void)berserk(10 + randint1(plev));
+ (void)berserk(p_ptr, 10 + randint1(plev));
break;
case RACE_AMBERITE:
case RACE_BARBARIAN:
msg_print(_("うぉぉおお!", "Raaagh!"));
- (void)berserk(10 + randint1(plev));
+ (void)berserk(p_ptr, 10 + randint1(plev));
break;
case RACE_HALF_OGRE:
if (cast)
{
- (void)berserk(base + randint1(base));
+ (void)berserk(p_ptr, base + randint1(base));
}
}
break;
if (cast)
{
- (void)berserk(base + randint1(base));
+ (void)berserk(p_ptr, base + randint1(base));
}
}
break;
if (cast)
{
- (void)berserk(b_base + randint1(b_base));
+ (void)berserk(p_ptr, b_base + randint1(b_base));
set_fast(caster_ptr, randint1(sp_sides) + sp_base, FALSE);
}
}
return ident;
}
-bool_hack berserk(int base)
+bool_hack berserk(player_type *creature_ptr, int base)
{
bool_hack ident = FALSE;
- if (set_afraid(p_ptr, 0)) ident = TRUE;
- if (set_shero(p_ptr, p_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE;
- if (hp_player(p_ptr, 30)) ident = TRUE;
+ if (set_afraid(creature_ptr, 0)) ident = TRUE;
+ if (set_shero(creature_ptr, creature_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE;
+ if (hp_player(creature_ptr, 30)) ident = TRUE;
return ident;
}
extern void roll_hitdice(player_type *creature_ptr, SPOP_FLAGS options);
extern bool_hack life_stream(player_type *creature_ptr, bool_hack message, bool_hack virtue_change);
extern bool_hack heroism(player_type *creature_ptr, int base);
-extern bool_hack berserk(int base);
+extern bool_hack berserk(player_type *creature_ptr, int base);
extern bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides);
extern bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides);
extern bool_hack cure_critical_wounds(HIT_POINT pow);