if we are taller or are higher in level then we may say we are stronger.. if higher in level then we are experienced, if taller then we are phisically stronger.. this should be counted to attack damage.
see the other side of thing: dragonfoo... er.. gnome warriors will be less.. umm... lucky
this here goes to client::attack
Code:
//damage formula needs some work
int min_hit = 1;
****** custom code from here ******
int sizematters = (mylevel-otherlevel)+(this->GetSize()-other->GetSize()); //yes, let it be negative too, if we are tiny we have less "luck"
if (sizematters>0) {min_hit+=sizematters;} //if we are tough our minimum is higher, but if we are "weaker" our minimum can't go bellow 1
int max_hit=
(weapon_damage * ((GetSTR()*20) + (GetSkill(OFFENSE)*15) + (GetSkill(skillinuse)*2) / 1000)
+ sizematters
);
***** custom code ends here *****
and this goes to NPC::attack
Code:
min_dmg=1;
if (weapon_damage==1) {
//possible hand to hand was done,
//we don't want that unarmed, brawling, clawing, biting stuff behaving like a w00sh, so we correct weapon damage to level
weapon_damage=(mylevel/5);
}
int sizematters = (mylevel-otherlevel)+(this->GetSize()-other->GetSize()); //yes, let it be negative too, if we are tiny we have less "luck"
if (sizematters>0) {min_dmg+=sizematters;} //if we are tough our minimum is higher, but if we are "weaker" our minimum can't go bellow 1
max_dmg=
(weapon_damage * ((GetSTR()*20) + (GetSkill(OFFENSE)*15) + (mylevel*10)) / 1000)
+ sizematters
);
if (max_dmg<=min_dmg+eleBane) { damage=min_dmg+eleBane; }
else { damage=MakeRandomInt(min_dmg+eleBane,max_dmg+eleBane); }
note: also "corrected" that Client::attack wont count with level * 10, but skill in use * 2.. so with that if you are low skilled with sword but still use it, you will hit less as well..