using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; 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 EntityStates.VoidJailer.Weapon; using HG; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using Nautilus.Configuration; using Nautilus.Interactables; using Nautilus.Items; using On.RoR2; using R2API; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; [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("Nautilus")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+9c4bebcab331578124318ec1e98a43b1b65e7fd0")] [assembly: AssemblyProduct("Nautilus")] [assembly: AssemblyTitle("Nautilus")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Nautilus { public static class Helpers { public static GameObject PrepareItemDisplayModel(GameObject itemDisplayModel) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0044: Unknown result type (might be due to invalid IL or missing references) ItemDisplay val = itemDisplayModel.AddComponent(); List list = new List(); Renderer[] componentsInChildren = itemDisplayModel.GetComponentsInChildren(); foreach (Renderer val2 in componentsInChildren) { RendererInfo val3 = default(RendererInfo); val3.renderer = val2; val3.defaultMaterial = val2.material; RendererInfo item = val3; list.Add(item); } val.rendererInfos = list.ToArray(); return itemDisplayModel; } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInPlugin("com.Hex3.Nautilus", "Nautilus", "1.3.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin { public class RecipeContentPackProvider : IContentPackProvider { [CompilerGenerated] private sealed class d__8 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FinalizeAsyncArgs args; public RecipeContentPackProvider <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; Log.Info("Craftable content provider called (Finalize)"); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GetContentPackAsyncArgs args; public RecipeContentPackProvider <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; Log.Info("Craftable content provider called (Generate)"); ContentPack.Copy(<>4__this.contentPack, args.output); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LoadStaticContentAsyncArgs args; public RecipeContentPackProvider <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; Log.Info("Craftable content provider called (Load)"); <>4__this.contentPack.identifier = <>4__this.identifier; <>4__this.contentPack.craftableDefs.Add(Craftables.ToArray()); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal ContentPack contentPack = new ContentPack(); public static List Craftables = new List(); public string identifier => "com.hex3.NautilusRecipes"; public void Initialise() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(AddSelf); } private void AddSelf(AddContentPackProviderDelegate add) { add.Invoke((IContentPackProvider)(object)this); } [IteratorStateMachine(typeof(d__6))] public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(d__7))] public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(d__8))] public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__8(0) { <>4__this = this, args = args }; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnMainMenuControllerInitialized <>9__9_0; internal void b__9_0(orig_OnMainMenuControllerInitialized orig, RoR2Application self) { ItemInit.FormatDescriptions(); orig.Invoke(self); } } public const string NAUTILUS_GUID = "com.Hex3.Nautilus"; public const string NAUTILUS_NAME = "Nautilus"; public const string NAUTILUS_VER = "1.3.0"; public static Main Instance; public static ExpansionDef Expansion; public static AssetBundle Assets; public static ItemRelationshipProvider ItemRelationshipProvider = ScriptableObject.CreateInstance(); public static List ItemConversionList = new List(); public static ConfigEntry Config_Enabled; public void Awake() { //IL_007c: 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_0097: Expected O, but got Unknown //IL_0097: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Expected O, but got Unknown Log.Init(((BaseUnityPlugin)this).Logger); Log.Info("Init Nautilus 1.3.0"); Instance = this; Log.Info("Creating assets..."); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Nautilus.nautilusvfx")) { Assets = AssetBundle.LoadFromStream(stream); } InteractableInit.shrineOfTheDeep = InteractableInit.shrineOfTheDeep; Log.Info("Creating config..."); Config_Enabled = ((BaseUnityPlugin)Instance).Config.Bind(new ConfigDefinition("CONFIG - IMPORTANT", "Enable custom config"), false, new ConfigDescription("Set to 'true' to enable custom configuration for this mod. False by default to allow balance changes to take effect.", (AcceptableValueBase)null, Array.Empty())); ModSettingsManager.SetModDescription("Adds new void counterparts for vanilla items."); ModSettingsManager.SetModIcon(Assets.LoadAsset("Assets/icons/expansion.png")); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Config_Enabled, true)); ConfigItem.Init(); Log.Info("Creating expansion..."); Expansion = ScriptableObject.CreateInstance(); ((Object)Expansion).name = "Nautilus"; Expansion.nameToken = "NT_EXPANSION_NAME"; Expansion.descriptionToken = "NT_EXPANSION_DESC"; Expansion.iconSprite = Assets.LoadAsset("Assets/icons/expansion.png"); Expansion.disabledIconSprite = Assets.LoadAsset("Assets/icons/expansion-inactive.png"); Expansion.requiredEntitlement = null; ContentAddition.AddExpansionDef(Expansion); Log.Info("Creating items..."); ItemInit.Init(); Log.Info("Creating interactables..."); InteractableInit.Init(); Log.Info("Creating void conversions..."); ((Object)ItemRelationshipProvider).name = "NT_ITEMRELATIONSHIPPROVIDER"; ItemRelationshipProvider.relationshipType = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion(); ItemRelationshipProvider.relationships = ItemConversionList.ToArray(); ContentAddition.AddItemRelationshipProvider(ItemRelationshipProvider); Log.Info("Creating crafting recipes..."); if (ItemInit.WeepingFungus_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.WeepingFungus_Ingredient1.Value, ItemInit.WeepingFungus_Ingredient2.Value, "MushroomVoid"); } if (ItemInit.SaferSpaces_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.SaferSpaces_Ingredient1.Value, ItemInit.SaferSpaces_Ingredient2.Value, "BearVoid"); } if (ItemInit.EncrustedKey_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.EncrustedKey_Ingredient1.Value, ItemInit.EncrustedKey_Ingredient2.Value, "TreasureCacheVoid"); } if (ItemInit.Lenses_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Lenses_Ingredient1.Value, ItemInit.Lenses_Ingredient2.Value, "CritGlassesVoid"); } if (ItemInit.NeedleTick_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.NeedleTick_Ingredient1.Value, ItemInit.NeedleTick_Ingredient2.Value, "BleedOnHitVoid"); } if (ItemInit.LysateCell_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.LysateCell_Ingredient1.Value, ItemInit.LysateCell_Ingredient2.Value, "EquipmentMagazineVoid"); } if (ItemInit.Polylute_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Polylute_Ingredient1.Value, ItemInit.Polylute_Ingredient2.Value, "ChainLightningVoid"); } if (ItemInit.Tentabauble_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Tentabauble_Ingredient1.Value, ItemInit.Tentabauble_Ingredient2.Value, "SlowOnHitVoid"); } if (ItemInit.Voidsent_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Voidsent_Ingredient1.Value, ItemInit.Voidsent_Ingredient2.Value, "ExplodeOnDeathVoid"); } if (ItemInit.Band_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Band_Ingredient1.Value, ItemInit.Band_Ingredient2.Value, "ElementalRingVoid"); } if (ItemInit.Band_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Band_Ingredient1Alt.Value, ItemInit.Band_Ingredient2.Value, "ElementalRingVoid"); } if (ItemInit.PlasmaShrimp_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.PlasmaShrimp_Ingredient1.Value, ItemInit.PlasmaShrimp_Ingredient2.Value, "MissileVoid"); } if (ItemInit.Benthic_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Benthic_Ingredient1.Value, ItemInit.Benthic_Ingredient2.Value, "CloverVoid"); } if (ItemInit.Larva_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Larva_Ingredient1.Value, ItemInit.Larva_Ingredient2.Value, "ExtraLifeVoid"); } if (ItemInit.Zoea_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ItemInit.Zoea_Ingredient1.Value, ItemInit.Zoea_Ingredient2.Value, "VoidMegaCrabItem"); } for (int i = 0; i < ItemInit.RecipeList.Count; i++) { CraftableDef val = ScriptableObject.CreateInstance(); ((Object)val).name = "NautilusRecipe" + i; RecipeContentPackProvider.Craftables.Add(val); } new RecipeContentPackProvider().Initialise(); ((ResourceAvailability)(ref PickupCatalog.availability)).CallWhenAvailable((Action)InitRecipes); Log.Info("Adding language hooks..."); object obj = <>c.<>9__9_0; if (obj == null) { hook_OnMainMenuControllerInitialized val2 = delegate(orig_OnMainMenuControllerInitialized orig, RoR2Application self) { ItemInit.FormatDescriptions(); orig.Invoke(self); }; <>c.<>9__9_0 = val2; obj = (object)val2; } RoR2Application.OnMainMenuControllerInitialized += (hook_OnMainMenuControllerInitialized)obj; Log.Info("Done"); } public void InitRecipes() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) int num = 0; foreach (VoidRecipe recipe in ItemInit.RecipeList) { CraftableDef val = RecipeContentPackProvider.Craftables[num]; Recipe val2 = new Recipe(); val2.amountToDrop = 1; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (Object)(object)ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex(recipe.ingredient1)) }, new RecipeIngredient { pickup = (Object)(object)ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex(recipe.ingredient2)) } }; val.pickup = (Object)(object)ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex(recipe.result)); val.recipes = (Recipe[])(object)new Recipe[1] { val2 }; RecipeContentPackProvider.Craftables.Add(val); Log.Info("Added recipe for " + recipe.result + ": " + recipe.ingredient1 + " + " + recipe.ingredient2); num++; } } } } namespace Nautilus.Items { public class CollapseInfectOrb : Orb { public override void Begin() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration, scale = 2f }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(OrbStorageUtility.Get("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); } public static void CreateInfectOrb(Vector3 origin, HurtBox target) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) CollapseInfectOrb collapseInfectOrb = new CollapseInfectOrb(); ((Orb)collapseInfectOrb).duration = 0.5f; ((Orb)collapseInfectOrb).origin = origin; ((Orb)collapseInfectOrb).target = target; OrbManager.instance.AddOrb((Orb)(object)collapseInfectOrb); } } public abstract class ItemBase { public ItemDef ItemDef; public string Name; public ItemTag[] Tags; public ItemTier Tier; public bool CanRemove; public bool IsConsumed; public bool Hidden; public ItemIndex ItemIndex => ItemCatalog.FindItemIndex(((Object)ItemDef).name); public abstract bool Enabled { get; } public abstract ItemDef ConversionItemDef { get; } public abstract GameObject itemPrefab { get; } public abstract Sprite itemIcon { get; } public ItemBase(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove, bool _isConsumed, bool _hidden) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) Name = _name; Tags = _tags; Tier = _tier; CanRemove = _canRemove; IsConsumed = _isConsumed; Hidden = _hidden; ItemInit.ItemList.Add(this); } public bool RegisterItem() { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_01d3: Expected O, but got Unknown //IL_01e8: 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_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) if (!Enabled) { return Enabled; } ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = Name; ItemDef.nameToken = "NT_ITEM_" + Name.ToUpper() + "_NAME"; ItemDef.pickupToken = "NT_ITEM_" + Name.ToUpper() + "_PICKUP"; ItemDef.descriptionToken = "NT_ITEM_" + Name.ToUpper() + "_DESC"; ItemDef.loreToken = "NT_ITEM_" + Name.ToUpper() + "_LORE"; ItemDef.tags = Tags; ItemDef.tier = Tier; ItemDef.deprecatedTier = Tier; ItemDef.canRemove = CanRemove; ItemDef.isConsumed = IsConsumed; ItemDef.hidden = Hidden; ItemDef.requiredExpansion = Main.Expansion; ItemDef.pickupModelPrefab = itemPrefab; ItemDef.pickupIconSprite = itemIcon; if (Object.op_Implicit((Object)(object)itemPrefab)) { Transform child = itemPrefab.transform.GetChild(0); ModelPanelParameters val = itemPrefab.AddComponent(); val.minDistance = 1f; val.maxDistance = 2f; val.focusPointTransform = child; val.cameraPositionTransform = child; } ItemAPI.Add(new CustomItem(ItemDef, AddItemDisplays())); if (Object.op_Implicit((Object)(object)ConversionItemDef)) { Pair val2 = default(Pair); val2.itemDef1 = ConversionItemDef; val2.itemDef2 = ItemDef; Pair item = val2; Main.ItemConversionList.Add(item); Log.Info($"Added void conversion from {((Object)ConversionItemDef).name} to {((Object)ItemDef).name}"); } return Enabled; } public int GetItemCountEffective(CharacterBody body) { int result = 0; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { result = body.inventory.GetItemCountEffective(ItemDef); } return result; } public int GetItemCountPermanent(CharacterBody body) { int result = 0; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { result = body.inventory.GetItemCountPermanent(ItemDef); } return result; } public abstract void FormatDescriptionTokens(); public abstract void RegisterHooks(); public abstract void AddCorruptionRecipe(); public abstract ItemDisplayRuleDict AddItemDisplays(); } public static class ItemInit { public static ConfigItem WeepingFungus_Recipe = new ConfigItem("Vanilla: Weeping Fungus", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem WeepingFungus_Ingredient1 = new ConfigItem("Vanilla: Weeping Fungus", "Recipe ingredient 1", "First ingredient for corruption recipe", "Mushroom"); public static ConfigItem WeepingFungus_Ingredient2 = new ConfigItem("Vanilla: Weeping Fungus", "Recipe ingredient 2", "Second ingredient for corruption recipe", "Crabsinthe"); public static ConfigItem SaferSpaces_Recipe = new ConfigItem("Vanilla: Safer Spaces", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem SaferSpaces_Ingredient1 = new ConfigItem("Vanilla: Safer Spaces", "Recipe ingredient 1", "First ingredient for corruption recipe", "Bear"); public static ConfigItem SaferSpaces_Ingredient2 = new ConfigItem("Vanilla: Safer Spaces", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BleedOnHitVoid"); public static ConfigItem EncrustedKey_Recipe = new ConfigItem("Vanilla: Encrusted Key", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem EncrustedKey_Ingredient1 = new ConfigItem("Vanilla: Encrusted Key", "Recipe ingredient 1", "First ingredient for corruption recipe", "TreasureCache"); public static ConfigItem EncrustedKey_Ingredient2 = new ConfigItem("Vanilla: Encrusted Key", "Recipe ingredient 2", "Second ingredient for corruption recipe", "VoidWatch"); public static ConfigItem Lenses_Recipe = new ConfigItem("Vanilla: Lost Seers Lenses", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Lenses_Ingredient1 = new ConfigItem("Vanilla: Lost Seers Lenses", "Recipe ingredient 1", "First ingredient for corruption recipe", "CritGlasses"); public static ConfigItem Lenses_Ingredient2 = new ConfigItem("Vanilla: Lost Seers Lenses", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BleedOnHitVoid"); public static ConfigItem NeedleTick_Recipe = new ConfigItem("Vanilla: Needletick", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem NeedleTick_Ingredient1 = new ConfigItem("Vanilla: Needletick", "Recipe ingredient 1", "First ingredient for corruption recipe", "BleedOnHit"); public static ConfigItem NeedleTick_Ingredient2 = new ConfigItem("Vanilla: Needletick", "Recipe ingredient 2", "Second ingredient for corruption recipe", "Crabsinthe"); public static ConfigItem LysateCell_Recipe = new ConfigItem("Vanilla: Lysate Cell", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem LysateCell_Ingredient1 = new ConfigItem("Vanilla: Lysate Cell", "Recipe ingredient 1", "First ingredient for corruption recipe", "EquipmentMagazine"); public static ConfigItem LysateCell_Ingredient2 = new ConfigItem("Vanilla: Lysate Cell", "Recipe ingredient 2", "Second ingredient for corruption recipe", "MushroomVoid"); public static ConfigItem Polylute_Recipe = new ConfigItem("Vanilla: Polylute", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Polylute_Ingredient1 = new ConfigItem("Vanilla: Polylute", "Recipe ingredient 1", "First ingredient for corruption recipe", "ChainLightning"); public static ConfigItem Polylute_Ingredient2 = new ConfigItem("Vanilla: Polylute", "Recipe ingredient 2", "Second ingredient for corruption recipe", "CritGlassesVoid"); public static ConfigItem Tentabauble_Recipe = new ConfigItem("Vanilla: Tentabauble", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Tentabauble_Ingredient1 = new ConfigItem("Vanilla: Tentabauble", "Recipe ingredient 1", "First ingredient for corruption recipe", "SlowOnHit"); public static ConfigItem Tentabauble_Ingredient2 = new ConfigItem("Vanilla: Tentabauble", "Recipe ingredient 2", "Second ingredient for corruption recipe", "Crabsinthe"); public static ConfigItem Voidsent_Recipe = new ConfigItem("Vanilla: Voidsent Flame", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Voidsent_Ingredient1 = new ConfigItem("Vanilla: Voidsent Flame", "Recipe ingredient 1", "First ingredient for corruption recipe", "ExplodeOnDeath"); public static ConfigItem Voidsent_Ingredient2 = new ConfigItem("Vanilla: Voidsent Flame", "Recipe ingredient 2", "Second ingredient for corruption recipe", "VoidWatch"); public static ConfigItem Band_Recipe = new ConfigItem("Vanilla: Singularity Band", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Band_Ingredient1 = new ConfigItem("Vanilla: Singularity Band", "Recipe ingredient 1", "First ingredient for corruption recipe", "FireRing"); public static ConfigItem Band_Ingredient1Alt = new ConfigItem("Vanilla: Singularity Band", "Recipe ingredient 1 (alt)", "First ingredient for corruption recipe (alt)", "IceRing"); public static ConfigItem Band_Ingredient2 = new ConfigItem("Vanilla: Singularity Band", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BearVoid"); public static ConfigItem PlasmaShrimp_Recipe = new ConfigItem("Vanilla: Plasma Shrimp", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem PlasmaShrimp_Ingredient1 = new ConfigItem("Vanilla: Plasma Shrimp", "Recipe ingredient 1", "First ingredient for corruption recipe", "Missile"); public static ConfigItem PlasmaShrimp_Ingredient2 = new ConfigItem("Vanilla: Plasma Shrimp", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BearVoid"); public static ConfigItem Benthic_Recipe = new ConfigItem("Vanilla: Benthic Bloom", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Benthic_Ingredient1 = new ConfigItem("Vanilla: Benthic Bloom", "Recipe ingredient 1", "First ingredient for corruption recipe", "Clover"); public static ConfigItem Benthic_Ingredient2 = new ConfigItem("Vanilla: Benthic Bloom", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ChainLightningVoid"); public static ConfigItem Larva_Recipe = new ConfigItem("Vanilla: Pluripotent Larva", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Larva_Ingredient1 = new ConfigItem("Vanilla: Pluripotent Larva", "Recipe ingredient 1", "First ingredient for corruption recipe", "ExtraLife"); public static ConfigItem Larva_Ingredient2 = new ConfigItem("Vanilla: Pluripotent Larva", "Recipe ingredient 2", "Second ingredient for corruption recipe", "EquipmentMagazineVoid"); public static ConfigItem Zoea_Recipe = new ConfigItem("Vanilla: Newly Hatched Zoea", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Zoea_Ingredient1 = new ConfigItem("Vanilla: Newly Hatched Zoea", "Recipe ingredient 1", "First ingredient for corruption recipe", "BeetleGland"); public static ConfigItem Zoea_Ingredient2 = new ConfigItem("Vanilla: Newly Hatched Zoea", "Recipe ingredient 2", "Second ingredient for corruption recipe", "SlowOnHitVoid"); private static List _itemList; private static List _recipeList; public static ApathyCore ApathyCore; public static ApathyCoreHidden ApathyCoreHidden; public static DeepVoidSignal DeepVoidSignal; public static DrenchedPerforator DrenchedPerforator; public static EffigyOfRot EffigyOfRot; public static MobiusNode MobiusNode; public static ObserversEye ObserversEye; public static OsmiumShackles OsmiumShackles; public static RebelSoul RebelSoul; public static Rebirth Rebirth; public static SplitNucleus SplitNucleus; public static TenebralGland TenebralGland; public static Crabsinthe Crabsinthe; public static VoidWatch VoidWatch; public static Wellies Wellies; public static AlteredSoul AlteredSoul; public static MotherOfPearl MotherOfPearl; public static ShimmeringNautilus ShimmeringNautilus; public static SkullSprout SkullSprout; public static Xenobacteria Xenobacteria; public static HydraTooth HydraTooth; public static PaleStar PaleStar; public static PaleStarConsumed PaleStarConsumed; public static ViscousPot ViscousPot; public static List ItemList { get { if (_itemList == null) { _itemList = new List(); } return _itemList; } set { _itemList = value; } } public static List RecipeList { get { if (_recipeList == null) { _recipeList = new List(); } return _recipeList; } set { _recipeList = value; } } public static void Init() { foreach (ItemBase item in ItemList) { if (item.RegisterItem()) { Log.Info("Added definition for item " + item.Name); item.RegisterHooks(); item.AddCorruptionRecipe(); } } } public static int IsItemEnabledByString(string name) { foreach (ItemBase item in ItemList) { if (item.Name == name) { if (item.Enabled) { return 0; } return 1; } } return 2; } public static void FormatDescriptions() { foreach (ItemBase item in ItemList) { if (item.Enabled) { item.FormatDescriptionTokens(); } } } public static void MakeCorruptionRecipe(string ingredient1, string ingredient2, string result) { if (string.IsNullOrEmpty(ingredient1) || string.IsNullOrEmpty(ingredient2) || string.IsNullOrEmpty(result)) { Log.Warning("Failed adding recipe for " + result + " due to missing item names!"); return; } if (IsItemEnabledByString(ingredient1) == 1 || IsItemEnabledByString(ingredient2) == 1 || IsItemEnabledByString(result) == 1) { Log.Warning("Failed adding recipe for " + result + " due to one or more items being disabled!"); return; } VoidRecipe voidRecipe = default(VoidRecipe); voidRecipe.ingredient1 = ingredient1; voidRecipe.ingredient2 = ingredient2; voidRecipe.result = result; VoidRecipe item = voidRecipe; RecipeList.Add(item); } static ItemInit() { ItemTag[] array = new ItemTag[6]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ApathyCore = new ApathyCore("ApathyCore", (ItemTag[])(object)array, (ItemTier)9); ItemTag[] array2 = new ItemTag[4]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ApathyCoreHidden = new ApathyCoreHidden("ApathyCoreHidden", (ItemTag[])(object)array2, (ItemTier)5); ItemTag[] array3 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); DeepVoidSignal = new DeepVoidSignal("DeepVoidSignal", (ItemTag[])(object)array3, (ItemTier)9); ItemTag[] array4 = new ItemTag[4]; RuntimeHelpers.InitializeArray(array4, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); DrenchedPerforator = new DrenchedPerforator("DrenchedPerforator", (ItemTag[])(object)array4, (ItemTier)9); ItemTag[] array5 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array5, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); EffigyOfRot = new EffigyOfRot("EffigyOfRot", (ItemTag[])(object)array5, (ItemTier)9); MobiusNode = new MobiusNode("MobiusNode", (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, (ItemTier)9); ItemTag[] array6 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array6, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ObserversEye = new ObserversEye("ObserversEye", (ItemTag[])(object)array6, (ItemTier)9); OsmiumShackles = new OsmiumShackles("OsmiumShackles", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)9); ItemTag[] array7 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array7, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); RebelSoul = new RebelSoul("RebelSoul", (ItemTag[])(object)array7, (ItemTier)9); ItemTag[] array8 = new ItemTag[6]; RuntimeHelpers.InitializeArray(array8, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); Rebirth = new Rebirth("Rebirth", (ItemTag[])(object)array8, (ItemTier)9); SplitNucleus = new SplitNucleus("SplitNucleus", (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, (ItemTier)9); TenebralGland = new TenebralGland("TenebralGland", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)9); Crabsinthe = new Crabsinthe("Crabsinthe", (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, (ItemTier)6); VoidWatch = new VoidWatch("VoidWatch", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)6); Wellies = new Wellies("Wellies", (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, (ItemTier)6); AlteredSoul = new AlteredSoul("AlteredSoul", (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)4 }, (ItemTier)8); ItemTag[] array9 = new ItemTag[4]; RuntimeHelpers.InitializeArray(array9, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); MotherOfPearl = new MotherOfPearl("MotherOfPearl", (ItemTag[])(object)array9, (ItemTier)8); ItemTag[] array10 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array10, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ShimmeringNautilus = new ShimmeringNautilus("ShimmeringNautilus", (ItemTag[])(object)array10, (ItemTier)8); SkullSprout = new SkullSprout("Skullsprout", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)8); Xenobacteria = new Xenobacteria("Xenobacteria", (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)4 }, (ItemTier)8); HydraTooth = new HydraTooth("HydraTooth", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)7); ItemTag[] array11 = new ItemTag[3]; RuntimeHelpers.InitializeArray(array11, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); PaleStar = new PaleStar("PaleStar", (ItemTag[])(object)array11, (ItemTier)7); ItemTag[] array12 = new ItemTag[4]; RuntimeHelpers.InitializeArray(array12, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); PaleStarConsumed = new PaleStarConsumed("PaleStarConsumed", (ItemTag[])(object)array12, (ItemTier)5); ViscousPot = new ViscousPot("ViscousPot", (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)1 }, (ItemTier)7); } } public struct VoidRecipe { public string ingredient1; public string ingredient2; public string result; } public class PoisonInfectOrb : Orb { public override void Begin() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(OrbStorageUtility.Get("Prefabs/Effects/OrbEffects/CrocoDiseaseOrbEffect"), val, true); } public static void CreateInfectOrb(Vector3 origin, HurtBox target) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) PoisonInfectOrb poisonInfectOrb = new PoisonInfectOrb(); ((Orb)poisonInfectOrb).duration = 0.5f; ((Orb)poisonInfectOrb).origin = origin; ((Orb)poisonInfectOrb).target = target; OrbManager.instance.AddOrb((Orb)(object)poisonInfectOrb); } } public class ApathyCore : ItemBase { public BuffDef ApathyBuff; public BuffDef ApathyBuffTemp; private GameObject _explodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private Material _ExplodeOverlay; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private Material k__BackingField; private GameObject _individualExplodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public List PermanentAllies = new List { "drone1", "drone2", "junkdrone", "haulerdrone", "flamedrone", "missiledrone", "emergencydrone", "equipmentdrone", "cleanupdrone", "rechargedrone", "jailerdrone", "megadrone", "copycatdrone", "bombardmentdrone", "turret1", "dronecommander", "titangold", "infernodrone", "voltaicdrone" }; public static ConfigItem ApathyCore_Enabled = new ConfigItem("Void boss: Apathy Core", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem ApathyCore_ConsumptionInterval = new ConfigItem("Void boss: Apathy Core", "Consumption interval", "How often, in seconds, do nearby allies get consumed by the Apathy Core?", 20f, 1f, 40f, 1f); public static ConfigItem ApathyCore_ShieldGain = new ConfigItem("Void boss: Apathy Core", "Shield gain", "On consumption, how much shields should be gained per stack?", 5f, 1f, 40f, 1f); public static ConfigItem ApathyCore_ArmorGain = new ConfigItem("Void boss: Apathy Core", "Armor gain", "On consumption, how much armor should be gained?", 2f, 1f, 10f, 1f); public static ConfigItem ApathyCore_CriticalDamage = new ConfigItem("Void boss: Apathy Core", "Critical strike damage gain", "On consumption, what fraction of critical strike damage should be gained?", 0.05f, 0.05f, 0.5f, 0.01f); public static ConfigItem ApathyCore_SkillChargeGainPrimary = new ConfigItem("Void boss: Apathy Core", "Skill charge gain (primary)", "On consumption, add a charge of your primary skill?", _defaultValue: true); public static ConfigItem ApathyCore_SkillChargeGainSecondary = new ConfigItem("Void boss: Apathy Core", "Skill charge gain (secondary)", "On consumption, add a charge of your secondary skill?", _defaultValue: true); public static ConfigItem ApathyCore_SkillChargeGainUtility = new ConfigItem("Void boss: Apathy Core", "Skill charge gain (utility)", "On consumption, add a charge of your utility skill?", _defaultValue: true); public static ConfigItem ApathyCore_SkillChargeGainSpecial = new ConfigItem("Void boss: Apathy Core", "Skill charge gain (special)", "On consumption, add a charge of your special skill?", _defaultValue: true); public static ConfigItem ApathyCore_TemporaryBuffLength = new ConfigItem("Void boss: Apathy Core", "Temporary buff length", "When consuming a temporary ally, how many seconds should the buff last per stack?", 60f, 10f, 120f, 10f); public static ConfigItem ApathyCore_ExtraDrones = new ConfigItem("Void boss: Apathy Core", "Additional allied minions to consider as permanent", "(Separate by commas!) Vanilla and Sandswept drones already count as permanent allies for this item. Add the CharacterBody name of any minion to make it considered permanent as well", ""); public static ConfigItem ApathyCore_Recipe = new ConfigItem("Void boss: Apathy Core", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem ApathyCore_Ingredient1 = new ConfigItem("Void boss: Apathy Core", "Recipe ingredient 1", "First ingredient for corruption recipe", "RoboBallBuddy"); public static ConfigItem ApathyCore_Ingredient2 = new ConfigItem("Void boss: Apathy Core", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ViscousPot"); public override bool Enabled => ApathyCore_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBuddy/RoboBallBuddy.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/apathyCore.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC3/ironalluvium/matIAHexMetalPlateDark.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidSurvivorCorruptOverlay.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkBodyOverlayCorrupted.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/matTitanPebble.mat").WaitForCompletion(); public Material material4 => Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/matTitanProjectile.mat").WaitForCompletion(); public Material material5 => Addressables.LoadAssetAsync((object)"RoR2/DLC3/ironalluvium/matIAHexMetalPlateDark.mat").WaitForCompletion(); public GameObject explodePrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explodePrefab == (Object)null) { _explodePrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterExplosionCorrupted.prefab").WaitForCompletion(); } return _explodePrefab; } [CompilerGenerated] set { k__BackingField = value; } } public Material ExplodeOverlay { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_ExplodeOverlay == (Object)null) { _ExplodeOverlay = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkBodyOverlayCorrupted.mat").WaitForCompletion(); } return _ExplodeOverlay; } [CompilerGenerated] set { k__BackingField = value; } } public GameObject individualExplodePrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_individualExplodePrefab == (Object)null) { _individualExplodePrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/BleedOnHitVoid/FractureImpactEffect.prefab").WaitForCompletion(); } return _individualExplodePrefab; } [CompilerGenerated] set { k__BackingField = value; } } public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public ApathyCore(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_00f2: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/apathyCore.prefab"); Material[] materialArray = (Material[])(object)new Material[6] { material0, material1, material2, material3, material4, material5 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), ApathyCore_ShieldGain.Value, ApathyCore_ArmorGain.Value, ApathyCore_CriticalDamage.Value * 100f, ApathyCore_SkillChargeGainSecondary.Value, ApathyCore_TemporaryBuffLength.Value)); } public override void RegisterHooks() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown CreateApathyBuff(); CreateApathyBuffTemp(); CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); ApathyCoreBehavior apathyCoreBehavior = ((Component)self).GetComponent(); int itemCountEffective2 = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)apathyCoreBehavior)) { apathyCoreBehavior = self.AddItemBehavior(itemCountEffective2); } if (Object.op_Implicit((Object)(object)apathyCoreBehavior)) { ((ItemBehavior)apathyCoreBehavior).stack = itemCountEffective2; } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)apathyCoreBehavior)) { Object.Destroy((Object)(object)((Component)self).GetComponent()); } }; RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)orig.inventory)) { int itemCountEffective = orig.inventory.GetItemCountEffective(ItemInit.ApathyCoreHidden.ItemDef); if (itemCountEffective > 0) { orig.SetBuffCount(ApathyBuff.buffIndex, itemCountEffective); } int num = orig.GetBuffCount(ApathyBuff) + orig.GetBuffCount(ApathyBuffTemp); if (num > 0) { self.baseShieldAdd += (float)num * ApathyCore_ShieldGain.Value; self.armorAdd += (float)num * ApathyCore_ArmorGain.Value; self.critDamageMultAdd += (float)num * ApathyCore_CriticalDamage.Value; } } }; } public override void AddCorruptionRecipe() { if (ApathyCore_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ApathyCore_Ingredient1.Value, ApathyCore_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public void CreateApathyBuff() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); val.buffColor = new Color(1f, 0.282f, 0.392f); val.canStack = true; val.isDebuff = false; val.ignoreGrowthNectar = false; ((Object)val).name = "Apathy Core"; val.isHidden = false; val.isCooldown = false; val.iconSprite = Main.Assets.LoadAsset("Assets/icons/apathyCoreBuffPerm.png"); ContentAddition.AddBuffDef(val); ApathyBuff = val; } public void CreateApathyBuffTemp() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); val.buffColor = new Color(1f, 0.282f, 0.392f); val.canStack = true; val.isDebuff = false; val.ignoreGrowthNectar = false; ((Object)val).name = "Apathy Core (Temporary)"; val.isHidden = false; val.isCooldown = false; val.iconSprite = Main.Assets.LoadAsset("Assets/icons/apathyCoreBuffTemp.png"); ContentAddition.AddBuffDef(val); ApathyBuffTemp = val; } public List GetAllAllyNames() { List list = new List(); list.AddRange(PermanentAllies); if (!Utility.IsNullOrWhiteSpace(ApathyCore_ExtraDrones.Value)) { List list2 = ApathyCore_ExtraDrones.Value.Split(',').ToList(); for (int i = 0; i < list2.Count; i++) { list2[i] = list2[i].Trim(); } list.AddRange(list2); } return list; } } public class ApathyCoreBehavior : ItemBehavior { private float consumptionTimer = 0f; private float consumptionInterval = ApathyCore.ApathyCore_ConsumptionInterval.Value; private float effectTimer = 0f; private float effectInterval = 0.5f; private bool effectStarted = false; private void FixedUpdate() { //IL_0075: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown consumptionTimer += Time.fixedDeltaTime; if (consumptionTimer >= consumptionInterval) { TryConsumeAlly(); consumptionTimer = 0f; } if (!effectStarted) { return; } effectTimer += Time.fixedDeltaTime; if (effectTimer >= effectInterval) { EffectData val = new EffectData { origin = base.body.corePosition }; EffectManager.SpawnEffect(ItemInit.ApathyCore.individualExplodePrefab, val, true); ModelLocator component = ((Component)base.body).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform) && Object.op_Implicit((Object)(object)((Component)component.modelTransform).GetComponentInParent())) { TemporaryOverlay val2 = ((Component)base.body).gameObject.AddComponent(); val2.duration = 1f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.Linear(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = ItemInit.ApathyCore.ExplodeOverlay; val2.AddToCharacerModel(((Component)component.modelTransform).GetComponentInParent()); } effectTimer = 0f; effectStarted = false; } } private void TryConsumeAlly() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) CharacterBody[] minionBodies = base.body.GetMinionBodies(); Util.ShuffleArray(minionBodies); CharacterBody[] array = minionBodies; foreach (CharacterBody val in array) { if (!Object.op_Implicit((Object)(object)val.master)) { continue; } EffectData val2 = new EffectData { origin = val.corePosition }; EffectManager.SpawnEffect(ItemInit.ApathyCore.explodePrefab, val2, true); CollapseInfectOrb.CreateInfectOrb(val.corePosition, base.body.mainHurtBox); Util.PlaySound(ChargeFire.attackSoundEffect, ((Component)base.body).gameObject); effectStarted = true; bool flag = false; foreach (string allAllyName in ItemInit.ApathyCore.GetAllAllyNames()) { if (((Object)val).name.ToLower().Contains(allAllyName)) { flag = true; } } if (flag) { base.body.inventory.GiveItemPermanent(ItemInit.ApathyCoreHidden.ItemDef, 1); } else { base.body.AddTimedBuff(ItemInit.ApathyCore.ApathyBuffTemp, ApathyCore.ApathyCore_TemporaryBuffLength.Value * (float)base.stack); } base.body.RecalculateStats(); if (Object.op_Implicit((Object)(object)base.body.skillLocator)) { if (base.body.skillLocator.primary.maxStock >= 1 && ApathyCore.ApathyCore_SkillChargeGainPrimary.Value) { base.body.skillLocator.primary.AddOneStock(); } if (base.body.skillLocator.secondary.maxStock >= 1 && ApathyCore.ApathyCore_SkillChargeGainSecondary.Value) { base.body.skillLocator.secondary.AddOneStock(); } if (base.body.skillLocator.utility.maxStock >= 1 && ApathyCore.ApathyCore_SkillChargeGainUtility.Value) { base.body.skillLocator.utility.AddOneStock(); } if (base.body.skillLocator.special.maxStock >= 1 && ApathyCore.ApathyCore_SkillChargeGainSpecial.Value) { base.body.skillLocator.special.AddOneStock(); } } if (Object.op_Implicit((Object)(object)val.inventory)) { val.inventory.GiveItemPermanent(Items.Ghost, 1); } val.master.TrueKill(); break; } } } public class ApathyCoreHidden : ItemBase { public override bool Enabled => ApathyCore.ApathyCore_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/LowerPricedChests/LowerPricedChests.asset").WaitForCompletion(); public ItemDef ConversionItemDefConsumed => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/LowerPricedChests/LowerPricedChestsConsumed.asset").WaitForCompletion(); public override GameObject itemPrefab => null; public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/paleStarConsumed.png"); public ApathyCoreHidden(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = true, bool _hidden = true) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public override void FormatDescriptionTokens() { } public override void RegisterHooks() { } public override void AddCorruptionRecipe() { } public override ItemDisplayRuleDict AddItemDisplays() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } } public class DeepVoidSignal : ItemBase { private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem DeepVoidSignal_Enabled = new ConfigItem("Void boss: Deep Void Signal", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem DeepVoidSignal_InfestorSpawns = new ConfigItem("Void boss: Deep Void Signal", "Void Infestor spawns", "When using an interactable, how many Void Infestors should spawn?", 2, 1f, 5f, 1f); public static ConfigItem DeepVoidSignal_InfestorSpawnsStack = new ConfigItem("Void boss: Deep Void Signal", "Void Infestor spawns (per stack)", "When using an interactable, how many Void Infestors should spawn per additional stack?", 2, 1f, 5f, 1f); public static ConfigItem DeepVoidSignal_VoidPowerDuration = new ConfigItem("Void boss: Deep Void Signal", "Voidtouched power on interact duration", "How long the Voidtouched buff should last after using an interactable, in seconds", 6f, 1f, 12f, 1f); public static ConfigItem DeepVoidSignal_VoidPowerDurationStack = new ConfigItem("Void boss: Deep Void Signal", "Voidtouched power on interact duration (per stack)", "How long the Voidtouched buff should last after using an interactable, in seconds per additional stack", 2f, 1f, 12f, 1f); public static ConfigItem DeepVoidSignal_Recipe = new ConfigItem("Void boss: Deep Void Signal", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem DeepVoidSignal_Ingredient1 = new ConfigItem("Void boss: Deep Void Signal", "Recipe ingredient 1", "First ingredient for corruption recipe", "ShockDamageAura"); public static ConfigItem DeepVoidSignal_Ingredient2 = new ConfigItem("Void boss: Deep Void Signal", "Recipe ingredient 2", "Second ingredient for corruption recipe", "PaleStar"); public override bool Enabled => DeepVoidSignal_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC3/Items/ShockDamageAura/ShockDamageAura.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/deepVoidSignal.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/CritGlassesVoid/matCritGlassesVoid.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/gauntlets/matGTVoidTerrain.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/matTitanPebble.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidMegaCrab/matVoidCrabAntiMatterParticleStreak.mat").WaitForCompletion(); public Material material4 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/voidstage/matVoidCoral.mat").WaitForCompletion(); public Material material5 => Addressables.LoadAssetAsync((object)"RoR2/Base/Common/matVoidDeathBombStreak.mat").WaitForCompletion(); public BuffDef voidBuffDef => Addressables.LoadAssetAsync((object)"RoR2/DLC1/EliteVoid/bdEliteVoid.asset").WaitForCompletion(); public GameObject deathBombProjectile => Addressables.LoadAssetAsync((object)"RoR2/Base/Nullifier/NullifierDeathBombProjectile.prefab").WaitForCompletion(); public GameObject bigDeathBombProjectile => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombProjectile.prefab").WaitForCompletion(); public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public DeepVoidSignal(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/deepVoidSignal.prefab"); Material[] materialArray = (Material[])(object)new Material[6] { material0, material1, material2, material3, material4, material5 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), DeepVoidSignal_InfestorSpawns.Value, DeepVoidSignal_InfestorSpawnsStack.Value, DeepVoidSignal_VoidPowerDuration.Value, DeepVoidSignal_VoidPowerDurationStack.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); DeepVoidSignalBehavior deepVoidSignalBehavior = ((Component)self).GetComponent(); int itemCountEffective2 = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)deepVoidSignalBehavior)) { deepVoidSignalBehavior = self.AddItemBehavior(itemCountEffective2); } if (Object.op_Implicit((Object)(object)deepVoidSignalBehavior)) { ((ItemBehavior)deepVoidSignalBehavior).stack = itemCountEffective2; } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)deepVoidSignalBehavior)) { Object.Destroy((Object)(object)((Component)self).GetComponent()); } }; GlobalEventManager.OnInteractionBegin += (hook_OnInteractionBegin)delegate(orig_OnInteractionBegin orig, GlobalEventManager self, Interactor interactor, IInteractable interactable, GameObject interactableObject) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00cf: 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_009d: Expected O, but got Unknown orig.Invoke(self, interactor, interactable, interactableObject); InteractionProcFilter interactionProcFilter; if (Object.op_Implicit((Object)(object)interactor) && interactable != null && Object.op_Implicit((Object)(object)interactableObject)) { CharacterBody component = ((Component)interactor).GetComponent(); interactionProcFilter = interactableObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && GetItemCountEffective(component) > 0 && InteractableIsPermittedForSpawn((MonoBehaviour)interactable)) { int itemCountEffective = GetItemCountEffective(component); GameObject val3 = new GameObject("infestorSpawner"); val3.transform.position = interactableObject.transform.position; DeepVoidSignalInfestorSpawner deepVoidSignalInfestorSpawner = val3.AddComponent(); deepVoidSignalInfestorSpawner.Initialize(DeepVoidSignal_InfestorSpawns.Value + DeepVoidSignal_InfestorSpawnsStack.Value * (itemCountEffective - 1)); component.AddTimedBuff(voidBuffDef, DeepVoidSignal_VoidPowerDuration.Value + DeepVoidSignal_VoidPowerDurationStack.Value * (float)(itemCountEffective - 1)); } } bool InteractableIsPermittedForSpawn(MonoBehaviour interactableAsMonoBehaviour) { if (!Object.op_Implicit((Object)(object)interactableAsMonoBehaviour)) { return false; } if (Object.op_Implicit((Object)(object)interactionProcFilter)) { return interactionProcFilter.shouldAllowOnInteractionBeginProc; } if (interactable is PurchaseInteraction) { return !interactableObject.GetComponent().disableSpawnOnInteraction; } if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent())) { if (((Behaviour)((Component)interactableAsMonoBehaviour).GetComponent()).enabled) { return false; } return true; } if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent())) { return false; } if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent())) { return false; } if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent())) { return false; } if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent())) { return ((Component)interactableAsMonoBehaviour).GetComponent().CanTriggerFireworks; } if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent())) { return ((Component)interactableAsMonoBehaviour).GetComponent().CheckInteractionOrder(); } return true; } }; GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)delegate(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00c8: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); if (Object.op_Implicit((Object)(object)damageReport.victimBody) && damageReport.victimBody.HasBuff(voidBuffDef) && (Object)(object)Object.FindAnyObjectByType() != (Object)null) { FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = ((damageReport.victimIsChampion || damageReport.victimIsBoss) ? bigDeathBombProjectile : deathBombProjectile); val.position = damageReport.victimBody.corePosition; val.rotation = Quaternion.identity; val.owner = ((Component)damageReport.victimBody).gameObject; val.damage = damageReport.victimBody.damage; val.crit = damageReport.victimBody.RollCrit(); FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } }; } public override void AddCorruptionRecipe() { if (DeepVoidSignal_Recipe.Value) { ItemInit.MakeCorruptionRecipe(DeepVoidSignal_Ingredient1.Value, DeepVoidSignal_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } } public class DeepVoidSignalBehavior : ItemBehavior { } public class DeepVoidSignalInfestorSpawner : MonoBehaviour { private float spawnInterval = 0.5f; private float spawnTimer = 0.5f; private bool initialized = false; private int spawnAmount = 0; public void Initialize(int _spawnAmount) { spawnAmount = _spawnAmount; initialized = true; } private void FixedUpdate() { if (!initialized) { return; } spawnTimer += Time.fixedDeltaTime; if (spawnTimer > spawnInterval) { SpawnInfestor(); spawnAmount--; if (spawnAmount <= 0) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private void SpawnInfestor() { //IL_000e: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(((Component)this).gameObject.transform.position.x, ((Component)this).gameObject.transform.position.y + 2f, ((Component)this).gameObject.transform.position.z); GameObject val2 = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/DLC1/EliteVoid/VoidInfestorMaster.prefab").WaitForCompletion(), val, Quaternion.identity); CharacterMaster component = val2.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.teamIndex = (TeamIndex)4; NetworkServer.Spawn(val2); component.SpawnBodyHere(); } } } public class DrenchedPerforator : ItemBase { private GameObject _explodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private GameObject _individualExplodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ModdedProcType DrenchedPerforatorProcType = ProcTypeAPI.ReserveProcType(); public static ConfigItem DrenchedPerforator_Enabled = new ConfigItem("Void boss: Drenched Perforator", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem DrenchedPerforator_Threshold = new ConfigItem("Void boss: Drenched Perforator", "Damage threshold", "Repeating fractional damage threshold for additional stacks of collapse to be added.", 6f, 1f, 12f, 0.5f); public static ConfigItem DrenchedPerforator_Stacks = new ConfigItem("Void boss: Drenched Perforator", "Collapse stacks", "Number of stacks of collapse to add on passing threshold.", 1, 1f, 5f, 1f); public static ConfigItem DrenchedPerforator_StacksStack = new ConfigItem("Void boss: Drenched Perforator", "Collapse stacks (per stack)", "Number of stacks of collapse to add on passing threshold, per additional stack.", 1, 1f, 5f, 1f); public static ConfigItem DrenchedPerforator_ExplosionRadiusv2 = new ConfigItem("Void boss: Drenched Perforator", "Explosion radius", "Meters radius for the base collapse explosion.", 12f, 1f, 24f, 1f); public static ConfigItem DrenchedPerforator_ExplosionRadiusIncreasev2 = new ConfigItem("Void boss: Drenched Perforator", "Explosion radius increase", "Meters radius the collapse explosion expands when additional collapse stacks are added.", 4f, 1f, 8f, 1f); public static ConfigItem DrenchedPerforator_ExplosionDamage = new ConfigItem("Void boss: Drenched Perforator", "Explosion damage", "Fractional damage (1 = 100%) dealt by explosion.", 4f, 1f, 12f, 0.1f); public static ConfigItem DrenchedPerforator_ExplosionProcCoefficient = new ConfigItem("Void boss: Drenched Perforator", "Explosion proc coefficient", "Proc coefficient of the on-collapse explosion.", 0.2f, 0f, 1f, 0.05f); public static ConfigItem DrenchedPerforator_Recipe = new ConfigItem("Void boss: Drenched Perforator", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem DrenchedPerforator_Ingredient1 = new ConfigItem("Void boss: Drenched Perforator", "Recipe ingredient 1", "First ingredient for corruption recipe", "FireballsOnHit"); public static ConfigItem DrenchedPerforator_Ingredient1Alt = new ConfigItem("Void boss: Drenched Perforator", "Recipe ingredient 1 (alt)", "First ingredient for corruption recipe (alt)", "LightningStrikeOnHit"); public static ConfigItem DrenchedPerforator_Ingredient2 = new ConfigItem("Void boss: Drenched Perforator", "Recipe ingredient 2", "Second ingredient for corruption recipe", "HydraTooth"); public override bool Enabled => DrenchedPerforator_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/FireballsOnHit/FireballsOnHit.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/drenchedPerforator.png"); public ItemDef ConversionItemDefExtra => Addressables.LoadAssetAsync((object)"RoR2/Base/LightningStrikeOnHit/LightningStrikeOnHit.asset").WaitForCompletion(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/Base/Common/TrimSheets/matTrimSheetMetalLightSnow.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/matCrocoSpine.mat").WaitForCompletion(); public GameObject explodePrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explodePrefab == (Object)null) { _explodePrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombExplosion.prefab").WaitForCompletion(); } return _explodePrefab; } [CompilerGenerated] set { k__BackingField = value; } } public GameObject individualExplodePrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_individualExplodePrefab == (Object)null) { _individualExplodePrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/BleedOnHitVoid/FractureImpactEffect.prefab").WaitForCompletion(); } return _individualExplodePrefab; } [CompilerGenerated] set { k__BackingField = value; } } public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public DrenchedPerforator(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/drenchedPerforator.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), DrenchedPerforator_Threshold.Value * 100f, DrenchedPerforator_Stacks.Value, DrenchedPerforator_StacksStack.Value, DrenchedPerforator_ExplosionDamage.Value * 100f, DrenchedPerforator_ExplosionRadiusv2.Value, DrenchedPerforator_ExplosionRadiusIncreasev2.Value)); } public override void RegisterHooks() { //IL_0003: 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_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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown Pair val = default(Pair); val.itemDef1 = ConversionItemDefExtra; val.itemDef2 = ItemDef; Pair item = val; Main.ItemConversionList.Add(item); Log.Info($"Added void conversion from {((Object)ConversionItemDefExtra).name} to {((Object)ItemDef).name}"); GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)delegate(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victimObject) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victimObject); CharacterBody val2 = default(CharacterBody); CharacterBody val3 = default(CharacterBody); if (!((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)19) && !ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, DrenchedPerforatorProcType) && !damageInfo.rejected && damageInfo.procCoefficient > 0f && damageInfo.damage > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent(ref val2) && Object.op_Implicit((Object)(object)val2.master) && victimObject.TryGetComponent(ref val3) && Object.op_Implicit((Object)(object)val3.healthComponent)) { int itemCountEffective = GetItemCountEffective(val2); if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)val2.teamComponent) && Object.op_Implicit((Object)(object)val3.teamComponent)) { float num = (damageInfo.crit ? (damageInfo.damage * val2.critMultiplier) : damageInfo.damage); float num2 = num / val2.damage; if (num2 > 0f) { int num3 = Convert.ToInt32(Math.Floor(num2 / DrenchedPerforator_Threshold.Value)); int num4 = (DrenchedPerforator_Stacks.Value + (itemCountEffective - 1) * DrenchedPerforator_StacksStack.Value) * num3; if (num4 > 0) { DotDef dotDef = DotController.GetDotDef((DotIndex)8); for (int i = 0; i < num4; i++) { DotController.InflictDot(victimObject, damageInfo.attacker, damageInfo.inflictedHurtbox, (DotIndex)8, dotDef.interval, 1f, (uint?)null); } CreateExplosion(val2, val3.corePosition, DrenchedPerforator_ExplosionRadiusv2.Value, DrenchedPerforator_ExplosionRadiusIncreasev2.Value * (float)(num4 - 1), damageInfo); } } } } }; } public override void AddCorruptionRecipe() { if (DrenchedPerforator_Recipe.Value && ItemInit.HydraTooth.Enabled) { ItemInit.MakeCorruptionRecipe(DrenchedPerforator_Ingredient1.Value, DrenchedPerforator_Ingredient2.Value, ((Object)ItemDef).name); ItemInit.MakeCorruptionRecipe(DrenchedPerforator_Ingredient1Alt.Value, DrenchedPerforator_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public void CreateExplosion(CharacterBody attackerBody, Vector3 position, float radius, float extraRadius, DamageInfo origDamageInfo) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_017d: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_0195: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown List list = Physics.OverlapSphere(position, radius + extraRadius).ToList(); Util.ShuffleList(list); foreach (Collider item in list) { GameObject gameObject = ((Component)item).gameObject; if (Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren())) { CharacterBody componentInChildren = gameObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != attackerBody.teamComponent.teamIndex) { EffectData val = new EffectData { origin = componentInChildren.corePosition }; EffectManager.SpawnEffect(individualExplodePrefab, val, true); } } } ProcTypeAPI.AddModdedProc(ref origDamageInfo.procChainMask, DrenchedPerforatorProcType); BlastAttack val2 = new BlastAttack { position = position, baseDamage = attackerBody.damage * DrenchedPerforator_ExplosionDamage.Value, baseForce = 0f, radius = radius + extraRadius, attacker = ((Component)attackerBody).gameObject, inflictor = null, teamIndex = attackerBody.teamComponent.teamIndex, crit = origDamageInfo.crit, procChainMask = origDamageInfo.procChainMask, procCoefficient = DrenchedPerforator_ExplosionProcCoefficient.Value, damageColorIndex = (DamageColorIndex)9, falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)131072), attackerFiltering = (AttackerFiltering)2 }; val2.Fire(); float num = 0f; num = ((!(extraRadius > 0f)) ? 0f : (extraRadius / radius)); EffectData val3 = new EffectData { origin = position, scale = (1f + num) * 12f }; EffectManager.SpawnEffect(explodePrefab, val3, true); } } public class EffigyOfRot : ItemBase { public class PoisonDoNotTransferBehavior : MonoBehaviour { private float timeLeft = EffigyOfRot_PoisonImmunityDuration.Value; private void FixedUpdate() { timeLeft -= Time.fixedDeltaTime; if (timeLeft <= 0f) { Object.Destroy((Object)(object)this); } } } private GameObject _poisonPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem EffigyOfRot_Enabled = new ConfigItem("Void boss: Effigy Of Rot", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem EffigyOfRot_PoisonDuration = new ConfigItem("Void boss: Effigy Of Rot", "Poison duration", "Poison damage over time duration in seconds.", 10f, 1f, 20f, 1f); public static ConfigItem EffigyOfRot_PoisonImmunityDuration = new ConfigItem("Void boss: Effigy Of Rot", "Poison spread immunity duration", "Seconds of hidden immunity to poison applied after it spreads to an enemy. Prevents infinite poison loops.", 15f, 1f, 30f, 1f); public static ConfigItem EffigyOfRot_HealthPerSecond = new ConfigItem("Void boss: Effigy Of Rot", "Poison healing per second", "How much poison heals the inflictor per second.", 3f, 0.1f, 6f, 0.1f); public static ConfigItem EffigyOfRot_HealthPerSecondStack = new ConfigItem("Void boss: Effigy Of Rot", "Poison healing per second (per stack)", "How much poison heals the inflictor per second, per additional stack.", 3f, 0.1f, 6f, 0.1f); public static ConfigItem EffigyOfRot_SpreadChance = new ConfigItem("Void boss: Effigy Of Rot", "Poison spread chance per second", "Percent chance for poison to infect another enemy per second.", 10f, 0.1f, 10f, 0.1f); public static ConfigItem EffigyOfRot_SpreadChanceStack = new ConfigItem("Void boss: Effigy Of Rot", "Poison spread chance per second (per stack)", "Percent chance for poison to infect another enemy per second, per additional stack.", 5f, 0.1f, 5f, 0.1f); public static ConfigItem EffigyOfRot_SpreadRadius = new ConfigItem("Void boss: Effigy Of Rot", "Poison spread radius", "Poison can spread within this radius.", 20f, 1f, 40f, 1f); public static ConfigItem EffigyOfRot_MeleeRange = new ConfigItem("Void boss: Effigy Of Rot", "Melee range", "Meters range within which damage is considered to be melee. Measured from the center of your character to the damage point of contact.", 13f, 1f, 26f, 1f); public static ConfigItem EffigyOfRot_Recipe = new ConfigItem("Void boss: Effigy Of Rot", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem EffigyOfRot_Ingredient1 = new ConfigItem("Void boss: Effigy Of Rot", "Recipe ingredient 1", "First ingredient for corruption recipe", "SiphonOnLowHealth"); public static ConfigItem EffigyOfRot_Ingredient2 = new ConfigItem("Void boss: Effigy Of Rot", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ViscousPot"); public static ConfigItem EffigyOfRot_CorruptsAllMiredUrns = new ConfigItem("Void boss: Effigy Of Rot", "Corrupts all Mired Urns", "Corrupts all Mired Urns.", _defaultValue: false); public override bool Enabled => EffigyOfRot_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/SiphonOnLowHealth/SiphonOnLowHealth.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/effigyOfRot.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineBlood/matShrineBlood.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineHealing/matShrineHealing.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/Base/BeetleGland/matBeetleGland.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineBlood/matShrineBlood.mat").WaitForCompletion(); public GameObject PoisonPrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_poisonPrefab == (Object)null) { _poisonPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MajorConstructSpawnMinorConstructEffect.prefab").WaitForCompletion(); } return _poisonPrefab; } [CompilerGenerated] set { k__BackingField = value; } } public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public EffigyOfRot(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/effigyOfRot.prefab"); Material[] materialArray = (Material[])(object)new Material[4] { material0, material1, material2, material3 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string nameToken = ItemDef.nameToken; string descriptionToken = ItemDef.descriptionToken; if (EffigyOfRot_CorruptsAllMiredUrns.Value) { LanguageAPI.AddOverlay(nameToken, "Corrupts all Mired Urns."); } LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), EffigyOfRot_PoisonDuration.Value, EffigyOfRot_HealthPerSecond.Value, EffigyOfRot_HealthPerSecondStack.Value, EffigyOfRot_SpreadChance.Value, EffigyOfRot_SpreadChanceStack.Value, EffigyOfRot_SpreadRadius.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Invalid comparison between Unknown and I4 //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Invalid comparison between Unknown and I4 //IL_00a7: 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_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0198: 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_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)self.body)) { CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && GetItemCountEffective(component) > 0) { int itemCountEffective = GetItemCountEffective(component); if (damageInfo.procCoefficient > 0f) { float num = Vector3.Distance(damageInfo.position, component.corePosition); if (num <= EffigyOfRot_MeleeRange.Value) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = damageInfo.attacker; val.damageMultiplier = 1f; val.dotIndex = (DotIndex)4; val.duration = EffigyOfRot_PoisonDuration.Value; val.hitHurtBox = self.body.mainHurtBox; val.victimObject = ((Component)self.body).gameObject; DotController.InflictDot(ref val); } } if (((int)damageInfo.dotIndex == 4 || (int)damageInfo.dotIndex == 5) && Object.op_Implicit((Object)(object)component.healthComponent) && Object.op_Implicit((Object)(object)component.master)) { float num2 = (EffigyOfRot_HealthPerSecond.Value + EffigyOfRot_HealthPerSecondStack.Value * (float)(itemCountEffective - 1)) / 3f; float num3 = (EffigyOfRot_SpreadChance.Value + EffigyOfRot_SpreadChanceStack.Value * (float)(itemCountEffective - 1)) / 3f; component.healthComponent.Heal(num2, default(ProcChainMask), true); if (Util.CheckRoll(num3, component.master.luck, component.master)) { List list = Physics.OverlapSphere(component.corePosition, EffigyOfRot_SpreadRadius.Value).ToList(); Util.ShuffleList(list); foreach (Collider item in list) { GameObject gameObject = ((Component)item).gameObject; if (Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren())) { CharacterBody componentInChildren = gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)(object)self.body && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != component.teamComponent.teamIndex && !Object.op_Implicit((Object)(object)((Component)componentInChildren).gameObject.GetComponent())) { InflictDotInfo val2 = default(InflictDotInfo); val2.attackerObject = damageInfo.attacker; val2.damageMultiplier = 1f; val2.dotIndex = damageInfo.dotIndex; val2.duration = EffigyOfRot_PoisonDuration.Value; val2.hitHurtBox = componentInChildren.mainHurtBox; val2.victimObject = ((Component)componentInChildren).gameObject; ((Component)componentInChildren).gameObject.AddComponent(); PoisonInfectOrb.CreateInfectOrb(self.body.corePosition, componentInChildren.mainHurtBox); DotController.InflictDot(ref val2); break; } } } } } } } }; } public override void AddCorruptionRecipe() { if (EffigyOfRot_Recipe.Value) { ItemInit.MakeCorruptionRecipe(EffigyOfRot_Ingredient1.Value, EffigyOfRot_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } } public class MobiusNode : ItemBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__41_4; public static Func <>9__41_5; public static Func <>9__41_6; public static Func <>9__41_7; public static Func <>9__41_8; public static Manipulator <>9__41_1; public static hook_TakeDamageProcess <>9__41_2; internal void b__41_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00b2: 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) ILCursor val = new ILCursor(il); val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "missileVoid") }); float num = default(float); if (val.TryGotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchCgt(x) })) { val.Emit(OpCodes.Ldarg, 0); val.EmitDelegate>((Func)((HealthComponent hc) => Object.op_Implicit((Object)(object)hc) && Object.op_Implicit((Object)(object)hc.body) && Object.op_Implicit((Object)(object)hc.body.inventory) && hc.body.inventory.GetItemCountEffective(ItemInit.MobiusNode.ItemIndex) > 0)); val.Emit(OpCodes.Or); } else { Log.Error("IL hook failed for shield color adjustment."); } } internal bool b__41_4(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "missileVoid"); } internal bool b__41_5(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool b__41_6(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__41_7(Instruction x) { return ILPatternMatchingExt.MatchCgt(x); } internal bool b__41_8(HealthComponent hc) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hc) && Object.op_Implicit((Object)(object)hc.body) && Object.op_Implicit((Object)(object)hc.body.inventory)) { return hc.body.inventory.GetItemCountEffective(ItemInit.MobiusNode.ItemIndex) > 0; } return false; } internal void b__41_2(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { orig.Invoke(self, damageInfo); MobiusBehavior mobiusBehavior = default(MobiusBehavior); if (Object.op_Implicit((Object)(object)self.body) && ((Component)self.body).gameObject.TryGetComponent(ref mobiusBehavior) && self.IsHealthBelowThreshold(MobiusNode_Threshold.Value)) { mobiusBehavior.Explode(); } } } public BuffDef MobiusBuff; private GameObject _ExplodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private Material _ExplodeOverlay; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private Material k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem MobiusNode_Enabled = new ConfigItem("Void boss: Mobius Node", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem MobiusNode_ShieldAdd = new ConfigItem("Void boss: Mobius Node", "Added shield", "Fraction of shield to grant on first stack.", 0.2f, 0f, 1f, 0.05f); public static ConfigItem MobiusNode_Threshold = new ConfigItem("Void boss: Mobius Node", "Shield regen threshold", "Health fraction below which shield regeneration will activate.", 0.5f, 0.1f, 0.9f, 0.05f); public static ConfigItem MobiusNode_Timer = new ConfigItem("Void boss: Mobius Node", "Replenish interval", "All stacks of shield regen are replenished every x seconds.", 60f, 5f, 120f, 1f); public static ConfigItem MobiusNode_Stacks = new ConfigItem("Void boss: Mobius Node", "Stacks of shield regen", "Maximum shield regen stacks you can hold.", 2, 1f, 5f, 1f); public static ConfigItem MobiusNode_StacksStack = new ConfigItem("Void boss: Mobius Node", "Stacks of shield regen (per stack)", "Maximum shield regen stacks you can hold, per additional stack.", 1, 1f, 5f, 1f); public static ConfigItem MobiusNode_ExplodeRadius = new ConfigItem("Void boss: Mobius Node", "Stun radius", "Meters radius in which to stun enemies when shield is recharged.", 40f, 1f, 80f, 1f); public static ConfigItem MobiusNode_Recipe = new ConfigItem("Void boss: Mobius Node", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem MobiusNode_Ingredient1 = new ConfigItem("Void boss: Mobius Node", "Recipe ingredient 1", "First ingredient for corruption recipe", "NovaOnLowHealth"); public static ConfigItem MobiusNode_Ingredient2 = new ConfigItem("Void boss: Mobius Node", "Recipe ingredient 2", "Second ingredient for corruption recipe", "MissileVoid"); public override bool Enabled => MobiusNode_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/NovaOnLowHealth/NovaOnLowHealth.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/mobiusGland.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/GummyClone/matGummyClone.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidSurvivorCorruptOverlay.mat").WaitForCompletion(); public GameObject ExplodePrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_ExplodePrefab == (Object)null) { _ExplodePrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombExplosion.prefab").WaitForCompletion(); } return _ExplodePrefab; } [CompilerGenerated] set { k__BackingField = value; } } public Material ExplodeOverlay { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_ExplodeOverlay == (Object)null) { _ExplodeOverlay = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkBodyOverlayCorrupted.mat").WaitForCompletion(); } return _ExplodeOverlay; } [CompilerGenerated] set { k__BackingField = value; } } public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public MobiusNode(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/mobiusNode.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), MobiusNode_ShieldAdd.Value * 100f, MobiusNode_Threshold.Value * 100f, MobiusNode_Stacks.Value, MobiusNode_StacksStack.Value, MobiusNode_Timer.Value)); } public override void RegisterHooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown CreateMobiusBuff(); RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self) { int itemCountEffective2 = GetItemCountEffective(orig); if (itemCountEffective2 > 0) { self.baseShieldAdd += orig.maxHealth * MobiusNode_ShieldAdd.Value; } }; object obj = <>c.<>9__41_1; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00b2: 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) ILCursor val3 = new ILCursor(il); val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "missileVoid") }); float num = default(float); if (val3.TryGotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchCgt(x) })) { val3.Emit(OpCodes.Ldarg, 0); val3.EmitDelegate>((Func)((HealthComponent hc) => Object.op_Implicit((Object)(object)hc) && Object.op_Implicit((Object)(object)hc.body) && Object.op_Implicit((Object)(object)hc.body.inventory) && hc.body.inventory.GetItemCountEffective(ItemInit.MobiusNode.ItemIndex) > 0)); val3.Emit(OpCodes.Or); } else { Log.Error("IL hook failed for shield color adjustment."); } }; <>c.<>9__41_1 = val; obj = (object)val; } HealthComponent.GetHealthBarValues += (Manipulator)obj; object obj2 = <>c.<>9__41_2; if (obj2 == null) { hook_TakeDamageProcess val2 = delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { orig.Invoke(self, damageInfo); MobiusBehavior mobiusBehavior2 = default(MobiusBehavior); if (Object.op_Implicit((Object)(object)self.body) && ((Component)self.body).gameObject.TryGetComponent(ref mobiusBehavior2) && self.IsHealthBelowThreshold(MobiusNode_Threshold.Value)) { mobiusBehavior2.Explode(); } }; <>c.<>9__41_2 = val2; obj2 = (object)val2; } HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)obj2; CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); MobiusBehavior mobiusBehavior = ((Component)self).gameObject.GetComponent(); int itemCountEffective = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)mobiusBehavior)) { mobiusBehavior = ((Component)self).gameObject.AddComponent(); } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)mobiusBehavior)) { Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent()); self.SetBuffCount(MobiusBuff.buffIndex, 0); } }; } public override void AddCorruptionRecipe() { if (MobiusNode_Recipe.Value) { ItemInit.MakeCorruptionRecipe(MobiusNode_Ingredient1.Value, MobiusNode_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public void CreateMobiusBuff() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); val.buffColor = new Color(0.29f, 0f, 0.38f); val.canStack = true; val.isDebuff = false; val.ignoreGrowthNectar = true; ((Object)val).name = "Möbius regen charges"; val.isHidden = false; val.isCooldown = false; val.iconSprite = Main.Assets.LoadAsset("Assets/icons/mobiusBuff.png"); ContentAddition.AddBuffDef(val); MobiusBuff = val; } } public class MobiusBehavior : MonoBehaviour { private HealthComponent healthComponent; private CharacterBody characterBody; private BuffDef buffDef; public float rechargeInterval = 60f; public float rechargeTimer = 0f; private int _stacks = 0; public int maxStacks = 0; public int stacks { get { return _stacks; } set { //IL_001b: Unknown result type (might be due to invalid IL or missing references) RecheckMaxStacks(); _stacks = value; characterBody.SetBuffCount(buffDef.buffIndex, _stacks); } } private void Awake() { healthComponent = ((Component)this).gameObject.GetComponent(); characterBody = ((Component)this).gameObject.GetComponent(); buffDef = ItemInit.MobiusNode.MobiusBuff; if (!Object.op_Implicit((Object)(object)healthComponent) || !Object.op_Implicit((Object)(object)characterBody) || !Object.op_Implicit((Object)(object)buffDef)) { Object.Destroy((Object)(object)this); } RecheckMaxStacks(); stacks = maxStacks; } private void FixedUpdate() { if (stacks < maxStacks) { rechargeTimer += Time.fixedDeltaTime; if (rechargeTimer >= rechargeInterval) { RegenAllStacks(); rechargeTimer = 0f; } } } public void Explode() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_00bc: 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_0149: Unknown result type (might be due to invalid IL or missing references) if (stacks <= 0) { return; } EffectData val = new EffectData { origin = characterBody.corePosition }; EffectManager.SpawnEffect(ItemInit.MobiusNode.ExplodePrefab, val, true); TemporaryOverlay val2 = ((Component)characterBody).gameObject.AddComponent(); val2.duration = 2f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = ItemInit.MobiusNode.ExplodeOverlay; val2.AddToCharacerModel(((Component)((Component)characterBody).gameObject.GetComponent().modelTransform).GetComponentInParent()); List list = Physics.OverlapSphere(characterBody.corePosition, MobiusNode.MobiusNode_ExplodeRadius.Value).ToList(); SetStateOnHurt val3 = default(SetStateOnHurt); foreach (Collider item in list) { GameObject gameObject = ((Component)item).gameObject; if (!Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren())) { continue; } CharacterBody componentInChildren = gameObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren.healthComponent) && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != characterBody.teamComponent.teamIndex) { ((Component)componentInChildren.healthComponent).gameObject.TryGetComponent(ref val3); if (Object.op_Implicit((Object)(object)val3)) { val3.SetStun(2f); } } } healthComponent.RechargeShieldFull(); stacks--; } public void RegenAllStacks() { RecheckMaxStacks(); stacks = maxStacks; TemporaryOverlay val = ((Component)characterBody).gameObject.AddComponent(); val.duration = 1f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = ItemInit.MobiusNode.ExplodeOverlay; val.AddToCharacerModel(((Component)((Component)characterBody).gameObject.GetComponent().modelTransform).GetComponentInParent()); Util.PlaySound("Play_Item_proc_medkit", ((Component)characterBody).gameObject); } public void RecheckMaxStacks() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) maxStacks = MobiusNode.MobiusNode_Stacks.Value + MobiusNode.MobiusNode_StacksStack.Value * (characterBody.inventory.GetItemCountEffective(ItemInit.MobiusNode.ItemIndex) - 1); } } public class ObserversEye : ItemBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEquipmentExecuted_byte_byte_EquipmentIndex <>9__35_1; public static hook_GetDeployableSameSlotLimit <>9__35_3; internal void b__35_1(orig_OnEquipmentExecuted_byte_byte_EquipmentIndex orig, EquipmentSlot self, byte slot, byte set, EquipmentIndex index) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, slot, set, index); ObserversEyeBehavior component = ((Component)self).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddToQueue(new Tuple(self, index)); } } internal int b__35_3(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) if ((int)slot != 11) { if ((int)slot != 14) { if ((int)slot == 17) { return 999; } return orig.Invoke(self, slot); } return 999; } return 999; } } private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem ObserversEye_Enabled = new ConfigItem("Void boss: Observers Optics", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem ObserversEye_Activations = new ConfigItem("Void boss: Observers Optics", "Additional equipment activations", "How many extra times is your equipment activated?", 2, 1f, 5f, 1f); public static ConfigItem ObserversEye_ActivationsStack = new ConfigItem("Void boss: Observers Optics", "Additional equipment activations (per stack)", "How many extra times is your equipment activated, per additional stack?", 2, 1f, 5f, 1f); public static ConfigItem ObserversEye_EquipCooldownMult = new ConfigItem("Void boss: Observers Optics", "Equipment cooldown mult", "What multiplier should be used for equipment cooldown?", 2f, 0.1f, 5f, 0.1f); public static ConfigItem ObserversEye_Recipe = new ConfigItem("Void boss: Observers Optics", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem ObserversEye_Ingredient1 = new ConfigItem("Void boss: Observers Optics", "Recipe ingredient 1", "First ingredient for corruption recipe", "ExtraEquipment"); public static ConfigItem ObserversEye_Ingredient2 = new ConfigItem("Void boss: Observers Optics", "Recipe ingredient 2", "Second ingredient for corruption recipe", "EquipmentMagazineVoid"); public override bool Enabled => ObserversEye_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC3/Items/ExtraEquipment/ExtraEquipment.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/observersEye.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/Base/BonusGoldPackOnKill/matTomeGold.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VendingMachine/matVendingMachineGlass.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineBoss/matShrineBoss.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/DLC3/Items/ShockDamageAura/matDroneShockDamageGlass.mat").WaitForCompletion(); public Material material4 => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Seeker/matSeekerGlass.mat").WaitForCompletion(); public Material material5 => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/AttackSpeedPerNearbyAllyOrEnemy/matRageCrystalGlass.mat").WaitForCompletion(); public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public ObserversEye(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/observersEye.prefab"); Material[] materialArray = (Material[])(object)new Material[6] { material0, material1, material2, material3, material4, material5 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), ObserversEye_Activations.Value, ObserversEye_ActivationsStack.Value, ObserversEye_EquipCooldownMult.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); ObserversEyeBehavior observersEyeBehavior = ((Component)self).GetComponent(); int itemCountEffective = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)observersEyeBehavior)) { observersEyeBehavior = self.AddItemBehavior(itemCountEffective); observersEyeBehavior.activations = ObserversEye_Activations.Value; observersEyeBehavior.activationsStack = ObserversEye_ActivationsStack.Value; } if (Object.op_Implicit((Object)(object)observersEyeBehavior)) { ((ItemBehavior)observersEyeBehavior).stack = itemCountEffective; } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)observersEyeBehavior)) { Object.Destroy((Object)(object)((Component)self).GetComponent()); } }; object obj = <>c.<>9__35_1; if (obj == null) { hook_OnEquipmentExecuted_byte_byte_EquipmentIndex val = delegate(orig_OnEquipmentExecuted_byte_byte_EquipmentIndex orig, EquipmentSlot self, byte slot, byte set, EquipmentIndex index) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, slot, set, index); ObserversEyeBehavior component = ((Component)self).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddToQueue(new Tuple(self, index)); } }; <>c.<>9__35_1 = val; obj = (object)val; } EquipmentSlot.OnEquipmentExecuted_byte_byte_EquipmentIndex += (hook_OnEquipmentExecuted_byte_byte_EquipmentIndex)obj; Inventory.CalculateEquipmentCooldownScale += (hook_CalculateEquipmentCooldownScale)delegate(orig_CalculateEquipmentCooldownScale orig, Inventory self) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) float result = orig.Invoke(self); if (self.GetItemCountEffective(base.ItemIndex) > 0) { result = Mathf.Pow(ObserversEye_EquipCooldownMult.Value, (float)self.GetItemCountEffective(base.ItemIndex)); } return result; }; object obj2 = <>c.<>9__35_3; if (obj2 == null) { hook_GetDeployableSameSlotLimit val2 = delegate(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) if ((int)slot == 11) { return 999; } if ((int)slot == 14) { return 999; } return ((int)slot == 17) ? 999 : orig.Invoke(self, slot); }; <>c.<>9__35_3 = val2; obj2 = (object)val2; } CharacterMaster.GetDeployableSameSlotLimit += (hook_GetDeployableSameSlotLimit)obj2; } public override void AddCorruptionRecipe() { if (ObserversEye_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ObserversEye_Ingredient1.Value, ObserversEye_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } } public class ObserversEyeBehavior : ItemBehavior { public int activations = 2; public int activationsStack = 2; public float equipInterval = 0.5f; public float bfgInterval = 2.2f; public float equipTimer = 0f; public List> equipQueue = new List>(); public void AddToQueue(Tuple tuple) { int num = activations + activationsStack * (base.stack - 1); for (int i = 0; i < num; i++) { equipQueue.Add(tuple); } } private void FixedUpdate() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) if (equipQueue.Count <= 0) { return; } equipTimer += Time.fixedDeltaTime; if (equipQueue.First().Item2 == Equipment.BFG.equipmentIndex) { if (!(equipTimer > bfgInterval)) { return; } Tuple tuple = equipQueue.First(); if (equipQueue.Count >= 1) { Transform val = tuple.Item1.FindActiveEquipmentDisplay(); if (Object.op_Implicit((Object)(object)val)) { Animator componentInChildren = ((Component)val).GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.SetTrigger("Fire"); } } } tuple.Item1.PerformEquipmentAction(EquipmentCatalog.GetEquipmentDef(tuple.Item2)); equipQueue.RemoveAt(0); equipTimer = 0f; } else if (equipTimer > equipInterval) { Tuple tuple2 = equipQueue.First(); tuple2.Item1.PerformEquipmentAction(EquipmentCatalog.GetEquipmentDef(tuple2.Item2)); equipQueue.RemoveAt(0); equipTimer = 0f; } } } public class OsmiumShackles : ItemBase { public BuffDef OsmiumBuff; private GameObject _radiusPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private Material _OsmiumOverlay; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private Material k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem OsmiumShackles_Enabled = new ConfigItem("Void boss: Osmium Shackles", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem OsmiumShackles_DebuffRadius = new ConfigItem("Void boss: Osmium Shackles", "Weigh down radius", "Radius where enemies are debuffed by this item.", 20f, 1f, 40f, 1f); public static ConfigItem OsmiumShackles_DebuffRadiusStack = new ConfigItem("Void boss: Osmium Shackles", "Weigh down radius (per stack)", "Radius where enemies are debuffed by this item, per additional stack.", 8f, 1f, 40f, 1f); public static ConfigItem OsmiumShackles_DebuffPercent = new ConfigItem("Void boss: Osmium Shackles", "Debuff encumbrance percentage", "Slows enemy speed, attack speed and cooldowns by this fraction.", 0.3f, 0.1f, 1f, 0.1f); public static ConfigItem OsmiumShackles_CritAdd = new ConfigItem("Void boss: Osmium Shackles", "Crit addition", "Fractional crit chance increase against encumbered enemies", 0.25f, 0.05f, 1f, 0.05f); public static ConfigItem OsmiumShackles_Recipe = new ConfigItem("Void boss: Osmium Shackles", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem OsmiumShackles_Ingredient1 = new ConfigItem("Void boss: Osmium Shackles", "Recipe ingredient 1", "First ingredient for corruption recipe", "Knurl"); public static ConfigItem OsmiumShackles_Ingredient2 = new ConfigItem("Void boss: Osmium Shackles", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ElementalRingVoid"); public override bool Enabled => OsmiumShackles_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/Knurl/Knurl.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/osmiumShackles.png"); public ItemDef ConversionItemDefExtra => Addressables.LoadAssetAsync((object)"RoR2/Base/LightningStrikeOnHit/LightningStrikeOnHit.asset").WaitForCompletion(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/GlobalContent/matArtifact.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/Nullifier/matNullifierZoneAreaIndicator.mat").WaitForCompletion(); public GameObject radiusPrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_radiusPrefab == (Object)null) { _radiusPrefab = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/AttackSpeedPerNearbyAllyOrEnemy/BolsteringLanternBonusIndicator.prefab").WaitForCompletion()); Object.Destroy((Object)(object)_radiusPrefab.GetComponent()); Object.Destroy((Object)(object)_radiusPrefab.GetComponent()); MeshRenderer componentInChildren = _radiusPrefab.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { ((Renderer)componentInChildren).material = material1; } } return _radiusPrefab; } [CompilerGenerated] set { k__BackingField = value; } } public Material OsmiumOverlay { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_OsmiumOverlay == (Object)null) { _OsmiumOverlay = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkSwimOverlay.mat").WaitForCompletion(); } return _OsmiumOverlay; } [CompilerGenerated] set { k__BackingField = value; } } public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public OsmiumShackles(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/osmiumShackles.prefab"); Material[] materialArray = (Material[])(object)new Material[1] { material0 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), OsmiumShackles_DebuffRadius.Value, OsmiumShackles_DebuffRadiusStack.Value, OsmiumShackles_DebuffPercent.Value * 100f, OsmiumShackles_CritAdd.Value * 100f)); } public override void RegisterHooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown CreateOsmiumBuff(); CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); OsmiumShacklesBehavior osmiumShacklesBehavior = ((Component)self).gameObject.GetComponent(); int itemCountEffective = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)osmiumShacklesBehavior)) { osmiumShacklesBehavior = ((Component)self).gameObject.AddComponent(); } if (Object.op_Implicit((Object)(object)osmiumShacklesBehavior)) { osmiumShacklesBehavior.UpdateScale(); } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)osmiumShacklesBehavior)) { Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent()); } }; RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self) { int buffCount = orig.GetBuffCount(OsmiumBuff); if (buffCount > 0) { self.attackSpeedTotalMult -= OsmiumShackles_DebuffPercent.Value; self.moveSpeedTotalMult -= OsmiumShackles_DebuffPercent.Value; self.allSkills.cooldownMultiplier *= 0f - OsmiumShackles_DebuffPercent.Value; } }; HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { if (!damageInfo.crit && Object.op_Implicit((Object)(object)self.body) && self.body.GetBuffCount(OsmiumBuff) > 0 && (Object)(object)damageInfo.attacker != (Object)(object)((Component)self.body).gameObject && Util.CheckRoll(OsmiumShackles_CritAdd.Value * 100f, 0f, (CharacterMaster)null)) { damageInfo.crit = true; } orig.Invoke(self, damageInfo); }; CharacterBody.OnBuffFinalStackLost += (hook_OnBuffFinalStackLost)delegate(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, buffDef); if (buffDef.buffIndex == OsmiumBuff.buffIndex) { self.RecalculateStats(); } }; } public override void AddCorruptionRecipe() { if (OsmiumShackles_Recipe.Value) { ItemInit.MakeCorruptionRecipe(OsmiumShackles_Ingredient1.Value, OsmiumShackles_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public void CreateOsmiumBuff() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); val.buffColor = new Color(1f, 1f, 1f); val.canStack = false; val.isDebuff = true; ((Object)val).name = "Osmium weight"; val.isHidden = false; val.isCooldown = false; val.iconSprite = Main.Assets.LoadAsset("Assets/icons/osmiumBuff.png"); ContentAddition.AddBuffDef(val); OsmiumBuff = val; } } public class OsmiumShacklesBehavior : MonoBehaviour { private GameObject radius; private CharacterBody characterBody; private float scale = 20f; private float debuffInterval = 0.5f; private float debuffTimer = 0f; private void Awake() { radius = Object.Instantiate(ItemInit.OsmiumShackles.radiusPrefab); NetworkedBodyAttachment component = radius.GetComponent(); characterBody = ((Component)this).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)characterBody) && Object.op_Implicit((Object)(object)component)) { component.AttachToGameObjectAndSpawn(((Component)this).gameObject, (string)null); UpdateScale(); } else { Object.Destroy((Object)(object)this); } } private void FixedUpdate() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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) debuffTimer += Time.fixedDeltaTime; if (!(debuffTimer >= debuffInterval)) { return; } Collider[] array = Physics.OverlapSphere(characterBody.corePosition, scale); Collider[] array2 = array; foreach (Collider val in array2) { if (!Object.op_Implicit((Object)(object)((Component)val).gameObject)) { continue; } GameObject gameObject = ((Component)val).gameObject; CharacterBody componentInChildren = gameObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != characterBody.teamComponent.teamIndex) { componentInChildren.AddTimedBuff(ItemInit.OsmiumShackles.OsmiumBuff, 1f); ModelLocator component = ((Component)componentInChildren).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform) && Object.op_Implicit((Object)(object)((Component)component.modelTransform).GetComponentInParent())) { TemporaryOverlay val2 = ((Component)componentInChildren).gameObject.AddComponent(); val2.duration = 1f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.Constant(0f, 1f, 1f); val2.destroyComponentOnEnd = true; val2.originalMaterial = ItemInit.OsmiumShackles.OsmiumOverlay; val2.AddToCharacerModel(((Component)component.modelTransform).GetComponentInParent()); } } } debuffTimer = 0f; } private void OnDestroy() { Object.Destroy((Object)(object)radius); } public void UpdateScale() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) int itemCountEffective = characterBody.inventory.GetItemCountEffective(ItemInit.OsmiumShackles.ItemDef); scale = OsmiumShackles.OsmiumShackles_DebuffRadius.Value + OsmiumShackles.OsmiumShackles_DebuffRadiusStack.Value * (float)(itemCountEffective - 1); float num = scale / 10f; radius.transform.localScale = new Vector3(num, num, num); } } public class RebelSoul : ItemBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_UpdateOutOfCombatAndDanger <>9__48_1; internal void b__48_1(orig_UpdateOutOfCombatAndDanger orig, CharacterBody self) { orig.Invoke(self); if (!self.outOfCombat && Object.op_Implicit((Object)(object)((Component)self).gameObject.GetComponent())) { Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent()); } } } private GameObject _stealPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private GameObject _blinkPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private GameObject _radiusPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem RebelSoul_Enabled = new ConfigItem("Void boss: Rebel Soul", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem RebelSoul_BoostDuration = new ConfigItem("Void boss: Rebel Soul", "Cloak duration", "Length of cloaking in seconds.", 4f, 0.5f, 6f, 0.5f); public static ConfigItem RebelSoul_BoostDurationStack = new ConfigItem("Void boss: Rebel Soul", "Cloak duration (per stack)", "Length of cloaking in seconds, per additional stack.", 2f, 0.5f, 6f, 0.5f); public static ConfigItem RebelSoul_LifeSteal = new ConfigItem("Void boss: Rebel Soul", "Lifesteal fraction", "Fraction of enemy health to steal, and own health to heal per second.", 0.02f, 0.01f, 0.1f, 0.01f); public static ConfigItem RebelSoul_LifeStealStack = new ConfigItem("Void boss: Rebel Soul", "Lifesteal fraction (per stack)", "Fraction of enemy health to steal, and own health to heal per second, per additional stack.", 0.01f, 0.01f, 0.1f, 0.01f); public static ConfigItem RebelSoul_Radius = new ConfigItem("Void boss: Rebel Soul", "Lifesteal radius", "Meters radius of lifesteal around a cloaked player.", 20f, 1f, 40f, 1f); public static ConfigItem RebelSoul_Recipe = new ConfigItem("Void boss: Rebel Soul", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem RebelSoul_Ingredient1 = new ConfigItem("Void boss: Rebel Soul", "Recipe ingredient 1", "First ingredient for corruption recipe", "SprintWisp"); public static ConfigItem RebelSoul_Ingredient2 = new ConfigItem("Void boss: Rebel Soul", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ExplodeOnDeathVoid"); public override bool Enabled => RebelSoul_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/SprintWisp/SprintWisp.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/rebelSoul.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/matTreebotTreeBark.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/Common/matDebugBlack.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidMegaCrab/matVoidCrabAntiMatterParticleStreak.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidSplatAreanIndicator.mat").WaitForCompletion(); public GameObject stealPrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_stealPrefab == (Object)null) { _stealPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidJailer/VoidJailerDartImpact.prefab").WaitForCompletion(); } return _stealPrefab; } [CompilerGenerated] set { k__BackingField = value; } } public GameObject blinkPrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_blinkPrefab == (Object)null) { _blinkPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabImpact1.prefab").WaitForCompletion(); } return _blinkPrefab; } [CompilerGenerated] set { k__BackingField = value; } } public GameObject radiusPrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_radiusPrefab == (Object)null) { _radiusPrefab = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/AttackSpeedPerNearbyAllyOrEnemy/BolsteringLanternBonusIndicator.prefab").WaitForCompletion()); Object.Destroy((Object)(object)_radiusPrefab.GetComponent()); Object.Destroy((Object)(object)_radiusPrefab.GetComponent()); MeshRenderer componentInChildren = _radiusPrefab.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { ((Renderer)componentInChildren).material = material3; } } return _radiusPrefab; } [CompilerGenerated] set { k__BackingField = value; } } public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public RebelSoul(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/rebelSoul.prefab"); Material[] materialArray = (Material[])(object)new Material[3] { material0, material1, material2 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), RebelSoul_BoostDuration.Value, RebelSoul_BoostDurationStack.Value, RebelSoul_LifeSteal.Value * 100f, RebelSoul_LifeStealStack.Value * 100f, RebelSoul_Radius.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown EquipmentSlot.OnEquipmentExecuted_byte_byte_EquipmentIndex += (hook_OnEquipmentExecuted_byte_byte_EquipmentIndex)delegate(orig_OnEquipmentExecuted_byte_byte_EquipmentIndex orig, EquipmentSlot self, byte slot, byte set, EquipmentIndex index) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, slot, set, index); if (Object.op_Implicit((Object)(object)self.characterBody) && Object.op_Implicit((Object)(object)self.characterBody.healthComponent) && GetItemCountEffective(self.characterBody) > 0) { if (!Object.op_Implicit((Object)(object)((Component)self.characterBody).gameObject.GetComponent())) { ((Component)self.characterBody).gameObject.AddComponent(); } else { RebelSoulBehavior component = ((Component)self.characterBody).gameObject.GetComponent(); component.ResetTimer(); } } }; object obj = <>c.<>9__48_1; if (obj == null) { hook_UpdateOutOfCombatAndDanger val = delegate(orig_UpdateOutOfCombatAndDanger orig, CharacterBody self) { orig.Invoke(self); if (!self.outOfCombat && Object.op_Implicit((Object)(object)((Component)self).gameObject.GetComponent())) { Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent()); } }; <>c.<>9__48_1 = val; obj = (object)val; } CharacterBody.UpdateOutOfCombatAndDanger += (hook_UpdateOutOfCombatAndDanger)obj; } public override void AddCorruptionRecipe() { if (RebelSoul_Recipe.Value) { ItemInit.MakeCorruptionRecipe(RebelSoul_Ingredient1.Value, RebelSoul_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } } public class RebelSoulBehavior : MonoBehaviour { private GameObject radius; private CharacterBody characterBody; private float scale = 20f; private float stealInterval = 1f; private float stealTimer = 0f; private float timeToExpiration = 3f; private float expirationTimer = 0f; private float lifeStealFraction = 0.03f; private int itemCount = 1; private bool firstHit = true; private void Awake() { //IL_0059: 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_00dd: 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_00f0: Expected O, but got Unknown radius = Object.Instantiate(ItemInit.RebelSoul.radiusPrefab); NetworkedBodyAttachment component = radius.GetComponent(); characterBody = ((Component)this).gameObject.GetComponent(); component.AttachToGameObjectAndSpawn(((Component)this).gameObject, (string)null); UpdateScale(); itemCount = characterBody.inventory.GetItemCountEffective(ItemInit.RebelSoul.ItemIndex); timeToExpiration = RebelSoul.RebelSoul_BoostDuration.Value; timeToExpiration += RebelSoul.RebelSoul_BoostDurationStack.Value * (float)(itemCount - 1); lifeStealFraction = RebelSoul.RebelSoul_LifeSteal.Value; lifeStealFraction += RebelSoul.RebelSoul_LifeStealStack.Value * (float)(itemCount - 1); ResetTimer(); firstHit = true; EffectData val = new EffectData { origin = characterBody.corePosition }; EffectManager.SpawnEffect(ItemInit.RebelSoul.blinkPrefab, val, true); } private void FixedUpdate() { //IL_004a: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0117: 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_0126: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_00d7: 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) stealTimer += Time.fixedDeltaTime; expirationTimer += Time.fixedDeltaTime; if (stealTimer >= stealInterval || firstHit) { List list = Physics.OverlapSphere(characterBody.corePosition, scale).ToList(); foreach (Collider item in list) { GameObject gameObject = ((Component)item).gameObject; if (Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren())) { CharacterBody componentInChildren = gameObject.GetComponentInChildren(); if (!componentInChildren.isBoss && Object.op_Implicit((Object)(object)componentInChildren.healthComponent) && Object.op_Implicit((Object)(object)componentInChildren.mainHurtBox) && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != characterBody.teamComponent.teamIndex) { DamageInfo val = new DamageInfo { damage = componentInChildren.maxHealth * lifeStealFraction, crit = false, inflictor = gameObject, attacker = gameObject, position = componentInChildren.corePosition, inflictedHurtbox = componentInChildren.mainHurtBox, procChainMask = default(ProcChainMask), procCoefficient = 0f, damageColorIndex = (DamageColorIndex)9 }; EffectData val2 = new EffectData { origin = componentInChildren.corePosition }; EffectManager.SpawnEffect(ItemInit.RebelSoul.stealPrefab, val2, true); componentInChildren.healthComponent.TakeDamage(val); } characterBody.healthComponent.HealFraction(lifeStealFraction, default(ProcChainMask)); } } stealTimer = 0f; firstHit = false; } if (expirationTimer >= timeToExpiration + 0.1f) { Object.Destroy((Object)(object)this); } } private void OnDestroy() { //IL_000c: 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_003b: 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) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown characterBody.SetBuffCount(Buffs.Cloak.buffIndex, 0); characterBody.SetBuffCount(Buffs.CloakSpeed.buffIndex, 0); characterBody.RecalculateStats(); EffectData val = new EffectData { origin = characterBody.corePosition }; EffectManager.SpawnEffect(ItemInit.RebelSoul.blinkPrefab, val, true); Object.Destroy((Object)(object)radius); } public void UpdateScale() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) scale = RebelSoul.RebelSoul_Radius.Value; float num = scale / 10f; radius.transform.localScale = new Vector3(num, num, num); } public void ResetTimer() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) expirationTimer = 0f; characterBody.SetBuffCount(Buffs.Cloak.buffIndex, 1); characterBody.SetBuffCount(Buffs.CloakSpeed.buffIndex, 1); characterBody.outOfDangerStopwatch = 10f; characterBody.outOfCombatStopwatch = 10f; characterBody.UpdateOutOfCombatAndDanger(); } } public class Rebirth : ItemBase { private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem Rebirth_Enabled = new ConfigItem("Void boss: Rebirth", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem Rebirth_ItemsCorrupt = new ConfigItem("Void boss: Rebirth", "Items to corrupt", "Items corrupted at the start of each stage.", 2, 1f, 5f, 1f); public static ConfigItem Rebirth_RegenPerItem = new ConfigItem("Void boss: Rebirth", "Regen per void item", "Regen in hp/s per void item in your inventory.", 1f, 0.5f, 3f, 0.5f); public static ConfigItem Rebirth_RegenPerItemStack = new ConfigItem("Void boss: Rebirth", "Regen per void item (per stack)", "Regen in hp/s per void item in your inventory, per additional stack.", 0.5f, 0f, 3f, 0.5f); public static ConfigItem Rebirth_ItemsCorruptPickup = new ConfigItem("Void boss: Rebirth", "Items to corrupt on pickup", "Items corrupted on pickup.", 3, 1f, 6f, 1f); public static ConfigItem Rebirth_Recipe = new ConfigItem("Void boss: Rebirth", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Rebirth_Ingredient1 = new ConfigItem("Void boss: Rebirth", "Recipe ingredient 1", "First ingredient for corruption recipe", "ParentEgg"); public static ConfigItem Rebirth_Ingredient2 = new ConfigItem("Void boss: Rebirth", "Recipe ingredient 2", "Second ingredient for corruption recipe", "PaleStar"); public override bool Enabled => Rebirth_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/ParentEgg/ParentEgg.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/rebirth.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/voidstage/matVoidCoral.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/matBrotherInfectionVoid.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/matBrotherInfectionVoid.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/BearVoid/matBearVoidShieldStars.mat").WaitForCompletion(); public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public Rebirth(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/rebirth.prefab"); Material[] materialArray = (Material[])(object)new Material[4] { material0, material1, material2, material3 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), Rebirth_ItemsCorruptPickup.Value, Rebirth_ItemsCorrupt.Value, Rebirth_RegenPerItem.Value, Rebirth_RegenPerItemStack.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self) { int itemCountEffective = GetItemCountEffective(orig); if (itemCountEffective > 0) { int num3 = 0; num3 += orig.inventory.GetTotalItemCountOfTier((ItemTier)6); num3 += orig.inventory.GetTotalItemCountOfTier((ItemTier)7); num3 += orig.inventory.GetTotalItemCountOfTier((ItemTier)8); num3 += orig.inventory.GetTotalItemCountOfTier((ItemTier)9); self.baseRegenAdd += (Rebirth_RegenPerItem.Value + Rebirth_RegenPerItemStack.Value * (float)(itemCountEffective - 1)) * (float)num3; } }; Inventory.GiveItemPermanent_ItemIndex_int += (hook_GiveItemPermanent_ItemIndex_int)delegate(orig_GiveItemPermanent_ItemIndex_int orig, Inventory self, ItemIndex itemIndex, int count) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) int num = 0; int num2 = 0; num = self.GetItemCountPermanent(base.ItemIndex); orig.Invoke(self, itemIndex, count); num2 = self.GetItemCountPermanent(base.ItemIndex); if (num2 > num && Object.op_Implicit((Object)(object)((Component)self).gameObject.GetComponentInChildren())) { CorruptItems(((Component)self).gameObject.GetComponentInChildren(), Rebirth_ItemsCorruptPickup.Value); } }; CharacterMaster.OnServerStageBegin += (hook_OnServerStageBegin)delegate(orig_OnServerStageBegin orig, CharacterMaster self, Stage stage) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Invalid comparison between Unknown and I4 orig.Invoke(self, stage); if (Object.op_Implicit((Object)(object)stage.sceneDef) && (int)stage.sceneDef.sceneType != 2 && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCountEffective(ItemDef) > 0) { int value = Rebirth_ItemsCorrupt.Value; CorruptItems(self, value); } }; } public override void AddCorruptionRecipe() { if (Rebirth_Recipe.Value) { ItemInit.MakeCorruptionRecipe(Rebirth_Ingredient1.Value, Rebirth_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public void CorruptItems(CharacterMaster characterMaster, int amount) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_008b: 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_00af: 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_00c2: 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_00d3: 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_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) Xoroshiro128Plus val = new Xoroshiro128Plus(Run.instance.stageRng.nextUlong); List list = new List(characterMaster.inventory.itemAcquisitionOrder); Util.ShuffleList(list, val); val.Next(); TakeResult val4 = default(TakeResult); foreach (ItemIndex item in list) { if (amount <= 0) { break; } Enumerator enumerator2 = ItemCatalog.GetItemPairsForRelationship(ItemRelationshipTypes.ContagiousItem).GetEnumerator(); try { while (enumerator2.MoveNext()) { Pair current2 = enumerator2.Current; if ((Object)(object)current2.itemDef1 == (Object)(object)ItemCatalog.GetItemDef(item)) { Inventory inventory = characterMaster.inventory; ItemTransformation val2 = default(ItemTransformation); ((ItemTransformation)(ref val2)).originalItemIndex = ItemCatalog.GetItemDef(item).itemIndex; ((ItemTransformation)(ref val2)).newItemIndex = ItemCatalog.GetItemDef(current2.itemDef2.itemIndex).itemIndex; ItemTransformation val3 = val2; if (((ItemTransformation)(ref val3)).TryTake(inventory, ref val4)) { ((TakeResult)(ref val4)).GiveTakenItem(inventory, ((ItemTransformation)(ref val3)).newItemIndex); } amount--; break; } } } finally { ((IDisposable)enumerator2).Dispose(); } } } } public class SplitNucleus : ItemBase { public class SplitNucleusBehavior : MonoBehaviour { private HealthComponent healthComponent; private CharacterBody characterBody; private BuffDef buffDef; private int _stacks = 0; public int maxStacks = 0; public float pulseTimer = 0f; public float pulseInterval = 1f; public int stacks { get { return _stacks; } set { //IL_003b: Unknown result type (might be due to invalid IL or missing references) RecheckMaxStacks(); _stacks = value; if (_stacks > maxStacks) { _stacks = maxStacks; } characterBody.SetBuffCount(buffDef.buffIndex, _stacks); } } private void Awake() { healthComponent = ((Component)this).gameObject.GetComponent(); characterBody = ((Component)this).gameObject.GetComponent(); buffDef = ItemInit.SplitNucleus.NucleusBuff; if (!Object.op_Implicit((Object)(object)healthComponent) || !Object.op_Implicit((Object)(object)characterBody) || !Object.op_Implicit((Object)(object)buffDef)) { Object.Destroy((Object)(object)this); } RecheckMaxStacks(); stacks = maxStacks; } private void FixedUpdate() { pulseTimer += Time.fixedDeltaTime; if (pulseTimer > pulseInterval) { if (Object.op_Implicit((Object)(object)((Component)characterBody).gameObject.GetComponent()) && _stacks > 0) { TemporaryOverlay val = ((Component)characterBody).gameObject.AddComponent(); val.duration = 0.5f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 0.8f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = ItemInit.SplitNucleus.BlockOverlay; val.AddToCharacerModel(((Component)((Component)characterBody).gameObject.GetComponent().modelTransform).GetComponentInParent()); } pulseTimer = 0f; } } public bool LoseStack() { //IL_0021: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //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) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown if (stacks > 0) { stacks--; EffectData val = new EffectData { origin = characterBody.corePosition, scale = 0.5f }; EffectManager.SpawnEffect(ItemInit.SplitNucleus.BlockPrefab, val, true); EffectData val2 = new EffectData { origin = characterBody.corePosition }; EffectManager.SpawnEffect(ItemInit.SplitNucleus.BlockPrefabFlash, val2, true); Util.PlaySound("Play_majorConstruct_R_pulse", ((Component)characterBody).gameObject); if (Object.op_Implicit((Object)(object)((Component)characterBody).gameObject.GetComponent())) { TemporaryOverlay val3 = ((Component)characterBody).gameObject.AddComponent(); val3.duration = 2f; val3.animateShaderAlpha = true; val3.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val3.destroyComponentOnEnd = true; val3.originalMaterial = ItemInit.SplitNucleus.BlockOverlay; val3.AddToCharacerModel(((Component)((Component)characterBody).gameObject.GetComponent().modelTransform).GetComponentInParent()); } return true; } return false; } public void GainStacks() { if (stacks < maxStacks) { Util.PlaySound(ChargeFire.attackSoundEffect, ((Component)characterBody).gameObject); if (Object.op_Implicit((Object)(object)((Component)characterBody).gameObject.GetComponent())) { TemporaryOverlay val = ((Component)characterBody).gameObject.AddComponent(); val.duration = 2f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = ItemInit.SplitNucleus.BlockOverlay; val.AddToCharacerModel(((Component)((Component)characterBody).gameObject.GetComponent().modelTransform).GetComponentInParent()); } } stacks += SplitNucleus_ChargesOnEliteKill.Value; } public void RecheckMaxStacks() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) maxStacks = SplitNucleus_MaxStacks.Value + SplitNucleus_MaxStacksStack.Value * (characterBody.inventory.GetItemCountEffective(ItemInit.SplitNucleus.ItemIndex) - 1); } } public BuffDef NucleusBuff; private GameObject _blockPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private GameObject _blockPrefabFlash; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private Material _blockOverlay; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private Material k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem SplitNucleus_Enabled = new ConfigItem("Void boss: Split Nucleus", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem SplitNucleus_ActivateFraction = new ConfigItem("Void boss: Split Nucleus", "Activation health fraction", "What fraction of health must an attack take in order to be blocked?", 0.5f, 0.05f, 0.95f, 0.05f); public static ConfigItem SplitNucleus_MaxStacks = new ConfigItem("Void boss: Split Nucleus", "Maximum block stacks", "Amount of high-damage attacks that can be blocked.", 2, 1f, 4f, 1f); public static ConfigItem SplitNucleus_MaxStacksStack = new ConfigItem("Void boss: Split Nucleus", "Maximum block stacks (per stack)", "Amount of high-damage attacks that can be blocked, per additional stack.", 2, 1f, 4f, 1f); public static ConfigItem SplitNucleus_ChargesOnEliteKill = new ConfigItem("Void boss: Split Nucleus", "Charges regained on elite kill", "Number of block charges gained on elite kill.", 1, 1f, 4f, 1f); public static ConfigItem SplitNucleus_Recipe = new ConfigItem("Void boss: Split Nucleus", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem SplitNucleus_Ingredient1 = new ConfigItem("Void boss: Split Nucleus", "Recipe ingredient 1", "First ingredient for corruption recipe", "MinorConstructOnKill"); public static ConfigItem SplitNucleus_Ingredient2 = new ConfigItem("Void boss: Split Nucleus", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ChainLightningVoid"); public override bool Enabled => SplitNucleus_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC1/MinorConstructOnKill/MinorConstructOnKill.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/splitNucleus.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/Common/Void/matNullifierGemPortal3.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineChance/matShrineChance.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/Common/Void/matNullifierGemPortal3.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/DLC2/matShrineColossusAccessProngDisabled.mat").WaitForCompletion(); public Material material4 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidSurvivorBlasterSphereAreaIndicatorCorrupted.mat").WaitForCompletion(); public GameObject BlockPrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_blockPrefab == (Object)null) { _blockPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MajorConstructSpawnMinorConstructEffect.prefab").WaitForCompletion(); } return _blockPrefab; } [CompilerGenerated] set { k__BackingField = value; } } public GameObject BlockPrefabFlash { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_blockPrefabFlash == (Object)null) { _blockPrefabFlash = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MajorConstructMuzzleflashSpawnMinorConstruct.prefab").WaitForCompletion(); } return _blockPrefabFlash; } [CompilerGenerated] set { k__BackingField = value; } } public Material BlockOverlay { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_blockOverlay == (Object)null) { _blockOverlay = Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/matMagmaWormOverlay.mat").WaitForCompletion(); } return _blockOverlay; } [CompilerGenerated] set { k__BackingField = value; } } public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public SplitNucleus(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/splitNucleus.prefab"); Material[] materialArray = (Material[])(object)new Material[5] { material0, material1, material2, material3, material4 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), SplitNucleus_MaxStacks.Value, SplitNucleus_MaxStacksStack.Value, SplitNucleus_ActivateFraction.Value * 100f, SplitNucleus_ChargesOnEliteKill.Value)); } public override void RegisterHooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown CreateNucleusBuff(); HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { SplitNucleusBehavior splitNucleusBehavior3 = default(SplitNucleusBehavior); if (Object.op_Implicit((Object)(object)self.body) && GetItemCountEffective(self.body) > 0 && ((Component)self.body).gameObject.TryGetComponent(ref splitNucleusBehavior3) && damageInfo.damage >= self.fullCombinedHealth * SplitNucleus_ActivateFraction.Value && splitNucleusBehavior3.LoseStack()) { damageInfo.rejected = true; } orig.Invoke(self, damageInfo); }; CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); SplitNucleusBehavior splitNucleusBehavior2 = ((Component)self).gameObject.GetComponent(); int itemCountEffective = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)splitNucleusBehavior2)) { splitNucleusBehavior2 = ((Component)self).gameObject.AddComponent(); } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)splitNucleusBehavior2)) { Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent()); self.SetBuffCount(NucleusBuff.buffIndex, 0); } }; GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)delegate(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { SplitNucleusBehavior splitNucleusBehavior = default(SplitNucleusBehavior); if (Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.victimBody) && GetItemCountEffective(damageReport.attackerBody) > 0 && damageReport.victimIsElite && ((Component)damageReport.attackerBody).gameObject.TryGetComponent(ref splitNucleusBehavior)) { splitNucleusBehavior.GainStacks(); } orig.Invoke(self, damageReport); }; } public override void AddCorruptionRecipe() { if (SplitNucleus_Recipe.Value) { ItemInit.MakeCorruptionRecipe(SplitNucleus_Ingredient1.Value, SplitNucleus_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public void CreateNucleusBuff() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); val.buffColor = new Color(1f, 0.772f, 0.396f); val.canStack = true; val.isDebuff = false; val.ignoreGrowthNectar = true; ((Object)val).name = "Split Nucleus charges"; val.isHidden = false; val.isCooldown = false; val.iconSprite = Main.Assets.LoadAsset("Assets/icons/nucleusBuff.png"); ContentAddition.AddBuffDef(val); NucleusBuff = val; } } public class TenebralGland : ItemBase { public class TenebralMarkBehavior : MonoBehaviour { public List inflictorBodies = new List(); } public BuffDef TenebralBuff; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable k__BackingField; public static ConfigItem TenebralGland_Enabled = new ConfigItem("Void boss: Tenebral Gland", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem TenebralGland_SuperBleedChance = new ConfigItem("Void boss: Tenebral Gland", "Hemorrhage chance", "Percent chance that, upon critting, hemorrhage will be applied.", 5f, 1f, 20f, 0.5f); public static ConfigItem TenebralGland_SuperBleedChanceStack = new ConfigItem("Void boss: Tenebral Gland", "Hemorrhage chance (per stack)", "Percent chance that, upon critting, hemorrhage will be applied, per additional stack.", 2.5f, 1f, 20f, 0.5f); public static ConfigItem TenebralGland_CritChanceBuff = new ConfigItem("Void boss: Tenebral Gland", "Buff crit chance", "Fractional crit chance granted by each stack of the buff.", 0.1f, 0.01f, 0.5f, 0.01f); public static ConfigItem TenebralGland_CritDamageBuff = new ConfigItem("Void boss: Tenebral Gland", "Buff crit damage", "Fractional crit damage granted by each stack of the buff.", 0.1f, 0.01f, 0.5f, 0.01f); public static ConfigItem TenebralGland_BuffLength = new ConfigItem("Void boss: Tenebral Gland", "Buff length", "Length of the buff in seconds, refreshing upon gaining a new stack.", 10f, 1f, 30f, 1f); public static ConfigItem TenebralGland_BuffMaxStacks = new ConfigItem("Void boss: Tenebral Gland", "Buff max stacks (per stack)", "Max amount of buffs to gain per stack of this item.", 10, 1f, 30f, 1f); public static ConfigItem TenebralGland_Recipe = new ConfigItem("Void boss: Tenebral Gland", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem TenebralGland_Ingredient1 = new ConfigItem("Void boss: Tenebral Gland", "Recipe ingredient 1", "First ingredient for corruption recipe", "BleedOnHitAndExplode"); public static ConfigItem TenebralGland_Ingredient2 = new ConfigItem("Void boss: Tenebral Gland", "Recipe ingredient 2", "Second ingredient for corruption recipe", "EquipmentMagazineVoid"); public override bool Enabled => TenebralGland_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/BleedOnHitAndExplode/BleedOnHitAndExplode.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/tenebralGland.png"); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/Base/artifactworld/matArtifactGem.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/matBloodClayLarge.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/Base/artifactworld/matArtifactGem.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/DLC3/Items/TransferDebuffOnHit/matTransferDebuffOverlay.mat").WaitForCompletion(); public ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public TenebralGland(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/tenebralGland.prefab"); Material[] materialArray = (Material[])(object)new Material[4] { material0, material1, material2, material3 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), TenebralGland_SuperBleedChance.Value, TenebralGland_SuperBleedChanceStack.Value, TenebralGland_CritChanceBuff.Value * 100f, TenebralGland_BuffLength.Value, TenebralGland_BuffMaxStacks.Value)); } public override void RegisterHooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown CreateTenebralBuff(); GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)delegate(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victimObject) { //IL_0092: 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) orig.Invoke(self, damageInfo, victimObject); CharacterBody val2 = default(CharacterBody); CharacterBody val3 = default(CharacterBody); if (!damageInfo.rejected && damageInfo.crit && damageInfo.damage > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent(ref val2) && Object.op_Implicit((Object)(object)val2.master) && victimObject.TryGetComponent(ref val3)) { int itemCountEffective3 = GetItemCountEffective(val2); if (itemCountEffective3 > 0 && Object.op_Implicit((Object)(object)val2.teamComponent) && Object.op_Implicit((Object)(object)val3.teamComponent) && val2.teamComponent.teamIndex != val3.teamComponent.teamIndex && Util.CheckRoll((TenebralGland_SuperBleedChance.Value + TenebralGland_SuperBleedChanceStack.Value * (float)(itemCountEffective3 - 1)) * damageInfo.procCoefficient, val2.master.luck, val2.master)) { DotDef dotDef = DotController.GetDotDef((DotIndex)6); DotController.InflictDot(victimObject, damageInfo.attacker, damageInfo.inflictedHurtbox, (DotIndex)6, 15f, 1f, (uint?)null); if (!Object.op_Implicit((Object)(object)victimObject.GetComponent())) { victimObject.AddComponent(); } victimObject.GetComponent().inflictorBodies.Add(val2); } } }; CharacterBody.OnBuffFinalStackLost += (hook_OnBuffFinalStackLost)delegate(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, buffDef); if (buffDef.buffIndex == Buffs.SuperBleed.buffIndex && Object.op_Implicit((Object)(object)((Component)self).GetComponent())) { Object.Destroy((Object)(object)((Component)self).GetComponent()); } if (buffDef.buffIndex == TenebralBuff.buffIndex) { self.RecalculateStats(); } }; CharacterBody.OnDeathStart += (hook_OnDeathStart)delegate(orig_OnDeathStart orig, CharacterBody self) { TenebralMarkBehavior tenebralMarkBehavior = default(TenebralMarkBehavior); if (((Component)self).gameObject.TryGetComponent(ref tenebralMarkBehavior)) { foreach (CharacterBody inflictorBody in tenebralMarkBehavior.inflictorBodies) { int itemCountEffective2 = GetItemCountEffective(inflictorBody); if (itemCountEffective2 > 0 && inflictorBody.GetBuffCount(TenebralBuff) < TenebralGland_BuffMaxStacks.Value * itemCountEffective2) { inflictorBody.SetTimedBuffDurationIfPresent(TenebralBuff, TenebralGland_BuffLength.Value, true); inflictorBody.AddTimedBuff(TenebralBuff, TenebralGland_BuffLength.Value); TemporaryOverlay val = ((Component)inflictorBody).gameObject.AddComponent(); val.duration = 1f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = ItemInit.MobiusNode.ExplodeOverlay; val.AddToCharacerModel(((Component)((Component)inflictorBody).gameObject.GetComponent().modelTransform).GetComponentInParent()); } } } orig.Invoke(self); }; RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self) { int itemCountEffective = GetItemCountEffective(orig); if (itemCountEffective > 0) { int buffCount = orig.GetBuffCount(TenebralBuff); self.critAdd += TenebralGland_CritChanceBuff.Value * (float)buffCount; self.critDamageMultAdd += TenebralGland_CritDamageBuff.Value * (float)buffCount; } }; } public override void AddCorruptionRecipe() { if (TenebralGland_Recipe.Value) { ItemInit.MakeCorruptionRecipe(TenebralGland_Ingredient1.Value, TenebralGland_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public void CreateTenebralBuff() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); val.buffColor = new Color(0f, 0f, 0f); val.canStack = true; val.isDebuff = false; val.ignoreGrowthNectar = false; ((Object)val).name = "Tenebral rush"; val.isHidden = false; val.isCooldown = false; val.iconSprite = Main.Assets.LoadAsset("Assets/icons/tenebralBuff.png"); ContentAddition.AddBuffDef(val); TenebralBuff = val; } } public class Crabsinthe : ItemBase { public static ConfigItem Crabsinthe_Enabled = new ConfigItem("Void common: Crabsinthe", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem Crabsinthe_Regen = new ConfigItem("Void common: Crabsinthe", "Regen boost", "Grants a regen boost with this multiplier.", 0.5f, 0f, 6f, 0.1f); public static ConfigItem Crabsinthe_RegenStack = new ConfigItem("Void common: Crabsinthe", "Regen boost (Per stack)", "Grants a regen boost with this multiplier per additional stack.", 0.5f, 0f, 6f, 0.1f); public static ConfigItem Crabsinthe_CorruptBottles = new ConfigItem("Void common: Crabsinthe", "Corrupt empty bottles", "Should this item corrupt consumed elixirs?", _defaultValue: true); public static ConfigItem Crabsinthe_Recipe = new ConfigItem("Void common: Crabsinthe", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Crabsinthe_Ingredient1 = new ConfigItem("Void common: Crabsinthe", "Recipe ingredient 1", "First ingredient for corruption recipe", "HealingPotion"); public static ConfigItem Crabsinthe_Ingredient2 = new ConfigItem("Void common: Crabsinthe", "Recipe ingredient 2", "Second ingredient for corruption recipe", "MushroomVoid"); public override bool Enabled => Crabsinthe_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC1/HealingPotion/HealingPotion.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/crabsinthe.png"); public ItemDef ConversionItemDefConsumed => Addressables.LoadAssetAsync((object)"RoR2/DLC1/HealingPotion/HealingPotionConsumed.asset").WaitForCompletion(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/HealingPotion/matHealingPotionGlass.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidSurvivorBlasterSphereAreaIndicator.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/TreasureCacheVoid/matLockboxVoidEgg.mat").WaitForCompletion(); public Material material4 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/matVoidRaidCrabEyeOverlay2.mat").WaitForCompletion(); public Crabsinthe(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/crabsinthe.prefab"); Material[] materialArray = (Material[])(object)new Material[5] { material0, material1, material2, ((Renderer)val.GetComponentInChildren()).GetMaterialArray()[3], material4 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; string arg = (Crabsinthe_CorruptBottles.Value ? " and Empty Bottles" : ""); LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), Crabsinthe_Regen.Value * 100f, Crabsinthe_RegenStack.Value * 100f, arg)); } public override void RegisterHooks() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (Crabsinthe_CorruptBottles.Value) { Pair val = default(Pair); val.itemDef1 = ConversionItemDefConsumed; val.itemDef2 = ItemDef; Pair item = val; Main.ItemConversionList.Add(item); Log.Info($"Added void conversion from {((Object)ConversionItemDefConsumed).name} to {((Object)ItemDef).name}"); } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self) { int itemCountEffective = GetItemCountEffective(orig); if (itemCountEffective > 0) { self.regenMultAdd += Crabsinthe_Regen.Value + Crabsinthe_RegenStack.Value * (float)(itemCountEffective - 1); } }; } public override void AddCorruptionRecipe() { if (Crabsinthe_Recipe.Value) { ItemInit.MakeCorruptionRecipe(Crabsinthe_Ingredient1.Value, Crabsinthe_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0043: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_016a: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076b: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09f5: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a10: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) GameObject followerPrefab = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.22006f, 0.01029f, -0.03222f), localAngles = new Vector3(342.1314f, 263.4621f, 143.145f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.22006f, 0.01029f, -0.03222f), localAngles = new Vector3(342.1314f, 263.4621f, 143.145f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.22006f, 0.01029f, -0.03222f), localAngles = new Vector3(342.1314f, 263.4621f, 143.145f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmL", localPos = new Vector3(-3.13168f, 0.39244f, -0.15114f), localAngles = new Vector3(297.6138f, 184.4109f, 212.2324f), localScale = new Vector3(1.98902f, 1.98902f, 1.98902f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.2742f, 0.05734f, 0.01088f), localAngles = new Vector3(338.9652f, 266.8782f, 132.2899f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.17946f, 0.01028f, -0.03222f), localAngles = new Vector3(342.1314f, 263.4621f, 143.145f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "UpperArmR", localPos = new Vector3(-0.19241f, 0.25936f, -0.00967f), localAngles = new Vector3(314.5362f, 254.9864f, 127.1974f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "PlatformBase", localPos = new Vector3(-0.28089f, 0.49833f, -0.78794f), localAngles = new Vector3(18.34931f, 274.9786f, 318.1312f), localScale = new Vector3(0.46942f, 0.46942f, 0.46942f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.22006f, 0.01029f, -0.03222f), localAngles = new Vector3(342.1314f, 263.4621f, 143.145f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(1.96845f, 0.58616f, 0.07431f), localAngles = new Vector3(336.642f, 239.765f, 187.3825f), localScale = new Vector3(2.2141f, 2.2141f, 2.2141f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(-0.41247f, -0.05317f, 0.15905f), localAngles = new Vector3(351.2866f, 264.4579f, 120.5038f), localScale = new Vector3(0.33326f, 0.33326f, 0.33326f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.1722f, 0.10773f, -0.00286f), localAngles = new Vector3(324.0815f, 269.0406f, 128.8251f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "ForeArmR", localPos = new Vector3(0.03669f, -0.17884f, -0.04173f), localAngles = new Vector3(342.1314f, 263.4621f, 143.145f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.29005f, 0.00948f, -0.03139f), localAngles = new Vector3(316.0573f, 78.27985f, 129.4233f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(0.13337f, 0.60202f, -1.07796f), localAngles = new Vector3(354.3503f, 245.6798f, 188.1472f), localScale = new Vector3(0.43405f, 0.43405f, 0.43405f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(0.12288f, -0.49027f, 0.21384f), localAngles = new Vector3(293.7258f, 146.1052f, 269.1249f), localScale = new Vector3(0.38783f, 0.38783f, 0.38783f) } }); val.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "ThighL", localPos = new Vector3(-0.10692f, -0.17225f, -0.09653f), localAngles = new Vector3(46.51857f, 187.6929f, 45.30641f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); val.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.02914f, 0.13215f, -0.43569f), localAngles = new Vector3(288.0392f, 100.3947f, 318.3475f), localScale = new Vector3(0.29222f, 0.29222f, 0.29222f) } }); return val; } } public class VoidWatch : ItemBase { public class VoidWatchBehavior : ItemBehavior { public BuffIndex buffIndex = (BuffIndex)(-1); public float buffInterval = 1f; public float buffTimer = 0f; private void FixedUpdate() { //IL_001a: 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) buffTimer += Time.fixedDeltaTime; int buffCount = base.body.GetBuffCount(buffIndex); if (buffTimer >= buffInterval && base.body.outOfDanger && buffCount < VoidWatch_MaxBuffsv2.Value) { if (buffCount == VoidWatch_MaxBuffsv2.Value - 1) { Util.PlaySound("Play_bandit2_m1_reload_bullet", ((Component)base.body).gameObject); } base.body.AddBuff(buffIndex); buffTimer = 0f; } } } public BuffDef VoidWatchBuff; public static ConfigItem VoidWatch_Enabled = new ConfigItem("Void common: Collectors Appraisal", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem VoidWatch_Damagev2 = new ConfigItem("Void common: Collectors Appraisal", "Damage on first hit per buff", "Multiplies the first hit's damage this much each buff.", 0.04f, 0f, 1f, 0.01f); public static ConfigItem VoidWatch_DamageStackv2 = new ConfigItem("Void common: Collectors Appraisal", "Damage on first hit per buff (Per stack)", "Multiplies the first hit's damage this much each buff, per additional stack.", 0.04f, 0f, 1f, 0.01f); public static ConfigItem VoidWatch_MaxBuffsv2 = new ConfigItem("Void common: Collectors Appraisal", "Maximum buffs", "Maximum buffs a wearer can have.", 12, 1f, 24f, 1f); public static ConfigItem VoidWatch_Recipe = new ConfigItem("Void common: Collectors Appraisal", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem VoidWatch_Ingredient1 = new ConfigItem("Void common: Collectors Appraisal", "Recipe ingredient 1", "First ingredient for corruption recipe", "FragileDamageBonus"); public static ConfigItem VoidWatch_Ingredient2 = new ConfigItem("Void common: Collectors Appraisal", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BearVoid"); public override bool Enabled => VoidWatch_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC1/FragileDamageBonus/FragileDamageBonus.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSuppressor/matVoidSuppressorStone.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC2/meridian/Assets/matPMGold.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/voidWatch.png"); public static GameObject itemImpactEffect => Addressables.LoadAssetAsync((object)"RoR2/DLC1/MissileVoid/VoidImpactEffect.prefab").WaitForCompletion(); public VoidWatch(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/voidWatch.prefab"); Material[] materialArray = (Material[])(object)new Material[3] { material0, material1, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), VoidWatch_Damagev2.Value * 100f, VoidWatch_DamageStackv2.Value * 100f, VoidWatch_MaxBuffsv2.Value)); } public override void RegisterHooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown CreateVoidWatchBuff(); HealthComponent.TakeDamage += (hook_TakeDamage)delegate(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0102: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown CharacterBody val = default(CharacterBody); VoidWatchBehavior voidWatchBehavior2 = default(VoidWatchBehavior); if (!damageInfo.rejected && damageInfo.damage > 0f && damageInfo.procCoefficient > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent(ref val) && Object.op_Implicit((Object)(object)self.body) && ((Component)val).TryGetComponent(ref voidWatchBehavior2)) { int itemCountEffective2 = GetItemCountEffective(val); int buffCount = val.GetBuffCount(VoidWatchBuff); if (itemCountEffective2 > 0 && buffCount > 0) { if (buffCount > VoidWatch_MaxBuffsv2.Value / 2) { EffectData val2 = new EffectData { origin = damageInfo.position }; EffectManager.SpawnEffect(itemImpactEffect, val2, true); } float num = (float)buffCount * (VoidWatch_Damagev2.Value + VoidWatch_DamageStackv2.Value * (float)(itemCountEffective2 - 1)); damageInfo.damage += damageInfo.damage * num; val.SetBuffCount(VoidWatchBuff.buffIndex, 0); val.RecalculateStats(); } } orig.Invoke(self, damageInfo); }; CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { //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) orig.Invoke(self); VoidWatchBehavior voidWatchBehavior = ((Component)self).GetComponent(); int itemCountEffective = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)voidWatchBehavior)) { voidWatchBehavior = self.AddItemBehavior(1); voidWatchBehavior.buffIndex = VoidWatchBuff.buffIndex; } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)voidWatchBehavior)) { Object.Destroy((Object)(object)((Component)self).GetComponent()); } }; } public override void AddCorruptionRecipe() { if (VoidWatch_Recipe.Value) { ItemInit.MakeCorruptionRecipe(VoidWatch_Ingredient1.Value, VoidWatch_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0043: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_016a: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076b: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09f5: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a10: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) GameObject followerPrefab = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.02457f, 0.30852f, -0.14102f), localAngles = new Vector3(290.7905f, 230.8014f, 102.7876f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.02457f, 0.30852f, -0.14102f), localAngles = new Vector3(290.7905f, 230.8014f, 102.7876f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.02457f, 0.30852f, -0.14102f), localAngles = new Vector3(290.7905f, 230.8014f, 102.7876f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.12958f, 3.40309f, 0.94518f), localAngles = new Vector3(283.9275f, 84.74718f, 64.29515f), localScale = new Vector3(1.56946f, 1.56946f, 1.56946f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.02457f, 0.30852f, -0.14102f), localAngles = new Vector3(290.7905f, 230.8014f, 102.7876f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(0.0438f, 0.17509f, 0.18862f), localAngles = new Vector3(291.6444f, 337.9544f, 190.9388f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.02457f, 0.30852f, -0.14102f), localAngles = new Vector3(290.7905f, 230.8014f, 102.7876f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "MuzzleSyringe", localPos = new Vector3(0.00801f, -0.09124f, 0.15755f), localAngles = new Vector3(293.973f, 222.3054f, 112.2281f), localScale = new Vector3(0.56994f, 0.56994f, 0.56994f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "MechLowerArmR", localPos = new Vector3(0.01522f, 0.54796f, -0.24817f), localAngles = new Vector3(292.765f, 219.4528f, 110.5262f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(1.43691f, 3.63456f, 1.00784f), localAngles = new Vector3(296.4076f, 94.46941f, 107.0581f), localScale = new Vector3(2.34403f, 2.34403f, 2.34403f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.03098f, 0.36814f, -0.13694f), localAngles = new Vector3(290.7905f, 230.8014f, 102.7876f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "GunBarrel", localPos = new Vector3(-0.02104f, 0.90413f, -0.01548f), localAngles = new Vector3(343.2699f, 343.8205f, 336.6695f), localScale = new Vector3(0.36454f, 0.36454f, 0.36454f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(-0.01295f, 0.42512f, -0.14371f), localAngles = new Vector3(290.7905f, 230.8014f, 102.7876f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.0495f, 0.28059f, 0.16044f), localAngles = new Vector3(76.02249f, 354.1454f, 334.8496f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(0.14945f, 0.60299f, 0.20539f), localAngles = new Vector3(281.7685f, 48.24983f, 137.1102f), localScale = new Vector3(0.41455f, 0.41455f, 0.41455f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.10782f, -0.07246f, -0.199f), localAngles = new Vector3(21.05138f, 271.56f, 76.94494f), localScale = new Vector3(0.3999f, 0.3999f, 0.3999f) } }); val.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmL", localPos = new Vector3(-0.15221f, 0.06868f, -0.03477f), localAngles = new Vector3(340.3852f, 86.98999f, 300.8787f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); val.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "LowerArmR", localPos = new Vector3(-0.28032f, -0.0148f, 0.13817f), localAngles = new Vector3(349.3889f, 243.8624f, 234.1732f), localScale = new Vector3(0.31854f, 0.31854f, 0.31854f) } }); return val; } public void CreateVoidWatchBuff() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); val.buffColor = new Color(0.76f, 0.3f, 0.92f); val.canStack = true; val.isDebuff = false; val.ignoreGrowthNectar = false; ((Object)val).name = "Collector's Appraisal stacks"; val.isHidden = false; val.isCooldown = false; val.iconSprite = Main.Assets.LoadAsset("Assets/icons/voidWatchBuff.png"); ContentAddition.AddBuffDef(val); VoidWatchBuff = val; } } public class Wellies : ItemBase { public static ConfigItem Wellies_Enabled = new ConfigItem("Void common: Waterlogged Wellies", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem Wellies_Force = new ConfigItem("Void common: Waterlogged Wellies", "Downward pull force", "How strong the on-hit pull down effect is in arbitrary wacky units.", 150f, 0f, 240f, 10f); public static ConfigItem Wellies_ForceStack = new ConfigItem("Void common: Waterlogged Wellies", "Downward pull force (Per stack)", "How strong the on-hit pull down effect is per additional stack.", 150f, 0f, 240f, 10f); public static ConfigItem Wellies_ForceUnmassed = new ConfigItem("Void common: Waterlogged Wellies", "Pure downward pull force percentage", "What percentage of downward pull force should treat the enemy as if it's massless? Equalizes large vs. small enemies, but high values can cause larger enemies to take too much fall damage.", 1f, 0.1f, 2.5f, 0.1f); public static ConfigItem Wellies_DebuffSeconds = new ConfigItem("Void common: Waterlogged Wellies", "Debuff length", "How long the on-hit debuff should last in seconds.", 2f, 0f, 12f, 0.5f); public static ConfigItem Wellies_DebuffSecondsStack = new ConfigItem("Void common: Waterlogged Wellies", "Debuff length (Per stack)", "How long the on-hit debuff should last in seconds per additional stack.", 2f, 0f, 12f, 0.5f); public static ConfigItem Wellies_Recipe = new ConfigItem("Void common: Waterlogged Wellies", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Wellies_Ingredient1 = new ConfigItem("Void common: Waterlogged Wellies", "Recipe ingredient 1", "First ingredient for corruption recipe", "CritAtLowerElevation"); public static ConfigItem Wellies_Ingredient2 = new ConfigItem("Void common: Waterlogged Wellies", "Recipe ingredient 2", "Second ingredient for corruption recipe", "CritGlassesVoid"); public override bool Enabled => Wellies_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC3/Items/CritAtLowerElevation/CritAtLowerElevation.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Props/matRescueshipDirtPiles.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/Railgunner/matRailGunnerBase.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/ScrapVoid/matScrapVoidMetal.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/wellies.png"); public BuffDef DebuffDef => Addressables.LoadAssetAsync((object)"RoR2/Base/Treebot/bdWeak.asset").WaitForCompletion(); public Wellies(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/wellies.prefab"); Material[] materialArray = (Material[])(object)new Material[3] { material0, material1, material2 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), Wellies_DebuffSeconds.Value, Wellies_DebuffSecondsStack.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0116: 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_0122: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_0179: 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) if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); CharacterBody body = self.body; if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)body)) { int itemCountEffective = GetItemCountEffective(component); if (itemCountEffective > 0) { float num = Wellies_DebuffSeconds.Value + Wellies_DebuffSecondsStack.Value * (float)(itemCountEffective - 1); float num2 = Wellies_Force.Value + Wellies_ForceStack.Value * (float)(itemCountEffective - 1); float num3 = num2 * Wellies_ForceUnmassed.Value / 100f; if (num2 > 0f && damageInfo.procCoefficient > 0f && !((Object)body).name.ToLower().Contains("grandparent") && !((Object)body).name.ToLower().Contains("voidraid")) { PhysForceInfo val = default(PhysForceInfo); val.force = Vector3.down * num2; PhysForceInfo val2 = val; val = default(PhysForceInfo); val.force = Vector3.down * num3; ((PhysForceInfo)(ref val)).massIsOne = true; PhysForceInfo val3 = val; CharacterMotor val4 = default(CharacterMotor); RigidbodyMotor val5 = default(RigidbodyMotor); if (((Component)body).TryGetComponent(ref val4) && !val4.isGrounded) { val4.ApplyForceImpulse(ref val2); val4.ApplyForceImpulse(ref val3); body.AddTimedBuff(DebuffDef.buffIndex, num); Util.PlaySound("Play_voidBarnacle_m1_chargeUp", ((Component)body).gameObject); } else if (((Component)body).TryGetComponent(ref val5)) { val5.ApplyForceImpulse(ref val2); val5.ApplyForceImpulse(ref val3); body.AddTimedBuff(DebuffDef.buffIndex, num); Util.PlaySound("Play_voidBarnacle_m1_chargeUp", ((Component)body).gameObject); } } } } } orig.Invoke(self, damageInfo); }; } public override void AddCorruptionRecipe() { if (Wellies_Recipe.Value) { ItemInit.MakeCorruptionRecipe(Wellies_Ingredient1.Value, Wellies_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0043: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_016a: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076b: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09f5: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a10: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) GameObject followerPrefab = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.05459f, 0.35279f, -0.02096f), localAngles = new Vector3(24.00437f, 241.7346f, 175.7336f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.0339f, 0.46121f, -0.02344f), localAngles = new Vector3(18.96789f, 238.3667f, 167.2122f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.06766f, 0.42942f, -0.02797f), localAngles = new Vector3(18.01975f, 236.5676f, 166.5165f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.0906f, 4.26193f, -1.60567f), localAngles = new Vector3(33.83314f, 231.597f, 176.2843f), localScale = new Vector3(4.6442f, 4.6442f, 4.6442f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.04855f, 0.29898f, -0.02227f), localAngles = new Vector3(29.31547f, 235.8502f, 181.9146f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.00463f, 0.44786f, -0.10045f), localAngles = new Vector3(27.64817f, 242.7562f, 174.6417f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.05201f, 0.32554f, -0.03236f), localAngles = new Vector3(27.87446f, 246.3371f, 184.4269f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "FootFrontL", localPos = new Vector3(0.0376f, 1.37253f, -0.04084f), localAngles = new Vector3(23.72903f, 223.4445f, 161.818f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.04056f, 0.49894f, -0.00329f), localAngles = new Vector3(27.55028f, 214.5608f, 169.1206f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "HeadCenter", localPos = new Vector3(-0.12383f, 2.23713f, 1.70597f), localAngles = new Vector3(23.80973f, 50.96521f, 168.1773f), localScale = new Vector3(5.01094f, 5.01094f, 5.01094f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.03605f, 0.43529f, 0.02278f), localAngles = new Vector3(20.46794f, 224.6553f, 160.8648f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.00597f, 0.49747f, 0.07436f), localAngles = new Vector3(16.03705f, 129.8903f, 163.5802f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfR", localPos = new Vector3(-0.06144f, 0.38091f, -0.01169f), localAngles = new Vector3(31.09837f, 291.495f, 160.6339f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(0.07177f, 0.42745f, 0.0448f), localAngles = new Vector3(31.23956f, 136.0638f, 181.1546f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "ClubExplosionPoint", localPos = new Vector3(0.04072f, -0.03077f, -2.62772f), localAngles = new Vector3(35.57562f, 297.9604f, 273.7678f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "PizzaCutter", localPos = new Vector3(0.00503f, 0.44955f, 0.05011f), localAngles = new Vector3(17.83064f, 135.3451f, 161.9421f), localScale = new Vector3(1.20654f, 1.20654f, 1.20654f) } }); val.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "CalfL", localPos = new Vector3(-0.66415f, 0.04357f, 0.03509f), localAngles = new Vector3(44.04141f, 136.1547f, 51.91541f), localScale = new Vector3(1.04054f, 1.04054f, 1.04054f) } }); val.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "BagPocketL", localPos = new Vector3(-0.02132f, 0.18006f, 0.23867f), localAngles = new Vector3(355.0318f, 229.4706f, 92.83186f), localScale = new Vector3(0.64488f, 0.64258f, 0.64258f) } }); return val; } } public class AlteredSoul : ItemBase { public class AlteredSoulBehavior : MonoBehaviour { public DamageReport DamageReport; public float onKillInterval = 1f; public float onKillTimer = 0f; public float remainingKills = 2f; private void FixedUpdate() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0099: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown onKillTimer += Time.fixedDeltaTime; if (onKillTimer >= onKillInterval) { onKillTimer = 0f; EffectData val = new EffectData { origin = ((Component)this).gameObject.transform.position }; EffectManager.SpawnEffect(itemKillEffect, val, true); GlobalEventManager.instance.OnCharacterDeath(DamageReport); remainingKills -= 1f; if (remainingKills <= 0f) { EffectData val2 = new EffectData { origin = ((Component)this).gameObject.transform.position }; EffectManager.SpawnEffect(itemImpactEffect, val2, true); Object.Destroy((Object)(object)((Component)this).gameObject); } } } } [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; private GameObject _itemDropPrefab; public static ConfigItem AlteredSoul_Enabled = new ConfigItem("Void legendary: Altered Soul", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem AlteredSoul_Kills = new ConfigItem("Void legendary: Altered Soul", "Additional on-kills", "How many on-kill effect duplications occur.", 1, 1f, 5f, 1f); public static ConfigItem AlteredSoul_KillsStack = new ConfigItem("Void legendary: Altered Soul", "Additional on-kills (per stack)", "How many on-kill effect duplications occur, per additional stack.", 1, 1f, 5f, 1f); public static ConfigItem AlteredSoul_KillInterval = new ConfigItem("Void legendary: Altered Soul", "On-kill interval", "Time (in seconds) between on-kill effect triggers from crystals.", 1f, 0.1f, 5f, 0.1f); public static ConfigItem AlteredSoul_Recipe = new ConfigItem("Void legendary: Altered Soul", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem AlteredSoul_Ingredient1 = new ConfigItem("Void legendary: Altered Soul", "Recipe ingredient 1", "First ingredient for corruption recipe", "Dagger"); public static ConfigItem AlteredSoul_Ingredient2 = new ConfigItem("Void legendary: Altered Soul", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ElementalRingVoid"); public override bool Enabled => AlteredSoul_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/Dagger/Dagger.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/Base/crystalworld/matTimeCrystalSolid.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidRaidCrab/matVoidRaidCrabParticleBlue.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/alteredSoul.png"); public GameObject itemDropPrefab { get { if ((Object)(object)_itemDropPrefab == (Object)null) { _itemDropPrefab = CreateDropPrefab(); } return _itemDropPrefab; } [CompilerGenerated] set { k__BackingField = value; } } public LayerMask dropLayerMask => ((LayerIndex)(ref LayerIndex.world)).mask; public static GameObject itemKillEffect => Addressables.LoadAssetAsync((object)"RoR2/Base/DeathProjectile/DeathProjectileTickEffect.prefab").WaitForCompletion(); public static GameObject itemBlinkEffect => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidBarnacle/VoidBarnacleSpawnEffect.prefab").WaitForCompletion(); public static GameObject itemImpactEffect => Addressables.LoadAssetAsync((object)"RoR2/DLC1/MissileVoid/VoidImpactEffect.prefab").WaitForCompletion(); public AlteredSoul(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/alteredSoul.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public GameObject CreateDropPrefab() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) GameObject val = Main.Assets.LoadAsset("Assets/prefabs/alteredSoul.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); val.transform.localScale = new Vector3(4f, 4f, 4f); AlteredSoulBehavior alteredSoulBehavior = val.AddComponent(); CharacterBody val2 = val.AddComponent(); HealthComponent val3 = val.AddComponent(); val3.health = 100f; val3.body = val2; val2.healthComponent = val3; SphereCollider val4 = val.AddComponent(); val4.radius = 0.01f; return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), AlteredSoul_Kills.Value, AlteredSoul_KillsStack.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)delegate(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0078: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.victimBody) && Object.op_Implicit((Object)(object)damageReport.victimBody.teamComponent) && GetItemCountEffective(damageReport.attackerBody) > 0 && !Object.op_Implicit((Object)(object)((Component)damageReport.victim).gameObject.GetComponentInChildren())) { int itemCountEffective = GetItemCountEffective(damageReport.attackerBody); GameObject val = Object.Instantiate(itemDropPrefab, damageReport.victimBody.corePosition, Quaternion.identity); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(damageReport.victimBody.corePosition, Vector3.down, ref val2, 1000f, LayerMask.op_Implicit(dropLayerMask))) { val.transform.SetPositionAndRotation(((RaycastHit)(ref val2)).point, Quaternion.identity); EffectData val3 = new EffectData { origin = ((RaycastHit)(ref val2)).point }; EffectManager.SpawnEffect(itemBlinkEffect, val3, true); EffectData val4 = new EffectData { origin = ((RaycastHit)(ref val2)).point }; EffectManager.SpawnEffect(itemImpactEffect, val4, true); AlteredSoulBehavior component = val.GetComponent(); HealthComponent component2 = val.GetComponent(); CharacterBody component3 = val.GetComponent(); DamageReport val5 = new DamageReport(damageReport.damageInfo, component2, damageReport.damageDealt, damageReport.combinedHealthBeforeDamage); if (damageReport.victimIsElite) { val5.victimIsElite = true; } component.DamageReport = val5; component.onKillInterval = AlteredSoul_KillInterval.Value; component.remainingKills = AlteredSoul_Kills.Value + AlteredSoul_KillsStack.Value * (itemCountEffective - 1); component3.teamComponent.teamIndex = damageReport.victimBody.teamComponent.teamIndex; } else { Object.Destroy((Object)(object)val); } } orig.Invoke(self, damageReport); }; } public override void AddCorruptionRecipe() { if (AlteredSoul_Recipe.Value) { ItemInit.MakeCorruptionRecipe(AlteredSoul_Ingredient1.Value, AlteredSoul_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } } public class MotherOfPearl : ItemBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnTriggerStay <>9__27_1; internal void b__27_1(orig_OnTriggerStay orig, MoneyPickup self, Collider other) { //IL_0021: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && self.alive) { TeamIndex objectTeam = TeamComponent.GetObjectTeam(((Component)other).gameObject); CharacterBody val = default(CharacterBody); MotherOfPearlBehavior motherOfPearlBehavior = default(MotherOfPearlBehavior); if (objectTeam == self.teamFilter.teamIndex && ((Component)other).TryGetComponent(ref val) && ((Component)val).TryGetComponent(ref motherOfPearlBehavior)) { motherOfPearlBehavior.Trigger(); } orig.Invoke(self, other); } } } public static ConfigItem MotherOfPearl_Enabled = new ConfigItem("Void legendary: Mother Of Pearl", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem MotherOfPearl_MissilesLaunched = new ConfigItem("Void legendary: Mother Of Pearl", "Missiles launched", "How many missiles to launch on gold pickup", 3, 1f, 10f, 1f); public static ConfigItem MotherOfPearl_DamageCoeff = new ConfigItem("Void legendary: Mother Of Pearl", "Missile damage", "Missile damage in percentage", 300f, 100f, 1000f, 100f); public static ConfigItem MotherOfPearl_DamageCoeffStack = new ConfigItem("Void legendary: Mother Of Pearl", "Missile damage (per stack)", "Missile damage in percentage, per additional stack", 300f, 100f, 1000f, 100f); public static ConfigItem MotherOfPearl_PickupConvert = new ConfigItem("Void legendary: Mother Of Pearl", "Gold convert chance", "Flat fractional chance for any pickup generated by the holder to convert into a gold chunk", 0.1f, 0f, 1f, 0.01f); public static ConfigItem MotherOfPearl_Recipe = new ConfigItem("Void legendary: Mother Of Pearl", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem MotherOfPearl_Ingredient1 = new ConfigItem("Void legendary: Mother Of Pearl", "Recipe ingredient 1", "First ingredient for corruption recipe", "BarrageOnBoss"); public static ConfigItem MotherOfPearl_Ingredient2 = new ConfigItem("Void legendary: Mother Of Pearl", "Recipe ingredient 2", "Second ingredient for corruption recipe", "MissileVoid"); public override bool Enabled => MotherOfPearl_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/BarrageOnBoss/BarrageOnBoss.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/voidstage/matVoidTerrain.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/BonusGoldPackOnKill/matTomeGold.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/motherOfPearl.png"); public static GameObject moneyPackPrefab => Addressables.LoadAssetAsync((object)"RoR2/Base/BonusGoldPackOnKill/BonusMoneyPack.prefab").WaitForCompletion(); public static GameObject convertEffectPrefab => Addressables.LoadAssetAsync((object)"RoR2/Base/DeathProjectile/DeathProjectileTickEffect.prefab").WaitForCompletion(); public MotherOfPearl(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/motherOfPearl.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), MotherOfPearl_MissilesLaunched.Value, MotherOfPearl_DamageCoeff.Value, MotherOfPearl_DamageCoeffStack.Value, MotherOfPearl_PickupConvert.Value * 100f)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { //IL_003d: 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) orig.Invoke(self); MotherOfPearlBehavior motherOfPearlBehavior2 = ((Component)self).GetComponent(); int itemCountEffective = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)motherOfPearlBehavior2)) { motherOfPearlBehavior2 = self.AddItemBehavior(itemCountEffective); motherOfPearlBehavior2.itemIndex = base.ItemIndex; motherOfPearlBehavior2.missiles = MotherOfPearl_MissilesLaunched.Value; motherOfPearlBehavior2.convertChance = MotherOfPearl_PickupConvert.Value; } if (Object.op_Implicit((Object)(object)motherOfPearlBehavior2)) { ((ItemBehavior)motherOfPearlBehavior2).stack = itemCountEffective; motherOfPearlBehavior2.damageCoeff = (MotherOfPearl_DamageCoeff.Value + MotherOfPearl_DamageCoeffStack.Value * (float)(itemCountEffective - 1)) / 100f; } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)motherOfPearlBehavior2)) { Object.Destroy((Object)(object)((Component)self).GetComponent()); } }; object obj = <>c.<>9__27_1; if (obj == null) { hook_OnTriggerStay val = delegate(orig_OnTriggerStay orig, MoneyPickup self, Collider other) { //IL_0021: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && self.alive) { TeamIndex objectTeam = TeamComponent.GetObjectTeam(((Component)other).gameObject); CharacterBody val2 = default(CharacterBody); MotherOfPearlBehavior motherOfPearlBehavior = default(MotherOfPearlBehavior); if (objectTeam == self.teamFilter.teamIndex && ((Component)other).TryGetComponent(ref val2) && ((Component)val2).TryGetComponent(ref motherOfPearlBehavior)) { motherOfPearlBehavior.Trigger(); } orig.Invoke(self, other); } }; <>c.<>9__27_1 = val; obj = (object)val; } MoneyPickup.OnTriggerStay += (hook_OnTriggerStay)obj; } public override void AddCorruptionRecipe() { if (MotherOfPearl_Recipe.Value) { ItemInit.MakeCorruptionRecipe(MotherOfPearl_Ingredient1.Value, MotherOfPearl_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } } public class MotherOfPearlBehavior : ItemBehavior { public ItemIndex itemIndex; public int missiles = 3; public float damageCoeff = 3f; public float convertRadius = 20f; public float convertChance = 10f; public float missileInterval = 0.1f; public float missileTimer = 0f; public float convertInterval = 0.33f; public float convertTimer = 0f; public int missileQueue = 0; public void Trigger() { missileQueue += missiles; } private void FixedUpdate() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_00de: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown missileTimer += Time.fixedDeltaTime; convertTimer += Time.fixedDeltaTime; if (convertTimer > convertInterval) { Collider[] array = Physics.OverlapSphere(base.body.transform.position, convertRadius); Collider[] array2 = array; foreach (Collider val in array2) { if (!Object.op_Implicit((Object)(object)((Component)val).gameObject)) { continue; } GameObject gameObject = ((Component)val).gameObject; if (!Object.op_Implicit((Object)(object)gameObject.GetComponent()) && (Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren()) || Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren()) || Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren()))) { if (CheckGoldPickupRoll()) { SpawnGoldPickup(gameObject.transform.position); EffectData val2 = new EffectData { origin = gameObject.transform.position }; EffectManager.SpawnEffect(MotherOfPearl.convertEffectPrefab, val2, true); Object.Destroy((Object)(object)gameObject); } else { gameObject.AddComponent(); } } } convertTimer = 0f; } if (missileTimer > missileInterval && missileQueue > 0) { MissileUtils.FireMissile(base.body.corePosition, base.body, default(ProcChainMask), (GameObject)null, damageCoeff * base.body.damage, base.body.RollCrit(), CommonAssets.missilePrefab, (DamageColorIndex)3, true); missileQueue--; missileTimer = 0f; } } public bool CheckGoldPickupRoll() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) float num = 0f; ReadOnlyCollection teamMembers = TeamComponent.GetTeamMembers((TeamIndex)1); foreach (TeamComponent item in teamMembers) { if (Object.op_Implicit((Object)(object)item.body) && Object.op_Implicit((Object)(object)item.body.inventory) && item.body.inventory.GetItemCountEffective(itemIndex) > 0) { num += convertChance * 100f; } } return Util.CheckRoll(num, 0f, (CharacterMaster)null); } public void SpawnGoldPickup(Vector3 position) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(MotherOfPearl.moneyPackPrefab, position, Random.rotation); if (Object.op_Implicit((Object)(object)val)) { Collider component = val.GetComponent(); Physics.IgnoreCollision(component, val.GetComponent()); TeamFilter component2 = val.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.teamIndex = (TeamIndex)1; } MoneyPickup componentInChildren = val.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.baseGoldReward = 25; Physics.IgnoreCollision(component, ((Component)componentInChildren).GetComponent()); } GravitatePickup componentInChildren2 = val.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren2)) { Physics.IgnoreCollision(component, ((Component)componentInChildren2).GetComponent()); } val.transform.localScale = Vector3.one * 1f; NetworkServer.Spawn(val); } } } public class MotherOfPearlBlacklistBehavior : MonoBehaviour { } public class ShimmeringNautilus : ItemBase { public BuffDef NautilusBuff; public static ConfigItem ShimmeringNautilus_Enabled = new ConfigItem("Void legendary: Shimmering Nautilus", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem ShimmeringNautilus_DamageResist = new ConfigItem("Void legendary: Shimmering Nautilus", "Damage resistance", "Resist this fraction of all damage.", 0.1f, 0f, 1f, 0.05f); public static ConfigItem ShimmeringNautilus_RetaliateHits = new ConfigItem("Void legendary: Shimmering Nautilus", "Retaliation hits", "Retaliation damage requires this many hits from the same enemy to trigger.", 5, 1f, 20f, 1f); public static ConfigItem ShimmeringNautilus_RetaliateDamage = new ConfigItem("Void legendary: Shimmering Nautilus", "Retaliation damage", "Base damage percentage of retaliation hits.", 1800f, 100f, 5000f, 100f); public static ConfigItem ShimmeringNautilus_RetaliateDamageStack = new ConfigItem("Void legendary: Shimmering Nautilus", "Retaliation damage (per stack)", "Base damage percentage of retaliation hits, per additional stack.", 1800f, 100f, 2500f, 100f); public static ConfigItem ShimmeringNautilus_RetaliateProcCoefficient = new ConfigItem("Void legendary: Shimmering Nautilus", "Retaliation proc coefficient", "Proc coefficient of the retaliation projectile.", 1f, 0f, 3f, 0.1f); public static ConfigItem ShimmeringNautilus_Recipe = new ConfigItem("Void legendary: Shimmering Nautilus", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem ShimmeringNautilus_Ingredient1 = new ConfigItem("Void legendary: Shimmering Nautilus", "Recipe ingredient 1", "First ingredient for corruption recipe", "ArmorReductionOnHit"); public static ConfigItem ShimmeringNautilus_Ingredient2 = new ConfigItem("Void legendary: Shimmering Nautilus", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ExplodeOnDeathVoid"); public override bool Enabled => ShimmeringNautilus_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/ArmorReductionOnHit/ArmorReductionOnHit.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/EliteVoid/matVoidInfestorMetal.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/shimmeringNautilus.png"); public Material OverlayMaterial => Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkBodyOverlay.mat").WaitForCompletion(); public ShimmeringNautilus(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/shimmeringNautilus.prefab"); Material[] materialArray = (Material[])(object)new Material[1] { material0 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), ShimmeringNautilus_DamageResist.Value * 100f, ShimmeringNautilus_RetaliateHits.Value, ShimmeringNautilus_RetaliateDamage.Value, ShimmeringNautilus_RetaliateDamageStack.Value)); } public override void RegisterHooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown CreateNautilusBuff(); HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = self.body; CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent(ref val) && Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)val.teamComponent) && Object.op_Implicit((Object)(object)body.teamComponent)) { int itemCountEffective = GetItemCountEffective(body); if (itemCountEffective > 0) { damageInfo.damage *= 1f - ShimmeringNautilus_DamageResist.Value; if (val.teamComponent.teamIndex != body.teamComponent.teamIndex) { val.AddBuff(NautilusBuff.buffIndex); } if (val.GetBuffCount(NautilusBuff) >= ShimmeringNautilus_RetaliateHits.Value) { MissileVoidOrb val2 = new MissileVoidOrb(); ((Orb)val2).origin = body.aimOrigin; ((GenericDamageOrb)val2).damageValue = body.damage * (ShimmeringNautilus_RetaliateDamage.Value / 100f) + ShimmeringNautilus_RetaliateDamageStack.Value / 100f * (float)(itemCountEffective - 1); ((GenericDamageOrb)val2).teamIndex = body.teamComponent.teamIndex; ((GenericDamageOrb)val2).attacker = ((Component)body).gameObject; ((GenericDamageOrb)val2).procCoefficient = ShimmeringNautilus_RetaliateProcCoefficient.Value; ((GenericDamageOrb)val2).damageColorIndex = (DamageColorIndex)9; ((GenericDamageOrb)val2).scale = 3f; HurtBox mainHurtBox = val.mainHurtBox; if (Object.op_Implicit((Object)(object)mainHurtBox)) { TemporaryOverlay val3 = ((Component)body).gameObject.AddComponent(); val3.duration = 1f; val3.animateShaderAlpha = true; val3.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val3.destroyComponentOnEnd = true; val3.originalMaterial = OverlayMaterial; val3.AddToCharacerModel(((Component)((Component)body).gameObject.GetComponent().modelTransform).GetComponentInParent()); ((Orb)val2).target = mainHurtBox; OrbManager.instance.AddOrb((Orb)(object)val2); val.ClearAllBuffs(NautilusBuff); } } } } orig.Invoke(self, damageInfo); }; } public override void AddCorruptionRecipe() { if (ShimmeringNautilus_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ShimmeringNautilus_Ingredient1.Value, ShimmeringNautilus_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public void CreateNautilusBuff() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); val.buffColor = new Color(1f, 0.35f, 0.8f); val.canStack = true; val.isDebuff = true; ((Object)val).name = "Shimmering Nautilus stacks"; val.isHidden = false; val.isCooldown = false; val.iconSprite = Main.Assets.LoadAsset("Assets/icons/nautilusBuff.png"); ContentAddition.AddBuffDef(val); NautilusBuff = val; } } public class SkullSprout : ItemBase { public static ConfigItem SkullSprout_Enabled = new ConfigItem("Void legendary: Skullsprout", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem SkullSprout_CollapseChance = new ConfigItem("Void legendary: Skullsprout", "Collapse chance", "Fractional chance to collapse a random enemy within a radius on hit.", 0.05f, 0.05f, 1f, 0.05f); public static ConfigItem SkullSprout_CollapseRadius = new ConfigItem("Void legendary: Skullsprout", "Random collapse radius", "Meters radius where a hit can potentially collapse an enemy.", 40f, 1f, 60f, 1f); public static ConfigItem SkullSprout_CollapseCooldownReduction = new ConfigItem("Void legendary: Skullsprout", "Collapse cooldown reduction", "Collapse reduces your cooldowns by this many seconds on trigger.", 0.4f, 0.1f, 2f, 0.1f); public static ConfigItem SkullSprout_CollapseCooldownReductionStack = new ConfigItem("Void legendary: Skullsprout", "Collapse cooldown reduction (per stack)", "Collapse reduces your cooldowns by this many seconds on trigger, per additional stack.", 0.4f, 0.1f, 2f, 0.1f); public static ConfigItem SkullSprout_Recipe = new ConfigItem("Void legendary: Skullsprout", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem SkullSprout_Ingredient1 = new ConfigItem("Void legendary: Skullsprout", "Recipe ingredient 1", "First ingredient for corruption recipe", "KillEliteFrenzy"); public static ConfigItem SkullSprout_Ingredient2 = new ConfigItem("Void legendary: Skullsprout", "Recipe ingredient 2", "Second ingredient for corruption recipe", "HydraTooth"); public override bool Enabled => SkullSprout_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/KillEliteFrenzy/KillEliteFrenzy.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/Base/artifactworld/matArtifactBloody.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/SlowOnHitVoid/BaubleVoid.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/skullSprout.png"); public SkullSprout(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/skullSprout.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), SkullSprout_CollapseChance.Value * 100f, SkullSprout_CollapseRadius.Value, SkullSprout_CollapseCooldownReduction.Value, SkullSprout_CollapseCooldownReductionStack.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)delegate(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victimObject) { orig.Invoke(self, damageInfo, victimObject); CharacterBody val3 = default(CharacterBody); CharacterBody val4 = default(CharacterBody); if (!((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)19) && !damageInfo.rejected && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent(ref val3) && Object.op_Implicit((Object)(object)val3.master) && victimObject.TryGetComponent(ref val4) && Object.op_Implicit((Object)(object)val4.healthComponent)) { int itemCountEffective2 = GetItemCountEffective(val3); if (itemCountEffective2 > 0 && Object.op_Implicit((Object)(object)val3.teamComponent) && Object.op_Implicit((Object)(object)val4.teamComponent) && Util.CheckRoll(SkullSprout_CollapseChance.Value * 100f * damageInfo.procCoefficient, val3.master.luck, val3.master)) { DotDef dotDef = DotController.GetDotDef((DotIndex)8); DotController.InflictDot(((Component)val4).gameObject, damageInfo.attacker, val4.mainHurtBox, (DotIndex)8, dotDef.interval, 1f, (uint?)null); } } }; HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)damageInfo.attacker) && (int)damageInfo.dotIndex == 8) { CharacterBody component4 = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component4) && Object.op_Implicit((Object)(object)component4.skillLocator)) { int itemCountEffective = GetItemCountEffective(component4); if (itemCountEffective > 0) { component4.skillLocator.DeductCooldownFromAllSkillsServer(SkullSprout_CollapseCooldownReduction.Value + SkullSprout_CollapseCooldownReductionStack.Value * (float)(itemCountEffective - 1)); } } } orig.Invoke(self, damageInfo); }; DotController.InflictDot_refInflictDotInfo += (hook_InflictDot_refInflictDotInfo)delegate(orig_InflictDot_refInflictDotInfo orig, ref InflictDotInfo self) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = self.attackerObject.GetComponent(); CharacterBody component2 = self.victimObject.GetComponent(); CollapseDoNotTransferBehavior component3 = ((Component)component2).gameObject.GetComponent(); if ((int)self.dotIndex == 8 && GetItemCountEffective(component) > 0 && Object.op_Implicit((Object)(object)component.teamComponent) && Object.op_Implicit((Object)(object)component2.teamComponent) && component.teamComponent.teamIndex != component2.teamComponent.teamIndex && !Object.op_Implicit((Object)(object)component3)) { CharacterBody val = null; List list = Physics.OverlapSphere(((Component)self.hitHurtBox).transform.position, SkullSprout_CollapseRadius.Value).ToList(); Util.ShuffleList(list); foreach (Collider item in list) { GameObject gameObject = ((Component)item).gameObject; if (Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren())) { CharacterBody componentInChildren = gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren == (Object)(object)component2) { break; } if (Object.op_Implicit((Object)(object)componentInChildren.healthComponent) && componentInChildren.healthComponent.health > 0f && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != component.teamComponent.teamIndex && (Object)(object)componentInChildren != (Object)(object)component2 && (Object)(object)componentInChildren != (Object)(object)component) { val = componentInChildren; } } } if (Object.op_Implicit((Object)(object)val)) { InflictDotInfo val2 = default(InflictDotInfo); val2.attackerObject = self.attackerObject; val2.damageMultiplier = self.damageMultiplier; val2.dotIndex = self.dotIndex; val2.duration = self.duration; val2.hitHurtBox = val.mainHurtBox; val2.maxStacksFromAttacker = self.maxStacksFromAttacker; val2.totalDamage = self.totalDamage; val2.victimObject = ((Component)val).gameObject; ((Component)val).gameObject.AddComponent(); CollapseInfectOrb.CreateInfectOrb(component2.corePosition, val.mainHurtBox); DotController.InflictDot(ref val2); return; } } if (Object.op_Implicit((Object)(object)component3)) { Object.Destroy((Object)(object)self.victimObject.GetComponent()); } orig.Invoke(ref self); }; } public override void AddCorruptionRecipe() { if (SkullSprout_Recipe.Value) { ItemInit.MakeCorruptionRecipe(SkullSprout_Ingredient1.Value, SkullSprout_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } } public class Xenobacteria : ItemBase { public static ConfigItem Xenobacteria_Enabled = new ConfigItem("Void legendary: Xenobacteria", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem Xenobacteria_AttackSpeedBoost = new ConfigItem("Void legendary: Xenobacteria", "Attack speed increase", "Boost your and your allies' attack speed by this fraction.", 0.3f, 0f, 1f, 0.05f); public static ConfigItem Xenobacteria_AttackSpeedBoostStack = new ConfigItem("Void legendary: Xenobacteria", "Attack speed increase (per stack)", "Boost your and your allies' attack speed by this fraction, per additional stack.", 0.3f, 0f, 1f, 0.05f); public static ConfigItem Xenobacteria_Recipe = new ConfigItem("Void legendary: Xenobacteria", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem Xenobacteria_Ingredient1 = new ConfigItem("Void legendary: Xenobacteria", "Recipe ingredient 1", "First ingredient for corruption recipe", "AlienHead"); public static ConfigItem Xenobacteria_Ingredient2 = new ConfigItem("Void legendary: Xenobacteria", "Recipe ingredient 2", "Second ingredient for corruption recipe", "SlowOnHitVoid"); public override bool Enabled => Xenobacteria_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/Base/AlienHead/AlienHead.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/gauntlets/matGTVoidTerrain.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/PortalVoid/matPortalVoidCenter.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/Common/Void/matNullifierFracturePortalFull.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/ITAssets/matVoidWhale.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/xenobacteria.png"); public Xenobacteria(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/xenobacteria.prefab"); Material[] materialArray = (Material[])(object)new Material[4] { material0, material1, material2, material3 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), Xenobacteria_AttackSpeedBoost.Value * 100f, Xenobacteria_AttackSpeedBoostStack.Value * 100f)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)orig.teamComponent) && (int)orig.teamComponent.teamIndex == 1) { int bacteriasInTeam = GetBacteriasInTeam((TeamIndex)1); if (bacteriasInTeam > 0) { self.attackSpeedMultAdd += Xenobacteria_AttackSpeedBoost.Value + Xenobacteria_AttackSpeedBoostStack.Value * (float)(bacteriasInTeam - 1); } } }; } public override void AddCorruptionRecipe() { if (Xenobacteria_Recipe.Value) { ItemInit.MakeCorruptionRecipe(Xenobacteria_Ingredient1.Value, Xenobacteria_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); return new ItemDisplayRuleDict(Array.Empty()); } public int GetBacteriasInTeam(TeamIndex teamIndex) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) int num = 0; foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(teamIndex)) { if (Object.op_Implicit((Object)(object)teamMember.body)) { num += GetItemCountEffective(teamMember.body); } } return num; } } public class HydraTooth : ItemBase { private GameObject _explodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; public static ConfigItem HydraTooth_Enabled = new ConfigItem("Void uncommon: Tooth Of Hydra", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem HydraTooth_CollapseChance = new ConfigItem("Void uncommon: Tooth Of Hydra", "Collapse chance", "Fractional chance to collapse an enemy on hit.", 0.1f, 0.1f, 1f, 0.05f); public static ConfigItem HydraTooth_CollapseChanceStack = new ConfigItem("Void uncommon: Tooth Of Hydra", "Collapse chance (per stack)", "Fractional chance to collapse an enemy on hit, per additional stack.", 0.1f, 0f, 1f, 0.05f); public static ConfigItem HydraTooth_CollapseExplosionDamageStack = new ConfigItem("Void uncommon: Tooth Of Hydra", "Collapse explosion damage per debuff stack", "Fractional damage dealt by the explosion per stack of collapse consumed", 1f, 0.1f, 4f, 0.1f); public static ConfigItem HydraTooth_CollapseExplosionRadius = new ConfigItem("Void uncommon: Tooth Of Hydra", "Collapse explosion radius", "Meters radius of the collapse explosion", 12f, 0.1f, 24f, 0.1f); public static ConfigItem HydraTooth_CollapseExplosionRadiusStack = new ConfigItem("Void uncommon: Tooth Of Hydra", "Collapse explosion radius (per stack)", "Meters radius of the collapse explosion, per additional stack", 2.4f, 0.1f, 24f, 0.1f); public static ConfigItem HydraTooth_CollapseExplosionProcCoefficient = new ConfigItem("Void uncommon: Tooth Of Hydra", "Collapse explosion proc coefficient", "Proc coefficient of the collapse explosion", 0.1f, 0f, 1f, 0.01f); public static ConfigItem HydraTooth_CollapseExplosionStunDuration = new ConfigItem("Void uncommon: Tooth Of Hydra", "Collapse explosion stun duration", "Duration of the collapse explosion's stun in seconds", 1f, 0f, 4f, 0.01f); public static ConfigItem HydraTooth_Recipe = new ConfigItem("Void uncommon: Tooth Of Hydra", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem HydraTooth_Ingredient1 = new ConfigItem("Void uncommon: Tooth Of Hydra", "Recipe ingredient 1", "First ingredient for corruption recipe", "TriggerEnemyDebuffs"); public static ConfigItem HydraTooth_Ingredient2 = new ConfigItem("Void uncommon: Tooth Of Hydra", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BleedOnHitVoid"); public override bool Enabled => HydraTooth_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/TriggerEnemyDebuffs/TriggerEnemyDebuffs.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/TreasureCacheVoid/matKeyVoid.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/artifactworld/matArtifactBloody.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/hydraTooth.png"); public BuffDef DebuffDef => Addressables.LoadAssetAsync((object)"RoR2/DLC1/BleedOnHitVoid/bdFracture.asset").WaitForCompletion(); public GameObject explodePrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explodePrefab == (Object)null) { _explodePrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombExplosion.prefab").WaitForCompletion(); } return _explodePrefab; } [CompilerGenerated] set { k__BackingField = value; } } public HydraTooth(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/hydraTooth.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), HydraTooth_CollapseChance.Value * 100f, HydraTooth_CollapseChanceStack.Value * 100f, HydraTooth_CollapseExplosionDamageStack.Value * 100f, HydraTooth_CollapseExplosionRadius.Value, HydraTooth_CollapseExplosionRadiusStack.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)delegate(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victimObject) { CharacterBody val6 = default(CharacterBody); CharacterBody val7 = default(CharacterBody); if (!((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)19) && !damageInfo.rejected && damageInfo.damage > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent(ref val6) && Object.op_Implicit((Object)(object)val6.master) && victimObject.TryGetComponent(ref val7) && Object.op_Implicit((Object)(object)val7.healthComponent)) { int itemCountEffective = GetItemCountEffective(val6); if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)val6.teamComponent) && Object.op_Implicit((Object)(object)val7.teamComponent) && Util.CheckRoll((HydraTooth_CollapseChance.Value + HydraTooth_CollapseChanceStack.Value * (float)(itemCountEffective - 1)) * 100f * damageInfo.procCoefficient, val6.master.luck, val6.master)) { DotDef dotDef = DotController.GetDotDef((DotIndex)8); DotController.InflictDot(victimObject, damageInfo.attacker, damageInfo.inflictedHurtbox, (DotIndex)8, dotDef.interval, 1f, (uint?)null); } } orig.Invoke(self, damageInfo, victimObject); }; HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_0145: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) if ((int)damageInfo.dotIndex == 8 && !damageInfo.rejected && damageInfo.damage > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && GetItemCountEffective(component) > 0) { float baseDamage = HydraTooth_CollapseExplosionDamageStack.Value / 4f * damageInfo.damage; float num = HydraTooth_CollapseExplosionRadius.Value + HydraTooth_CollapseExplosionRadiusStack.Value * (float)(GetItemCountEffective(component) - 1); ProcChainMask procChainMask = default(ProcChainMask); ((ProcChainMask)(ref procChainMask)).AddProc((ProcType)19); BlastAttack val = new BlastAttack { position = damageInfo.position, baseDamage = baseDamage, baseForce = 0f, radius = num, attacker = damageInfo.attacker, inflictor = null, teamIndex = TeamComponent.GetObjectTeam(damageInfo.attacker), crit = component.RollCrit(), procChainMask = procChainMask, procCoefficient = HydraTooth_CollapseExplosionProcCoefficient.Value, damageColorIndex = (DamageColorIndex)9, falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)131072), attackerFiltering = (AttackerFiltering)2 }; Result val2 = val.Fire(); HitPoint[] hitPoints = val2.hitPoints; SetStateOnHurt val4 = default(SetStateOnHurt); foreach (HitPoint val3 in hitPoints) { if (Object.op_Implicit((Object)(object)val3.hurtBox) && Object.op_Implicit((Object)(object)val3.hurtBox.healthComponent) && Object.op_Implicit((Object)(object)val3.hurtBox.healthComponent.body) && ((Component)val3.hurtBox.healthComponent).gameObject.TryGetComponent(ref val4)) { float num2 = (float)Math.Pow(num, 2.0); float num3 = val3.distanceSqr / num2; if (num3 < 1f) { val4.SetStun(HydraTooth_CollapseExplosionStunDuration.Value); } } } float num4 = num / HydraTooth_CollapseExplosionRadius.Value; EffectData val5 = new EffectData { origin = damageInfo.position, scale = num4 * 8f }; EffectManager.SpawnEffect(explodePrefab, val5, true); } } orig.Invoke(self, damageInfo); }; } public override void AddCorruptionRecipe() { if (HydraTooth_Recipe.Value) { ItemInit.MakeCorruptionRecipe(HydraTooth_Ingredient1.Value, HydraTooth_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0043: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_016a: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076b: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09f5: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a10: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) GameObject followerPrefab = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(0.19615f, 0.41993f, -0.07579f), localAngles = new Vector3(18.38553f, 30.75567f, 309.8916f), localScale = new Vector3(0.30668f, 0.30668f, 0.30668f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(0.01384f, 0.08245f, 0.13035f), localAngles = new Vector3(311.4166f, 265.4389f, 245.1299f), localScale = new Vector3(0.20255f, 0.20255f, 0.20255f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Hat", localPos = new Vector3(-0.00727f, 0.08001f, 0.12739f), localAngles = new Vector3(7.18305f, 44.60707f, 336.7971f), localScale = new Vector3(0.20509f, 0.20509f, 0.20509f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(1.80855f, 2.41185f, -0.13005f), localAngles = new Vector3(17.98998f, 45.18383f, 346.3629f), localScale = new Vector3(2.52552f, 2.52552f, 2.52552f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "FootL", localPos = new Vector3(-0.01151f, 0.20096f, -0.12813f), localAngles = new Vector3(312.9743f, 65.56718f, 270.9045f), localScale = new Vector3(0.20587f, 0.20587f, 0.20587f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.26691f, 0.07741f, 0.04157f), localAngles = new Vector3(20.5455f, 22.258f, 91.12227f), localScale = new Vector3(0.1939f, 0.1939f, 145f / (276f * MathF.E)) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "SwordBase", localPos = new Vector3(-0.01956f, 0.34844f, -0.003f), localAngles = new Vector3(12.06424f, 41.59543f, 338.6489f), localScale = new Vector3(0.39487f, 0.39487f, 0.39487f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Base", localPos = new Vector3(0.15767f, 0.87197f, -1.45617f), localAngles = new Vector3(321.9741f, 74.32614f, 256.6255f), localScale = new Vector3(0.52041f, 0.52041f, 0.52041f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(-0.01763f, 0.29012f, 0.06423f), localAngles = new Vector3(9.31793f, 39.21895f, 338.5111f), localScale = new Vector3(0.26194f, 0.26194f, 0.26194f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "MouthMuzzle", localPos = new Vector3(-0.52581f, 2.6205f, 3.95378f), localAngles = new Vector3(17.13763f, 41.48186f, 342.577f), localScale = new Vector3(2.38907f, 2.38907f, 2.38907f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(-0.02084f, 0.33586f, 0.0584f), localAngles = new Vector3(6.14586f, 37.77752f, 335.9771f), localScale = new Vector3(0.25304f, 0.25304f, 0.25304f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "ToeR", localPos = new Vector3(-0.08888f, 0.17111f, 0.01675f), localAngles = new Vector3(314.7864f, 169.9855f, 253.5239f), localScale = new Vector3(0.29485f, 0.29485f, 0.29485f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(0.1682f, 0.17862f, 0.13788f), localAngles = new Vector3(319.7149f, 316.2584f, 119.7615f), localScale = new Vector3(0.24985f, 0.24985f, 0.24985f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pack", localPos = new Vector3(0.107f, -0.08567f, -0.34887f), localAngles = new Vector3(49.90333f, 291.6018f, 4.64734f), localScale = new Vector3(0.27392f, 0.27392f, 0.27392f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(-0.45698f, 0.16417f, -0.38749f), localAngles = new Vector3(281.3585f, 102.0705f, 281.1522f), localScale = new Vector3(0.61926f, 0.61926f, 0.61926f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Cleaver", localPos = new Vector3(-0.16585f, 0.42729f, -0.01543f), localAngles = new Vector3(26.70289f, 325.1594f, 348.7908f), localScale = new Vector3(0.76697f, 0.76697f, 0.76697f) } }); val.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "ClawRightTip", localPos = new Vector3(0.07737f, 0.1517f, 0.02069f), localAngles = new Vector3(30.80137f, 138.6705f, 359.241f), localScale = new Vector3(0.47248f, 0.47248f, 0.47248f) } }); val.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(-0.212f, -0.11479f, -0.30873f), localAngles = new Vector3(302.9277f, 131.4791f, 242.4093f), localScale = new Vector3(0.32932f, 0.32932f, 0.32932f) } }); return val; } public int GetToothsInTeam(TeamIndex teamIndex) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) int num = 0; foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(teamIndex)) { if (Object.op_Implicit((Object)(object)teamMember.body)) { num += GetItemCountEffective(teamMember.body); } } return num; } } public class CollapseDoNotTransferBehavior : MonoBehaviour { } public class PaleStar : ItemBase { public GameObject potentialPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/OptionPickup/OptionPickup.prefab").WaitForCompletion(); public GameObject chestKillPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/TreasureCacheVoid/VoidCacheOpenExplosion.prefab").WaitForCompletion(); private ItemDef _consumedItemDef; public static ConfigItem PaleStar_Enabled = new ConfigItem("Void uncommon: Pale Star", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem PaleStar_Choices = new ConfigItem("Void uncommon: Pale Star", "Void potential choices", "Amount of choices offered by Pale Star's void potential.", 2, 1f, 6f, 1f); public static ConfigItem PaleStar_ChoicesStack = new ConfigItem("Void uncommon: Pale Star", "Void potential choices (per stack)", "Amount of choices offered by Pale Star's void potential, per additional stack.", 1, 1f, 3f, 1f); public static ConfigItem PaleStar_Recipe = new ConfigItem("Void uncommon: Pale Star", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem PaleStar_Ingredient1 = new ConfigItem("Void uncommon: Pale Star", "Recipe ingredient 1", "First ingredient for corruption recipe", "LowerPricedChests"); public static ConfigItem PaleStar_Ingredient2 = new ConfigItem("Void uncommon: Pale Star", "Recipe ingredient 2", "Second ingredient for corruption recipe", "TreasureCacheVoid"); public override bool Enabled => PaleStar_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/LowerPricedChests/LowerPricedChests.asset").WaitForCompletion(); public ItemDef ConversionItemDefConsumed => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/LowerPricedChests/LowerPricedChestsConsumed.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/TreasureCacheVoid/matKeyVoid.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/voidstage/matVoidCoral.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/paleStar.png"); public ItemDef ConsumedItemDef { get { //IL_001a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)_consumedItemDef)) { _consumedItemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("PaleStarConsumed")); } return _consumedItemDef; } } public PaleStar(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/paleStar.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), PaleStar_Choices.Value, PaleStar_ChoicesStack.Value)); } public override void RegisterHooks() { //IL_0003: 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_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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown Pair val = default(Pair); val.itemDef1 = ConversionItemDefConsumed; val.itemDef2 = ItemDef; Pair item = val; Main.ItemConversionList.Add(item); Log.Info($"Added void conversion from {((Object)ConversionItemDefConsumed).name} to {((Object)ItemDef).name}"); GlobalEventManager.OnInteractionBegin += (hook_OnInteractionBegin)delegate(orig_OnInteractionBegin orig, GlobalEventManager self, Interactor interactor, IInteractable interactable, GameObject interactableObject) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Invalid comparison between Unknown and I4 //IL_00d8: 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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Invalid comparison between Unknown and I4 //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Expected O, but got Unknown //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected I4, but got Unknown //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) ChestBehavior component = interactableObject.GetComponent(); CharacterBody component2 = ((Component)interactor).GetComponent(); PurchaseInteraction component3 = interactableObject.GetComponent(); if (((Object)interactableObject).name.ToLower().Contains("voidchest") && Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.inventory) && Object.op_Implicit((Object)(object)component2.master)) { int itemCountPermanent = component2.inventory.GetItemCountPermanent(ConsumedItemDef); int num = component2.inventory.GetItemCountEffective(ConsumedItemDef) - itemCountPermanent; if (num > 0) { component2.inventory.RemoveItemTemp(ConsumedItemDef.itemIndex, (float)num); component2.inventory.GiveItemTemp(base.ItemIndex, (float)num); } if (itemCountPermanent > 0) { component2.inventory.RemoveItemPermanent(ConsumedItemDef.itemIndex, itemCountPermanent); component2.inventory.GiveItemPermanent(base.ItemIndex, itemCountPermanent); CharacterMasterNotificationQueue.SendTransformNotification(component2.master, ConsumedItemDef.itemIndex, base.ItemIndex, (TransformationType)0); } } if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component3) && (int)component3.costType == 1 && component3.saleStarCompatible && !((Object)interactableObject).name.ToLower().Contains("equip") && Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.master) && GetItemCountEffective(component2) > 0) { int itemCountEffective = GetItemCountEffective(component2); List list = new List(); List list2 = new List(); PickupDef val2 = null; List list3 = new List(); component.dropTable.GenerateDistinctPickups(list3, PaleStar_Choices.Value + PaleStar_ChoicesStack.Value * (itemCountEffective - 1), component.rng, true); int num2 = 0; List list4 = Run.instance.availableVoidTier1DropList.ToList(); Util.ShuffleList(list4); List list5 = Run.instance.availableVoidTier2DropList.ToList(); Util.ShuffleList(list5); List list6 = Run.instance.availableVoidTier3DropList.ToList(); Util.ShuffleList(list6); foreach (UniquePickup item2 in list3) { PickupDef pickupDef = PickupCatalog.GetPickupDef(item2.pickupIndex); if (pickupDef != null && (int)pickupDef.itemIndex != -1 && Object.op_Implicit((Object)(object)ItemCatalog.GetItemDef(pickupDef.itemIndex))) { ItemDef itemDef = ItemCatalog.GetItemDef(PickupCatalog.GetPickupDef(item2.pickupIndex).itemIndex); if (!itemDef.tags.Contains((ItemTag)9)) { ItemTier tier = itemDef.tier; ItemTier val3 = tier; PickupIndex val4; switch ((int)val3) { case 1: if (list5.Count > 0) { val4 = list5.First(); val2 = ((PickupIndex)(ref val4)).pickupDef; list5.RemoveAt(0); } break; case 2: if (list6.Count > 0) { val4 = list6.First(); val2 = ((PickupIndex)(ref val4)).pickupDef; list6.RemoveAt(0); } break; default: if (list4.Count > 0) { val4 = list4.First(); val2 = ((PickupIndex)(ref val4)).pickupDef; list4.RemoveAt(0); } break; } if (val2 != null && !list.Contains(val2.pickupIndex)) { list.Add(val2.pickupIndex); list2.Add(new UniquePickup(val2.pickupIndex)); num2++; } } } } if (num2 != 0) { CreatePickupInfo val5 = default(CreatePickupInfo); val5.pickerOptions = PickupPickerController.GenerateOptionsFromList>(list2); val5.prefabOverride = potentialPrefab; val5.position = component.dropTransform.position; val5.rotation = Quaternion.identity; ((CreatePickupInfo)(ref val5)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)6); PickupDropletController.CreatePickupDroplet(val5, component.dropTransform.position, Vector3.up * component.dropUpVelocityStrength + component.dropTransform.forward * component.dropForwardVelocityStrength); EffectData val6 = new EffectData { origin = ((Component)component).transform.position }; EffectManager.SpawnEffect(chestKillPrefab, val6, false); int itemCountPermanent2 = component2.inventory.GetItemCountPermanent(ItemDef); int num3 = component2.inventory.GetItemCountEffective(ItemDef) - itemCountPermanent2; if (num3 > 0) { component2.inventory.RemoveItemTemp(base.ItemIndex, (float)num3); component2.inventory.GiveItemTemp(ConsumedItemDef.itemIndex, (float)num3); } if (itemCountPermanent2 > 0) { component2.inventory.RemoveItemPermanent(base.ItemIndex, itemCountPermanent2); component2.inventory.GiveItemPermanent(ConsumedItemDef.itemIndex, itemCountPermanent2); CharacterMasterNotificationQueue.SendTransformNotification(component2.master, base.ItemIndex, ConsumedItemDef.itemIndex, (TransformationType)0); } Object.Destroy((Object)(object)interactableObject); } } else { orig.Invoke(self, interactor, interactable, interactableObject); } }; } public override void AddCorruptionRecipe() { if (PaleStar_Recipe.Value) { ItemInit.MakeCorruptionRecipe(PaleStar_Ingredient1.Value, PaleStar_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0043: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_016a: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076b: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09f5: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a10: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) GameObject followerPrefab = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(0.17404f, 0.26902f, 0.03915f), localAngles = new Vector3(1.20415f, 309.7686f, 290.1716f), localScale = new Vector3(0.51108f, 0.51108f, 0.51108f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(0.18408f, 0.25715f, -0.0513f), localAngles = new Vector3(66.9883f, 208.4114f, 214.8888f), localScale = new Vector3(0.29811f, 0.29811f, 0.29811f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.02566f, 0.0074f, -0.20749f), localAngles = new Vector3(326.4415f, 4.59984f, 341.5688f), localScale = new Vector3(0.34146f, 0.34146f, 0.34146f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Hat", localPos = new Vector3(0.70959f, 0.7673f, 0.28225f), localAngles = new Vector3(347.1987f, 85.8254f, 20.75347f), localScale = new Vector3(2.02981f, 2.02981f, 2.02981f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(-0.01818f, 0.17803f, 0.30661f), localAngles = new Vector3(44.39985f, 160.2284f, 155.3203f), localScale = new Vector3(0.56736f, 0.56736f, 0.56736f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "UpperArmR", localPos = new Vector3(-0.05549f, 0.0329f, 0.01952f), localAngles = new Vector3(318.2411f, 100.5932f, 341.4568f), localScale = new Vector3(0.31869f, 0.31869f, 0.31869f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.02161f, -0.00597f, -0.04957f), localAngles = new Vector3(319.1647f, 18.44227f, 179.1725f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "PlatformBase", localPos = new Vector3(0.63372f, -4E-05f, 0.27016f), localAngles = new Vector3(24.30042f, 289.0943f, 248.6985f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.20687f, 0.15865f, 0.16166f), localAngles = new Vector3(32.38534f, 238.2729f, 177.4259f), localScale = new Vector3(0.45012f, 0.45012f, 0.45012f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "UpperArmR", localPos = new Vector3(1.56359f, 1.15676f, 0.54787f), localAngles = new Vector3(7.43413f, 294.1498f, 277.8724f), localScale = new Vector3(3.24229f, 3.24229f, 3.24229f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(-0.00948f, 0.05919f, 0.15681f), localAngles = new Vector3(44.78082f, 160.5153f, 153.2166f), localScale = new Vector3(0.31272f, 0.31272f, 0.31272f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Backpack", localPos = new Vector3(-0.0623f, -0.46175f, 0.03516f), localAngles = new Vector3(316.1055f, 180f, 180f), localScale = new Vector3(0.47221f, 0.47961f, 0.47961f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(1E-05f, 0.00628f, -0.20681f), localAngles = new Vector3(291.1954f, 0f, 0f), localScale = new Vector3(0.45525f, 0.45525f, 0.45525f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(0f, 0.10965f, 0.11324f), localAngles = new Vector3(73.06095f, 180f, 180f), localScale = new Vector3(0.37883f, 0.37883f, 0.37883f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "UpperArmL", localPos = new Vector3(-0.16756f, 0.25657f, -0.05397f), localAngles = new Vector3(330.8152f, 28.66801f, 42.45759f), localScale = new Vector3(0.49949f, 0.49949f, 0.49949f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Wheel", localPos = new Vector3(-0.24158f, 0.02272f, 0.3118f), localAngles = new Vector3(45.58923f, 180f, 190.3184f), localScale = new Vector3(0.61356f, 0.61356f, 0.61356f) } }); val.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "ClawSpin", localPos = new Vector3(-0.04933f, -0.03878f, -0.02688f), localAngles = new Vector3(304.7343f, 0f, 0f), localScale = new Vector3(0.85638f, 0.85638f, 0.85638f) } }); val.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(-0.10592f, 0.24429f, 0.00351f), localAngles = new Vector3(44.00243f, 0f, 0f), localScale = new Vector3(0.40039f, 0.40039f, 0.40039f) } }); return val; } } public class PaleStarConsumed : ItemBase { public override bool Enabled => PaleStar.PaleStar_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/LowerPricedChests/LowerPricedChests.asset").WaitForCompletion(); public ItemDef ConversionItemDefConsumed => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/LowerPricedChests/LowerPricedChestsConsumed.asset").WaitForCompletion(); public override GameObject itemPrefab => null; public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/paleStarConsumed.png"); public PaleStarConsumed(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = true, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public override void FormatDescriptionTokens() { } public override void RegisterHooks() { //IL_0003: 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_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) Pair val = default(Pair); val.itemDef1 = ConversionItemDefConsumed; val.itemDef2 = ItemDef; Pair item = val; Main.ItemConversionList.Add(item); Log.Info($"Added void conversion from {((Object)ConversionItemDefConsumed).name} to {((Object)ItemDef).name}"); } public override void AddCorruptionRecipe() { } public override ItemDisplayRuleDict AddItemDisplays() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } } public class ViscousPot : ItemBase { public class ViscousPotOrb : SquidOrb { public override void OnArrival() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_00a8: 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) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Orb)this).target)) { CharacterBody component = ((GenericDamageOrb)this).attacker.GetComponent(); if (Object.op_Implicit((Object)(object)((Orb)this).target.healthComponent) && Object.op_Implicit((Object)(object)component.healthComponent) && Object.op_Implicit((Object)(object)component.teamComponent) && ((Orb)this).target.teamIndex != component.teamComponent.teamIndex) { DamageInfo val = new DamageInfo(); val.damage = component.damage * ViscousPot_OrbDamagev2.Value; val.attacker = ((GenericDamageOrb)this).attacker; val.inflictor = null; val.force = Vector3.zero; val.crit = false; val.procChainMask = ((GenericDamageOrb)this).procChainMask; val.procCoefficient = ViscousPot_OrbProcCoefficient.Value; val.position = ((Component)((Orb)this).target).transform.position; val.damageColorIndex = (DamageColorIndex)9; val.damageType = ((GenericDamageOrb)this).damageType; val.inflictedHurtbox = ((Orb)this).target; ((Orb)this).target.healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)((Orb)this).target.healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)((Orb)this).target.healthComponent).gameObject); component.healthComponent.AddBarrier(ViscousPot_BarrierAddFlatv2.Value); } } } } private GameObject _gooExplodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject k__BackingField; public static ConfigItem ViscousPot_Enabled = new ConfigItem("Void uncommon: Viscous Pot", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem ViscousPot_DecayReduction = new ConfigItem("Void uncommon: Viscous Pot", "Barrier decay reduction", "Fraction for barrier decay reduction.", 0.2f, 0f, 1f, 0.05f); public static ConfigItem ViscousPot_BarrierAddFlatv2 = new ConfigItem("Void uncommon: Viscous Pot", "Barrier on hit", "Flat amount of barrier added when a viscous orb hits an enemy.", 15f, 0f, 50f, 1f); public static ConfigItem ViscousPot_OrbAmountv2 = new ConfigItem("Void uncommon: Viscous Pot", "Viscous orb amount", "Amount of orbs launched per secondary skill.", 3, 1f, 6f, 1f); public static ConfigItem ViscousPot_OrbAmountStackv2 = new ConfigItem("Void uncommon: Viscous Pot", "Viscous orb amount (per stack)", "Amount of orbs launched per secondary skill, per additional stack.", 1, 1f, 6f, 1f); public static ConfigItem ViscousPot_OrbRadiusv2 = new ConfigItem("Void uncommon: Viscous Pot", "Viscous orb radius", "Meters radius where enemies can be targeted by orbs.", 20f, 1f, 60f, 1f); public static ConfigItem ViscousPot_OrbRadiusStackv2 = new ConfigItem("Void uncommon: Viscous Pot", "Viscous orb radius (per stack)", "Meters radius where enemies can be targeted by orbs, per additional stack.", 8f, 1f, 60f, 1f); public static ConfigItem ViscousPot_OrbDamagev2 = new ConfigItem("Void uncommon: Viscous Pot", "Viscous orb damage", "Fractional damage from viscous orbs.", 2f, 0f, 6f, 0.1f); public static ConfigItem ViscousPot_OrbProcCoefficient = new ConfigItem("Void uncommon: Viscous Pot", "Viscous orb proc coefficient", "Proc coefficient of viscous orbs.", 0.2f, 0f, 1f, 0.05f); public static ConfigItem ViscousPot_Recipe = new ConfigItem("Void uncommon: Viscous Pot", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true); public static ConfigItem ViscousPot_Ingredient1 = new ConfigItem("Void uncommon: Viscous Pot", "Recipe ingredient 1", "First ingredient for corruption recipe", "IncreasePrimaryDamage"); public static ConfigItem ViscousPot_Ingredient2 = new ConfigItem("Void uncommon: Viscous Pot", "Recipe ingredient 2", "Second ingredient for corruption recipe", "Wellies"); public override bool Enabled => ViscousPot_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/IncreasePrimaryDamage/IncreasePrimaryDamage.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public Material material0 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/EliteVoid/matVoidInfestorMetal.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync((object)"RoR2/Base/Clay/matClayBubble.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync((object)"RoR2/DLC1/voidstage/matVoidAsteroid.mat").WaitForCompletion(); public override Sprite itemIcon => Main.Assets.LoadAsset("Assets/icons/viscousPot.png"); public GameObject gooExplodePrefab { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_gooExplodePrefab == (Object)null) { _gooExplodePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/goolake/ClayGooOrbImpact.prefab").WaitForCompletion(); } return _gooExplodePrefab; } [CompilerGenerated] set { k__BackingField = value; } } public ViscousPot(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false) : base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden) { }//IL_0003: Unknown result type (might be due to invalid IL or missing references) public GameObject OverwritePrefabMaterials() { GameObject val = Main.Assets.LoadAsset("Assets/prefabs/viscousPot.prefab"); Material[] materialArray = (Material[])(object)new Material[3] { material0, material1, material2 }; ((Renderer)val.GetComponentInChildren()).SetMaterialArray(materialArray); return val; } public override void FormatDescriptionTokens() { string descriptionToken = ItemDef.descriptionToken; LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), ViscousPot_DecayReduction.Value * 100f, ViscousPot_OrbAmountv2.Value, ViscousPot_OrbAmountStackv2.Value, ViscousPot_OrbRadiusv2.Value, ViscousPot_OrbRadiusStackv2.Value, ViscousPot_OrbDamagev2.Value * 100f, ViscousPot_BarrierAddFlatv2.Value)); } public override void RegisterHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self) { int itemCountEffective2 = GetItemCountEffective(orig); if (itemCountEffective2 > 0) { self.barrierDecayMult *= 1f - ViscousPot_DecayReduction.Value; } }; CharacterBody.OnSkillActivated += (hook_OnSkillActivated)delegate(orig_OnSkillActivated orig, CharacterBody self, GenericSkill genericSkill) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, genericSkill); if (GetItemCountEffective(self) > 0 && Object.op_Implicit((Object)(object)self.healthComponent)) { int itemCountEffective = GetItemCountEffective(self); if (self.bodyIndex == SpecialCases.RailGunner()) { if (self.skillLocator.primary == genericSkill && self.canAddIncrasePrimaryDamage) { FireOrbs(self, itemCountEffective); } } else if ((genericSkill.skillDef.autoHandleLuminousShot || self.canAddIncrasePrimaryDamage) && self.skillLocator.secondary == genericSkill) { FireOrbs(self, itemCountEffective); } } }; } public override void AddCorruptionRecipe() { if (ViscousPot_Recipe.Value) { ItemInit.MakeCorruptionRecipe(ViscousPot_Ingredient1.Value, ViscousPot_Ingredient2.Value, ((Object)ItemDef).name); } } public override ItemDisplayRuleDict AddItemDisplays() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0043: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_016a: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076b: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09f5: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a10: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) GameObject followerPrefab = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false)); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.23243f, -0.01495f, 0.10609f), localAngles = new Vector3(0f, 0f, 181.5702f), localScale = new Vector3(0.73856f, 0.73856f, 0.73856f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "FootR", localPos = new Vector3(0f, 0.09763f, -0.07923f), localAngles = new Vector3(274.1588f, 1E-05f, 2.5506f), localScale = new Vector3(1.30692f, 1.30692f, 1.30692f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.24255f, -0.00993f, -0.03103f), localAngles = new Vector3(0f, 0f, 177.32f), localScale = new Vector3(0.76163f, 0.76163f, 0.76163f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(0f, 1.86914f, 0.01515f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(6.73994f, 6.73994f, 6.73994f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(-0.30395f, 0.13843f, -0.00856f), localAngles = new Vector3(0.82139f, 180f, 180f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "FootL", localPos = new Vector3(0.00051f, 0.05496f, 0.03331f), localAngles = new Vector3(315.4312f, 146.2849f, 210.6754f), localScale = new Vector3(1.08864f, 1.08864f, 1.08864f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(0f, 0.1795f, -1E-05f), localAngles = new Vector3(0f, 0f, 180f), localScale = new Vector3(1.67378f, 1.67378f, 1.67378f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "PlatformBase", localPos = new Vector3(-0.76272f, -0.08788f, -0.30847f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(1.65139f, 1.65139f, 1.65139f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Chest", localPos = new Vector3(0f, 0.13543f, 0.29333f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(1.10422f, 1.10422f, 1.10422f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "FootR", localPos = new Vector3(1E-05f, 0.50056f, -1.04024f), localAngles = new Vector3(348.8859f, 180f, 180f), localScale = new Vector3(11.03721f, 11.03721f, 14.89955f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.29921f, -0.10334f, -0.19508f), localAngles = new Vector3(0f, 0f, 180.8385f), localScale = new Vector3(1.1213f, 1.1213f, 1.1213f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "GunRoot", localPos = new Vector3(0f, -0.56949f, -0.12557f), localAngles = new Vector3(359.8944f, 180f, 180f), localScale = new Vector3(0.63613f, 0.63613f, 0.63613f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.0038f, 0.07978f, 0f), localAngles = new Vector3(0f, 0f, 180.4983f), localScale = new Vector3(1.52951f, 1.52951f, 1.52951f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pack", localPos = new Vector3(-0.31313f, 0.21783f, -0.22959f), localAngles = new Vector3(0f, 0f, 47.0003f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "HandR", localPos = new Vector3(-1E-05f, 0.29194f, -0.04805f), localAngles = new Vector3(3.72109f, 180f, 180f), localScale = new Vector3(1.63274f, 1.63274f, 1.63274f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Pelvis", localPos = new Vector3(0.09855f, 0.29608f, 0.00934f), localAngles = new Vector3(0f, 0f, 98.57596f), localScale = new Vector3(1.57669f, 1.57669f, 1.57669f) } }); val.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "Head", localPos = new Vector3(-0.36535f, -0.02339f, 0f), localAngles = new Vector3(0f, 0f, 271.7016f), localScale = new Vector3(1.11821f, 1.11821f, 1.11821f) } }); val.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = followerPrefab, childName = "BagPocketL", localPos = new Vector3(-0.22659f, -0.02006f, 0.0012f), localAngles = new Vector3(86.2076f, 25.61749f, 25.6665f), localScale = new Vector3(1.24465f, 1.24465f, 1.24465f) } }); return val; } public void FireOrbs(CharacterBody body, int itemCount) { //IL_0002: 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) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown List list = Physics.OverlapSphere(body.corePosition, ViscousPot_OrbRadiusv2.Value + ViscousPot_OrbRadiusStackv2.Value * (float)(itemCount - 1)).ToList(); Util.ShuffleList(list); int num = ViscousPot_OrbAmountv2.Value + ViscousPot_OrbAmountStackv2.Value * (itemCount - 1); bool flag = false; foreach (Collider item in list) { if (num <= 0) { break; } GameObject gameObject = ((Component)item).gameObject; if (!Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren())) { continue; } CharacterBody componentInChildren = gameObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren.healthComponent) && componentInChildren.healthComponent.health > 0f && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != body.teamComponent.teamIndex) { if (!flag) { EffectData val = new EffectData { origin = body.corePosition }; EffectManager.SpawnEffect(gooExplodePrefab, val, true); flag = true; } ViscousPotOrb viscousPotOrb = new ViscousPotOrb(); ((GenericDamageOrb)viscousPotOrb).attacker = ((Component)body).gameObject; ((Orb)viscousPotOrb).target = componentInChildren.mainHurtBox; ((GenericDamageOrb)viscousPotOrb).teamIndex = body.teamComponent.teamIndex; ((Orb)viscousPotOrb).origin = body.corePosition; OrbManager.instance.AddOrb((Orb)(object)viscousPotOrb); num--; } } } } } namespace Nautilus.Interactables { public abstract class InteractableBase { public InteractableBase() { InteractableInit.InteractableList.Add(this); } public abstract void Init(); } public static class InteractableInit { public static List InteractableList = new List(); public static ShrineOfTheDeep shrineOfTheDeep = new ShrineOfTheDeep(); public static void Init() { foreach (InteractableBase interactable in InteractableList) { interactable.Init(); } } } public class ShrineOfTheDeep : InteractableBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_DropRewards <>9__20_0; public static hook_FireBossHunter <>9__20_1; public static hook_SetEquipmentIndexForSlot_EquipmentIndex_uint_uint <>9__20_2; internal void b__20_0(orig_DropRewards orig, BossGroup self) { if ((self.bossDrops != null || self.bossDropTables != null) && (Object)(object)TeleporterInteraction.instance != (Object)null && !self.forceTier3Reward) { if (Object.op_Implicit((Object)(object)((Component)TeleporterInteraction.instance).GetComponent())) { self.bossDrops = ConvertBossDrops(self.bossDrops); self.bossDropTables = ConvertBossDropTables(self.bossDropTables, self.rng); self.bonusRewardCount += 1; self.bossDropChance = 0.2f; } else if (Object.op_Implicit((Object)(object)((Component)TeleporterInteraction.instance).GetComponent())) { self.bossDrops = ConvertBossDrops(self.bossDrops); self.bossDropTables = ConvertBossDropTables(self.bossDropTables, self.rng); } } orig.Invoke(self); } internal bool b__20_1(orig_FireBossHunter orig, EquipmentSlot self) { HurtBox hurtBox = self.currentTarget.hurtBox; CharacterBody val = hurtBox?.healthComponent?.body; object obj; if (hurtBox == null) { obj = null; } else { HealthComponent healthComponent = hurtBox.healthComponent; if (healthComponent == null) { obj = null; } else { CharacterBody body = healthComponent.body; if (body == null) { obj = null; } else { GameObject gameObject = ((Component)body).gameObject; obj = ((gameObject != null) ? gameObject.GetComponent() : null); } } } DeathRewards val2 = (DeathRewards)obj; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val2) && (Object)(object)val2.bossDropTable != (Object)null && val.HasBuff(Buffs.EliteVoid)) { val2.bossDropTable = ConvertBossDropTables(new List { val2.bossDropTable }, self.rng).First(); } return orig.Invoke(self); } internal void b__20_2(orig_SetEquipmentIndexForSlot_EquipmentIndex_uint_uint orig, Inventory self, EquipmentIndex newEquipmentIndex, uint slot, uint set) { //IL_0003: 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_0014: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, newEquipmentIndex, slot, set); if (newEquipmentIndex == Equipment.EliteVoidEquipment.equipmentIndex) { CharacterMaster componentInChildren = ((Component)self).gameObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)componentInChildren.GetBody()) && componentInChildren.isBoss && (Object)(object)TeleporterInteraction.instance != (Object)null) { ((Component)TeleporterInteraction.instance).gameObject.AddComponent(); } } } } public static ConfigItem ShrineOfTheDeep_Enabled = new ConfigItem("Interactable: Shrine of the Deep", "Boss drops enabled", "Enables both the Shrine Of The Deep and the Void Boss system. To remove the shrine only, set its Director Weight to 0.", _defaultValue: true); public static ConfigItem ShrineOfTheDeep_DirectorCost = new ConfigItem("Interactable: Shrine of the Deep", "Director cost", "Cost of this interactable for director spawns (30 = large chest cost)", 30, 1f, 60f, 1f); public static ConfigItem ShrineOfTheDeep_DirectorWeight = new ConfigItem("Interactable: Shrine of the Deep", "Director weight", "Weight of this interactable against other spawns (2 = boss printer weight)", 4, 1f, 15f, 1f); public static ConfigItem ShrineOfTheDeep_ExtraStages = new ConfigItem("Interactable: Shrine of the Deep", "Additional stages to spawn", "(Separate by commas!) The interactable already has spawn definitions for vanilla stages, but you can define extra modded stages here by using their internal names.", "observatory_wormsworms, hollowsummit_wormsworms, hollowsummitnight_wormsworms, foggyswampdownpour"); public static ConfigItem ShrineOfTheDeep_ZoeaRework = new ConfigItem("Rework: Newly Hatched Zoea", "Zoea as Beetle Queen item", "Uses ZoeaRework to make Newly Hatched Zoea a void boss item for the Beetle Queen. If you don't want the conversion, set this to false and disable ZoeaRework in your mod profile.", _defaultValue: true); public static ConfigItem ShrineOfTheDeep_ZoeaConversion = new ConfigItem("Rework: Newly Hatched Zoea", "Remove void conversions", "If you're not using ZoeaRework, this disables all void conversion for Zoea and leaves it solely as the Void Devastator's drop. False by default.", _defaultValue: false); private EliteDef _voidEliteDef; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private EliteDef k__BackingField; private static ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private static ExplicitPickupDropTable k__BackingField; public static GameObject shrinePrefab = null; public static InteractableSpawnCard interactableSpawnCard = null; public static DirectorCard directorCard = null; public EliteDef voidEliteDef { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_voidEliteDef == (Object)null) { _voidEliteDef = Addressables.LoadAssetAsync((object)"RoR2/DLC1/EliteVoid/edVoid.asset").WaitForCompletion(); } return _voidEliteDef; } [CompilerGenerated] set { k__BackingField = value; } } public static ExplicitPickupDropTable explicitPickupDropTable { get { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_explicitPickupDropTable == (Object)null) { _explicitPickupDropTable = ScriptableObject.CreateInstance(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)Items.VoidMegaCrabItem, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { k__BackingField = value; } } public override void Init() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_00fe: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Expected O, but got Unknown //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Expected O, but got Unknown //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05b1: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Expected O, but got Unknown //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f1: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Expected O, but got Unknown //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Expected O, but got Unknown //IL_0636: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0641: Expected O, but got Unknown if (!ShrineOfTheDeep_Enabled.Value) { return; } GameObject val = Main.Assets.LoadAsset("Assets/prefabs/shrineOfTheDeep.prefab"); Material material = Addressables.LoadAssetAsync((object)"RoR2/DLC1/voidstage/matVoidAsteroid.mat").WaitForCompletion(); Material material2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Gateway/matGatewaySphere.mat").WaitForCompletion(); Material material3 = Addressables.LoadAssetAsync((object)"RoR2/Base/Imp/matImpBossPortal.mat").WaitForCompletion(); val.AddComponent(); val.AddComponent(); MeshRenderer component = ((Component)val.transform.Find("hand")).GetComponent(); ((Renderer)component).SetMaterial(material); MeshRenderer component2 = ((Component)val.transform.Find("homer simpson")).GetComponent(); ((Renderer)component2).SetMaterial(material2); MeshRenderer component3 = ((Component)val.transform.Find("marge simpson")).GetComponent(); ((Renderer)component3).SetMaterial(material3); ExpansionRequirementComponent val2 = val.AddComponent(); val2.requiredExpansion = Main.Expansion; InspectDef val3 = ScriptableObject.CreateInstance(); InspectInfo val4 = new InspectInfo(); InspectInfo val5 = val4; val3.Info = val4; InspectInfo val6 = val5; val6.Visual = Main.Assets.LoadAsset("Assets/icons/expansion.png"); val6.TitleToken = "NT_INTERACTABLE_SHRINEOFTHEDEEP_NAME"; val6.DescriptionToken = "NT_INTERACTABLE_SHRINEOFTHEDEEP_DESCRIPTION"; val3.Info = val6; GenericInspectInfoProvider val7 = val.AddComponent(); val7.InspectInfo = val3; Highlight val8 = val.AddComponent(); val8.pickupState = UniquePickup.none; val8.targetRenderer = (Renderer)(object)component; val8.strength = 1f; val8.highlightColor = (HighlightColor)0; PurchaseInteraction val9 = val.AddComponent(); val9.displayNameToken = "NT_INTERACTABLE_SHRINEOFTHEDEEP_NAME"; val9.contextToken = "NT_INTERACTABLE_SHRINEOFTHEDEEP_CONTEXT"; val9.costType = (CostTypeIndex)0; val9.setUnavailableOnTeleporterActivated = true; val9.isShrine = true; EntityLocator val10 = ((Component)val.GetComponentInChildren()).gameObject.AddComponent(); val10.entity = val; ModelLocator val11 = val.AddComponent(); val11.modelTransform = val.transform.Find("hand"); val11.modelBaseTransform = val11.modelTransform; val11.dontDetatchFromParent = true; val11.autoUpdateModelTransform = true; Transform transform = val.transform; transform.position = new Vector3(transform.position.x, transform.position.y + 1.6f, transform.position.z); ChildLocator val12 = val.AddComponent(); val12.transformPairs = (NameTransformPair[])(object)new NameTransformPair[1] { new NameTransformPair { name = "FireworkOrigin", transform = transform } }; shrinePrefab = val; PrefabAPI.RegisterNetworkPrefab(shrinePrefab); interactableSpawnCard = ScriptableObject.CreateInstance(); ((Object)interactableSpawnCard).name = "iscShrineOfTheDeep"; ((SpawnCard)interactableSpawnCard).prefab = shrinePrefab; ((SpawnCard)interactableSpawnCard).sendOverNetwork = true; ((SpawnCard)interactableSpawnCard).hullSize = (HullClassification)1; ((SpawnCard)interactableSpawnCard).nodeGraphType = (GraphType)0; ((SpawnCard)interactableSpawnCard).requiredFlags = (NodeFlags)0; ((SpawnCard)interactableSpawnCard).forbiddenFlags = (NodeFlags)16; ((SpawnCard)interactableSpawnCard).directorCreditCost = ShrineOfTheDeep_DirectorCost.Value; ((SpawnCard)interactableSpawnCard).occupyPosition = true; interactableSpawnCard.orientToFloor = false; interactableSpawnCard.skipSpawnWhenSacrificeArtifactEnabled = false; interactableSpawnCard.maxSpawnsPerStage = 1; directorCard = new DirectorCard { selectionWeight = ShrineOfTheDeep_DirectorWeight.Value, spawnCard = (SpawnCard)(object)interactableSpawnCard, minimumStageCompletions = 1 }; DirectorCardHolder val13 = new DirectorCardHolder { Card = directorCard, InteractableCategory = (InteractableCategory)4 }; Helpers.AddNewInteractableToStage(val13, (Stage)16, ""); Helpers.AddNewInteractableToStage(val13, (Stage)8, ""); Helpers.AddNewInteractableToStage(val13, (Stage)262144, ""); Helpers.AddNewInteractableToStage(val13, (Stage)70368744177664L, ""); Helpers.AddNewInteractableToStage(val13, (Stage)137438953472L, ""); Helpers.AddNewInteractableToStage(val13, (Stage)32, ""); Helpers.AddNewInteractableToStage(val13, (Stage)64, ""); Helpers.AddNewInteractableToStage(val13, (Stage)134217728, ""); Helpers.AddNewInteractableToStage(val13, (Stage)17592186044416L, ""); Helpers.AddNewInteractableToStage(val13, (Stage)35184372088832L, ""); Helpers.AddNewInteractableToStage(val13, (Stage)274877906944L, ""); Helpers.AddNewInteractableToStage(val13, (Stage)549755813888L, ""); Helpers.AddNewInteractableToStage(val13, (Stage)128, ""); Helpers.AddNewInteractableToStage(val13, (Stage)256, ""); Helpers.AddNewInteractableToStage(val13, (Stage)131072, ""); Helpers.AddNewInteractableToStage(val13, (Stage)140737488355328L, ""); Helpers.AddNewInteractableToStage(val13, (Stage)8796093022208L, ""); Helpers.AddNewInteractableToStage(val13, (Stage)16384, ""); Helpers.AddNewInteractableToStage(val13, (Stage)1099511627776L, ""); List list = new List(); if (!Utility.IsNullOrWhiteSpace(ShrineOfTheDeep_ExtraStages.Value)) { List collection = ShrineOfTheDeep_ExtraStages.Value.Split(',').ToList(); list.AddRange(collection); } foreach (string item in list) { string text = item.Trim(); Helpers.AddNewInteractableToStage(val13, (Stage)1, text); } if (ShrineOfTheDeep_ZoeaConversion.Value) { ItemRelationshipType val14 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion(); ItemDef zoeaItemDef = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidMegaCrabItem.asset").WaitForCompletion(); ItemCatalog.SetItemRelationships += (hook_SetItemRelationships)delegate(orig_SetItemRelationships orig, ItemRelationshipProvider[] self) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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) //IL_005f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); List list2 = new List(); Pair[] array = ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem]; foreach (Pair val20 in array) { if (!((Object)(object)val20.itemDef2 == (Object)(object)zoeaItemDef) && !((Object)(object)val20.itemDef2 == (Object)(object)zoeaItemDef)) { list2.Add(val20); } } ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem] = list2.ToArray(); }; } object obj = <>c.<>9__20_0; if (obj == null) { hook_DropRewards val15 = delegate(orig_DropRewards orig, BossGroup self) { if ((self.bossDrops != null || self.bossDropTables != null) && (Object)(object)TeleporterInteraction.instance != (Object)null && !self.forceTier3Reward) { if (Object.op_Implicit((Object)(object)((Component)TeleporterInteraction.instance).GetComponent())) { self.bossDrops = ConvertBossDrops(self.bossDrops); self.bossDropTables = ConvertBossDropTables(self.bossDropTables, self.rng); self.bonusRewardCount += 1; self.bossDropChance = 0.2f; } else if (Object.op_Implicit((Object)(object)((Component)TeleporterInteraction.instance).GetComponent())) { self.bossDrops = ConvertBossDrops(self.bossDrops); self.bossDropTables = ConvertBossDropTables(self.bossDropTables, self.rng); } } orig.Invoke(self); }; <>c.<>9__20_0 = val15; obj = (object)val15; } BossGroup.DropRewards += (hook_DropRewards)obj; object obj2 = <>c.<>9__20_1; if (obj2 == null) { hook_FireBossHunter val16 = delegate(orig_FireBossHunter orig, EquipmentSlot self) { HurtBox hurtBox = self.currentTarget.hurtBox; CharacterBody val18 = hurtBox?.healthComponent?.body; object obj4; if (hurtBox == null) { obj4 = null; } else { HealthComponent healthComponent = hurtBox.healthComponent; if (healthComponent == null) { obj4 = null; } else { CharacterBody body = healthComponent.body; if (body == null) { obj4 = null; } else { GameObject gameObject = ((Component)body).gameObject; obj4 = ((gameObject != null) ? gameObject.GetComponent() : null); } } } DeathRewards val19 = (DeathRewards)obj4; if (Object.op_Implicit((Object)(object)val18) && Object.op_Implicit((Object)(object)val19) && (Object)(object)val19.bossDropTable != (Object)null && val18.HasBuff(Buffs.EliteVoid)) { val19.bossDropTable = ConvertBossDropTables(new List { val19.bossDropTable }, self.rng).First(); } return orig.Invoke(self); }; <>c.<>9__20_1 = val16; obj2 = (object)val16; } EquipmentSlot.FireBossHunter += (hook_FireBossHunter)obj2; object obj3 = <>c.<>9__20_2; if (obj3 == null) { hook_SetEquipmentIndexForSlot_EquipmentIndex_uint_uint val17 = delegate(orig_SetEquipmentIndexForSlot_EquipmentIndex_uint_uint orig, Inventory self, EquipmentIndex newEquipmentIndex, uint slot, uint set) { //IL_0003: 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_0014: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, newEquipmentIndex, slot, set); if (newEquipmentIndex == Equipment.EliteVoidEquipment.equipmentIndex) { CharacterMaster componentInChildren = ((Component)self).gameObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)componentInChildren.GetBody()) && componentInChildren.isBoss && (Object)(object)TeleporterInteraction.instance != (Object)null) { ((Component)TeleporterInteraction.instance).gameObject.AddComponent(); } } }; <>c.<>9__20_2 = val17; obj3 = (object)val17; } Inventory.SetEquipmentIndexForSlot_EquipmentIndex_uint_uint += (hook_SetEquipmentIndexForSlot_EquipmentIndex_uint_uint)obj3; Log.Info("Added interactable Shrine of the Deep"); } public static List ConvertBossDropTables(List bossDropTables, Xoroshiro128Plus rng) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0030: 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) //IL_006c: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) List list = new List(); foreach (PickupDropTable bossDropTable in bossDropTables) { UniquePickup val = bossDropTable.GeneratePickup(rng); if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.FireballsOnHit.itemIndex) && DrenchedPerforator.DrenchedPerforator_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.DrenchedPerforator.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.LightningStrikeOnHit.itemIndex) && DrenchedPerforator.DrenchedPerforator_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.DrenchedPerforator.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.Knurl.itemIndex) && OsmiumShackles.OsmiumShackles_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.OsmiumShackles.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.BleedOnHitAndExplode.itemIndex) && TenebralGland.TenebralGland_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.TenebralGland.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.ParentEgg.itemIndex) && Rebirth.Rebirth_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.Rebirth.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.NovaOnLowHealth.itemIndex) && MobiusNode.MobiusNode_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.MobiusNode.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.SprintWisp.itemIndex) && RebelSoul.RebelSoul_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.RebelSoul.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.MinorConstructOnKill.itemIndex) && SplitNucleus.SplitNucleus_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.SplitNucleus.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.SiphonOnLowHealth.itemIndex) && EffigyOfRot.EffigyOfRot_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.EffigyOfRot.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.ExtraEquipment.itemIndex) && ObserversEye.ObserversEye_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.ObserversEye.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.ShockDamageAura.itemIndex) && DeepVoidSignal.DeepVoidSignal_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.DeepVoidSignal.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.RoboBallBuddy.itemIndex) && ApathyCore.ApathyCore_Enabled.Value) { list.Add((PickupDropTable)(object)ItemInit.ApathyCore.explicitPickupDropTable); } else if (val.pickupIndex == PickupCatalog.FindPickupIndex(Items.BeetleGland.itemIndex) && ShrineOfTheDeep_ZoeaRework.Value) { list.Add((PickupDropTable)(object)explicitPickupDropTable); } else { list.Add(bossDropTable); } } return list; } public static List ConvertBossDrops(List bossDrops) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: 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) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) List list = new List(); foreach (UniquePickup bossDrop in bossDrops) { if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.FireballsOnHit.itemIndex) && DrenchedPerforator.DrenchedPerforator_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.DrenchedPerforator.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.LightningStrikeOnHit.itemIndex) && DrenchedPerforator.DrenchedPerforator_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.DrenchedPerforator.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.Knurl.itemIndex) && OsmiumShackles.OsmiumShackles_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.OsmiumShackles.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.BleedOnHitAndExplode.itemIndex) && TenebralGland.TenebralGland_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.TenebralGland.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.ParentEgg.itemIndex) && Rebirth.Rebirth_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.Rebirth.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.NovaOnLowHealth.itemIndex) && MobiusNode.MobiusNode_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.MobiusNode.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.SprintWisp.itemIndex) && RebelSoul.RebelSoul_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.RebelSoul.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.MinorConstructOnKill.itemIndex) && SplitNucleus.SplitNucleus_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.SplitNucleus.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.SiphonOnLowHealth.itemIndex) && EffigyOfRot.EffigyOfRot_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.EffigyOfRot.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.ExtraEquipment.itemIndex) && ObserversEye.ObserversEye_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.ObserversEye.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.ShockDamageAura.itemIndex) && DeepVoidSignal.DeepVoidSignal_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.DeepVoidSignal.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.RoboBallBuddy.itemIndex) && ApathyCore.ApathyCore_Enabled.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(ItemInit.ApathyCore.ItemIndex))); } else if (bossDrop.pickupIndex == PickupCatalog.FindPickupIndex(Items.BeetleGland.itemIndex) && ShrineOfTheDeep_ZoeaRework.Value) { list.Add(new UniquePickup(PickupCatalog.FindPickupIndex(Items.VoidMegaCrabItem.itemIndex))); } else { list.Add(bossDrop); } } return list; } } public class ShrineOfTheDeepBehavior : NetworkBehaviour { public static GameObject explodeEffect = Addressables.LoadAssetAsync((object)"RoR2/DLC1/CritGlassesVoid/CritGlassesVoidExecuteEffect.prefab").WaitForCompletion(); public void Start() { PurchaseInteraction component = ((Component)this).gameObject.GetComponent(); if (NetworkServer.active && Object.op_Implicit((Object)(object)Run.instance)) { component.SetAvailableTrue(); } ((UnityEvent)(object)component.onPurchase).AddListener((UnityAction)PurchaseAction); } public void PurchaseAction(Interactor interactor) { //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_00f1: Expected O, but got Unknown //IL_00bd: 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_00d2: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)TeleporterInteraction.instance)) { return; } ((Component)TeleporterInteraction.instance).gameObject.AddComponent(); if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance.bossDirector) && Object.op_Implicit((Object)(object)((Component)TeleporterInteraction.instance).gameObject.GetComponent())) { TeleporterInteraction.instance.bossDirector.ActiveEliteDefOverride = InteractableInit.shrineOfTheDeep.voidEliteDef; TeleporterInteraction.instance.bossDirector.eliteBias = 0f; if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance.bonusDirector)) { TeleporterInteraction.instance.bonusDirector.ActiveEliteDefOverride = InteractableInit.shrineOfTheDeep.voidEliteDef; } } CharacterBody val = default(CharacterBody); if (((Component)interactor).TryGetComponent(ref val)) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "NT_INTERACTABLE_SHRINEOFTHEDEEP_MESSAGE" }); } EffectData val2 = new EffectData { origin = ((Component)this).gameObject.transform.position }; EffectManager.SpawnEffect(explodeEffect, val2, true); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class ShrineOfTheDeepActivationBehavior : NetworkBehaviour { } public class RegularVoidActivationBehavior : NetworkBehaviour { } } namespace Nautilus.Configuration { public abstract class ConfigItem { private static List _configList; public static List ConfigList { get { if (_configList == null) { _configList = new List(); } return _configList; } set { _configList = value; } } public abstract void InitConfigItem(); public static void Init() { foreach (ConfigItem config in ConfigList) { config.InitConfigItem(); } } } public class ConfigItem : ConfigItem { private ConfigEntry configEntry; private readonly string header; private readonly string name; private readonly string desc; private readonly T defaultValue; private readonly float minValue; private readonly float maxValue; private readonly float increment; public T Value { get { if (Main.Config_Enabled.Value) { return configEntry.Value; } return defaultValue; } } public Type Type => typeof(T); public ConfigItem(string _header, string _name, string _desc, T _defaultValue, float _minValue = float.MinValue, float _maxValue = float.MinValue, float _increment = float.MinValue) { header = _header; name = _name; desc = _desc; defaultValue = _defaultValue; minValue = _minValue; maxValue = _maxValue; increment = _increment; ConfigItem.ConfigList.Add(this); } public override void InitConfigItem() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0039: 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 //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_0120: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0143: 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 //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown configEntry = ((BaseUnityPlugin)Main.Instance).Config.Bind(new ConfigDefinition(header, name), defaultValue, new ConfigDescription(desc, (AcceptableValueBase)null, Array.Empty())); if (Type == typeof(bool)) { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(configEntry as ConfigEntry, true)); } else if (Type == typeof(string)) { ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(configEntry as ConfigEntry, true)); } else if (Type == typeof(int)) { int num = Convert.ToInt32(defaultValue); float num2 = ((minValue == float.MinValue) ? 0f : minValue); float num3 = ((maxValue == float.MinValue) ? ((float)num * 10f) : maxValue); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(configEntry as ConfigEntry, new IntSliderConfig { min = (int)num2, max = (int)num3, restartRequired = true })); } else if (Type == typeof(float)) { float num4 = Convert.ToSingle(defaultValue); float min = ((minValue == float.MinValue) ? 0f : minValue); float max = ((maxValue == float.MinValue) ? (num4 * 10f) : maxValue); float num5 = ((increment == float.MinValue) ? (num4 / 10f) : increment); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(configEntry as ConfigEntry, new StepSliderConfig { min = min, max = max, increment = num5, restartRequired = true })); } } } }