Lazarus 
Master
 
Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1
Hybris Ultima Online
![]()
|
RE: About the new combat system
(07-14-2015 04:45 PM)XuN Wrote: Here's the old formula scripted and commented like we had it in the source:
Code:
[function f_HitChance]
// src should be my target
if !(<src.isChar>)
return <r31>// must be a training dummy
endif
if ((<brain>==brain_guard) && (<serv.GuardsInstantKill>==1))
return 0
endif
// Frozen targets should be easy.
if ((<src.flags>&statf_freeze) || (<src.flags>&statf_sleeping))
return <r10>
endif
local.iSkillVal = <i.<action>> // value of the skill whe are using to hit.
// Offensive value mostly based on your skill and TACTICS.
// 0 - 1000
local.iSkillAttack = <local.iSkillVal> + <eval <tactics>/2>
// Defensive value mostly based on your tactics value and random DEX,
// 0 - 1000
local.iSkillDefend = <src.tactics>
// Make it easier to hit people havin a bow or crossbow due to the fact that its
// not a very "mobile" weapon, nor is it fast to change position while in
// a fight etc. Just use 90% of the statvalue when defending so its easier
// to hit than defend == more fun in combat.
local.iStam= <src.dex>
if (<serv.skill.<action>.flags>&skf_ranged)
// The defender uses ranged weapon and the attacker is not.
// Make just a bit easier to hit.
local.iSkillDefend = (<local.iSkillDefend> + (<local.iStam>*9))/2
else
// The defender is using a nonranged, or they both use bows.
local.iSkillDefend = (<local.iSkillDefend> + (<local.iStam>*10))/2
endif
local.iDiff = (<local.iSkillAttack> - <local.iSkillDefend>) /5
local.iDiff /= 10
if (<local.iDiff> < 0)
local.iDiff = 0 // just means it's very easy.
elseif (<local.iDif>> 100)
local.iDiff = 100 // just means it's very hard.
endif
return <r<local.iDiff>> //always need to have some chance.
And what's changed in the new formula? why is so hard to hit?
How can I reactivate this formula in my sphere? just change it in Combat?
|
|
07-16-2015 01:22 AM |
|
|