internal static void Initialize() { SprainedAnkle sprainedAnkle = GameManager.GetSprainedAnkleComponent(); SprainedWrist sprainedWrist = GameManager.GetSprainedWristComponent(); Sprains sprains = GameManager.GetSprainsComponent(); chanceOfWristSprainWhenMoving = sprains.m_ChanceOfWristSprainWhenMoving; ankleBaseFallChance = sprainedAnkle.m_ChanceSprainAfterFall; wristBaseFallChance = sprainedWrist.m_ChanceSprainAfterFall; ankleMoveChanceReduction = 0; wristMoveChanceReduction = 0; }
private static void Prefix(Sprains __instance, ref float sprainChance) { if (Mathf.Approximately(sprainChance, 0f)) return; if (Implementation.ShouldRollForWristSprain()) { Implementation.AdjustWristSprainMoveChance(ref sprainChance); __instance.m_ChanceOfWristSprainWhenMoving = 100.0f; } else { Implementation.AdjustAnkleSprainMoveChance(ref sprainChance); __instance.m_ChanceOfWristSprainWhenMoving = 0.0f; } }
private static void Prefix(Sprains __instance) { float overEncumbranceInKg = GameManager.GetEncumberComponent().m_GearWeightKG - GameManager.GetEncumberComponent().GetEffectiveCarryCapacityKG(); __instance.m_ChanceIncreaseEncumbered = Mathf.Max(0.3f, AS_Settings.settings.OverEncumbranceValue * overEncumbranceInKg); __instance.m_ChanceIncreaseExhausted = AS_Settings.settings.ExhaustedValue; }