Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of FalseHasan v1.0.0
HalseSon.dll
Decompiled 2 months agousing System; 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.Logging; using Microsoft.CodeAnalysis; using On.RoR2; using RoR2; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("HalseSon")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("HalseSon")] [assembly: AssemblyTitle("HalseSon")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [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 HalseSon { [BepInPlugin("pseudopulse.HalseSon", "HalseSon", "1.0.0")] public class Main : BaseUnityPlugin { public const string PluginGUID = "pseudopulse.HalseSon"; public const string PluginAuthor = "pseudopulse"; public const string PluginName = "HalseSon"; public const string PluginVersion = "1.0.0"; public static ManualLogSource ModLogger; public static LazyIndex FalseSon = new LazyIndex("FalseSonBody"); public static LazyIndex FalseSonBoss = new LazyIndex("FalseSonBoss"); public static LazyIndex Acrid = new LazyIndex("CrocoBody"); public void Awake() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown ModLogger = ((BaseUnityPlugin)this).Logger; HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamage); } private void OnTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_0052: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_009b: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)self.body) && self.body.bodyIndex == (BodyIndex)Acrid && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && (val.bodyIndex == (BodyIndex)FalseSon || val.bodyIndex == (BodyIndex)FalseSonBoss)) { damageInfo.damage *= 5f; damageInfo.damageType |= DamageTypeCombo.op_Implicit((DamageType)16777216); } orig.Invoke(self, damageInfo); } } public class LazyIndex { private string target; private BodyIndex _value = (BodyIndex)(-1); public BodyIndex Value => UpdateValue(); public LazyIndex(string target) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) this.target = target; } public BodyIndex UpdateValue() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if ((int)_value == -1 || (int)_value == -1) { _value = BodyCatalog.FindBodyIndex(target); } return _value; } public static implicit operator BodyIndex(LazyIndex index) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return index.Value; } } }