The Cathedral of Attnam

Changes

Jump to navigation Jump to search
570 bytes added ,  04:18, 13 August 2014
m
&& 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>
Moderator
952

edits

Navigation menu