Skip to content

Commit

Permalink
Merge pull request #17 from Darth411/master
Browse files Browse the repository at this point in the history
Shield shunting recalculations
  • Loading branch information
InvalidArgument3 authored Apr 26, 2024
2 parents 3071919 + 8604c4a commit e9dcdd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Data/Scripts/DefenseShields/API/TapiBackend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ private static MyTuple<bool, int, int, float, float, float> TAPI_GetFaceInfoAndP

var hitShuntedSide = shuntedFaceHit != -1;
var shuntedFaces = Math.Abs(logic.ShieldRedirectState.X) + Math.Abs(logic.ShieldRedirectState.Y) + Math.Abs(logic.ShieldRedirectState.Z);
var shuntMod = !hitShuntedSide ? 1 - (shuntedFaces * Session.ShieldShuntBonus) : logic.DsSet.Settings.AutoManage ? 1 - Session.ShieldShuntBonus : 1f;
var shuntMod = !hitShuntedSide ? (float)(1 - ((shuntedFaces * 0.17f) - ((shuntedFaces * (shuntedFaces - 3)) * 0.025f))) : logic.DsSet.Settings.AutoManage ? 1 - Session.ShieldShuntBonus : 1f;
var preventBypassMod = MathHelper.Clamp(shuntedFaces * Session.ShieldBypassBonus, 0f, 1f);

var reinforcedPercent = hitShuntedSide ? logic.DsState.State.ShieldPercent + (shuntedFaces * 8) : logic.DsState.State.ShieldPercent;
Expand Down

0 comments on commit e9dcdd4

Please sign in to comment.