&& KickDamage * 5 < RAND() % GetSize());
}</pre>
The damage done by being kicked into a wall is equivalent to the remainder of (1 + a random number) / 5 and is applied directly to the head.
<pre>if(NoRoom)
{
if(HasHead())
{
if(IsPlayer())
ADD_MESSAGE("You hit your head on the wall.");
else if(CanBeSeenByPlayer())
ADD_MESSAGE("%s hits %s head on the wall.", CHAR_NAME(DEFINITE), GetPossessivePronoun().CStr());
}
ReceiveDamage(GuiltyGuy, 1 + RAND() % 5, PHYSICAL_DAMAGE, HEAD);
CheckDeath(CONST_S("killed by hitting a wall due to being kicked @bk"), GuiltyGuy);
}</pre>