[quote=“pisskop, post:1, topic:12176”][spoiler=code]
if( has_effect( effect_grabbed ) && !attacking ) {
int zed_number = 0;
for( auto &&dest : g->m.points_in_radius( pos(), 1, 0 ) ){
if( g->mon_at( dest ) != -1 &&
( g->zombie( g->mon_at( dest ) ).has_flag( MF_GRABS ) ||
g->zombie( g->mon_at( dest ) ).type->has_special_attack( “GRAB” ) ) ) {
zed_number ++;
}
}
if( zed_number == 0 ) {
add_msg_player_or_npc( m_good, _( “You find yourself no longer grabbed.” ),
_( " finds themselves no longer grabbed." ) );
remove_effect( effect_grabbed );
///\EFFECT_DEX increases chance to escape grab, if >STR
///\EFFECT_STR increases chance to escape grab, if >DEX
} else if( rng( 0, std::max( get_dex(), get_str() ) ) < rng( get_effect_int( effect_grabbed ), 8 ) ) {
// Randomly compare higher of dex or str to grab intensity.
add_msg_player_or_npc( m_bad, _( "You try break out of the grab, but fail!" ),
_( "<npcname> tries to break out of the grab, but fails!" ) );
return false;
} else {
add_msg_player_or_npc( m_good, _( "You break out of the grab!" ),
_( "<npcname> breaks out of the grab!" ) );
remove_effect( effect_grabbed );
}
[/spoiler]
The code seems to imply a strength check, but Ive seen a strength 10 character (at str 10 when this occurs) fail to break a single zombie for several turns.[/quote]
Point to the doll where the zombie grabbed you.