Decompiled source of Nautilus v1.2.4
plugins/Nautilus/Nautilus.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; 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.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; 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.ExpansionManagement; using RoR2.Navigation; using RoR2.Orbs; 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+34ba428e4ee08d853201b8d143d34cccdd184228")] [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 class Compat { private static bool? _riskOfOptions; public static bool RiskOfOptions { get { if (!_riskOfOptions.HasValue) { _riskOfOptions = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); } return _riskOfOptions.Value; } } } 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.2.4")] [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 { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnMainMenuControllerInitialized <>9__9_0; internal void <Awake>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.2.4"; public static Main Instance; public static ExpansionDef Expansion; public static AssetBundle Assets; public static ItemRelationshipProvider ItemRelationshipProvider = new ItemRelationshipProvider(); public static List<Pair> ItemConversionList = new List<Pair>(); public static ConfigEntry<bool> Config_Enabled; public void Awake() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_008d: Expected O, but got Unknown //IL_01b5: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Expected O, but got Unknown Log.Init(((BaseUnityPlugin)this).Logger); Log.Info("Init Nautilus 1.2.4"); Instance = this; Log.Info("Creating assets..."); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Nautilus.nautilusvfx")) { Assets = AssetBundle.LoadFromStream(stream); } Log.Info("Creating config..."); Config_Enabled = ((BaseUnityPlugin)Instance).Config.Bind<bool>(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<object>())); if (Compat.RiskOfOptions) { Log.Info("Detected RiskOfOptions"); ModSettingsManager.SetModDescription("Adds new void counterparts for vanilla items."); ModSettingsManager.SetModIcon(Assets.LoadAsset<Sprite>("Assets/icons/expansion.png")); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Config_Enabled, true)); } Log.Info("Creating expansion..."); Expansion = ScriptableObject.CreateInstance<ExpansionDef>(); ((Object)Expansion).name = "Nautilus"; Expansion.nameToken = "NT_EXPANSION_NAME"; Expansion.descriptionToken = "NT_EXPANSION_DESC"; Expansion.iconSprite = Assets.LoadAsset<Sprite>("Assets/icons/expansion.png"); Expansion.disabledIconSprite = Assets.LoadAsset<Sprite>("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..."); ItemRelationshipProvider = ScriptableObject.CreateInstance<ItemRelationshipProvider>(); ((Object)ItemRelationshipProvider).name = "NT_ITEMRELATIONSHIPPROVIDER"; ItemRelationshipProvider.relationshipType = Addressables.LoadAssetAsync<ItemRelationshipType>((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion(); ItemRelationshipProvider.relationships = ItemConversionList.ToArray(); ContentAddition.AddItemRelationshipProvider(ItemRelationshipProvider); object obj = <>c.<>9__9_0; if (obj == null) { hook_OnMainMenuControllerInitialized val = delegate(orig_OnMainMenuControllerInitialized orig, RoR2Application self) { ItemInit.FormatDescriptions(); orig.Invoke(self); }; <>c.<>9__9_0 = val; obj = (object)val; } RoR2Application.OnMainMenuControllerInitialized += (hook_OnMainMenuControllerInitialized)obj; Log.Info("Done"); } } } 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_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/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_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) if (!Enabled) { return Enabled; } ItemDef = ScriptableObject.CreateInstance<ItemDef>(); ((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<ModelPanelParameters>(); val.minDistance = 1f; val.maxDistance = 2f; val.focusPointTransform = child; val.cameraPositionTransform = child; } ItemAPI.Add(new CustomItem(ItemDef, Array.Empty<ItemDisplayRule>())); 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 static class ItemInit { public static List<ItemBase> ItemList = new List<ItemBase>(); public static DrenchedPerforator DrenchedPerforator; public static MobiusNode MobiusNode; public static OsmiumShackles OsmiumShackles; public static RebelSoul RebelSoul; public static Rebirth Rebirth; 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 void Init() { foreach (ItemBase item in ItemList) { if (item.RegisterItem()) { Log.Info("Added definition for item " + item.Name); item.RegisterHooks(); } } } public static void FormatDescriptions() { foreach (ItemBase item in ItemList) { if (item.Enabled) { item.FormatDescriptionTokens(); } } } static ItemInit() { ItemTag[] array = new ItemTag[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); DrenchedPerforator = new DrenchedPerforator("DrenchedPerforator", (ItemTag[])(object)array, (ItemTier)9); MobiusNode = new MobiusNode("MobiusNode", (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, (ItemTier)9); OsmiumShackles = new OsmiumShackles("OsmiumShackles", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)9); ItemTag[] array2 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); RebelSoul = new RebelSoul("RebelSoul", (ItemTag[])(object)array2, (ItemTier)9); ItemTag[] array3 = new ItemTag[6]; RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); Rebirth = new Rebirth("Rebirth", (ItemTag[])(object)array3, (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[] array4 = new ItemTag[4]; RuntimeHelpers.InitializeArray(array4, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); MotherOfPearl = new MotherOfPearl("MotherOfPearl", (ItemTag[])(object)array4, (ItemTier)8); ItemTag[] array5 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array5, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ShimmeringNautilus = new ShimmeringNautilus("ShimmeringNautilus", (ItemTag[])(object)array5, (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[2] { (ItemTag)1, (ItemTag)4 }, (ItemTier)7); ItemTag[] array6 = new ItemTag[3]; RuntimeHelpers.InitializeArray(array6, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); PaleStar = new PaleStar("PaleStar", (ItemTag[])(object)array6, (ItemTier)7); ItemTag[] array7 = new ItemTag[4]; RuntimeHelpers.InitializeArray(array7, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); PaleStarConsumed = new PaleStarConsumed("PaleStarConsumed", (ItemTag[])(object)array7, (ItemTier)5); ViscousPot = new ViscousPot("ViscousPot", (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)1 }, (ItemTier)7); } } public class DrenchedPerforator : ItemBase { private GameObject _explodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject <explodePrefab>k__BackingField; private GameObject _individualExplodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject <individualExplodePrefab>k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField; public static ConfigItem<bool> DrenchedPerforator_Enabled = new ConfigItem<bool>("Void boss: Drenched Perforator", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem<float> DrenchedPerforator_Threshold = new ConfigItem<float>("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<int> DrenchedPerforator_Stacks = new ConfigItem<int>("Void boss: Drenched Perforator", "Collapse stacks", "Number of stacks of collapse to add on passing threshold.", 1, 1f, 5f, 1f); public static ConfigItem<int> DrenchedPerforator_StacksStack = new ConfigItem<int>("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<float> DrenchedPerforator_ExplosionRadiusv2 = new ConfigItem<float>("Void boss: Drenched Perforator", "Explosion radius", "Meters radius for the base collapse explosion.", 12f, 1f, 24f, 1f); public static ConfigItem<float> DrenchedPerforator_ExplosionRadiusIncreasev2 = new ConfigItem<float>("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<float> DrenchedPerforator_ExplosionDamage = new ConfigItem<float>("Void boss: Drenched Perforator", "Explosion damage", "Fractional damage (1 = 100%) dealt by explosion.", 4f, 1f, 12f, 0.1f); public override bool Enabled => DrenchedPerforator_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/FireballsOnHit/FireballsOnHit.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/drenchedPerforator.png"); public ItemDef ConversionItemDefExtra => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/LightningStrikeOnHit/LightningStrikeOnHit.asset").WaitForCompletion(); public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/TrimSheets/matTrimSheetMetalLightSnow.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync<Material>((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<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombExplosion.prefab").WaitForCompletion(); } return _explodePrefab; } [CompilerGenerated] set { <explodePrefab>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<GameObject>((object)"RoR2/DLC1/BleedOnHitVoid/FractureImpactEffect.prefab").WaitForCompletion(); } return _individualExplodePrefab; } [CompilerGenerated] set { <individualExplodePrefab>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>(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { <explicitPickupDropTable>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<GameObject>("Assets/prefabs/drenchedPerforator.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren<MeshRenderer>()).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_0188: 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) && !damageInfo.rejected && damageInfo.procCoefficient > 0f && damageInfo.damage > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val2) && Object.op_Implicit((Object)(object)val2.master) && victimObject.TryGetComponent<CharacterBody>(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 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_00d6: 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_00dc: 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_00e2: 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_0104: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_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_016c: 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_017e: Expected O, but got Unknown //IL_017f: 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_01ab: 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_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: 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<Collider> list = Physics.OverlapSphere(position, radius + extraRadius).ToList(); Util.ShuffleList<Collider>(list); foreach (Collider item in list) { GameObject gameObject = ((Component)item).gameObject; if (Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren<CharacterBody>())) { CharacterBody componentInChildren = gameObject.GetComponentInChildren<CharacterBody>(); 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); } } } 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 = 0f, 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 }; EffectManager.SpawnEffect(explodePrefab, val3, true); } } public class MobiusNode : ItemBase { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__38_4; public static Func<Instruction, bool> <>9__38_5; public static Func<Instruction, bool> <>9__38_6; public static Func<Instruction, bool> <>9__38_7; public static Func<HealthComponent, bool> <>9__38_8; public static Manipulator <>9__38_1; public static hook_TakeDamageProcess <>9__38_2; internal void <RegisterHooks>b__38_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<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "missileVoid") }); float num = default(float); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[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, bool>>((Func<HealthComponent, bool>)((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 <RegisterHooks>b__38_4(Instruction x) { return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "missileVoid"); } internal bool <RegisterHooks>b__38_5(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool <RegisterHooks>b__38_6(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <RegisterHooks>b__38_7(Instruction x) { return ILPatternMatchingExt.MatchCgt(x); } internal bool <RegisterHooks>b__38_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 <RegisterHooks>b__38_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<MobiusBehavior>(ref mobiusBehavior) && self.IsHealthBelowThreshold(MobiusNode_Threshold.Value)) { mobiusBehavior.Explode(); } } } public BuffDef MobiusBuff; private GameObject _ExplodePrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject <ExplodePrefab>k__BackingField; private Material _ExplodeOverlay; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private Material <ExplodeOverlay>k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField; public static ConfigItem<bool> MobiusNode_Enabled = new ConfigItem<bool>("Void boss: Mobius Node", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem<float> MobiusNode_ShieldAdd = new ConfigItem<float>("Void boss: Mobius Node", "Added shield", "Fraction of shield to grant on first stack.", 0.2f, 0f, 1f, 0.05f); public static ConfigItem<float> MobiusNode_Threshold = new ConfigItem<float>("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<float> MobiusNode_Timer = new ConfigItem<float>("Void boss: Mobius Node", "Replenish interval", "All stacks of shield regen are replenished every x seconds.", 60f, 5f, 120f, 1f); public static ConfigItem<int> MobiusNode_Stacks = new ConfigItem<int>("Void boss: Mobius Node", "Stacks of shield regen", "Maximum shield regen stacks you can hold.", 2, 1f, 5f, 1f); public static ConfigItem<int> MobiusNode_StacksStack = new ConfigItem<int>("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<float> MobiusNode_ExplodeRadius = new ConfigItem<float>("Void boss: Mobius Node", "Stun radius", "Meters radius in which to stun enemies when shield is recharged.", 40f, 1f, 80f, 1f); public override bool Enabled => MobiusNode_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/NovaOnLowHealth/NovaOnLowHealth.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/mobiusGland.png"); public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/GummyClone/matGummyClone.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync<Material>((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<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombExplosion.prefab").WaitForCompletion(); } return _ExplodePrefab; } [CompilerGenerated] set { <ExplodePrefab>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<Material>((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkBodyOverlayCorrupted.mat").WaitForCompletion(); } return _ExplodeOverlay; } [CompilerGenerated] set { <ExplodeOverlay>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>(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { <explicitPickupDropTable>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<GameObject>("Assets/prefabs/mobiusNode.prefab"); Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 }; ((Renderer)val.GetComponentInChildren<MeshRenderer>()).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__38_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<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "missileVoid") }); float num = default(float); if (val3.TryGotoNext((MoveType)2, new Func<Instruction, bool>[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, bool>>((Func<HealthComponent, bool>)((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__38_1 = val; obj = (object)val; } HealthComponent.GetHealthBarValues += (Manipulator)obj; object obj2 = <>c.<>9__38_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<MobiusBehavior>(ref mobiusBehavior2) && self.IsHealthBelowThreshold(MobiusNode_Threshold.Value)) { mobiusBehavior2.Explode(); } }; <>c.<>9__38_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<MobiusBehavior>(); int itemCountEffective = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)mobiusBehavior)) { mobiusBehavior = ((Component)self).gameObject.AddComponent<MobiusBehavior>(); } if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)mobiusBehavior)) { Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent<MobiusBehavior>()); self.SetBuffCount(MobiusBuff.buffIndex, 0); } }; } 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<BuffDef>(); 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<Sprite>("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_0014: Unknown result type (might be due to invalid IL or missing references) _stacks = value; characterBody.SetBuffCount(buffDef.buffIndex, _stacks); RecheckMaxStacks(); } } private void Awake() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) healthComponent = ((Component)this).gameObject.GetComponent<HealthComponent>(); characterBody = ((Component)this).gameObject.GetComponent<CharacterBody>(); 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); } maxStacks = MobiusNode.MobiusNode_Stacks.Value + MobiusNode.MobiusNode_StacksStack.Value * (characterBody.inventory.GetItemCountEffective(ItemInit.MobiusNode.ItemIndex) - 1); 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<TemporaryOverlay>(); 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<ModelLocator>().modelTransform).GetComponentInParent<CharacterModel>()); List<Collider> 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<CharacterBody>())) { continue; } CharacterBody componentInChildren = gameObject.GetComponentInChildren<CharacterBody>(); 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<SetStateOnHurt>(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<TemporaryOverlay>(); 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<ModelLocator>().modelTransform).GetComponentInParent<CharacterModel>()); 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 OsmiumShackles : ItemBase { public BuffDef OsmiumBuff; private GameObject _radiusPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject <radiusPrefab>k__BackingField; private Material _OsmiumOverlay; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private Material <OsmiumOverlay>k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField; public static ConfigItem<bool> OsmiumShackles_Enabled = new ConfigItem<bool>("Void boss: Osmium Shackles", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem<float> OsmiumShackles_DebuffRadius = new ConfigItem<float>("Void boss: Osmium Shackles", "Weigh down radius", "Radius where enemies are debuffed by this item.", 20f, 1f, 40f, 1f); public static ConfigItem<float> OsmiumShackles_DebuffRadiusStack = new ConfigItem<float>("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<float> OsmiumShackles_DebuffPercent = new ConfigItem<float>("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<float> OsmiumShackles_CritAdd = new ConfigItem<float>("Void boss: Osmium Shackles", "Crit addition", "Fractional crit chance increase against encumbered enemies", 0.25f, 0.05f, 1f, 0.05f); public override bool Enabled => OsmiumShackles_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/Knurl/Knurl.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/osmiumShackles.png"); public ItemDef ConversionItemDefExtra => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/LightningStrikeOnHit/LightningStrikeOnHit.asset").WaitForCompletion(); public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/GlobalContent/matArtifact.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync<Material>((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<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Items/AttackSpeedPerNearbyAllyOrEnemy/BolsteringLanternBonusIndicator.prefab").WaitForCompletion()); Object.Destroy((Object)(object)_radiusPrefab.GetComponent<SphereCollider>()); Object.Destroy((Object)(object)_radiusPrefab.GetComponent<AttackSpeedPerNearbyCollider>()); MeshRenderer componentInChildren = _radiusPrefab.GetComponentInChildren<MeshRenderer>(); if (Object.op_Implicit((Object)(object)componentInChildren)) { ((Renderer)componentInChildren).material = material1; } } return _radiusPrefab; } [CompilerGenerated] set { <radiusPrefab>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<Material>((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkSwimOverlay.mat").WaitForCompletion(); } return _OsmiumOverlay; } [CompilerGenerated] set { <OsmiumOverlay>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>(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { <explicitPickupDropTable>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<GameObject>("Assets/prefabs/osmiumShackles.prefab"); Material[] materialArray = (Material[])(object)new Material[1] { material0 }; ((Renderer)val.GetComponentInChildren<MeshRenderer>()).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<OsmiumShacklesBehavior>(); int itemCountEffective = GetItemCountEffective(self); if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)osmiumShacklesBehavior)) { osmiumShacklesBehavior = ((Component)self).gameObject.AddComponent<OsmiumShacklesBehavior>(); } 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<OsmiumShacklesBehavior>()); } }; 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 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<BuffDef>(); 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<Sprite>("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<GameObject>(ItemInit.OsmiumShackles.radiusPrefab); NetworkedBodyAttachment component = radius.GetComponent<NetworkedBodyAttachment>(); characterBody = ((Component)this).gameObject.GetComponent<CharacterBody>(); 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<CharacterBody>(); 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<ModelLocator>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform) && Object.op_Implicit((Object)(object)((Component)component.modelTransform).GetComponentInParent<CharacterModel>())) { TemporaryOverlay val2 = ((Component)componentInChildren).gameObject.AddComponent<TemporaryOverlay>(); 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<CharacterModel>()); } } } 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__45_1; internal void <RegisterHooks>b__45_1(orig_UpdateOutOfCombatAndDanger orig, CharacterBody self) { orig.Invoke(self); if (!self.outOfCombat && Object.op_Implicit((Object)(object)((Component)self).gameObject.GetComponent<RebelSoulBehavior>())) { Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent<RebelSoulBehavior>()); } } } private GameObject _stealPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject <stealPrefab>k__BackingField; private GameObject _blinkPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject <blinkPrefab>k__BackingField; private GameObject _radiusPrefab; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private GameObject <radiusPrefab>k__BackingField; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField; public static ConfigItem<bool> RebelSoul_Enabled = new ConfigItem<bool>("Void boss: Rebel Soul", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem<float> RebelSoul_BoostDuration = new ConfigItem<float>("Void boss: Rebel Soul", "Cloak duration", "Length of cloaking in seconds.", 4f, 0.5f, 6f, 0.5f); public static ConfigItem<float> RebelSoul_BoostDurationStack = new ConfigItem<float>("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<float> RebelSoul_LifeSteal = new ConfigItem<float>("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<float> RebelSoul_LifeStealStack = new ConfigItem<float>("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<float> RebelSoul_Radius = new ConfigItem<float>("Void boss: Rebel Soul", "Lifesteal radius", "Meters radius of lifesteal around a cloaked player.", 20f, 1f, 40f, 1f); public override bool Enabled => RebelSoul_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/SprintWisp/SprintWisp.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/rebelSoul.png"); public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Treebot/matTreebotTreeBark.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/matDebugBlack.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidMegaCrab/matVoidCrabAntiMatterParticleStreak.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync<Material>((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<GameObject>((object)"RoR2/DLC1/VoidJailer/VoidJailerDartImpact.prefab").WaitForCompletion(); } return _stealPrefab; } [CompilerGenerated] set { <stealPrefab>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<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabImpact1.prefab").WaitForCompletion(); } return _blinkPrefab; } [CompilerGenerated] set { <blinkPrefab>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<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Items/AttackSpeedPerNearbyAllyOrEnemy/BolsteringLanternBonusIndicator.prefab").WaitForCompletion()); Object.Destroy((Object)(object)_radiusPrefab.GetComponent<SphereCollider>()); Object.Destroy((Object)(object)_radiusPrefab.GetComponent<AttackSpeedPerNearbyCollider>()); MeshRenderer componentInChildren = _radiusPrefab.GetComponentInChildren<MeshRenderer>(); if (Object.op_Implicit((Object)(object)componentInChildren)) { ((Renderer)componentInChildren).material = material3; } } return _radiusPrefab; } [CompilerGenerated] set { <radiusPrefab>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>(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { <explicitPickupDropTable>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<GameObject>("Assets/prefabs/rebelSoul.prefab"); Material[] materialArray = (Material[])(object)new Material[3] { material0, material1, material2 }; ((Renderer)val.GetComponentInChildren<MeshRenderer>()).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<RebelSoulBehavior>())) { ((Component)self.characterBody).gameObject.AddComponent<RebelSoulBehavior>(); } else { RebelSoulBehavior component = ((Component)self.characterBody).gameObject.GetComponent<RebelSoulBehavior>(); component.ResetTimer(); } } }; object obj = <>c.<>9__45_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<RebelSoulBehavior>())) { Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent<RebelSoulBehavior>()); } }; <>c.<>9__45_1 = val; obj = (object)val; } CharacterBody.UpdateOutOfCombatAndDanger += (hook_UpdateOutOfCombatAndDanger)obj; } } 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<GameObject>(ItemInit.RebelSoul.radiusPrefab); NetworkedBodyAttachment component = radius.GetComponent<NetworkedBodyAttachment>(); characterBody = ((Component)this).gameObject.GetComponent<CharacterBody>(); 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<Collider> 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>())) { CharacterBody componentInChildren = gameObject.GetComponentInChildren<CharacterBody>(); 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 <explicitPickupDropTable>k__BackingField; public static ConfigItem<bool> Rebirth_Enabled = new ConfigItem<bool>("Void boss: Rebirth", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem<int> Rebirth_ItemsCorrupt = new ConfigItem<int>("Void boss: Rebirth", "Items to corrupt", "Items corrupted at the start of each stage.", 2, 1f, 5f, 1f); public static ConfigItem<float> Rebirth_RegenPerItem = new ConfigItem<float>("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<float> Rebirth_RegenPerItemStack = new ConfigItem<float>("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<int> Rebirth_ItemsCorruptPickup = new ConfigItem<int>("Void boss: Rebirth", "Items to corrupt on pickup", "Items corrupted on pickup.", 3, 1f, 6f, 1f); public override bool Enabled => Rebirth_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/ParentEgg/ParentEgg.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/rebirth.png"); public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/voidstage/matVoidCoral.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Brother/matBrotherInfectionVoid.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Brother/matBrotherInfectionVoid.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync<Material>((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>(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { <explicitPickupDropTable>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<GameObject>("Assets/prefabs/rebirth.prefab"); Material[] materialArray = (Material[])(object)new Material[4] { material0, material1, material2, material3 }; ((Renderer)val.GetComponentInChildren<MeshRenderer>()).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<CharacterMaster>())) { CorruptItems(((Component)self).gameObject.GetComponentInChildren<CharacterMaster>(), 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 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<ItemIndex> list = new List<ItemIndex>(characterMaster.inventory.itemAcquisitionOrder); Util.ShuffleList<ItemIndex>(list, val); val.Next(); TakeResult val4 = default(TakeResult); foreach (ItemIndex item in list) { if (amount <= 0) { break; } Enumerator<Pair> 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 TenebralGland : ItemBase { public class TenebralMarkBehavior : MonoBehaviour { public List<CharacterBody> inflictorBodies = new List<CharacterBody>(); } public BuffDef TenebralBuff; private ExplicitPickupDropTable _explicitPickupDropTable; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField; public static ConfigItem<bool> TenebralGland_Enabled = new ConfigItem<bool>("Void boss: Tenebral Gland", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem<float> TenebralGland_SuperBleedChance = new ConfigItem<float>("Void boss: Tenebral Gland", "Hemorrhage chance", "Percent chance that, upon critting, hemorrhage will be applied.", 5f, 1f, 20f, 0.5f); public static ConfigItem<float> TenebralGland_SuperBleedChanceStack = new ConfigItem<float>("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<float> TenebralGland_CritChanceBuff = new ConfigItem<float>("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<float> TenebralGland_CritDamageBuff = new ConfigItem<float>("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<float> TenebralGland_BuffLength = new ConfigItem<float>("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<int> TenebralGland_BuffMaxStacks = new ConfigItem<int>("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 override bool Enabled => TenebralGland_Enabled.Value; public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/BleedOnHitAndExplode/BleedOnHitAndExplode.asset").WaitForCompletion(); public override GameObject itemPrefab => OverwritePrefabMaterials(); public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/tenebralGland.png"); public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/artifactworld/matArtifactGem.mat").WaitForCompletion(); public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matBloodClayLarge.mat").WaitForCompletion(); public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/artifactworld/matArtifactGem.mat").WaitForCompletion(); public Material material3 => Addressables.LoadAssetAsync<Material>((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>(); _explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupDef = (Object)(object)ItemDef, pickupWeight = 1f } }; } ((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance); return _explicitPickupDropTable; } [CompilerGenerated] set { <explicitPickupDropTable>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<GameObject>("Assets/prefabs/tenebralGland.prefab"); Material[] materialArray = (Material[])(object)new Material[4] { material0, material1, material2, material3 }; ((Renderer)val.GetComponentInChildren<MeshRenderer>()).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<CharacterBody>(ref val2) && Object.op_Implicit((Object)(object)val2.master) && victimObject.TryGetComponent<CharacterBody>(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<TenebralMarkBehavior>())) { victimObject.AddComponent<TenebralMarkBehavior>(); } victimObject.GetComponent<TenebralMarkBehavior>().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<TenebralMarkBehavior>())) { Object.Destroy((Object)(object)((Component)self).GetComponent<TenebralMarkBehavior>()); } 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<TenebralMarkBehavior>(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<TemporaryOverlay>(); 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<ModelLocator>().modelTransform).GetComponentInParent<CharacterModel>()); } } } 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 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<BuffDef>(); 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<Sprite>("Assets/icons/tenebralBuff.png"); ContentAddition.AddBuffDef(val); TenebralBuff = val; } } public class Crabsinthe : ItemBase { public static ConfigItem<bool> Crabsinthe_Enabled = new ConfigItem<bool>("Void common: Crabsinthe", "Item enabled", "Should this item appear in runs?", _defaultValue: true); public static ConfigItem<float> Crabsinthe_Regen = new ConfigItem<float>("Void common: Crabsinthe", "Regen boost", "Grants a regen boost with this multiplier.", 0.5f, 0f, 6f, 0.1f); public static ConfigItem<float> Crabsinthe_RegenStack = new ConfigItem<float>("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<bool> Crabsinthe_C