Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Nemesis Rising Tides v1.0.9
NemesisRisingTides.dll
Decompiled 2 years ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; 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 IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using MysticsRisky2Utils; using MysticsRisky2Utils.BaseAssetTypes; using MysticsRisky2Utils.ContentManagement; using NemesisRisingTides.Changes; using NemesisRisingTides.Contents; using On.RoR2; using On.RoR2.UI; using R2API; using RisingTides; using RisingTides.Buffs; using RisingTides.Elites; using RisingTides.Equipment; using RoR2; using RoR2.ContentManagement; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering.PostProcessing; [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("NemesisRisingTides")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+98c5e58a42e2d7a0806de380fdd041d93ca9ea66")] [assembly: AssemblyProduct("NemesisRisingTides")] [assembly: AssemblyTitle("NemesisRisingTides")] [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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace NemesisRisingTides { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("prodzpod.NemesisRisingTides", "NemesisRisingTides", "1.0.9")] public class Main : BaseUnityPlugin { [HarmonyPatch(typeof(ContentLoadHelper), "InvokeAfterContentPackLoaded", new Type[] { typeof(Assembly), typeof(Type) })] public class PatchPostinits { public static void Postfix(Assembly assembly, Type loadType) { if (!(assembly != RisingTidesPlugin.executingAssembly)) { if (loadType == typeof(BaseBuff) && Main.AfterBuffContentPackLoaded != null) { Main.AfterBuffContentPackLoaded(); } else if (loadType == typeof(BaseEquipment) && Main.AfterEquipContentPackLoaded != null) { Main.AfterEquipContentPackLoaded(); } else if (loadType == typeof(BaseElite) && Main.AfterEliteContentPackLoaded != null) { Main.AfterEliteContentPackLoaded(); } } } } public class Content : IContentPackProvider { public static ContentPack contentPack = new ContentPack(); public string identifier => "Nemesis Rising Tides"; public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; ContentLoadHelper contentLoadHelper = new ContentLoadHelper(); Assembly executingAssembly = Assembly.GetExecutingAssembly(); Action[] loadDispatchers2 = new Action[3] { delegate { contentLoadHelper.DispatchLoad<EquipmentDef>(executingAssembly, typeof(BaseEquipment), (Action<EquipmentDef[]>)delegate(EquipmentDef[] x) { contentPack.equipmentDefs.Add(x); }); }, delegate { contentLoadHelper.DispatchLoad<BuffDef>(executingAssembly, typeof(BaseBuff), (Action<BuffDef[]>)delegate(BuffDef[] x) { contentPack.buffDefs.Add(x); }); }, delegate { contentLoadHelper.DispatchLoad<EliteDef>(executingAssembly, typeof(BaseElite), (Action<EliteDef[]>)delegate(EliteDef[] x) { contentPack.eliteDefs.Add(x); }); } }; int j = 0; while (j < loadDispatchers2.Length) { loadDispatchers2[j](); args.ReportProgress(Util.Remap((float)(j + 1), 0f, (float)loadDispatchers2.Length, 0f, 0.05f)); yield return null; int num = j + 1; j = num; } while (contentLoadHelper.coroutine.MoveNext()) { args.ReportProgress(Util.Remap(contentLoadHelper.progress.value, 0f, 1f, 0.05f, 0.9f)); yield return contentLoadHelper.coroutine.Current; } loadDispatchers2 = new Action[3] { delegate { ContentLoadHelper.InvokeAfterContentPackLoaded<BaseEquipment>(executingAssembly); }, delegate { ContentLoadHelper.InvokeAfterContentPackLoaded<BaseBuff>(executingAssembly); }, delegate { ContentLoadHelper.InvokeAfterContentPackLoaded<BaseElite>(executingAssembly); } }; int i = 0; while (i < loadDispatchers2.Length) { loadDispatchers2[i](); args.ReportProgress(Util.Remap((float)(i + 1), 0f, (float)loadDispatchers2.Length, 0.95f, 0.99f)); yield return null; int num2 = i + 1; i = num2; } } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static CollectContentPackProvidersDelegate <>9__22_0; public static Action <>9__22_1; public static hook_GetLocalizedStringByToken <>9__22_2; internal void <Awake>b__22_0(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new Content()); } internal void <Awake>b__22_1() { EquipmentDef[] array = (EquipmentDef[])(object)new EquipmentDef[8] { Equipment.RisingTides_AffixBlackHole, Equipment.RisingTides_AffixNight, Equipment.RisingTides_AffixWater, Equipment.RisingTides_AffixMoney, Equipment.RisingTides_AffixBarrier, Equipment.RisingTides_AffixImpPlane, ((BaseEquipment)Buffered.EquipBuffered.instance).equipmentDef, ((BaseEquipment)Oppressive.EquipOppressive.instance).equipmentDef }; EquipmentDef[] array2 = array; foreach (EquipmentDef val in array2) { val.dropOnDeathChance = 0.0003f; } } internal string <Awake>b__22_2(orig_GetLocalizedStringByToken orig, Language self, string token) { if (self.TokenIsRegistered("EQUIPMENT_AFFIXRED_DESC") && Pickups.Contains(token)) { return orig.Invoke(self, token).Split('.')[0] + "."; } return orig.Invoke(self, token); } } public const string PluginGUID = "prodzpod.NemesisRisingTides"; public const string PluginAuthor = "prodzpod"; public const string PluginName = "NemesisRisingTides"; public const string PluginVersion = "1.0.9"; public static ManualLogSource Log; public static PluginInfo pluginInfo; public static Harmony Harmony; public static ConfigFile Config; public static Dictionary<string, string> SuperOverrides = new Dictionary<string, string>(); private static AssetBundle _assetBundle; public static readonly string[] Pickups = new string[7] { "EQUIPMENT_RISINGTIDES_AFFIXMONEY_PICKUP", "EQUIPMENT_RISINGTIDES_AFFIXNIGHT_PICKUP", "EQUIPMENT_RISINGTIDES_AFFIXWATER_PICKUP", "EQUIPMENT_RISINGTIDES_AFFIXBARRIER_PICKUP", "EQUIPMENT_RISINGTIDES_AFFIXIMPPLANE_PICKUP", "EQUIPMENT_RISINGTIDES_AFFIXBLACKHOLE_PICKUP", "EQUIPMENT_RISINGTIDES_AFFIXMIRROR_PICKUP" }; public static AssetBundle AssetBundle { get { if ((Object)(object)_assetBundle == (Object)null) { _assetBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(pluginInfo.Location), "nemesisrisingtides")); } return _assetBundle; } } public static event Action AfterBuffContentPackLoaded; public static event Action AfterEquipContentPackLoaded; public static event Action AfterEliteContentPackLoaded; public void Awake() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown pluginInfo = ((BaseUnityPlugin)this).Info; Log = ((BaseUnityPlugin)this).Logger; Harmony = new Harmony("prodzpod.NemesisRisingTides"); Config = new ConfigFile(Path.Combine(Paths.ConfigPath, "prodzpod.NemesisRisingTides.cfg"), true); Harmony.PatchAll(typeof(PatchPostinits)); Magnetic.Init(); LanguageAPI.Add("EQUIPMENT_RISINGTIDES_AFFIXMONEY_DESC", Magnetic.Description); Nocturnal.Init(); LanguageAPI.Add("EQUIPMENT_RISINGTIDES_AFFIXNIGHT_DESC", Nocturnal.Description); Aquamarine.Init(); LanguageAPI.Add("EQUIPMENT_RISINGTIDES_AFFIXWATER_DESC", Aquamarine.Description); Bismuth.Init(); LanguageAPI.Add("EQUIPMENT_RISINGTIDES_AFFIXBARRIER_DESC", Bismuth.Description); Onyx.Init(); LanguageAPI.Add("EQUIPMENT_RISINGTIDES_AFFIXBLACKHOLE_DESC", Onyx.Description); Realgar.Init(); LanguageAPI.Add("EQUIPMENT_RISINGTIDES_AFFIXIMPPLANE_DESC", Realgar.Description); if (Config.Bind<bool>("Misc", "Change Blighted Name", true, "").Value) { LanguageAPI.AddOverlay("ELITE_MODIFIER_BLIGHTED_MOFFEIN", "Obsidian {0}"); } Assembly executingAssembly = Assembly.GetExecutingAssembly(); ContentLoadHelper.PluginAwakeLoad<BaseEquipment>(executingAssembly); ContentLoadHelper.PluginAwakeLoad<BaseBuff>(executingAssembly); ContentLoadHelper.PluginAwakeLoad<BaseElite>(executingAssembly); object obj = <>c.<>9__22_0; if (obj == null) { CollectContentPackProvidersDelegate val = delegate(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new Content()); }; <>c.<>9__22_0 = val; obj = (object)val; } ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj; AfterEquipContentPackLoaded += delegate { EquipmentDef[] array = (EquipmentDef[])(object)new EquipmentDef[8] { Equipment.RisingTides_AffixBlackHole, Equipment.RisingTides_AffixNight, Equipment.RisingTides_AffixWater, Equipment.RisingTides_AffixMoney, Equipment.RisingTides_AffixBarrier, Equipment.RisingTides_AffixImpPlane, ((BaseEquipment)Buffered.EquipBuffered.instance).equipmentDef, ((BaseEquipment)Oppressive.EquipOppressive.instance).equipmentDef }; EquipmentDef[] array2 = array; foreach (EquipmentDef val3 in array2) { val3.dropOnDeathChance = 0.0003f; } }; object obj2 = <>c.<>9__22_2; if (obj2 == null) { hook_GetLocalizedStringByToken val2 = (orig_GetLocalizedStringByToken orig, Language self, string token) => (self.TokenIsRegistered("EQUIPMENT_AFFIXRED_DESC") && Pickups.Contains(token)) ? (orig.Invoke(self, token).Split('.')[0] + ".") : orig.Invoke(self, token); <>c.<>9__22_2 = val2; obj2 = (object)val2; } Language.GetLocalizedStringByToken += (hook_GetLocalizedStringByToken)obj2; } public static GameObject MakeAura(CharacterBody body, float radius, Color color, Texture texture = null) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(RisingTidesAffixMoneyBehaviour.auraPrefab, body.transform); ((Object)val).name = "Aura"; val.transform.localScale = Vector3.one * radius; RisingTidesAffixMoneyAuraComponent component = val.GetComponent<RisingTidesAffixMoneyAuraComponent>(); Material val2 = Object.Instantiate<Material>(component.outerMaterial); Material val3 = Object.Instantiate<Material>(component.innerMaterial); ParticleSystemRenderer component2 = ((Component)val.transform.Find("Stars")).GetComponent<ParticleSystemRenderer>(); Material val4 = Object.Instantiate<Material>(((Renderer)component2).sharedMaterial); val2.color = color; val3.color = color; Color color2 = default(Color); ((Color)(ref color2))..ctor(color.r, color.g, color.b); val4.color = color2; val3.SetTexture("_Cloud1Tex", (Texture)(object)Texture2D.blackTexture); val3.SetTexture("_Cloud2Tex", (Texture)(((object)texture) ?? ((object)Texture2D.blackTexture))); component.outerMaterial = val2; component.innerMaterial = val3; ((Renderer)component2).sharedMaterial = val4; component.outerSphereRenderer.sharedMaterial = val2; component.innerSphereRenderer.sharedMaterial = val3; val.transform.SetParent(body.transform); return val; } } } namespace NemesisRisingTides.Contents { public class Buffered { public class EliteBuffered : BaseElite { public static EliteBuffered instance; public override void OnLoad() { ((BaseLoadableAsset)this).OnLoad(); instance = this; ((Object)base.eliteDef).name = "NemesisRisingTides_Buffered"; base.vanillaTier = 1; base.isHonor = true; base.eliteDef.healthBoostCoefficient = Main.Config.Bind<float>("BufferedElites", "Health Boost Coefficient", 4f, "How much health this elite should have? (e.g. 18 means it will have 18x health)").Value; base.eliteDef.damageBoostCoefficient = Main.Config.Bind<float>("BufferedElites", "Damage Boost Coefficient", 2f, "How much damage this elite should have? (e.g. 6 means it will have 6x damage)").Value; EliteRamp.AddRamp(base.eliteDef, Main.AssetBundle.LoadAsset<Texture2D>("Assets/BufferedRamp.png")); } public override void AfterContentPackLoaded() { ((BaseLoadableAsset)this).AfterContentPackLoaded(); base.eliteDef.eliteEquipmentDef = (Main.Config.Bind<bool>("Enabled Elites", "Buffered", true, "").Value ? ((BaseEquipment)EquipBuffered.instance).equipmentDef : null); } } public class EquipBuffered : BaseEliteAffix { public static EquipBuffered instance; public static ConfigEntry<bool> DisableOnUse; public override void OnPluginAwake() { ((BaseLoadableAsset)this).OnPluginAwake(); DisableOnUse = Main.Config.Bind<bool>("Buffered Elites", "Disable On-use for enemies", true, ""); } public override void OnLoad() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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) //IL_011a: 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_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: 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_01c9: Unknown result type (might be due to invalid IL or missing references) ((BaseEliteAffix)this).OnLoad(); instance = this; ((Object)((BaseEquipment)this).equipmentDef).name = "NemesisRisingTides_AffixBuffered"; ConfigurableValue.CreateFloat("prodzpod.NemesisRisingTides", "NemesisRisingTides", Main.Config, typeof(Buffered)?.ToString() + "Elites", "On-use Cooldown", 30f, 0f, 1000f, "", (List<string>)null, (ConfigEntry<bool>)null, false, (Action<float>)delegate(float newValue) { ((BaseEquipment)this).equipmentDef.cooldown = newValue; }); ((BaseEquipment)this).equipmentDef.pickupIconSprite = Main.AssetBundle.LoadAsset<Sprite>("Assets/BufferedEquip.png"); ((BaseEliteAffix)this).SetUpPickupModel(); ((BaseEliteAffix)this).AdjustElitePickupMaterial(Color.white, 1.6f, (Texture)(object)Main.AssetBundle.LoadAsset<Texture2D>("Assets/BufferedRamp.png")); GameObject val = PrefabAPI.InstantiateClone(new GameObject(), "NemesisRisingTidesAffixBufferedHeadpieceWrapper", false); GameObject val2 = PrefabAPI.InstantiateClone(((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/BarrierEffect.prefab").WaitForCompletion().transform.Find("MeshHolder").Find("ShieldMesh")).gameObject, "NemesisRisingTidesAffixBufferedHeadpiece", false); val2.transform.localScale = Vector3.one * 7.5f; val2.transform.SetParent(val.transform); val2.GetComponent<MeshFilter>().sharedMesh = Object.Instantiate<Mesh>(((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/SlowOnHit/SlowDownTime.prefab").WaitForCompletion().transform.Find("Visual").Find("Mesh")).GetComponent<MeshFilter>().sharedMesh); val2.transform.eulerAngles = new Vector3(30f, 0f, 0f); GameObject val3 = PrefabAPI.InstantiateClone(val2, "Crown 2"); val3.transform.eulerAngles = Quaternion.AngleAxis(180f, Vector3.up) * val2.transform.eulerAngles; val3.transform.SetParent(val.transform); ((BaseItemLike)this).itemDisplayPrefab = ((BaseItemLike)this).PrepareItemDisplayModel(val); BaseItemLike.onSetupIDRS += delegate { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00ae: Unknown result type (might be due to invalid IL or missing references) foreach (CharacterBody allBodyPrefabBodyBodyComponent in BodyCatalog.allBodyPrefabBodyBodyComponents) { CharacterModel componentInChildren = ((Component)allBodyPrefabBodyBodyComponent).GetComponentInChildren<CharacterModel>(); if (Object.op_Implicit((Object)(object)componentInChildren) && (Object)(object)componentInChildren.itemDisplayRuleSet != (Object)null) { DisplayRuleGroup equipmentDisplayRuleGroup = componentInChildren.itemDisplayRuleSet.GetEquipmentDisplayRuleGroup(Equipment.AffixWhite.equipmentIndex); if (!((DisplayRuleGroup)(ref equipmentDisplayRuleGroup)).Equals(DisplayRuleGroup.empty)) { string bodyName = BodyCatalog.GetBodyName(allBodyPrefabBodyBodyComponent.bodyIndex); ItemDisplayRule[] rules = equipmentDisplayRuleGroup.rules; foreach (ItemDisplayRule val4 in rules) { ((BaseItemLike)this).AddDisplayRule(bodyName, val4.childName, val4.localPos, val4.localAngles, val4.localScale); } } } } }; } public override bool OnUse(EquipmentSlot equipmentSlot) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 if (DisableOnUse.Value && Object.op_Implicit((Object)(object)equipmentSlot) && Object.op_Implicit((Object)(object)equipmentSlot.characterBody) && Object.op_Implicit((Object)(object)equipmentSlot.characterBody.teamComponent) && (int)equipmentSlot.characterBody.teamComponent.teamIndex != 1) { return false; } if (Object.op_Implicit((Object)(object)equipmentSlot.characterBody)) { EffectData val = new EffectData { origin = equipmentSlot.characterBody.corePosition, scale = equipmentSlot.characterBody.radius }; val.SetHurtBoxReference(((Component)equipmentSlot.characterBody).gameObject); EffectManager.SpawnEffect(AffixBarrierEquipment.selfBuffUseEffect, val, true); if (Object.op_Implicit((Object)(object)equipmentSlot.characterBody.healthComponent)) { equipmentSlot.characterBody.healthComponent.AddBarrier(equipmentSlot.characterBody.maxBarrier * ConfigurableValue<float>.op_Implicit(AffixBarrierEquipment.barrierRecharge) / 100f); } return true; } return false; } public override void AfterContentPackLoaded() { ((BaseLoadableAsset)this).AfterContentPackLoaded(); ((BaseEquipment)this).equipmentDef.passiveBuffDef = ((BaseBuff)AffixBuffered.instance).buffDef; } } public class AffixBuffered : BaseBuff { [HarmonyPatch] public class PatchBuffered { public static void ILManipulator(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); while (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<BaseBuff>(x, "buffDef") })) { val.Emit(OpCodes.Pop); val.EmitDelegate<Func<BuffDef>>((Func<BuffDef>)(() => ((BaseBuff)instance).buffDef)); } } public static IEnumerable<MethodBase> TargetMethods() { string[] list = new string[10] { "HealthComponent_TakeDamageForce_Vector3_bool_bool", "HealthComponent_TakeDamageForce_DamageInfo_bool_bool", "GenericGameEvents_OnApplyDamageReductionModifiers", "CharacterBody_RecalculateStats", "CharacterBody_RecalculateStats1", "CharacterBody_OnBuffFinalStackLost", "HealthBar_UpdateBarInfos", "HealthComponent_TakeDamage", "<CharacterBody_RecalculateStats1>b__12_0", "<HealthComponent_TakeDamage>b__15_0" }; return from x in AccessTools.GetDeclaredMethods(typeof(AffixBarrier)) where list.Contains(x.Name) select x; } } public static AffixBuffered instance; public static ConfigEntry<float> DeathRange; public static ConfigEntry<float> DeathHealth; public override void OnPluginAwake() { ((BaseLoadableAsset)this).OnPluginAwake(); DeathRange = Main.Config.Bind<float>("Buffered Elites", "On Death Nova Range", 13f, "in meters"); DeathHealth = Main.Config.Bind<float>("Buffered Elites", "On Death Nova Percentage", 0.25f, "1 = 100% of each enemies max hp"); } public override void OnLoad() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown ((BaseLoadableAsset)this).OnLoad(); instance = this; ((Object)base.buffDef).name = "NemesisRisingTides_AffixBuffered"; base.buffDef.iconSprite = Main.AssetBundle.LoadAsset<Sprite>("Assets/BufferedBuff.png"); LanguageAPI.Add("ELITE_MODIFIER_NEMESISRISINGTIDES_BUFFERED", "Buffered {0}"); LanguageAPI.Add("EQUIPMENT_NEMESISRISINGTIDES_AFFIXBUFFERED_NAME", "Combined Efforts"); LanguageAPI.Add("EQUIPMENT_NEMESISRISINGTIDES_AFFIXBUFFERED_PICKUP", "Become an aspect of unity."); LanguageAPI.Add("EQUIPMENT_NEMESISRISINGTIDES_AFFIXBUFFERED_DESC", $"<style=cIsHealth>Barrier does not decay</style>. Immune to knockback while <style=cIsHealing>barrier</style> is active. Attacks apply a <style=cIsUtility>random debuff</style> on hit. On Use, Gain <style=cIsHealth>{AffixBarrierEquipment.barrierRecharge.Value}%</style> of <style=cIsHealth>maximum health</style> as <style=cIsHealth>temporary barrier</style>."); AffixBarrier val = (AffixBarrier)BaseLoadableAsset.staticAssetDictionary[typeof(AffixBarrier)]; HealthComponent.TakeDamageForce_Vector3_bool_bool += new hook_TakeDamageForce_Vector3_bool_bool(val.HealthComponent_TakeDamageForce_Vector3_bool_bool); HealthComponent.TakeDamageForce_DamageInfo_bool_bool += new hook_TakeDamageForce_DamageInfo_bool_bool(val.HealthComponent_TakeDamageForce_DamageInfo_bool_bool); GenericGameEvents.OnApplyDamageReductionModifiers += new DamageModifierEventHandler(val.GenericGameEvents_OnApplyDamageReductionModifiers); CharacterBody.RecalculateStats += new hook_RecalculateStats(val.CharacterBody_RecalculateStats); CharacterBody.RecalculateStats += new Manipulator(val.CharacterBody_RecalculateStats1); CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(val.CharacterBody_OnBuffFinalStackLost); HealthBar.UpdateBarInfos += new hook_UpdateBarInfos(val.HealthBar_UpdateBarInfos); HealthComponent.TakeDamage += new Manipulator(val.HealthComponent_TakeDamage); GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)delegate(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); if (damageReport != null && Object.op_Implicit((Object)(object)damageReport.victimBody) && damageReport.victimBody.HasBuff(base.buffDef)) { SphereSearch val2 = new SphereSearch { radius = DeathRange.Value + damageReport.victimBody.radius, queryTriggerInteraction = (QueryTriggerInteraction)1, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = damageReport.victimBody.corePosition }; val2.RefreshCandidates(); val2.FilterCandidatesByDistinctHurtBoxEntities(); TeamMask val3 = default(TeamMask); ((TeamMask)(ref val3)).AddTeam(damageReport.victimBody.teamComponent.teamIndex); val2.FilterCandidatesByHurtBoxTeam(val3); CollectionExtensions.Do<HurtBox>((IEnumerable<HurtBox>)val2.GetHurtBoxes(), (Action<HurtBox>)delegate(HurtBox hurtBox) { if (Object.op_Implicit((Object)(object)hurtBox) && Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && (Object)(object)hurtBox.healthComponent.body != (Object)(object)damageReport.victimBody) { hurtBox.healthComponent.AddBarrier(hurtBox.healthComponent.body.maxHealth * DeathHealth.Value); } }); } }; Main.Harmony.PatchAll(typeof(PatchBuffered)); } public override void AfterContentPackLoaded() { ((BaseLoadableAsset)this).AfterContentPackLoaded(); base.buffDef.eliteDef = ((BaseElite)EliteBuffered.instance).eliteDef; } } } public class Oppressive { public class EliteOppressive : BaseElite { public static EliteOppressive instance; public override void OnLoad() { ((BaseLoadableAsset)this).OnLoad(); instance = this; ((Object)base.eliteDef).name = "NemesisRisingTides_Oppressive"; base.vanillaTier = 1; base.isHonor = true; base.eliteDef.healthBoostCoefficient = Main.Config.Bind<float>("OppressiveElites", "Health Boost Coefficient", 4f, "How much health this elite should have? (e.g. 18 means it will have 18x health)").Value; base.eliteDef.damageBoostCoefficient = Main.Config.Bind<float>("OppressiveElites", "Damage Boost Coefficient", 2f, "How much damage this elite should have? (e.g. 6 means it will have 6x damage)").Value; EliteRamp.AddRamp(base.eliteDef, Main.AssetBundle.LoadAsset<Texture2D>("Assets/OppressiveRamp.png")); } public override void AfterContentPackLoaded() { ((BaseLoadableAsset)this).AfterContentPackLoaded(); base.eliteDef.eliteEquipmentDef = (Main.Config.Bind<bool>("Enabled Elites", "Oppressive", true, "").Value ? ((BaseEquipment)EquipOppressive.instance).equipmentDef : null); } } public class EquipOppressive : BaseEliteAffix { public static EquipOppressive instance; public static ConfigEntry<bool> DisableOnUse; public static ConfigEntry<float> ForceRange; public static ConfigEntry<float> ForceActive; public static ConfigEntry<float> ActiveDuration; public override void OnLoad() { //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) ((BaseEliteAffix)this).OnLoad(); DisableOnUse = Main.Config.Bind<bool>("Oppressive Elites", "Disable On-use for enemies", true, ""); ForceRange = Main.Config.Bind<float>("Oppressive Elites", "Range", 13f, ""); ForceActive = Main.Config.Bind<float>("Oppressive Elites", "Downward Force", 4000f, ""); ActiveDuration = Main.Config.Bind<float>("Oppressive Elites", "No Jump Duration", 4f, ""); instance = this; ((Object)((BaseEquipment)this).equipmentDef).name = "NemesisRisingTides_AffixOppressive"; ConfigurableValue.CreateFloat("prodzpod.NemesisRisingTides", "NemesisRisingTides", Main.Config, typeof(Oppressive)?.ToString() + "Elites", "On-use Cooldown", 10f, 0f, 1000f, "", (List<string>)null, (ConfigEntry<bool>)null, false, (Action<float>)delegate(float newValue) { ((BaseEquipment)this).equipmentDef.cooldown = newValue; }); ((BaseEquipment)this).equipmentDef.pickupIconSprite = Main.AssetBundle.LoadAsset<Sprite>("Assets/OppressiveEquip.png"); ((BaseEliteAffix)this).SetUpPickupModel(); ((BaseEliteAffix)this).AdjustElitePickupMaterial(Color.white, 1.6f, (Texture)(object)Main.AssetBundle.LoadAsset<Texture2D>("Assets/OppressiveRamp.png")); GameObject val = PrefabAPI.InstantiateClone(new GameObject(), "NemesisRisingTidesAffixOppressiveHeadpieceWrapper", false); GameObject val2 = PrefabAPI.InstantiateClone(Main.AssetBundle.LoadAsset<GameObject>("Assets/AffixOppressiveHeadpiece.prefab"), "NemesisRisingTidesAffixOppressiveHeadpiece", false); val2.transform.localScale = Vector3.one * 200f; ((Component)val2.transform.Find("mdlAffixOppressiveCrown")).GetComponent<MeshFilter>().sharedMesh = Main.AssetBundle.LoadAsset<Mesh>("Assets/OppressiveCrown.asset"); Material sharedMaterial = ((Renderer)((Component)val2.transform.Find("mdlAffixOppressiveCrown")).GetComponent<MeshRenderer>()).sharedMaterial; sharedMaterial.color = new Color(1f, 1f, 1f, 0f); sharedMaterial.SetTexture("_MainTex", (Texture)(object)Main.AssetBundle.LoadAsset<Texture2D>("Assets/OppressiveCrownTexture.png")); ((Renderer)((Component)val2.transform.Find("mdlAffixOppressiveCrown")).GetComponent<MeshRenderer>()).sharedMaterial = sharedMaterial; val2.transform.SetParent(val.transform); ((BaseItemLike)this).itemDisplayPrefab = ((BaseItemLike)this).PrepareItemDisplayModel(val); BaseItemLike.onSetupIDRS += delegate { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //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) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) foreach (CharacterBody allBodyPrefabBodyBodyComponent in BodyCatalog.allBodyPrefabBodyBodyComponents) { CharacterModel componentInChildren = ((Component)allBodyPrefabBodyBodyComponent).GetComponentInChildren<CharacterModel>(); if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)componentInChildren.itemDisplayRuleSet)) { DisplayRuleGroup equipmentDisplayRuleGroup = componentInChildren.itemDisplayRuleSet.GetEquipmentDisplayRuleGroup(Equipment.AffixWhite.equipmentIndex); if (!((DisplayRuleGroup)(ref equipmentDisplayRuleGroup)).Equals(DisplayRuleGroup.empty)) { string bodyName = BodyCatalog.GetBodyName(allBodyPrefabBodyBodyComponent.bodyIndex); ItemDisplayRule[] rules = equipmentDisplayRuleGroup.rules; foreach (ItemDisplayRule val3 in rules) { ((BaseItemLike)this).AddDisplayRule(bodyName, val3.childName, val3.localPos, val3.localAngles, val3.localScale); } } } } }; } public override bool OnUse(EquipmentSlot equipmentSlot) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Invalid comparison between Unknown and I4 //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown if (DisableOnUse.Value && Object.op_Implicit((Object)(object)equipmentSlot) && Object.op_Implicit((Object)(object)equipmentSlot.characterBody) && Object.op_Implicit((Object)(object)equipmentSlot.characterBody.teamComponent) && (int)equipmentSlot.characterBody.teamComponent.teamIndex != 1) { return false; } if (!Object.op_Implicit((Object)(object)equipmentSlot.characterBody) || (DisableOnUse.Value && (int)equipmentSlot.characterBody.teamComponent.teamIndex != 1)) { return false; } if (ForceRange.Value > 0f) { BlastAttack val = new BlastAttack { attacker = ((Component)equipmentSlot.characterBody).gameObject, inflictor = ((Component)equipmentSlot.characterBody).gameObject, teamIndex = equipmentSlot.characterBody.teamComponent.teamIndex, position = equipmentSlot.characterBody.corePosition, procCoefficient = 1f, radius = ForceRange.Value, baseDamage = 0f, falloffModel = (FalloffModel)1, damageColorIndex = (DamageColorIndex)3, attackerFiltering = (AttackerFiltering)2 }; CollectionExtensions.Do<HitPoint>((IEnumerable<HitPoint>)val.Fire().hitPoints, (Action<HitPoint>)delegate(HitPoint hitPoint) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hitPoint.hurtBox) && Object.op_Implicit((Object)(object)hitPoint.hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hitPoint.hurtBox.healthComponent.body)) { hitPoint.hurtBox.healthComponent.TakeDamageForce(Physics.gravity * ForceActive.Value, false, false); hitPoint.hurtBox.healthComponent.body.AddTimedBuff(AffixOppressive.NoJump, ActiveDuration.Value); } }); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ProcStealthkit"), new EffectData { origin = equipmentSlot.characterBody.corePosition, rotation = Quaternion.identity }, true); return true; } return false; } public override void AfterContentPackLoaded() { ((BaseLoadableAsset)this).AfterContentPackLoaded(); ((BaseEquipment)this).equipmentDef.passiveBuffDef = ((BaseBuff)AffixOppressive.instance).buffDef; } } public class AffixOppressive : BaseBuff { public class NemesisAffixOppressiveBehaviour : MonoBehaviour { public RisingTidesAffixMoneyAuraComponent aura; public CharacterBody body; public float auraRadius = 0f; public void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); auraRadius += Range.Value + body.radius; } public void Start() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00f3: 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) GameObject val = Main.MakeAura(body, Range.Value + body.radius, new Color(1f, 0.6f, 1f, 0.25f)); string[] array = new string[2] { "SphereOuter", "SphereInner" }; foreach (string text in array) { Transform val2 = val.transform.Find(text); ((Component)val2).GetComponent<MeshFilter>().sharedMesh = Main.AssetBundle.LoadAsset<Mesh>("Assets/Cylinder.asset"); val2.localPosition = new Vector3(0f, 4f, 0f); val2.eulerAngles = new Vector3(90f, 0f, 0f); val2.localScale = new Vector3(110f, 110f, 450f); } val.transform.localScale = Vector3.one * auraRadius; aura = val.GetComponent<RisingTidesAffixMoneyAuraComponent>(); } public void FixedUpdate() { //IL_003c: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body.healthComponent) || !body.healthComponent.alive || !NetworkServer.active) { return; } CollectionExtensions.Do<Collider>((IEnumerable<Collider>)Physics.OverlapCapsule(body.corePosition, body.corePosition + Vector3.up * 200f, auraRadius), (Action<Collider>)delegate(Collider collider) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)collider) && Object.op_Implicit((Object)(object)((Component)collider).GetComponent<HurtBox>()) && Object.op_Implicit((Object)(object)((Component)collider).GetComponent<HurtBox>().healthComponent) && Object.op_Implicit((Object)(object)((Component)collider).GetComponent<HurtBox>().healthComponent.body)) { CharacterBody val = ((Component)collider).GetComponent<HurtBox>().healthComponent.body; if (Object.op_Implicit((Object)(object)val) && FriendlyFireManager.ShouldDirectHitProceed(val.healthComponent, body.teamComponent.teamIndex)) { val.AddTimedBuff(StrongerGravity, 4f); } } }); } public void OnEnable() { if (Object.op_Implicit((Object)(object)aura)) { ((Component)aura).gameObject.SetActive(true); } } public void OnDisable() { if (Object.op_Implicit((Object)(object)aura)) { ((Component)aura).gameObject.SetActive(false); } } } public class StrongerGravityBehaviour : MonoBehaviour { public CharacterBody body; public void Start() { body = ((Component)this).GetComponent<CharacterBody>(); } public void FixedUpdate() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.healthComponent)) { body.healthComponent.TakeDamageForce(Physics.gravity * Time.fixedDeltaTime * ForcePassive.Value, true, false); } } } public class NoJumpBehaviour : MonoBehaviour { public CharacterBody body; public void Start() { body = ((Component)this).GetComponent<CharacterBody>(); } public void FixedUpdate() { if (NetworkServer.active && Object.op_Implicit((Object)(object)body.characterMotor) && body.characterMotor.velocity.y > 0f) { body.characterMotor.velocity.y = 0f; } } } public static AffixOppressive instance; public static ConfigEntry<float> Range; public static ConfigEntry<float> ForcePassive; public static ConfigEntry<float> DisableDuration; public static BuffDef StrongerGravity; public static BuffDef NoJump; public override void OnPluginAwake() { //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) ((BaseLoadableAsset)this).OnPluginAwake(); Range = Main.Config.Bind<float>("Oppressive Elites", "Range", 13f, ""); ForcePassive = Main.Config.Bind<float>("Oppressive Elites", "Extra Gravity in Zone", 50f, ""); DisableDuration = Main.Config.Bind<float>("Oppressive Elites", "No Jump Duration", 4f, "on hit"); LanguageAPI.Add("ELITE_MODIFIER_NEMESISRISINGTIDES_OPPRESSIVE", "Oppressive {0}"); LanguageAPI.Add("EQUIPMENT_NEMESISRISINGTIDES_AFFIXOPPRESSIVE_NAME", "Titanic Pause"); LanguageAPI.Add("EQUIPMENT_NEMESISRISINGTIDES_AFFIXOPPRESSIVE_PICKUP", "Become an aspect of domination."); LanguageAPI.Add("EQUIPMENT_NEMESISRISINGTIDES_AFFIXOPPRESSIVE_DESC", $"Creates a <style=cIsUtility>{Range.Value}m</style> wide area that <style=cIsUtility>increases gravity</style> around it. On hit, <style=cIsUtility>drop</style> airborne enemy and <style=cIsUtility>disables jump</style> for <style=cIsUtility>{DisableDuration.Value}s</style>."); StrongerGravity = ScriptableObject.CreateInstance<BuffDef>(); StrongerGravity.canStack = false; StrongerGravity.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/texBuffSlow50Icon.tif").WaitForCompletion(); StrongerGravity.buffColor = new Color(1f, 0.8f, 0.8f); ContentAddition.AddBuffDef(StrongerGravity); NoJump = ScriptableObject.CreateInstance<BuffDef>(); NoJump.canStack = false; NoJump.iconSprite = Main.AssetBundle.LoadAsset<Sprite>("Assets/OppressiveEffect.png"); NoJump.buffColor = new Color(0.8f, 0.8f, 1f); ContentAddition.AddBuffDef(NoJump); } public override void OnLoad() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown ((BaseLoadableAsset)this).OnLoad(); instance = this; ((Object)base.buffDef).name = "NemesisRisingTides_AffixOppressive"; base.buffDef.iconSprite = Main.AssetBundle.LoadAsset<Sprite>("Assets/OppressiveBuff.png"); CharacterBody.OnBuffFirstStackGained += new hook_OnBuffFirstStackGained(CharacterBody_OnBuffFirstStackGained); CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost); GenericGameEvents.OnHitEnemy += new DamageAttackerVictimEventHandler(GenericGameEvents_OnHitEnemy); } public override void AfterContentPackLoaded() { ((BaseLoadableAsset)this).AfterContentPackLoaded(); base.buffDef.eliteDef = ((BaseElite)EliteOppressive.instance).eliteDef; } private void CharacterBody_OnBuffFirstStackGained(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if ((Object)(object)buffDef == (Object)(object)base.buffDef) { NemesisAffixOppressiveBehaviour component = ((Component)self).GetComponent<NemesisAffixOppressiveBehaviour>(); if (!Object.op_Implicit((Object)(object)component)) { ((Component)self).gameObject.AddComponent<NemesisAffixOppressiveBehaviour>(); } else if (!((Behaviour)component).enabled) { ((Behaviour)component).enabled = true; } } if ((Object)(object)buffDef == (Object)(object)StrongerGravity) { StrongerGravityBehaviour component2 = ((Component)self).GetComponent<StrongerGravityBehaviour>(); if (!Object.op_Implicit((Object)(object)component2)) { ((Component)self).gameObject.AddComponent<StrongerGravityBehaviour>(); } else if (!((Behaviour)component2).enabled) { ((Behaviour)component2).enabled = true; } } if ((Object)(object)buffDef == (Object)(object)NoJump) { NoJumpBehaviour component3 = ((Component)self).GetComponent<NoJumpBehaviour>(); if (!Object.op_Implicit((Object)(object)component3)) { ((Component)self).gameObject.AddComponent<NoJumpBehaviour>(); } else if (!((Behaviour)component3).enabled) { ((Behaviour)component3).enabled = true; } } } private void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if ((Object)(object)buffDef == (Object)(object)base.buffDef) { NemesisAffixOppressiveBehaviour component = ((Component)self).GetComponent<NemesisAffixOppressiveBehaviour>(); if (Object.op_Implicit((Object)(object)component) && ((Behaviour)component).enabled) { ((Behaviour)component).enabled = false; } } if ((Object)(object)buffDef == (Object)(object)StrongerGravity) { StrongerGravityBehaviour component2 = ((Component)self).GetComponent<StrongerGravityBehaviour>(); if (Object.op_Implicit((Object)(object)component2) && ((Behaviour)component2).enabled) { ((Behaviour)component2).enabled = false; } } if ((Object)(object)buffDef == (Object)(object)NoJump) { NoJumpBehaviour component3 = ((Component)self).GetComponent<NoJumpBehaviour>(); if (Object.op_Implicit((Object)(object)component3) && ((Behaviour)component3).enabled) { ((Behaviour)component3).enabled = false; } } } private void GenericGameEvents_OnHitEnemy(DamageInfo damageInfo, GenericCharacterInfo attackerInfo, GenericCharacterInfo victimInfo) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00c8: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_007c: 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: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) if (!damageInfo.rejected && damageInfo.procCoefficient > 0f && Object.op_Implicit((Object)(object)attackerInfo.body) && attackerInfo.body.HasBuff(base.buffDef) && Object.op_Implicit((Object)(object)victimInfo.healthComponent) && Object.op_Implicit((Object)(object)victimInfo.body) && ((!Object.op_Implicit((Object)victimInfo.body.characterMotor) && Object.op_Implicit((Object)(object)victimInfo.body.rigidbody)) || Object.op_Implicit((Object)victimInfo.body.characterMotor))) { EffectData val = new EffectData { origin = victimInfo.body.corePosition, scale = victimInfo.body.radius }; val.SetNetworkedObjectReference(victimInfo.gameObject); EffectManager.SpawnEffect(AffixMoney.gravityVFX, val, true); victimInfo.body.AddTimedBuff(NoJump, DisableDuration.Value); if (Object.op_Implicit((Object)(object)victimInfo.healthComponent)) { victimInfo.healthComponent.TakeDamageForce(Physics.gravity * ForcePassive.Value, true, false); } } } } } } namespace NemesisRisingTides.Changes { public class Aquamarine { public class NemesisAffixWaterBehaviour : MonoBehaviour { public RisingTidesAffixMoneyAuraComponent aura; public CharacterBody body; public SphereSearch sphereSearch; public float auraRadius = 0f; public void Awake() { //IL_0031: 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) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //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) //IL_005e: Expected O, but got Unknown body = ((Component)this).GetComponent<CharacterBody>(); auraRadius += Range.Value + body.radius; sphereSearch = new SphereSearch { radius = auraRadius, queryTriggerInteraction = (QueryTriggerInteraction)1, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; } public void Start() { //IL_0031: 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_004e: Unknown result type (might be due to invalid IL or missing references) GameObject val = Main.MakeAura(body, Range.Value + body.radius, new Color(0f, 0.5f, 0.5f, 0.5f)); val.transform.localScale = Vector3.one * auraRadius; aura = val.GetComponent<RisingTidesAffixMoneyAuraComponent>(); } public void FixedUpdate() { //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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body.healthComponent) || !body.healthComponent.alive || !NetworkServer.active) { return; } sphereSearch.origin = body.corePosition; sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); TeamMask val = default(TeamMask); ((TeamMask)(ref val)).AddTeam(body.teamComponent.teamIndex); sphereSearch.FilterCandidatesByHurtBoxTeam(val); CollectionExtensions.Do<HurtBox>((IEnumerable<HurtBox>)sphereSearch.GetHurtBoxes(), (Action<HurtBox>)delegate(HurtBox hurtBox) { if (Object.op_Implicit((Object)(object)hurtBox) && Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && (Object)(object)hurtBox.healthComponent.body != (Object)(object)body) { hurtBox.healthComponent.body.AddTimedBuff(AffectedBuff, 4f); } }); } public void OnEnable() { if (Object.op_Implicit((Object)(object)aura)) { ((Component)aura).gameObject.SetActive(true); } } public void OnDisable() { if (Object.op_Implicit((Object)(object)aura)) { ((Component)aura).gameObject.SetActive(false); } } } [HarmonyPatch(typeof(AffixWater), "CharacterBody_OnBuffFirstStackGained")] public class PatchWaterGained { public static bool Prefix(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if (Range.Value > 0f && (Object)(object)buffDef == (Object)(object)Buffs.RisingTides_AffixWater) { NemesisAffixWaterBehaviour component = ((Component)self).GetComponent<NemesisAffixWaterBehaviour>(); if (!Object.op_Implicit((Object)(object)component)) { ((Component)self).gameObject.AddComponent<NemesisAffixWaterBehaviour>(); } else if (!((Behaviour)component).enabled) { ((Behaviour)component).enabled = true; } } return false; } } [HarmonyPatch(typeof(AffixWater), "CharacterBody_OnBuffFinalStackLost")] public class PatchWaterLost { public static bool Prefix(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if (Range.Value > 0f && (Object)(object)buffDef == (Object)(object)Buffs.RisingTides_AffixWater) { NemesisAffixWaterBehaviour component = ((Component)self).GetComponent<NemesisAffixWaterBehaviour>(); if (Object.op_Implicit((Object)(object)component) && ((Behaviour)component).enabled) { ((Behaviour)component).enabled = false; } } return false; } } [HarmonyPatch(typeof(AffixWaterEquipment), "OnUse")] public class PatchWaterEquip { public static bool Prefix(EquipmentSlot equipmentSlot) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 if ((int)equipmentSlot.characterBody.teamComponent.teamIndex == 1) { return true; } return false; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Action <>9__9_0; public static hook_TakeDamage <>9__9_1; internal void <Init>b__9_0() { Equipment.RisingTides_AffixWater.cooldown = OnUseCooldown.Value; } internal void <Init>b__9_1(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_00f8: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)self)) { orig.Invoke(self, damageInfo); return; } CharacterBody body = self.body; if (!damageInfo.rejected && damageInfo.procCoefficient > 0f && Object.op_Implicit((Object)(object)body) && (body.HasBuff(AffectedBuff) || (IncludeSelf.Value && body.HasBuff(Buffs.RisingTides_AffixWater)))) { body.AddBuff(StackBuff); if (body.GetBuffCount(StackBuff) >= NullifyHits.Value) { body.SetBuffCount(StackBuff.buffIndex, 0); damageInfo.rejected = true; EffectData val = new EffectData { origin = damageInfo.position, rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere) }; EffectManager.SpawnEffect(AssetReferences.bearEffectPrefab, val, true); } } orig.Invoke(self, damageInfo); } } public static bool enabled; public static string Description; public static ConfigEntry<float> Range; public static ConfigEntry<int> NullifyHits; public static ConfigEntry<bool> IncludeSelf; public static ConfigEntry<bool> DisableOnUse; public static ConfigEntry<float> OnUseCooldown; public static BuffDef AffectedBuff; public static BuffDef StackBuff; public static void Init() { //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: 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_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown Description = $"Become invulnerable while not attacking. Attacks <style=cIsUtility>imprison</style> enemies in a bubble on hit. On Use, <style=cIsUtility>Cleanse</style> all debuffs and <style=cIsHealth>heal</style> for <style=cIsHealth>{AffixWaterEquipment.healAmount.Value}%</style> of <style=cIsHealth>maximum health</style>."; enabled = Main.Config.Bind<bool>("Aquamarine Elites", "Enable Changes", true, "").Value; if (!enabled) { return; } Main.Log.LogInfo((object)"Applying change to Aquamarine Elite"); Range = Main.Config.Bind<float>("Aquamarine Elites", "Range", 35f, "in meters. set to 0 to disable."); NullifyHits = Main.Config.Bind<int>("Aquamarine Elites", "Nullify Stack", 3, "every N hits is nullified"); IncludeSelf = Main.Config.Bind<bool>("Aquamarine Elites", "Include Self", true, "Whether to inflict itself with stack nullify"); DisableOnUse = Main.Config.Bind<bool>("Aquamarine Elites", "Disable On-use for enemies", true, ""); OnUseCooldown = Main.Config.Bind<float>("Aquamarine Elites", "On-use Cooldown", 30f, "in seconds"); Main.AfterEquipContentPackLoaded += delegate { Equipment.RisingTides_AffixWater.cooldown = OnUseCooldown.Value; }; Main.Harmony.PatchAll(typeof(PatchWaterGained)); Main.Harmony.PatchAll(typeof(PatchWaterLost)); if (Range.Value > 0f) { Description = "<style=cIsHealth>Block</style> every <style=cIsHealth>3</style> hits. Attacks <style=cIsUtility>imprison</style> enemies in a bubble on hit. On Use, <style=cIsUtility>Cleanse</style> all debuffs and <style=cIsHealth>gain some health</style>."; Main.SuperOverrides.Add("PASSIVE_IDLE_INVULN", "\n<style=cIsHealth>Block</style> every <style=cIsHealth>3</style> hits."); AffectedBuff = ScriptableObject.CreateInstance<BuffDef>(); AffectedBuff.canStack = false; AffectedBuff.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Junk/Common/texBuffBodyArmorIcon.tif").WaitForCompletion(); AffectedBuff.buffColor = Color.cyan; ContentAddition.AddBuffDef(AffectedBuff); StackBuff = ScriptableObject.CreateInstance<BuffDef>(); StackBuff.canStack = true; StackBuff.isCooldown = true; StackBuff.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/texBuffGenericShield.tif").WaitForCompletion(); StackBuff.buffColor = Color.cyan; ContentAddition.AddBuffDef(StackBuff); object obj = <>c.<>9__9_1; if (obj == null) { hook_TakeDamage val = delegate(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_00f8: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)self)) { orig.Invoke(self, damageInfo); } else { CharacterBody body = self.body; if (!damageInfo.rejected && damageInfo.procCoefficient > 0f && Object.op_Implicit((Object)(object)body) && (body.HasBuff(AffectedBuff) || (IncludeSelf.Value && body.HasBuff(Buffs.RisingTides_AffixWater)))) { body.AddBuff(StackBuff); if (body.GetBuffCount(StackBuff) >= NullifyHits.Value) { body.SetBuffCount(StackBuff.buffIndex, 0); damageInfo.rejected = true; EffectData val2 = new EffectData { origin = damageInfo.position, rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere) }; EffectManager.SpawnEffect(AssetReferences.bearEffectPrefab, val2, true); } } orig.Invoke(self, damageInfo); } }; <>c.<>9__9_1 = val; obj = (object)val; } HealthComponent.TakeDamage += (hook_TakeDamage)obj; } if (DisableOnUse.Value) { Main.Harmony.PatchAll(typeof(PatchWaterEquip)); } } } public class Bismuth { [HarmonyPatch(typeof(AffixBarrier), "GenericGameEvents_OnHitEnemy")] public class PatchBarrierOnHit { public static bool Prefix(DamageInfo damageInfo, GenericCharacterInfo attackerInfo, GenericCharacterInfo victimInfo) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (damageInfo.rejected || !(damageInfo.procCoefficient > 0f) || !Object.op_Implicit((Object)(object)attackerInfo.body) || !attackerInfo.body.HasBuff(Buffs.RisingTides_AffixBarrier) || !Object.op_Implicit((Object)(object)victimInfo.body)) { return false; } Action<float, float, CharacterBody, CharacterBody> action = Run.instance.runRNG.NextElementUniform<Action<float, float, CharacterBody, CharacterBody>>(RandomDebuffs); action(AffixBarrier.debuffDuration.Value, damageInfo.damage, attackerInfo.body, victimInfo.body); return false; } } [HarmonyPatch(typeof(AffixBarrierEquipment), "OnUse")] public class PatchBarrierEquip { public static bool Prefix(ref bool __result, EquipmentSlot equipmentSlot) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00f1: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Expected O, but got Unknown __result = false; if (!Object.op_Implicit((Object)(object)equipmentSlot.characterBody) || (DisableOnUse.Value && (int)equipmentSlot.characterBody.teamComponent.teamIndex != 1)) { return false; } if (BlastRange.Value > 0f && RandomDebuffs.Count > 0) { BlastAttack val = new BlastAttack { attacker = ((Component)equipmentSlot.characterBody).gameObject, inflictor = ((Component)equipmentSlot.characterBody).gameObject, teamIndex = equipmentSlot.characterBody.teamComponent.teamIndex, position = equipmentSlot.characterBody.corePosition, procCoefficient = 1f, radius = BlastRange.Value, baseDamage = BlastDamage.Value * equipmentSlot.characterBody.damage, falloffModel = (FalloffModel)1, damageColorIndex = (DamageColorIndex)3, attackerFiltering = (AttackerFiltering)2 }; CollectionExtensions.Do<HitPoint>((IEnumerable<HitPoint>)val.Fire().hitPoints, (Action<HitPoint>)delegate(HitPoint hitPoint) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hitPoint.hurtBox) && Object.op_Implicit((Object)(object)hitPoint.hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hitPoint.hurtBox.healthComponent.body)) { CharacterBody body = hitPoint.hurtBox.healthComponent.body; for (int i = 0; i < RandomBuffAmount.Value; i++) { Action<float, float, CharacterBody, CharacterBody> action = Run.instance.runRNG.NextElementUniform<Action<float, float, CharacterBody, CharacterBody>>(RandomDebuffs); action(AffixBarrier.debuffDuration.Value * 5f, BlastDamage.Value * equipmentSlot.characterBody.damage, equipmentSlot.characterBody, body); } } }); EffectManager.SpawnEffect(CommonAssets.igniteOnKillExplosionEffectPrefab, new EffectData { origin = equipmentSlot.characterBody.corePosition, scale = equipmentSlot.characterBody.radius }, true); __result = true; } return !RemoveBarrierShinanigan.Value; } } public static bool enabled; public static string Description; public static ConfigEntry<string> DebuffBlacklist; public static ConfigEntry<bool> UseWhitelist; public static ConfigEntry<bool> RemoveBarrierShinanigan; public static ConfigEntry<bool> DisableOnUse; public static ConfigEntry<float> OnUseCooldown; public static ConfigEntry<float> BlastDamage; public static ConfigEntry<float> BlastRange; public static ConfigEntry<int> RandomBuffAmount; public static List<Action<float, float, CharacterBody, CharacterBody>> RandomDebuffs = new List<Action<float, float, CharacterBody, CharacterBody>>(); public static void Init() { Description = $"<style=cIsHealth>Barrier does not decay</style>. Immune to knockback while <style=cIsHealing>barrier</style> is active. Attacks apply a <style=cIsUtility>random debuff</style> on hit. On Use, Gain <style=cIsHealth>{AffixBarrierEquipment.barrierRecharge.Value}%</style> of <style=cIsHealth>maximum health</style> as <style=cIsHealth>temporary barrier</style>."; enabled = Main.Config.Bind<bool>("Bismuth Elites", "Enable Changes", true, "").Value; if (!enabled) { return; } Main.Log.LogInfo((object)"Applying change to Bismuth Elite"); Main.AfterEquipContentPackLoaded += delegate { Equipment.RisingTides_AffixBarrier.cooldown = OnUseCooldown.Value; }; DebuffBlacklist = Main.Config.Bind<string>("Bismuth Elites", "Debuff Blacklist", "", "see log for list of debuff names, separated by comma"); UseWhitelist = Main.Config.Bind<bool>("Bismuth Elites", "Use blacklist as whitelist instead", false, ""); RemoveBarrierShinanigan = Main.Config.Bind<bool>("Bismuth Elites", "Remove Barrier Features", true, "enable if Buffered Elites are enabled."); DisableOnUse = Main.Config.Bind<bool>("Bismuth Elites", "Disable On-use for enemies", true, ""); OnUseCooldown = Main.Config.Bind<float>("Bismuth Elites", "On-use Cooldown", 30f, "in seconds"); BlastDamage = Main.Config.Bind<float>("Bismuth Elites", "On-use Damage Coefficient", 1.8f, "1 = 100%"); BlastRange = Main.Config.Bind<float>("Bismuth Elites", "On-use Damage Radius", 13f, "in meters"); RandomBuffAmount = Main.Config.Bind<int>("Bismuth Elites", "On-use Blast Random Debuff Amount", 3, ""); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate { List<string> list = new List<string>(); List<string> list2 = (from x in DebuffBlacklist.Value.Split(',') select x.Trim()).ToList(); DotDef[] dotDefs = DotAPI.DotDefs; foreach (DotDef dot in dotDefs) { if (dot != null && Object.op_Implicit((Object)(object)dot.associatedBuff) && ((Object)dot.associatedBuff).name != null) { string name = ((Object)dot.associatedBuff).name; list.Add(name); if (list2.Contains(name) == UseWhitelist.Value) { RandomDebuffs.Add(delegate(float duration, float damage, CharacterBody attacker, CharacterBody victim) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) InflictDotInfo val2 = default(InflictDotInfo); val2.victimObject = ((Component)victim).gameObject; val2.attackerObject = ((Component)attacker).gameObject; val2.dotIndex = (DotIndex)DotAPI.DotDefs.ToList().IndexOf(dot); val2.damageMultiplier = 1f; val2.totalDamage = damage * 0.5f; val2.duration = duration; DotController.InflictDot(ref val2); }); } } } List<BuffDef> list3 = DotController.dotDefs.Select((DotDef x) => x.associatedBuff).ToList(); BuffDef[] buffDefs = BuffCatalog.buffDefs; foreach (BuffDef buff in buffDefs) { if (!list3.Contains(buff) && buff.isDebuff && !buff.isElite) { string name2 = ((Object)buff).name; list.Add(name2); if (list2.Contains(name2) == UseWhitelist.Value) { RandomDebuffs.Add(delegate(float duration, float damage, CharacterBody attacker, CharacterBody victim) { victim.AddTimedBuff(buff, duration); }); } } } Main.Log.LogInfo((object)("List of debuff names to use for Bismuth elite config: " + GeneralExtensions.Join<string>((IEnumerable<string>)list, (Func<string, string>)null, ", "))); }); if (RemoveBarrierShinanigan.Value) { Description = $"Attacks apply a <style=cIsUtility>random debuff</style> on hit. On Use, cause a blast in a <style=cIsDamage>{BlastRange.Value}m</style> radius for <style=cIsDamage>{BlastDamage.Value * 100f}%</style> base damage that inflicts <style=cIsDamage>{RandomBuffAmount.Value} random debuffs</style> to all nearby enemies."; LanguageAPI.AddOverlay("EQUIPMENT_RISINGTIDES_AFFIXBARRIER_NAME", "Reversed Decision"); Main.SuperOverrides.Add("AFFIX_BARRIER_NAME", "Reversed Decision"); LanguageAPI.AddOverlay("EQUIPMENT_RISINGTIDES_AFFIXBARRIER_PICKUP", "Become an aspect of chaos. On use, cause a blast that inflicts 3 random debuffs to all nearby enemies."); Main.SuperOverrides.Add("AFFIX_BARRIER_PICKUP", "Become an aspect of chaos."); Main.SuperOverrides.Add("ASPECT_OF_UNITY", "<style=cDeath>Aspect of Chaos</style> :"); Main.SuperOverrides.Add("PASSIVE_BARRIER_STOP", ""); Main.SuperOverrides.Add("FORCE_IMMUNE_BARRIER", ""); Main.SuperOverrides.Add("AFFIX_BARRIER_ACTIVE", $"Cause a blast that inflicts <style=cIsDamage>{RandomBuffAmount.Value} random debuffs</style>."); Main.AfterBuffContentPackLoaded += delegate { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown AffixBarrier val = (AffixBarrier)BaseLoadableAsset.staticAssetDictionary[typeof(AffixBarrier)]; HealthComponent.TakeDamageForce_Vector3_bool_bool -= new hook_TakeDamageForce_Vector3_bool_bool(val.HealthComponent_TakeDamageForce_Vector3_bool_bool); HealthComponent.TakeDamageForce_DamageInfo_bool_bool -= new hook_TakeDamageForce_DamageInfo_bool_bool(val.HealthComponent_TakeDamageForce_DamageInfo_bool_bool); GenericGameEvents.OnApplyDamageReductionModifiers -= new DamageModifierEventHandler(val.GenericGameEvents_OnApplyDamageReductionModifiers); CharacterBody.RecalculateStats -= new hook_RecalculateStats(val.CharacterBody_RecalculateStats); CharacterBody.RecalculateStats -= new Manipulator(val.CharacterBody_RecalculateStats1); HealthBar.UpdateBarInfos -= new hook_UpdateBarInfos(val.HealthBar_UpdateBarInfos); Buffs.RisingTides_AffixBarrier.iconSprite = Main.AssetBundle.LoadAsset<Sprite>("Assets/BismuthBuff.png"); }; } Main.Harmony.PatchAll(typeof(PatchBarrierOnHit)); Main.Harmony.PatchAll(typeof(PatchBarrierEquip)); } } public class Magnetic { [HarmonyPatch(typeof(RisingTidesAffixMoneyBehaviour), "FixedUpdate")] public class PatchMoneyGiveBuff { public static bool Prefix(RisingTidesAffixMoneyBehaviour __instance) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00d7: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)__instance.body.healthComponent) || !__instance.body.healthComponent.alive || !NetworkServer.active || ConfigurableValue<float>.op_Implicit(AffixMoney.auraRadius) <= 0f) { return false; } __instance.sphereSearch.origin = __instance.body.corePosition; __instance.sphereSearch.RefreshCandidates(); __instance.sphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); TeamMask val = default(TeamMask); ((TeamMask)(ref val)).AddTeam(__instance.body.teamComponent.teamIndex); __instance.sphereSearch.FilterCandidatesByHurtBoxTeam(val); CollectionExtensions.Do<HurtBox>((IEnumerable<HurtBox>)__instance.sphereSearch.GetHurtBoxes(), (Action<HurtBox>)delegate(HurtBox hurtBox) { if (Object.op_Implicit((Object)(object)hurtBox) && Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body.master) && (Object)(object)hurtBox.healthComponent.body != (Object)(object)__instance.body) { hurtBox.healthComponent.body.AddTimedBuff(SapMoneyBuff, 4f); } }); return false; } } [HarmonyPatch(typeof(AffixMoneyEquipment), "OnUse")] public class PatchMoneyEquip { public static bool Prefix(ref bool __result, EquipmentSlot equipmentSlot) { //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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_009d: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 __result = false; if (NetworkServer.active && Object.op_Implicit((Object)(object)equipmentSlot.characterBody) && Object.op_Implicit((Object)(object)equipmentSlot.characterBody.master) && (int)equipmentSlot.characterBody.teamComponent.teamIndex == 1 && OnUseCooldown.Value > 0f) { BlastAttack val = new BlastAttack { attacker = ((Component)equipmentSlot.characterBody).gameObject, inflictor = ((Component)equipmentSlot.characterBody).gameObject, teamIndex = equipmentSlot.characterBody.teamComponent.teamIndex, position = equipmentSlot.characterBody.corePosition, procCoefficient = 1f, radius = OnUseRange.Value, baseDamage = OnUseDamage.Value * equipmentSlot.characterBody.damage, falloffModel = (FalloffModel)1, damageColorIndex = (DamageColorIndex)3, attackerFiltering = (AttackerFiltering)2 }; int hitCount = val.Fire().hitCount; CharacterMaster master = equipmentSlot.characterBody.master; master.money += (uint)Run.instance.GetDifficultyScaledCost((int)((float)hitCount * OnUseAmount.Value * 25f)); __result = true; EffectData val2 = new EffectData { scale = equipmentSlot.characterBody.radius, origin = equipmentSlot.characterBody.corePosition, genericFloat = 0.6f }; val2.SetHurtBoxReference(((Component)equipmentSlot.characterBody).gameObject); for (int i = 0; i < hitCount; i++) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/GoldOrbEffect"), val2, true); } return false; } return false; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Action <>9__12_0; public static Action <>9__12_1; public static hook_OnHitEnemy <>9__12_2; public static hook_OnCharacterDeath <>9__12_3; internal void <Init>b__12_0() { Equipment.RisingTides_AffixMoney.cooldown = OnUseCooldown.Value; } internal void <Init>b__12_1() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown GenericGameEvents.OnHitEnemy -= new DamageAttackerVictimEventHandler(((AffixMoney)BaseLoadableAsset.staticAssetDictionary[typeof(AffixMoney)]).GenericGameEvents_OnHitEnemy); } internal void <Init>b__12_2(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject _victim) { //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (damageInfo == null || damageInfo.rejected || damageInfo.procCoefficient <= 0f || !Object.op_Implicit((Object)(object)damageInfo.attacker) || !Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) || !Object.op_Implicit((Object)(object)_victim) || !Object.op_Implicit((Object)(object)_victim.GetComponent<CharacterBody>())) { orig.Invoke(self, damageInfo, _victim); return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); CharacterBody component2 = _victim.GetComponent<CharacterBody>(); if ((!component.HasBuff(SapMoneyBuff) && !component.HasBuff(Buffs.RisingTides_AffixMoney) && !DamageAPI.HasModdedDamageType(damageInfo, AffixMoney.magneticDamageType)) || !Object.op_Implicit((Object)(object)component2.master) || component2.master.money == 0) { orig.Invoke(self, damageInfo, _victim); return; } uint num = Math.Min(component2.master.money, (uint)Run.instance.GetDifficultyScaledCost((int)(SapMoneyAmount.Value * 25f))); CharacterMaster master = component2.master; master.money -= num; if (Object.op_Implicit((Object)(object)component.master)) { CharacterMaster master2 = component.master; master2.money += (uint)((float)num * GainMoneyAmount.Value); } orig.Invoke(self, damageInfo, _victim); } internal void <Init>b__12_3(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0071: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass12_0 <>c__DisplayClass12_ = new <>c__DisplayClass12_0 { damageReport = damageReport }; if (Object.op_Implicit((Object)(object)<>c__DisplayClass12_.damageReport.attackerMaster) && <>c__DisplayClass12_.damageReport.attackerMaster.money != 0 && Object.op_Implicit((Object)(object)<>c__DisplayClass12_.damageReport.victimBody) && <>c__DisplayClass12_.damageReport.victimBody.HasBuff(Buffs.RisingTides_AffixMoney)) { <>c__DisplayClass12_1 CS$<>8__locals0 = new <>c__DisplayClass12_1 { CS$<>8__locals1 = <>c__DisplayClass12_ }; SphereSearch val = new SphereSearch { radius = ConfigurableValue<float>.op_Implicit(AffixMoney.auraRadius) + CS$<>8__locals0.CS$<>8__locals1.damageReport.victimBody.radius, queryTriggerInteraction = (QueryTriggerInteraction)1, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = CS$<>8__locals0.CS$<>8__locals1.damageReport.victimBody.corePosition }; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); TeamMask val2 = default(TeamMask); ((TeamMask)(ref val2)).AddTeam(CS$<>8__locals0.CS$<>8__locals1.damageReport.victimBody.teamComponent.teamIndex); val.FilterCandidatesByHurtBoxTeam(val2); CS$<>8__locals0.money = 0f; CollectionExtensions.Do<HurtBox>((IEnumerable<HurtBox>)val.GetHurtBoxes(), (Action<HurtBox>)delegate(HurtBox hurtBox) { if (Object.op_Implicit((Object)(object)hurtBox) && Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body.master) && (Object)(object)hurtBox.healthComponent.body != (Object)(object)CS$<>8__locals0.CS$<>8__locals1.damageReport.victimBody) { CS$<>8__locals0.money += hurtBox.healthComponent.body.master.money; } }); CharacterMaster attackerMaster = CS$<>8__locals0.CS$<>8__locals1.damageReport.attackerMaster; attackerMaster.money += (uint)(CS$<>8__locals0.money * KillMoneyAmount.Value); } orig.Invoke(self, <>c__DisplayClass12_.damageReport); } } [CompilerGenerated] private sealed class <>c__DisplayClass12_0 { public DamageReport damageReport; } [CompilerGenerated] private sealed class <>c__DisplayClass12_1 { public float money; public <>c__DisplayClass12_0 CS$<>8__locals1; internal void <Init>b__4(HurtBox hurtBox) { if (Object.op_Implicit((Object)(object)hurtBox) && Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body.master) && (Object)(object)hurtBox.healthComponent.body != (Object)(object)CS$<>8__locals1.damageReport.victimBody) { money += hurtBox.healthComponent.body.master.money; } } } public static bool enabled; public static string Description; public static ConfigEntry<bool> SapMoneyEnable; public static ConfigEntry<float> SapMoneyAmount; public static ConfigEntry<float> GainMoneyAmount; public static ConfigEntry<float> KillMoneyAmount; public static ConfigEntry<bool> OnUseEnable; public static ConfigEntry<float> OnUseCooldown; public static ConfigEntry<float> OnUseDamage; public static ConfigEntry<float> OnUseRange; public static ConfigEntry<float> OnUseAmount; public static BuffDef SapMoneyBuff; public static void Init() { //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_035a: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Expected O, but got Unknown //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Expected O, but got Unknown Description = $"<style=cIsUtility>Steal the money</style> of nearby enemies. Attacks <style=cIsUtility>pull down</style> airborne enemies on hit. On Use, <style=cIsUtility>Stop all incoming projectiles</style> for <style=cIsUtility>{AffixMoneyEquipment.duration.Value}s</style>."; enabled = Main.Config.Bind<bool>("Magnetic Elites", "Enable Changes", true, "").Value; if (!enabled) { return; } Main.Log.LogInfo((object)"Applying change to Magnetic Elite"); Main.AfterEquipContentPackLoaded += delegate { Equipment.RisingTides_AffixMoney.cooldown = OnUseCooldown.Value; }; SapMoneyEnable = Main.Config.Bind<bool>("Magnetic Elites", "Money Sap Buff Enable", true, ""); SapMoneyAmount = Main.Config.Bind<float>("Magnetic Elites", "Money Sap Amount", 0.5f, "Scaled with time, amount of money sapped on hit"); GainMoneyAmount = Main.Config.Bind<float>("Magnetic Elites", "Money Sap Amount Gained", 0.05f, "Scaled with time, amount of money gained when hit"); KillMoneyAmount = Main.Config.Bind<float>("Magnetic Elites", "Extra Money Gain Per Enemy", 0.25f, "Scaled with time"); OnUseEnable = Main.Config.Bind<bool>("Magnetic Elites", "Change On-use", true, ""); OnUseCooldown = Main.Config.Bind<float>("Magnetic Elites", "On-use Cooldown", 30f, "in seconds, set to 0 to remove the on-use effect altogether."); OnUseDamage = Main.Config.Bind<float>("Magnetic Elites", "On-use Damage Coefficient", 1.8f, "1 = 100%"); OnUseRange = Main.Config.Bind<float>("Magnetic Elites", "On-use Damage Radius", 13f, "in meters"); OnUseAmount = Main.Config.Bind<float>("Magnetic Elites", "On-use Damage Money Steal Amount", 1f, "Scaled with time"); if (SapMoneyEnable.Value) { Description = $"On hit, Gain <style=cIsUtility>{GainMoneyAmount.Value * SapMoneyAmount.Value * 25f}$</style> that increases over time. On Use, cause a blast in a <style=cIsDamage>{OnUseRange.Value}m</style> radius for <style=cIsDamage>{OnUseDamage.Value * 100f}%</style> base damage that <style=cIsUtility>Steals money</style> from all nearby enemies."; Main.SuperOverrides.Add("AFFIX_MONEY_ACTIVE", "Cause a blast that <style=cIsUtility>Steals money</style> from all nearby enemies."); Main.SuperOverrides.Add("PASSIVE_DRAIN_MONEY", $"On hit, Gain <style=cIsUtility>{GainMoneyAmount.Value * SapMoneyAmount.Value * 25f}$</style> that increases over time."); Main.SuperOverrides.Add("PULLDOWN_ON_HIT", ""); SapMoneyBuff = ScriptableObject.CreateInstance<BuffDef>(); SapMoneyBuff.canStack = false; SapMoneyBuff.iconSprite = Main.AssetBundle.LoadAsset<Sprite>("Assets/MagneticEffect.png"); SapMoneyBuff.buffColor = Color.yellow; ContentAddition.AddBuffDef(SapMoneyBuff); Main.AfterBuffContentPackLoaded += delegate { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown GenericGameEvents.OnHitEnemy -= new DamageAttackerVictimEventHandler(((AffixMoney)BaseLoadableAsset.staticAssetDictionary[typeof(AffixMoney)]).GenericGameEvents_OnHitEnemy); }; Main.Harmony.PatchAll(typeof(PatchMoneyGiveBuff)); object obj = <>c.<>9__12_2; if (obj == null) { hook_OnHitEnemy val = delegate(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject _victim) { //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (damageInfo == null || damageInfo.rejected || damageInfo.procCoefficient <= 0f || !Object.op_Implicit((Object)(object)da
NemesisRisingTidesZetAspectCompat.dll
Decompiled 2 years 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.Bootstrap; using HarmonyLib; using Microsoft.CodeAnalysis; using TPDespair.ZetAspects; [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.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("NemesisRisingTidesZetAspectCompat")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("NemesisRisingTidesZetAspectCompat")] [assembly: AssemblyTitle("NemesisRisingTidesZetAspectCompat")] [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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace NemesisRisingTides { [HarmonyPatch(typeof(Language), "TextFragment")] public class PatchSuperOverrides { public static bool Prefix(string key, ref string __result) { if (Main.SuperOverrides.ContainsKey(key)) { __result = Main.SuperOverrides[key]; return false; } return true; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("prodzpod.NemesisRisingTidesZetAspectCompat", "NemesisRisingTidesZetAspectCompat", "1.0.0")] public class ZetAspectsCompat : BaseUnityPlugin { public const string PluginGUID = "prodzpod.NemesisRisingTidesZetAspectCompat"; public const string PluginAuthor = "prodzpod"; public const string PluginName = "NemesisRisingTidesZetAspectCompat"; public const string PluginVersion = "1.0.0"; public static Harmony Harmony; public void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown Harmony = new Harmony("prodzpod.NemesisRisingTidesZetAspectCompat"); if (Chainloader.PluginInfos.ContainsKey("com.TPDespair.ZetAspects")) { Main.Log.LogDebug((object)"ZetAspect compat loaded :3"); Harmony.PatchAll(typeof(PatchSuperOverrides)); } } } }