max_hit is an int so it can't store the 1.585 so it rounds to 1.
AC doesn't lower damage done yet.
As the comment above it states, there's some work to be done there.
However if you wanted to change it for now so it would work:
Code:
max_hit = (weapon_damage * ((GetSTR()*20) + (GetSkill(OFFENSE)*15) + (mylevel*10))) / 1000;