custom NPC melee
i never liked 500+ hitting mobs, but not even fluffy darkpaw who could smash my face without having a weapon for 20+ what i barely could manage with a tarnished two handed sword.. well.. first time in my eq life i can take revenge on these fippies :)
the following code part goes into attack.cpp, our target is the npc::attack Code:
todo: check if the creature is humanoid.. creatures biting actually do not need weapon - wont do it at 2am.. |
quickfix: sitting
quickfix: sitting
if other is sitting then we are to hit max damage. we did not count max damage, what is actually the top of the makerandomint.. so the damage calculation splits up into two lines Code:
|
todone: improving h2h a bit
todone: improving h2h a bit
hand to hand realizes always weapon_damage 1, so unless we have such weapon (did not saw any) we can talk with bare handed fight (what can mean biting, clawing, etc). this was very low damage with previous codes even on higher levels Code:
next step: size matters |
todone: size does matter
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:
Code:
|
duhh.. cant edit again..
Quote:
Code:
|
type stuff
another problem i found in my npc::attack code is that max_dmg is not normal int type, so if it would get negative it gets 65535-. so used a temp int
Code:
|
an "ok" calculation
for player (client::attack) Code:
Code:
after what i do count: well weapon damage as prior. then i add to this the weapon damage compared to master level in offense and actual weapon skill (by npc this is level *5 so they are same level with each weapon) then we add the sizematters modifier as a "bane" damage (see prev posts about size and level differences) then we give +1 damage after each 10str, 25dex, 100int, 75wis.. why int and wis? well.. ever wondered why war gets "some" of such gears (pre-hardcoresonycrap of course).. because knowing your enemy is power.. not much.. but +1 dam may be worth for any regular minded (human for example and not troll) warrior worth to make that 100 int or 75 wis... |
backstabb with piercer only
Mob::TryBackstab has restriction for player (mr. IsClient()) to backstabb only with piercing weapon.. this i want to apply for mob (npc/pet) too, but got some problem with code (not a pretty one tho')
Code:
any idea? |
a question for you
if no NPC can hit hard wihout a weapon - what gona happen to all the npc who do not normaly carry weapons? Like animals, insects, various non humanoid monsters? |
Quote:
of course if you put rusty dagger to a L20 mobs hand that will downgrade his damage at moment. rusty dagger 3 dam, L20 unarmed 5 dam |
All times are GMT -4. The time now is 09:53 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.