using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Peak.Afflictions; using Photon.Pun; using UnityEngine; using Zorro.Core; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Torrential_Torment")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Torrential_Torment")] [assembly: AssemblyTitle("Torrential_Torment")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace TorrentialTorment { [HarmonyPatch(typeof(AOE), "Explode")] internal static class AOEPatch { internal static bool Prefix(AOE __instance) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Invalid comparison between Unknown and I4 //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) if (!PhotonNetwork.IsMasterClient) { return true; } if (__instance.range == 0f) { return false; } Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, __instance.range, LayerMask.op_Implicit(HelperFunctions.GetMask(__instance.mask))); List list = new List(); Character val = default(Character); EventOnItemCollision val6 = default(EventOnItemCollision); for (int i = 0; i < array.Length; i++) { CharacterRagdoll.TryGetCharacterFromCollider(array[i], ref val); RaycastHit val2; Vector3 val4; if ((Object)(object)val != (Object)null && !list.Contains(val)) { float num = Vector3.Distance(((Component)__instance).transform.position, val.Center); if (!(num <= __instance.range)) { continue; } float factor = __instance.GetFactor(num); if (!(factor >= __instance.minFactor)) { continue; } if (__instance.requireLineOfSigh) { val2 = HelperFunctions.LineCheck(((Component)__instance).transform.position, val.Center, (LayerType)1, 0f, (QueryTriggerInteraction)1); if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val2)).transform)) { continue; } } list.Add(val); Vector3 val3 = Vector3.zero; if (__instance.useSingleDirection) { val3 = __instance.singleDirectionForwardTF.forward; } else { val4 = val.Center - ((Component)__instance).transform.position; val3 = ((Vector3)(ref val4)).normalized; } if (Mathf.Abs(__instance.statusAmount) > 0f) { if (__instance.illegalStatus != "") { if (__instance.illegalStatus.ToUpperInvariant().Equals("BLIND")) { Affliction_Blind val5 = new Affliction_Blind { totalTime = __instance.statusAmount * factor }; val.refs.afflictions.AddAffliction((Affliction)(object)val5, false); } else { val.AddIllegalStatus(__instance.illegalStatus, __instance.statusAmount * factor); } } else { val.refs.afflictions.AdjustStatus(__instance.statusType, __instance.statusAmount * factor, false); if (__instance.addtlStatus.Length != 0) { for (int j = 0; j < __instance.addtlStatus.Length; j++) { val.refs.afflictions.AdjustStatus(__instance.addtlStatus[j], __instance.statusAmount * factor, false); } } } } if (__instance.hasAffliction) { val.refs.afflictions.AddAffliction(__instance.affliction, false); } float num2 = 1f; if (__instance.knockback > 0f) { Plugin.ExploPowersForEach.TryGetValue(((Object)__instance).name, out ConfigEntry value); if (value != null) { num2 = value.Value; } } if (Plugin.dastardlySplos.Value) { val.AddForceAtPosition(new Vector3(Random.Range(-1f, 1f), 0.5f, -1f) * ((Vector3)(ref val3)).magnitude * factor * __instance.knockback * num2, val.Center, 1f); } else if (!val.IsLocal && PhotonNetwork.IsMasterClient) { num2 -= 1f; val.AddForceAtPosition(val3 * factor * __instance.knockback * num2, val.Center, 1f); } else { val.AddForce(val3 * factor * __instance.knockback * num2, 0.7f, 1.3f); } if (__instance.fallTime > 0f) { val.Fall(factor * __instance.fallTime, 0f); } } else { if (!__instance.canLaunchItems) { continue; } Item componentInParent = ((Component)array[i]).GetComponentInParent(); if (!((Object)(object)componentInParent != (Object)null) || !((MonoBehaviourPun)componentInParent).photonView.IsMine || (int)componentInParent.itemState != 0) { continue; } float num3 = Vector3.Distance(((Component)__instance).transform.position, componentInParent.Center()); if (!(num3 <= __instance.range)) { continue; } float factor2 = __instance.GetFactor(num3); if (!(factor2 >= __instance.minFactor)) { continue; } if (__instance.requireLineOfSigh) { val2 = HelperFunctions.LineCheck(((Component)__instance).transform.position, componentInParent.Center(), (LayerType)1, 0f, (QueryTriggerInteraction)1); if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val2)).transform)) { continue; } } if (__instance.procCollisionEvents && ((Component)componentInParent).TryGetComponent(ref val6)) { val6.TriggerEvent(); } if (__instance.cooksItems) { componentInParent.cooking.FinishCooking(); } val4 = componentInParent.Center() - ((Component)__instance).transform.position; Vector3 normalized = ((Vector3)(ref val4)).normalized; componentInParent.rig.AddForce(normalized * factor2 * __instance.knockback * __instance.itemKnockbackMultiplier, (ForceMode)1); } } return false; } } [HarmonyPatch(typeof(DayNightManager), "Update")] internal static class DayNightPatch { internal static bool Prefix(DayNightManager __instance) { __instance.HazeDebug = Shader.GetGlobalFloat(__instance.getShaderValue((ShaderParams)0)); __instance.RimFresnelDebug = Shader.GetGlobalFloat(__instance.getShaderValue((ShaderParams)1)); __instance.LavaAlphaDebug = Shader.GetGlobalFloat(__instance.getShaderValue((ShaderParams)2)); __instance.BandFogDebug = Shader.GetGlobalFloat(__instance.getShaderValue((ShaderParams)3)); __instance.SunSizeDebug = Shader.GetGlobalFloat(__instance.getShaderValue((ShaderParams)4)); if (__instance.timeOfDay >= 5.5f && __instance.timeOfDay <= 20f) { if (Plugin.dayTimeMultiplier.Value == 0f) { Plugin.dayTimeMultiplier.Value = 1f; } __instance.timeOfDay += 1f / (__instance.dayLengthInMinutes * 60f) * Time.deltaTime * 24f / Plugin.dayTimeMultiplier.Value; } else { if (Plugin.nightTimeMultiplier.Value == 0f) { Plugin.nightTimeMultiplier.Value = 1f; } __instance.timeOfDay += 1f / (__instance.dayLengthInMinutes * 60f) * Time.deltaTime * 24f / Plugin.nightTimeMultiplier.Value; } if (Plugin.eternalNight.Value && __instance.timeOfDay < 2f) { __instance.timeOfDay = 1f; } if (__instance.timeOfDay > 24f) { __instance.timeOfDay -= 24f; __instance.passedMidnight = true; } if (__instance.passedMidnight && __instance.timeOfDay >= 5.5f) { __instance.dayCount++; __instance.passedMidnight = false; } if (PhotonNetwork.IsMasterClient) { __instance.syncTimer += Time.deltaTime; if (__instance.syncTimer > 5f) { __instance.photonView.RPC("RPCA_SyncTime", (RpcTarget)0, new object[1] { __instance.timeOfDay }); __instance.syncTimer = 0f; } } __instance.UpdateCycle(); return false; } } [HarmonyPatch(typeof(MapHandler), "Awake")] internal static class AddDelayer { internal static void Prefix(MapHandler __instance) { ((Component)__instance).gameObject.AddComponent(); } } internal class ForceDelayer : MonoBehaviour { public static ForceDelayer Instance; public void Awake() { Instance = this; } public void ApplyForceDelayed(Vector3 force, float radius, Character chara) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).StartCoroutine((IEnumerator)ApplyForceDelayedRoutine(force, radius, chara)); } public IEnumerator ApplyForceDelayedRoutine(Vector3 force, float radius, Character chara) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) yield return new WaitForSeconds(Plugin.debugForceDelay.Value); chara.AddForceAtPosition(force, chara.Center, radius); } } [HarmonyPatch(typeof(Lava), "FixedUpdate")] internal static class LavaPatch { public static SyncedAnimation lavaAnim; public static bool Prefix(Lava __instance) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)lavaAnim == (Object)null) { lavaAnim = ((Component)__instance).GetComponent(); } if (!__instance.isKiln) { if (Plugin.lavaNeverLowers.Value) { Animator anim = lavaAnim.anim; AnimatorStateInfo currentAnimatorStateInfo = lavaAnim.anim.GetCurrentAnimatorStateInfo(0); anim.Play(((AnimatorStateInfo)(ref currentAnimatorStateInfo)).shortNameHash, 0, 0.7f); } lavaAnim.anim.speed = Plugin.lavaCycleSpeedMult.Value; } return true; } } [HarmonyPatch(typeof(SyncedAnimation), "Update")] internal static class SyncedAnimationPatch { internal static void Postfix(SyncedAnimation __instance) { if (PhotonNetwork.IsMasterClient && __instance.syncCounter == 0f) { __instance.syncCounter -= Plugin.lavaSyncRate.Value - 5f; } } } internal class CustomBananaHandler : MonoBehaviour { public BananaPeel banana; public Dictionary PlayerGracePeriods = new Dictionary(); internal void Awake() { foreach (Character allCharacter in Character.AllCharacters) { PlayerGracePeriods.Add(((Object)allCharacter).GetInstanceID(), 3f); } } internal void FixedUpdate() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) if (!PhotonNetwork.IsMasterClient || !Plugin.unshackledNanas.Value) { return; } foreach (Character allCharacter in Character.AllCharacters) { int instanceID = ((Object)allCharacter).GetInstanceID(); PlayerGracePeriods[instanceID] += Time.fixedDeltaTime; if (PlayerGracePeriods[instanceID] > 1f && Vector3.Distance(allCharacter.Center, ((Component)banana).transform.position) < 1.2f && allCharacter.data.isGrounded) { ((Component)banana).GetComponent().RPC("RPCA_TriggerBanana", (RpcTarget)0, new object[1] { allCharacter.refs.view.ViewID }); PlayerGracePeriods[instanceID] = 0f; } } } } [HarmonyPatch(typeof(BananaPeel), "Start")] internal static class NanaStartPatch { internal static void Prefix(BananaPeel __instance) { ((Component)__instance).gameObject.AddComponent().banana = __instance; } } [HarmonyPatch(typeof(BananaPeel), "RPCA_TriggerBanana")] internal static class SlipPatch { internal static void Postfix(BananaPeel __instance, int viewID) { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if ((Plugin.nannerPow.Value != 1f || Plugin.dastardlyNanas.Value) && PhotonNetwork.IsMasterClient) { Character component = ((Component)PhotonView.Find(viewID)).GetComponent(); if (Plugin.dastardlyNanas.Value) { ForceDelayer.Instance.ApplyForceDelayed(new Vector3(Random.Range(-1f, 1f), 0.5f, -1f) * 40f * (Plugin.nannerPow.Value - 1f), 1f, component); } else { ForceDelayer.Instance.ApplyForceDelayed((component.data.lookDirection_Flat + Vector3.up) * 40f * (Plugin.nannerPow.Value - 1f), 1f, component); } } } } [BepInPlugin("torrentialtorment", "Torrential_Torment", "1.0.0")] public class Plugin : BaseUnityPlugin { public struct StatusBlock { public ConfigEntry Type; public ConfigEntry Amount; } internal static ConfigEntry tornadoSpeedMult; internal static ConfigEntry tornadoLifetimeIncrease; internal static ConfigEntry tumbleSize; internal static ConfigEntry tumbleRollForce; internal static ConfigEntry dethornPlayers; internal static ConfigEntry dethornRate; internal static ConfigEntry dethornWhilePassedOut; internal static ConfigEntry segment2WeatherLength; internal static ConfigEntry segment3WeatherLength; internal static ConfigEntry eternalModeAlpine; internal static ConfigEntry eternalModeRoots; internal static ConfigEntry eternalModeTropics; internal static ConfigEntry a14Rain; internal static ConfigEntry rainPow; internal static ConfigEntry cycleWindDirection; internal static ConfigEntry allowAnyWindDirection; internal static ConfigEntry windForceMultiplier; internal static ConfigEntry windForceMultiplierAlpine; internal static ConfigEntry alpineAdditionalStatus; internal static ConfigEntry alpineAdditionalStatusOfType; internal static ConfigEntry tropicsAdditionalStatus; internal static ConfigEntry tropicsAdditionalStatusOfType; internal static ConfigEntry rootsAdditionalStatus; internal static ConfigEntry rootsAdditionalStatusOfType; internal static ConfigEntry mesaAdditionalStatus; internal static ConfigEntry mesaAdditionalStatusOfType; internal static ConfigEntry bigGusts; internal static ConfigEntry bigGustPowerMult; internal static ConfigEntry bigGustChance; internal static ConfigEntry bigGustFallTime; internal static ConfigEntry dayTimeMultiplier; internal static ConfigEntry nightTimeMultiplier; internal static ConfigEntry eternalNight; internal static ConfigEntry windNEVERPushesItems; internal static ConfigEntry lavaCycleSpeedMult; internal static ConfigEntry lavaNeverLowers; internal static ConfigEntry lavaSyncRate; internal static ConfigEntry dynamitePow; internal static ConfigEntry sporePuffPow; internal static ConfigEntry nannerPow; internal static ConfigEntry geyserPow; internal static ConfigEntry energyDrinkPow; internal static ConfigEntry dastardlySplos; internal static ConfigEntry dastardlyNanas; internal static ConfigEntry unshackledNanas; internal static ConfigEntry debugForceDelay; public static Dictionary> ExploPowersForEach = new Dictionary>(); public static Dictionary statusBlocks = new Dictionary(); internal static ManualLogSource Log { get; private set; } = null; private void SetupStatusDic() { StatusBlock value = default(StatusBlock); value.Type = alpineAdditionalStatusOfType; value.Amount = alpineAdditionalStatus; statusBlocks.Add("SnowStorm", value); StatusBlock value2 = default(StatusBlock); value2.Type = tropicsAdditionalStatusOfType; value2.Amount = tropicsAdditionalStatus; statusBlocks.Add("RainStorm", value2); StatusBlock value3 = default(StatusBlock); value3.Type = rootsAdditionalStatusOfType; value3.Amount = rootsAdditionalStatus; statusBlocks.Add("WindStorm", value3); StatusBlock value4 = default(StatusBlock); value4.Type = mesaAdditionalStatusOfType; value4.Amount = mesaAdditionalStatus; statusBlocks.Add("Sun", value4); } private void SetupPowDic() { ExploPowersForEach.Add("VFX_SporeExploExplo(Clone)", sporePuffPow); ExploPowersForEach.Add("VFX_DynamiteExplosion(Clone)", dynamitePow); ExploPowersForEach.Add("Explosion", geyserPow); ExploPowersForEach.Add("VFX_BalloonPopWithKnockback(Clone)", energyDrinkPow); } private void Awake() { //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Expected O, but got Unknown tornadoSpeedMult = ((BaseUnityPlugin)this).Config.Bind("Tornados", "Speed Mult", 1f, (ConfigDescription)null); tornadoLifetimeIncrease = ((BaseUnityPlugin)this).Config.Bind("Tornados", "Life Time Increase", 0f, (ConfigDescription)null); tumbleRollForce = ((BaseUnityPlugin)this).Config.Bind("Tumbles", "Speed Mult", 1f, (ConfigDescription)null); tumbleSize = ((BaseUnityPlugin)this).Config.Bind("Tumbles", "Hit Power Mult", 1f, (ConfigDescription)null); dethornPlayers = ((BaseUnityPlugin)this).Config.Bind("Tumbles", "Auto Dethorn Players", false, (ConfigDescription)null); dethornWhilePassedOut = ((BaseUnityPlugin)this).Config.Bind("Tumbles", "Dethorn Only While Passed Out", false, (ConfigDescription)null); dethornRate = ((BaseUnityPlugin)this).Config.Bind("Tumbles", "Dethorn Rate", 1f, (ConfigDescription)null); debugForceDelay = ((BaseUnityPlugin)this).Config.Bind("Debug", "Force Delay", 2f, (ConfigDescription)null); segment2WeatherLength = ((BaseUnityPlugin)this).Config.Bind("Weather", "Tropics/Roots Weather Length Multiplier", 1f, (ConfigDescription)null); segment3WeatherLength = ((BaseUnityPlugin)this).Config.Bind("Weather", "Alpine Wind Length Multiplier", 1f, (ConfigDescription)null); windForceMultiplier = ((BaseUnityPlugin)this).Config.Bind("Weather", "Wind Force Multiplier Roots", 1f, (ConfigDescription)null); windForceMultiplierAlpine = ((BaseUnityPlugin)this).Config.Bind("Weather", "Wind Force Multiplier Alpine", 1f, (ConfigDescription)null); allowAnyWindDirection = ((BaseUnityPlugin)this).Config.Bind("Weather", "Allow Any Wind Directions", false, (ConfigDescription)null); eternalModeTropics = ((BaseUnityPlugin)this).Config.Bind("Weather", "Infinite Tropics Rain", false, (ConfigDescription)null); a14Rain = ((BaseUnityPlugin)this).Config.Bind("Weather", "Tropics Has Wind Force That Pushes Down", false, (ConfigDescription)null); rainPow = ((BaseUnityPlugin)this).Config.Bind("Weather", "Tropics Rain Pow", 10f, (ConfigDescription)null); eternalModeRoots = ((BaseUnityPlugin)this).Config.Bind("Weather", "Infinite Roots Wind", false, (ConfigDescription)null); eternalModeAlpine = ((BaseUnityPlugin)this).Config.Bind("Weather", "Infinite Alpine Wind", false, (ConfigDescription)null); windNEVERPushesItems = ((BaseUnityPlugin)this).Config.Bind("Weather", "Prevent Wind From Pushing Items", true, (ConfigDescription)null); tropicsAdditionalStatus = ((BaseUnityPlugin)this).Config.Bind("Weather Statuses", "Tropics Status Per Second (0.02f is 1 point per second)", 0f, (ConfigDescription)null); tropicsAdditionalStatusOfType = ((BaseUnityPlugin)this).Config.Bind("Weather Statuses", "Tropics Status Type", (STATUSTYPE)3, (ConfigDescription)null); rootsAdditionalStatus = ((BaseUnityPlugin)this).Config.Bind("Weather Statuses", "Roots Status Per Second", 0f, (ConfigDescription)null); rootsAdditionalStatusOfType = ((BaseUnityPlugin)this).Config.Bind("Weather Statuses", "Roots Status Type", (STATUSTYPE)10, (ConfigDescription)null); alpineAdditionalStatus = ((BaseUnityPlugin)this).Config.Bind("Weather Statuses", "Additional Alpine Status Per Second", 0f, (ConfigDescription)null); alpineAdditionalStatusOfType = ((BaseUnityPlugin)this).Config.Bind("Weather Statuses", "Additional Alpine Status Type", (STATUSTYPE)2, (ConfigDescription)null); mesaAdditionalStatus = ((BaseUnityPlugin)this).Config.Bind("Weather Statuses", "Additional Mesa Status Per Second", 0f, (ConfigDescription)null); mesaAdditionalStatusOfType = ((BaseUnityPlugin)this).Config.Bind("Weather Statuses", "Additional Mesa Status Type", (STATUSTYPE)8, (ConfigDescription)null); bigGusts = ((BaseUnityPlugin)this).Config.Bind("Big Gusts", "Big Gusts Enabled", false, (ConfigDescription)null); bigGustPowerMult = ((BaseUnityPlugin)this).Config.Bind("Big Gusts", "Big Gust Power Mult", 5f, (ConfigDescription)null); bigGustChance = ((BaseUnityPlugin)this).Config.Bind("Big Gusts", "% Chance (10 rolls per second)", 0.1f, (ConfigDescription)null); bigGustFallTime = ((BaseUnityPlugin)this).Config.Bind("Big Gusts", "Big Gust Fall Time", 2f, (ConfigDescription)null); dayTimeMultiplier = ((BaseUnityPlugin)this).Config.Bind("Day Night Cycle", "Day Length Multiplier", 1f, (ConfigDescription)null); nightTimeMultiplier = ((BaseUnityPlugin)this).Config.Bind("Day Night Cycle", "Night Length Multiplier", 1f, (ConfigDescription)null); eternalNight = ((BaseUnityPlugin)this).Config.Bind("Day Night Cycle", "Eternal Night", false, (ConfigDescription)null); lavaCycleSpeedMult = ((BaseUnityPlugin)this).Config.Bind("Lava", "Lava Cycle Speed Mult", 1f, (ConfigDescription)null); lavaNeverLowers = ((BaseUnityPlugin)this).Config.Bind("Lava", "Lava Never Lowers", false, (ConfigDescription)null); lavaSyncRate = ((BaseUnityPlugin)this).Config.Bind("Lava", "Lava Sync Rate (Lower equals smoother lava but potentially more server lag.)", 5f, (ConfigDescription)null); dynamitePow = ((BaseUnityPlugin)this).Config.Bind("AOE", "Dynamite Explosion Power Mult", 1f, (ConfigDescription)null); sporePuffPow = ((BaseUnityPlugin)this).Config.Bind("AOE", "Spore Puff Power Mult", 1f, (ConfigDescription)null); geyserPow = ((BaseUnityPlugin)this).Config.Bind("AOE", "Geyser Power Mult", 1f, (ConfigDescription)null); energyDrinkPow = ((BaseUnityPlugin)this).Config.Bind("AOE", "Energy Drink Explosion Power Mult", 1f, (ConfigDescription)null); dastardlySplos = ((BaseUnityPlugin)this).Config.Bind("AOE", "Dastardly Explosions (If on, all explosions will try to send you off the mountain)", false, (ConfigDescription)null); unshackledNanas = ((BaseUnityPlugin)this).Config.Bind("Bananas", "Unshackled Bananas", false, (ConfigDescription)null); nannerPow = ((BaseUnityPlugin)this).Config.Bind("Bananas", "Banana Slip Power Mult", 1f, (ConfigDescription)null); dastardlyNanas = ((BaseUnityPlugin)this).Config.Bind("Bananas", "Dastardly Bananas (If on, bananas will try to send you off the mountain)", false, (ConfigDescription)null); SetupPowDic(); SetupStatusDic(); Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)"Plugin Torrential Torment is loaded!"); Harmony val = new Harmony("torentialtorment"); val.PatchAll(); } } [HarmonyPatch(typeof(Tornado), "Start")] internal static class TornadoExtraLifetime { internal static void Postfix(Tornado __instance) { __instance.lifeTime += Plugin.tornadoLifetimeIncrease.Value; } } [HarmonyPatch(typeof(Tornado), "Movement")] internal static class TornadoSpeedMultApplier { internal static bool Prefix(Tornado __instance) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) if (Plugin.tornadoSpeedMult.Value == 1f || !PhotonNetwork.IsMasterClient) { return true; } if ((Object)(object)__instance.target == (Object)null) { return false; } Vector3 vel = __instance.vel; Vector3 val = __instance.target.position - __instance.tornadoPos; __instance.vel = FRILerp.Lerp(vel, ((Vector3)(ref val)).normalized * 15f * Plugin.tornadoSpeedMult.Value, 0.15f, true); __instance.tornadoPos += __instance.vel * Time.deltaTime; RaycastHit groundPosRaycast = HelperFunctions.GetGroundPosRaycast(__instance.tornadoPos + Vector3.up * 200f, (LayerType)2, 0f); if (Object.op_Implicit((Object)(object)((RaycastHit)(ref groundPosRaycast)).transform) && Vector3.Distance(__instance.tornadoPos, ((RaycastHit)(ref groundPosRaycast)).point) < 100f) { ((Component)__instance).transform.position = ((RaycastHit)(ref groundPosRaycast)).point; return false; } ((Component)__instance).transform.position = __instance.tornadoPos; return false; } } [HarmonyPatch(typeof(TumbleWeed), "Start")] internal static class TumblePatch { internal static void Postfix(TumbleWeed __instance) { if (PhotonNetwork.IsMasterClient) { __instance.rollForce *= Plugin.tumbleRollForce.Value; __instance.powerMultiplier *= Plugin.tumbleSize.Value; } } } [HarmonyPatch(typeof(TumbleWeed), "OnCollisionEnter")] internal static class AnotherPatchToTumbles { internal static void Prefix(TumbleWeed __instance, Collision collision) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) Character componentInParent = collision.gameObject.GetComponentInParent(); if (Object.op_Implicit((Object)(object)componentInParent) && PhotonNetwork.IsMasterClient && !componentInParent.IsLocal && Plugin.tumbleSize.Value != 1f) { float num = ((Component)__instance).transform.localScale.x / __instance.originalScale; if (__instance.originalScale == 0f) { num = 1f; } num = Mathf.Clamp01(num); Vector3 linearVelocity = __instance.rig.linearVelocity; float num2 = Mathf.Clamp01(((Vector3)(ref linearVelocity)).magnitude * num * __instance.powerMultiplier); if (__instance.testFullPower) { num2 = 1f; } if (!(num2 < 0.2f)) { componentInParent.Fall(2f * num2, 0f); linearVelocity = __instance.rig.linearVelocity; componentInParent.AddForceAtPosition(((Vector3)(ref linearVelocity)).normalized * __instance.collisionForce * num2, ((ContactPoint)(ref collision.contacts[0])).point, 1f); } } } } [HarmonyPatch(typeof(Character), "Update")] internal static class CharThornPatch { public static float dethornCount; internal static void Prefix(Character __instance) { if (!__instance.IsLocal || !PhotonNetwork.IsMasterClient) { return; } dethornCount += Time.deltaTime; if (!(dethornCount > Plugin.dethornRate.Value)) { return; } foreach (Character allCharacter in Character.AllCharacters) { List physicalThorns = allCharacter.refs.afflictions.physicalThorns; if (physicalThorns.Count > 0 && (allCharacter.data.passedOut || !Plugin.dethornWhilePassedOut.Value) && Plugin.dethornPlayers.Value) { Util.RandomSelection((IEnumerable)physicalThorns, (Func)((ThornOnMe thorn) => Convert.ToInt32(thorn.stuckIn))).Interact_CastFinished(Character.localCharacter); dethornCount = 0f; } } } } [HarmonyPatch(typeof(WindChillZone), "HandleTime")] internal static class AllWeatherPatch { internal static bool Prefix(WindChillZone __instance) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Invalid comparison between Unknown and I4 //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Invalid comparison between Unknown and I4 __instance.untilSwitch -= Time.deltaTime; Vector3 zero = Vector3.zero; if (__instance.untilSwitch < 0f && PhotonNetwork.IsMasterClient) { if ((Plugin.eternalModeTropics.Value && ((Object)__instance).name == "RainStorm") || (Plugin.eternalModeRoots.Value && ((Object)__instance).name == "WindStorm") || (Plugin.eternalModeAlpine.Value && ((Object)__instance).name == "SnowStorm")) { __instance.windActive = false; } __instance.untilSwitch = __instance.GetNextWindTime(!__instance.windActive); Segment currentSegment = Singleton.Instance.GetCurrentSegment(); if (!__instance.windActive) { if ((int)currentSegment == 1) { __instance.untilSwitch *= Plugin.segment2WeatherLength.Value; } else if ((int)currentSegment == 2) { __instance.untilSwitch *= Plugin.segment3WeatherLength.Value; } } if (Plugin.allowAnyWindDirection.Value) { __instance.view.RPC("RPCA_ToggleWind", (RpcTarget)0, new object[3] { !__instance.windActive, (object)new Vector3(Random.Range(-1f, 1f), Random.Range(-1f, 1f), Random.Range(-1f, 1f)), __instance.untilSwitch }); } else { __instance.view.RPC("RPCA_ToggleWind", (RpcTarget)0, new object[3] { !__instance.windActive, __instance.RandomWindDirection(), __instance.untilSwitch }); } } return !PhotonNetwork.IsMasterClient; } } [HarmonyPatch(typeof(CharacterAfflictions), "AddSunHeat")] internal static class PatchSunHeat { internal static void Postfix(CharacterAfflictions __instance, float amount) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) Plugin.statusBlocks.TryGetValue("Sun", out var value); float[] array = new float[CharacterAfflictions.NumStatusTypes]; array[value.Type.Value] = value.Amount.Value; __instance.character.refs.view.RPC("RPC_ApplyStatusesFromFloatArray", (RpcTarget)0, new object[1] { array }); } } [HarmonyPatch(typeof(WindChillZone), "FixedUpdate")] internal static class HandleForceFromHostPatch { internal static int windForceClock; internal static int windStatusClock; internal static bool dontQueueF; internal static bool dontQueueS; internal static bool Prefix(WindChillZone __instance) { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Invalid comparison between Unknown and I4 //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Invalid comparison between Unknown and I4 //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Invalid comparison between Unknown and I4 //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Invalid comparison between Unknown and I4 //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Invalid comparison between Unknown and I4 //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Invalid comparison between Unknown and I4 //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Invalid comparison between Unknown and I4 //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Invalid comparison between Unknown and I4 //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Invalid comparison between Unknown and I4 if ((Object)(object)Character.localCharacter == (Object)null || !PhotonNetwork.IsMasterClient) { return true; } __instance.currentForceMult = Mathf.MoveTowards(__instance.currentForceMult, (float)(__instance.windActive ? 1 : 0), Time.fixedDeltaTime); if (__instance.timeSpentWaiting >= __instance.delayBeforeForce) { if (((Object)__instance).name == "WindStorm" && (int)Singleton.Instance.GetCurrentBiome() == 7) { windForceClock++; windStatusClock++; } else if (((Object)__instance).name == "SnowStorm" && (int)Singleton.Instance.GetCurrentBiome() == 2) { windForceClock++; windStatusClock++; } else if (((Object)__instance).name == "RainStorm" && (int)Singleton.Instance.GetCurrentBiome() == 1) { windForceClock++; windStatusClock++; } if (windForceClock > 5) { if (((Object)__instance).name == "WindStorm" && (int)Singleton.Instance.GetCurrentBiome() == 7) { windForceClock = 0; } else if (((Object)__instance).name == "SnowStorm" && (int)Singleton.Instance.GetCurrentBiome() == 2) { windForceClock = 0; } else if (((Object)__instance).name == "RainStorm" && (int)Singleton.Instance.GetCurrentBiome() == 1) { windForceClock = 0; } foreach (Character allCharacter in Character.AllCharacters) { if (((Bounds)(ref __instance.windZoneBounds)).Contains(allCharacter.Center) && __instance.windActive) { __instance.windPlayerFactor = WindChillZone.GetWindIntensityAtPoint(allCharacter.Center, __instance.lightVolumeSampleThreshold_lower, __instance.lightVolumeSampleThreshold_margin); __instance.AddWindForceToCharacter(allCharacter, __instance.currentForceMult * 5f); } } if (windStatusClock > 49) { if (((Object)__instance).name == "WindStorm" && (int)Singleton.Instance.GetCurrentBiome() == 7) { windStatusClock = 0; } else if (((Object)__instance).name == "SnowStorm" && (int)Singleton.Instance.GetCurrentBiome() == 2) { windStatusClock = 0; } else if (((Object)__instance).name == "RainStorm" && (int)Singleton.Instance.GetCurrentBiome() == 1) { windStatusClock = 0; } } } foreach (Character allBotCharacter in Character.AllBotCharacters) { if (((Bounds)(ref __instance.windZoneBounds)).Contains(allBotCharacter.Center)) { __instance.AddWindForceToCharacter(allBotCharacter, 0.6f * __instance.currentForceMult); } } } if (__instance.windMovesItems && !Plugin.windNEVERPushesItems.Value) { for (int i = 0; i < Item.ALL_ACTIVE_ITEMS.Count; i++) { Item val = Item.ALL_ACTIVE_ITEMS[i]; if (ClassExtensionsMethods.UnityObjectExists(val) && (int)val.itemState == 0 && ((Bounds)(ref __instance.windZoneBounds)).Contains(val.Center())) { __instance.AddWindForceToItem(val); } } } return false; } } [HarmonyPatch(typeof(WindChillZone), "AddWindForceToCharacter")] internal static class WindForcePatch { internal static bool Prefix(WindChillZone __instance, Character character, float mult = 1f) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_05fa: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) Plugin.statusBlocks.TryGetValue(((Object)__instance).name, out var value); if (((Object)__instance).name == "RainStorm") { Vector3 groundPos = HelperFunctions.GetGroundPos(character.Center + new Vector3(0f, 500f, 0f), (LayerType)1, 0f); if (groundPos.y < character.Center.y) { if (value.Amount.Value > 0f && HandleForceFromHostPatch.windStatusClock > 49) { float[] array = new float[CharacterAfflictions.NumStatusTypes]; array[value.Type.Value] = value.Amount.Value; character.refs.view.RPC("RPC_ApplyStatusesFromFloatArray", (RpcTarget)0, new object[1] { array }); } if (Plugin.a14Rain.Value) { character.view.RPC("RPCA_AddForceAtPosition", character.view.Owner, new object[3] { (object)new Vector3(0f, 0f - Plugin.rainPow.Value, 0f), character.Center, __instance.forceRadius }); } } return false; } if ((!character.IsLocal && Plugin.windForceMultiplier.Value == 1f && Plugin.windForceMultiplierAlpine.Value == 1f) || __instance.windForce <= 0f || __instance.windPlayerFactor <= 0f) { return false; } if ((Object)(object)character.data.currentClimbHandle != (Object)null) { return false; } float num = (__instance.useIntensityCurve ? (Mathf.Clamp01(__instance.windIntensity - 0.5f) * 2f) : 1f); bool flag = false; Parasol val = default(Parasol); if (Object.op_Implicit((Object)(object)character.data.currentItem) && ((Component)character.data.currentItem).TryGetComponent(ref val) && val.isOpen) { num *= 10f; flag = true; } if (character.refs.balloons.currentBalloonCount > 0) { int num2 = 2; if (flag) { num2 = 0; } num *= (float)(num2 + character.refs.balloons.currentBalloonCount); } Affliction val2 = default(Affliction); if (character.refs.afflictions.HasAfflictionType((AfflictionType)17, ref val2)) { num = 0f; } if (__instance.useRaycast && Physics.Raycast(character.Center, -__instance.currentWindDirection, ref __instance.hitInfo, __instance.maxRaycastDistance, LayerMask.op_Implicit(HelperFunctions.GetMask((LayerType)1)))) { float num3 = Mathf.InverseLerp(__instance.minRaycastDistance, __instance.maxRaycastDistance, ((RaycastHit)(ref __instance.hitInfo)).distance); float num4 = Mathf.Clamp01(Vector3.Dot(((RaycastHit)(ref __instance.hitInfo)).normal, __instance.currentWindDirection)); num3 += 1f - num4; num *= Mathf.Clamp01(num3); } num *= ((character.data.fallSeconds >= 0.01f) ? __instance.ragdolledWindForceMult : 1f); num *= mult; if (value.Amount.Value > 0f && HandleForceFromHostPatch.windStatusClock > 49) { float[] array2 = new float[CharacterAfflictions.NumStatusTypes]; array2[value.Type.Value] = value.Amount.Value * __instance.windPlayerFactor; character.refs.view.RPC("RPC_ApplyStatusesFromFloatArray", (RpcTarget)0, new object[1] { array2 }); } float num5 = 0f; if (!character.IsLocal) { num5 -= 1f; } if (((Object)__instance).name == "SnowStorm") { num5 += Plugin.windForceMultiplierAlpine.Value; } else if (((Object)__instance).name == "WindStorm") { num5 += Plugin.windForceMultiplier.Value; } if (Plugin.bigGusts.Value) { float num6 = Random.Range(0f, 100f); if (Plugin.bigGustChance.Value > num6 && character.data.fallSeconds <= 0f && __instance.windIntensity > 0.5f) { character.view.RPC("RPCA_AddForceAtPosition", character.view.Owner, new object[3] { __instance.currentWindDirection * __instance.windForce * __instance.windPlayerFactor * num * Plugin.bigGustPowerMult.Value * (num5 + 1f), character.Center, __instance.forceRadius }); character.Fall(Plugin.bigGustFallTime.Value, 0f); } else { character.view.RPC("RPCA_AddForceAtPosition", character.view.Owner, new object[3] { __instance.currentWindDirection * __instance.windForce * __instance.windPlayerFactor * num * num5, character.Center, __instance.forceRadius }); } } else { character.view.RPC("RPCA_AddForceAtPosition", character.view.Owner, new object[3] { __instance.currentWindDirection * __instance.windForce * __instance.windPlayerFactor * num * num5, character.Center, __instance.forceRadius }); } return !PhotonNetwork.IsMasterClient; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }