mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-03 04:16:19 -04:00
Combat - Added Ranged and Melee Glancing Blow
This commit is contained in:
@@ -745,6 +745,12 @@ public class CombatService implements INetworkDispatch {
|
||||
|
||||
float glanceChance = (float) target.getSkillModBase("display_only_glancing_blow") / 10000;
|
||||
|
||||
if(weapon.isRanged())
|
||||
glanceChance += target.getSkillModBase("expertise_glancing_blow_ranged");
|
||||
|
||||
if(weapon.isMelee())
|
||||
glanceChance += target.getSkillModBase("expertise_glancing_blow_melee");
|
||||
|
||||
r = random.nextFloat();
|
||||
if(r <= glanceChance)
|
||||
return HitType.GLANCE;
|
||||
|
||||
Reference in New Issue
Block a user