using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using DeltaruneMod.Characters.Modules; using DeltaruneMod.Characters.Modules.BaseContent.BaseStates; using DeltaruneMod.Characters.Modules.BaseContent.Characters; using DeltaruneMod.Characters.RoaringKnight.SkillStates; using DeltaruneMod.Elite; using DeltaruneMod.Elites; using DeltaruneMod.Interactables; using DeltaruneMod.Interactables.SusExchange.TradingItems; using DeltaruneMod.Items; using DeltaruneMod.Items.Lunar; using DeltaruneMod.Items.Spamton; using DeltaruneMod.Items.Tier1.Gacha; using DeltaruneMod.Items.Yellow; using DeltaruneMod.NeoMithrix; using DeltaruneMod.Unlocks; using DeltaruneMod.Util; using EntityStates; using EntityStates.AI.Walker; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.Croco; using EntityStates.Mage.Weapon; using HG; using HG.BlendableTypes; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using On.RoR2.Orbs; using R2API; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [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("DeltaruneMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+412cd7c4b9fac638e4325847ede2e0f2333335b3")] [assembly: AssemblyProduct("DeltaruneMod")] [assembly: AssemblyTitle("DeltaruneMod")] [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 DeltaruneMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [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.*/)] [BepInPlugin("AGU.DeltaruneMod", "DeltaruneMod", "2.2.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class DeltarunePlugin : BaseUnityPlugin { [CompilerGenerated] private sealed class d__25 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public DeltarunePlugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__25(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; goto IL_0051; case 1: <>1__state = -1; goto IL_0051; case 2: { <>1__state = -1; SoundBank.Init(); return false; } IL_0051: if (!AkSoundEngine.IsInitialized()) { Debug.Log((object)"Waiting for sound engine"); <>2__current = null; <>1__state = 1; return true; } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string PluginGUID = "AGU.DeltaruneMod"; public const string PluginAuthor = "AGU"; public const string PluginName = "DeltaruneMod"; public const string PluginVersion = "2.2.0"; public static DeltarunePlugin Instance; public static CharacterMaster characterMaster; public static CharacterBody characterBody; public static AssetBundle MainAssets; public List Items = new List(); public List Interactables = new List(); public static HashSet BlacklistedFromPrinter = new HashSet(); public static ConfigEntry? useChapter1; public static ConfigEntry? useChapter2; public static ConfigEntry? useChapter3; public static ConfigEntry? useChapter4; public static ConfigEntry? neoEliteDisable; public static ConfigEntry? neoEliteMaxBuffs; public static ConfigEntry? neoEliteDamageMult; public static ConfigEntry? allEnemiesNEO; public static ConfigEntry? susExchangeChance; public static ConfigEntry? susExchangeMaxUses; public static ConfigEntry? susExchangeMusicDisabled; public static ConfigEntry? antiFunMode; public static Material malachiteOverlayMat = new Material(Addressables.LoadAssetAsync((object)"RoR2/Base/ElitePoison/matElitePoisonOverlay.mat").WaitForCompletion()); public void Awake() { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Expected O, but got Unknown //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Expected O, but got Unknown //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Expected O, but got Unknown //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Expected O, but got Unknown //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Expected O, but got Unknown //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Expected O, but got Unknown ModSettingsManager.SetModDescription("Adds various aspects to the game inspired by Deltarune."); useChapter1 = ((BaseUnityPlugin)this).Config.Bind("Chapter Settings", "Use Chapter 1 Features", true, "Enable or Disable Chapter 1"); useChapter2 = ((BaseUnityPlugin)this).Config.Bind("Chapter Settings", "Use Chapter 2 Features", true, "Enable or Disable Chapter 2"); useChapter3 = ((BaseUnityPlugin)this).Config.Bind("Chapter Settings", "Use Chapter 3 Features", true, "Enable or Disable Chapter 3"); useChapter4 = ((BaseUnityPlugin)this).Config.Bind("Chapter Settings", "Use Chapter 4 Features", true, "Enable or Disable Chapter 4"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useChapter1)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useChapter2)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useChapter3)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useChapter4)); Instance = this; Log.Init(((BaseUnityPlugin)this).Logger); Debug.Log((object)"Starting Model Intialization for DeltaruneMod"); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("DeltaruneMod.AssetBundle.deltarune_mod")) { MainAssets = AssetBundle.LoadFromStream(stream); } Debug.Log((object)"Model Intialization for DeltaruneMod successful!"); Debug.Log((object)"Starting Item Intialization for DeltaruneMod"); IEnumerable enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase)) select type; foreach (Type item in enumerable) { ItemBase itemBase = (ItemBase)Activator.CreateInstance(item); if (ValidateItem(itemBase, Items)) { itemBase.Init(); Debug.Log((object)("Item: " + itemBase.ItemName + " Initialized!")); } } Debug.Log((object)"Item Intialization for DeltaruneMod successful!"); susExchangeChance = ((BaseUnityPlugin)this).Config.Bind("Interactable Settings", "Change Exchange Rate", 40, "[REQUIRES RESTART] Changes the exchange rate at the Susipicous Exchange. Default: 40"); ModSettingsManager.AddOption((BaseOption)new IntFieldOption(susExchangeChance)); susExchangeMaxUses = ((BaseUnityPlugin)this).Config.Bind("Interactable Settings", "Change Max Uses", 10, "[REQUIRES RESTART] Changes the maximum uses at the Susipicous Exchange. Default: 10"); ModSettingsManager.AddOption((BaseOption)new IntFieldOption(susExchangeMaxUses)); susExchangeMusicDisabled = ((BaseUnityPlugin)this).Config.Bind("Interactable Settings", "Disable Suspicious Exchange Music", false, "[REQUIRES RESTART] Disables the music at the Susipicious Exchange."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(susExchangeMusicDisabled)); Log.Debug("Trashcan empty... loading!"); IEnumerable enumerable2 = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(InteractableBase)) select type; foreach (Type item2 in enumerable2) { InteractableBase interactableBase = (InteractableBase)Activator.CreateInstance(item2); if (ValidateInteractable(interactableBase, Interactables)) { interactableBase.Init(); Debug.Log((object)("Interactable: " + interactableBase.InteractableName + " Initialized!")); } } Log.Debug("Trashcan full!"); neoEliteDisable = ((BaseUnityPlugin)this).Config.Bind("Elite Settings", "Disable N.E.O. Elite", false, "[REQUIRES RESTART] Disables N.E.O. Elites from spawning."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(neoEliteDisable)); neoEliteMaxBuffs = ((BaseUnityPlugin)this).Config.Bind("Elite Settings", "Change N.E.O. Elite Max Buffs", 2, "[REQUIRES RESTART] Changes the maximum buffs N.E.O. Elites spawn with. Default: 2"); ModSettingsManager.AddOption((BaseOption)new IntFieldOption(neoEliteMaxBuffs)); neoEliteDamageMult = ((BaseUnityPlugin)this).Config.Bind("Elite Settings", "Change N.E.O. Elite DMG Multiplyer", 1.3f, "[REQUIRES RESTART] Changes the damage multiplayer of N.E.O. Elites. Default: 1.3x"); ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(neoEliteDamageMult)); allEnemiesNEO = ((BaseUnityPlugin)this).Config.Bind("Elite Settings", "Make (almost) all enemies N.E.O. Elites.", false, "Makes all possible enemies N.E.O. Elites."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(allEnemiesNEO)); if (!neoEliteDisable.Value) { IEnumerable enumerable3 = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(EliteBase)) select type; foreach (Type item3 in enumerable3) { EliteBase eliteBase = (EliteBase)Activator.CreateInstance(item3); eliteBase.Init(); Debug.Log((object)("Elite: " + eliteBase.EliteName + " Initialized!")); } } ((MonoBehaviour)this).StartCoroutine(LoadSoundBankWhenReady()); RemoveFromLootPool(); new NeoMithrixController(); new Hooks(); antiFunMode = ((BaseUnityPlugin)this).Config.Bind("Additional Settings", "(NOT RECOMMENDED!) Allow Suspicious Exchange items in Lootpool?", false, "(Use only with command, otherwise it just ruins the fun!)"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(antiFunMode)); antiFunMode.SettingChanged += ToggleItemsForCommand; Log.Debug("DeltaruneMod loaded successfully!"); } [IteratorStateMachine(typeof(d__25))] private IEnumerator LoadSoundBankWhenReady() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__25(0) { <>4__this = this }; } public bool ValidateItem(ItemBase item, List itemList) { ItemBase item2 = item; ConfigEntry enabled = ((BaseUnityPlugin)this).Config.Bind("Enable Item?", item2.ConfigCategory, true, "Should this item appear in runs?"); bool flag = item2.ItemTags.Contains((ItemTag)4); bool value = ((BaseUnityPlugin)this).Config.Bind(item2.ConfigCategory, "Blacklist Item from AI Use?", flag, "Should the AI not be able to obtain this item?").Value; bool value2 = ((BaseUnityPlugin)this).Config.Bind(item2.ConfigCategory, "Blacklist Item from Printers?", false, "Should the printers be able to print this item?").Value; useChapter1.SettingChanged += delegate { if (!useChapter1.Value && item2.isChapter1) { enabled.Value = false; } }; useChapter2.SettingChanged += delegate { if (!useChapter2.Value && item2.isChapter2) { enabled.Value = false; } }; useChapter3.SettingChanged += delegate { if (!useChapter3.Value && item2.isChapter3) { enabled.Value = false; } }; useChapter4.SettingChanged += delegate { if (!useChapter4.Value && item2.isChapter4) { enabled.Value = false; } }; if (enabled.Value) { itemList.Add(item2); if (value2) { item2.PrinterBlacklisted = true; } if (value) { item2.AIBlacklisted = true; } } return enabled.Value; } public bool ValidateInteractable(InteractableBase interactable, List interactableList) { InteractableBase interactable2 = interactable; ConfigEntry enabled = ((BaseUnityPlugin)this).Config.Bind("Enable Interactable?", interactable2.ConfigCategory, true, "Should this interactable appear in runs?"); useChapter1.SettingChanged += delegate { if (!useChapter1.Value && interactable2.isChapter1) { enabled.Value = false; } }; useChapter2.SettingChanged += delegate { if (!useChapter2.Value && interactable2.isChapter2) { enabled.Value = false; } }; useChapter3.SettingChanged += delegate { if (!useChapter3.Value && interactable2.isChapter3) { enabled.Value = false; } }; useChapter4.SettingChanged += delegate { if (!useChapter4.Value && interactable2.isChapter4) { enabled.Value = false; } }; if (enabled.Value) { interactableList.Add(interactable2); } return enabled.Value; } public void ToggleItemsForCommand(object sender, EventArgs e) { List toggleableItems = new List(); toggleableItems.Add(ItemBase.instance.ItemDef); toggleableItems.Add(ItemBase.instance.ItemDef); toggleableItems.Add(ItemBase.instance.ItemDef); toggleableItems.Add(ItemBase.instance.ItemDef); toggleableItems.Add(ItemBase.instance.ItemDef); toggleableItems.Add(ItemBase.instance.ItemDef); Run.onRunSetRuleBookGlobal += delegate(Run run, RuleBook rulebook) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) foreach (ItemDef item in toggleableItems) { if (antiFunMode.Value) { try { run.availableItems.Add(item.itemIndex); } catch { Debug.Log((object)(((object)item)?.ToString() + " is already disabled!")); } } else if (!antiFunMode.Value) { try { run.availableItems.Remove(item.itemIndex); } catch { Debug.Log((object)(((object)item)?.ToString() + " is already enabled!")); } } } }; } public void RemoveFromLootPool() { List blacklistedItems = new List(); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); blacklistedItems.Add(ItemBase.instance.ItemDef); Run.onRunSetRuleBookGlobal += delegate(Run run, RuleBook rulebook) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) foreach (ItemDef item in blacklistedItems) { try { run.availableItems.Remove(item.itemIndex); } catch { Debug.Log((object)(((object)item)?.ToString() + " is already disabled!")); } } PickupDropTable.RegenerateAll(run); }; } private void Update() { } } } namespace DeltaruneMod.Util { public class Components { public class FollowTarget : MonoBehaviour { public Transform target; public Vector3 offset = Vector3.zero; public bool followRotation = false; private void FixedUpdate() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target)) { ((Component)this).transform.position = target.position + offset; if (followRotation) { ((Component)this).transform.rotation = target.rotation; } } } } public class TextController : NetworkBehaviour { public TextMeshPro textMesh; public void SetText(string newText) { ((TMP_Text)textMesh).text = newText; } } public class Timer : MonoBehaviour { private float timer = 0f; private bool timerActive = false; public bool CallTimer(float interval) { timer = interval; timerActive = true; while (timer > 0f) { Debug.Log((object)("Timer: " + timer)); } return true; } private void Update() { if (timerActive) { timer -= Time.deltaTime; } } } } public abstract class CoreModule { public abstract string Name { get; } public abstract void Init(); } public static class Helpers { public static List GetItems(int tierIndex) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Invalid comparison between Unknown and I4 //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Invalid comparison between Unknown and I4 //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Invalid comparison between Unknown and I4 //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Invalid comparison between Unknown and I4 //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Invalid comparison between Unknown and I4 //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Invalid comparison between Unknown and I4 //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Invalid comparison between Unknown and I4 //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Invalid comparison between Unknown and I4 //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Invalid comparison between Unknown and I4 List list = new List(); for (ItemIndex val = (ItemIndex)0; (int)val < ItemCatalog.itemCount; val = (ItemIndex)(val + 1)) { ItemDef itemDef = ItemCatalog.GetItemDef(val); if ((Object)(object)itemDef == (Object)null || itemDef.ContainsTag((ItemTag)9)) { continue; } switch (tierIndex) { case 99: list.Add(itemDef); continue; case 0: if ((int)itemDef.tier == 0) { list.Add(itemDef); continue; } break; } if (tierIndex == 1 && (int)itemDef.tier == 1) { list.Add(itemDef); } else if (tierIndex == 2 && (int)itemDef.tier == 2) { list.Add(itemDef); } else if (tierIndex == 3 && (int)itemDef.tier == 3) { list.Add(itemDef); } else if (tierIndex == 4 && (int)itemDef.tier == 4) { list.Add(itemDef); } else if (tierIndex == 5 && (int)itemDef.tier == 5) { list.Add(itemDef); } else if (tierIndex == 6 && (int)itemDef.tier == 6) { list.Add(itemDef); } else if (tierIndex == 7 && (int)itemDef.tier == 7) { list.Add(itemDef); } else if (tierIndex == 8 && (int)itemDef.tier == 8) { list.Add(itemDef); } else if (tierIndex == 9 && (int)itemDef.tier == 9) { list.Add(itemDef); } else if (tierIndex == 10 && (int)itemDef.tier == 11) { list.Add(itemDef); } } return list; } public static List GetAllPermenantItemsFromInventory(Inventory inv) { //IL_0008: 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_0043: Invalid comparison between Unknown and I4 //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_003c: Unknown result type (might be due to invalid IL or missing references) List list = new List(); for (ItemIndex val = (ItemIndex)0; (int)val < ItemCatalog.itemCount; val = (ItemIndex)(val + 1)) { ItemDef itemDef = ItemCatalog.GetItemDef(val); if (!((Object)(object)itemDef == (Object)null) && inv.GetItemCountPermanent(val) > 0) { list.Add(itemDef); } } return list; } public static List GetAllTempItemsFromInventory(Inventory inv) { //IL_0008: 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_0043: Invalid comparison between Unknown and I4 //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_003c: Unknown result type (might be due to invalid IL or missing references) List list = new List(); for (ItemIndex val = (ItemIndex)0; (int)val < ItemCatalog.itemCount; val = (ItemIndex)(val + 1)) { ItemDef itemDef = ItemCatalog.GetItemDef(val); if (!((Object)(object)itemDef == (Object)null) && inv.GetItemCountTemp(val) > 0) { list.Add(itemDef); } } return list; } public static List GetBuffs(int type) { List list = new List(); FieldInfo[] fields = typeof(Buffs).GetFields(BindingFlags.Static | BindingFlags.Public); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { object? value = fieldInfo.GetValue(null); BuffDef val = (BuffDef)((value is BuffDef) ? value : null); if (val != null && !val.isHidden) { if (type == 0 && !val.isElite && !val.isDebuff) { list.Add(val); } else if (type == 1 && val.isDebuff) { list.Add(val); } else if (type == 2 && val.isElite) { list.Add(val); } else if (type == 99) { list.Add(val); } } } fields = typeof(Buffs).GetFields(BindingFlags.Static | BindingFlags.Public); FieldInfo[] array2 = fields; foreach (FieldInfo fieldInfo2 in array2) { object? value2 = fieldInfo2.GetValue(null); BuffDef val2 = (BuffDef)((value2 is BuffDef) ? value2 : null); if (val2 != null && !val2.isHidden) { if (type == 0 && !val2.isElite && !val2.isDebuff) { list.Add(val2); } else if (type == 1 && val2.isDebuff) { list.Add(val2); } else if (type == 2 && val2.isElite) { list.Add(val2); } else if (type == 99) { list.Add(val2); } } } fields = typeof(Buffs).GetFields(BindingFlags.Static | BindingFlags.Public); FieldInfo[] array3 = fields; foreach (FieldInfo fieldInfo3 in array3) { object? value3 = fieldInfo3.GetValue(null); BuffDef val3 = (BuffDef)((value3 is BuffDef) ? value3 : null); if (val3 != null && !val3.isHidden) { if (type == 0 && !val3.isElite && !val3.isDebuff) { list.Add(val3); } else if (type == 1 && val3.isDebuff) { list.Add(val3); } else if (type == 2 && val3.isElite) { list.Add(val3); } else if (type == 99) { list.Add(val3); } } } return list; } public static void CreateEffectPrefab(GameObject obj, bool isFollower) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) EffectComponent val = obj.GetComponent(); if (!Object.op_Implicit((Object)(object)val)) { val = obj.AddComponent(); } val.applyScale = isFollower; val.effectIndex = (EffectIndex)(-1); val.parentToReferencedTransform = isFollower; val.positionAtReferencedTransform = isFollower; ContentAddition.AddEffect(obj); } public static void AddEffectPrefabToContentAddition(GameObject obj) { if (!Object.op_Implicit((Object)(object)obj.GetComponent())) { obj.AddComponent(); } if (!Object.op_Implicit((Object)(object)obj.GetComponent())) { obj.AddComponent(); } ContentAddition.AddEffect(obj); } public static void CreateNetworkedObjectPrefab(GameObject obj) { if (!Object.op_Implicit((Object)(object)obj.GetComponent())) { obj.AddComponent(); } PrefabAPI.RegisterNetworkPrefab(obj); ContentAddition.AddNetworkedObject(obj); } public static void CreateNetworkedProjectilePrefab(GameObject obj) { if (!Object.op_Implicit((Object)(object)obj.GetComponent())) { obj.AddComponent(); } if (!Object.op_Implicit((Object)(object)obj.GetComponent())) { obj.AddComponent(); } if (!Object.op_Implicit((Object)(object)obj.GetComponent())) { obj.AddComponent(); } PrefabAPI.RegisterNetworkPrefab(obj); ContentAddition.AddProjectile(obj); } public static GameObject ModifyVanillaPrefab(string addressablePath, string newName, bool shouldNetwork, Func modifierCallback) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)addressablePath).WaitForCompletion(), "Temporary Setup Prefab", false); GameObject val2 = modifierCallback(val); GameObject result = PrefabAPI.InstantiateClone(val2, newName, shouldNetwork); Object.Destroy((Object)(object)val); Object.Destroy((Object)(object)val2); return result; } public static NetworkSoundEventDef CreateNetworkSoundEventDef(string eventName) { NetworkSoundEventDef val = ScriptableObject.CreateInstance(); val.akId = AkSoundEngine.GetIDFromString(eventName); val.eventName = eventName; ContentAddition.AddNetworkSoundEventDef(val); return val; } public static void GetAllComponentNames(GameObject obj) { Component[] components = obj.GetComponents(); foreach (Component val in components) { Debug.Log((object)(((object)obj)?.ToString() + ": " + (object)val)); } } public static void GetAllTransformNames(GameObject obj) { Transform[] componentsInChildren = obj.GetComponentsInChildren(); foreach (Transform val in componentsInChildren) { Debug.Log((object)(((Object)val.parent).name + ": " + ((Object)val).name)); } } public static void AddPersistentListener(this UnityEvent unityEvent, UnityAction action) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls; PersistentCall val = new PersistentCall(); ref Object target = ref val.m_Target; object? target2 = ((Delegate)(object)action).Target; target = (Object)((target2 is Object) ? target2 : null); val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName); val.m_MethodName = ((Delegate)(object)action).Method.Name; val.m_CallState = (UnityEventCallState)2; val.m_Mode = (PersistentListenerMode)0; persistentCalls.AddListener(val); } public static void AddPersistentListener(this UnityEvent unityEvent, UnityAction action) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls; PersistentCall val = new PersistentCall(); ref Object target = ref val.m_Target; object? target2 = ((Delegate)(object)action).Target; target = (Object)((target2 is Object) ? target2 : null); val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName); val.m_MethodName = ((Delegate)(object)action).Method.Name; val.m_CallState = (UnityEventCallState)2; val.m_Mode = (PersistentListenerMode)0; persistentCalls.AddListener(val); } public static void AddPersistentListener(this UnityEvent unityEvent, UnityAction action) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls; PersistentCall val = new PersistentCall(); ref Object target = ref val.m_Target; object? target2 = ((Delegate)(object)action).Target; target = (Object)((target2 is Object) ? target2 : null); val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName); val.m_MethodName = ((Delegate)(object)action).Method.Name; val.m_CallState = (UnityEventCallState)2; val.m_Mode = (PersistentListenerMode)0; persistentCalls.AddListener(val); } public static Texture2D CreateGradientTexture(Color32[] colors, int width, int height) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_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_0083: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(width, height); ((Texture)val).wrapMode = (TextureWrapMode)1; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { float num = (float)j / (float)(width - 1); float num2 = num * (float)(colors.Length - 1); int num3 = Mathf.FloorToInt(num2); float t = num2 - (float)num3; if (num3 >= colors.Length - 1) { num3 = colors.Length - 2; t = 1f; } Color32 val2 = LerpColor32(colors[num3], colors[num3 + 1], t); val.SetPixel(j, i, Color32.op_Implicit(val2)); } } val.Apply(); DeltarunePlugin.malachiteOverlayMat.SetTexture("_RemapTex", (Texture)(object)val); return val; } public static Color32 LerpColor32(Color32 colorA, Color32 colorB, float t) { //IL_0001: 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_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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) byte b = (byte)Mathf.Lerp((float)(int)colorA.r, (float)(int)colorB.r, t); byte b2 = (byte)Mathf.Lerp((float)(int)colorA.g, (float)(int)colorB.g, t); byte b3 = (byte)Mathf.Lerp((float)(int)colorA.b, (float)(int)colorB.b, t); byte b4 = (byte)Mathf.Lerp((float)(int)colorA.a, (float)(int)colorB.a, t); return new Color32(b, b2, b3, b4); } } public class Hooks { private int numOfEnemiesSpawned = 0; public Hooks() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); if (!DeltarunePlugin.neoEliteDisable.Value && DeltarunePlugin.allEnemiesNEO.Value && !body.isPlayerControlled && !body.isRemoteOp && !body.IsDrone) { numOfEnemiesSpawned++; body.inventory.SetEquipmentIndex(EliteBase.instance.EliteEquip.equipmentIndex, true); } } } 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); } } public static class SoundBank { public static uint _soundBankId; public const string soundBankFolderName = "AGU-DeltaruneMod"; public const string soundBankFileName = "DeltaruneSoundBank.bnk"; public static string SoundBankDirectory => Path.GetDirectoryName(((BaseUnityPlugin)DeltarunePlugin.Instance).Info.Location); public static void Init() { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Invalid comparison between Unknown and I4 //IL_00d1: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)SoundBankDirectory); try { string text = ((!SoundBankDirectory.Contains("AGU-DeltaruneMod")) ? Path.Combine(SoundBankDirectory, "AGU-DeltaruneMod", "DeltaruneSoundBank.bnk") : Path.Combine(SoundBankDirectory, "DeltaruneSoundBank.bnk")); Debug.Log((object)(SoundBankDirectory + " ||| DeltaruneSoundBank.bnk")); Debug.Log((object)$"SoundBank size: {new FileInfo(text).Length} bytes"); Debug.Log((object)"Attempting to load sound bank..."); if (!File.Exists(text)) { Debug.Log((object)"Sound bank path does not exist!!"); return; } AKRESULT val = AkSoundEngine.LoadBank(text, ref _soundBankId); if ((int)val == 1) { Debug.Log((object)"SoundBank loaded successfully!"); } else { Debug.Log((object)$"SoundBank failed to load. {val}"); } SoundBanks.Add(text); } catch (Exception ex) { Debug.Log((object)("Failed to load soundbank: " + ex)); } } } public class StatHooks : CoreModule { public class StatHookEventArgs : EventArgs { public float healthMultAdd = 0f; public float baseHealthAdd = 0f; public float baseShieldAdd = 0f; public float regenMultAdd = 0f; public float baseRegenAdd = 0f; public float baseMoveSpeedAdd = 0f; public float moveSpeedMultAdd = 0f; public float jumpPowerMultAdd = 0f; public float damageMultAdd = 0f; public float baseDamageAdd = 0f; public float baseAttackSpeedAdd = 0f; public float attackSpeedMultAdd = 0f; public float critAdd = 0f; public float armorAdd = 0f; } public delegate void StatHookEventHandler(CharacterBody sender, StatHookEventArgs args); [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_CBRecalcStats; } public override string Name => "StatHooks (from TILER2 originally)"; public static event StatHookEventHandler GetStatCoefficients; public override void Init() { //IL_0011: 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) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__IL_CBRecalcStats; if (obj == null) { Manipulator val = IL_CBRecalcStats; <>O.<0>__IL_CBRecalcStats = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; } internal static void IL_CBRecalcStats(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0a84: Unknown result type (might be due to invalid IL or missing references) //IL_0aa9: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); StatHookEventArgs statMods = null; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(CharacterBody cb) { statMods = new StatHookEventArgs(); StatHooks.GetStatCoefficients?.Invoke(cb, statMods); }); int locBaseHealthIndex = -1; int locHealthMultIndex = -1; if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseMaxHealth"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelMaxHealth") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseHealthIndex) }) && val.TryGotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseHealthIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locHealthMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseHealthIndex) })) { val.GotoPrev(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseMaxHealth") }); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseHealthIndex) }); val.EmitDelegate>((Func)((float origMaxHealth) => origMaxHealth + statMods.baseHealthAdd)); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locHealthMultIndex) }); val.EmitDelegate>((Func)((float origHealthMult) => origHealthMult + statMods.healthMultAdd)); } val.Index = 0; int locBaseShieldIndex = -1; if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseMaxShield"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelMaxShield") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseShieldIndex) })) { val.EmitDelegate>((Func)((float origBaseShield) => origBaseShield + statMods.baseShieldAdd)); } val.Index = 0; int locRegenMultIndex = -1; int locFinalRegenIndex = -1; if (val.TryGotoNext(new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locFinalRegenIndex), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "set_regen") }) && val.TryGotoPrev(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locRegenMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locFinalRegenIndex) })) { val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locRegenMultIndex) }); val.EmitDelegate>((Func)(() => statMods.baseRegenAdd)); val.Emit(OpCodes.Add); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchMul(x) }); val.EmitDelegate>((Func)((float origRegenMult) => origRegenMult + statMods.regenMultAdd)); } val.Index = 0; int locBaseSpeedIndex = -1; int locSpeedMultIndex = -1; int locSpeedDivIndex = -1; if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseMoveSpeed"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelMoveSpeed") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseSpeedIndex) }) && val.TryGotoNext(new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseSpeedIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locSpeedMultIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locSpeedDivIndex), (Instruction x) => ILPatternMatchingExt.MatchDiv(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseSpeedIndex) })) { val.GotoPrev(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelMoveSpeed") }); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseSpeedIndex) }); val.EmitDelegate>((Func)((float origBaseMoveSpeed) => origBaseMoveSpeed + statMods.baseMoveSpeedAdd)); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locSpeedMultIndex) }); val.EmitDelegate>((Func)((float origMoveSpeedMult) => origMoveSpeedMult + statMods.moveSpeedMultAdd)); } val.Index = 0; int num = default(int); if (val.TryGotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseJumpPower"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelJumpPower"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x) })) { val.EmitDelegate>((Func)((float origJumpPower) => origJumpPower * (1f + statMods.jumpPowerMultAdd))); } val.Index = 0; int locBaseDamageIndex = -1; int locDamageMultIndex = -1; if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseDamage"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelDamage") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseDamageIndex) }) && val.TryGotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseDamageIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locDamageMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseDamageIndex) })) { val.GotoPrev(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseDamage") }); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseDamageIndex) }); val.EmitDelegate>((Func)((float origDamage) => origDamage + statMods.baseDamageAdd)); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locDamageMultIndex) }); val.EmitDelegate>((Func)((float origDamageMult) => origDamageMult + statMods.damageMultAdd)); } val.Index = 0; int locBaseAttackSpeedIndex = -1; int locAttackSpeedMultIndex = -1; if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseAttackSpeed"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "levelAttackSpeed") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseAttackSpeedIndex) }) && val.TryGotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseAttackSpeedIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locAttackSpeedMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseAttackSpeedIndex) })) { val.GotoPrev(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseAttackSpeed") }); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseAttackSpeedIndex) }); val.EmitDelegate>((Func)((float origSpeed) => origSpeed + statMods.baseAttackSpeedAdd)); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locAttackSpeedMultIndex) }); val.EmitDelegate>((Func)((float origSpeedMult) => origSpeedMult + statMods.attackSpeedMultAdd)); } val.Index = 0; int locOrigCrit = -1; if (val.TryGotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locOrigCrit), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "set_crit") })) { val.Emit(OpCodes.Ldloc, locOrigCrit); val.EmitDelegate>((Func)((float origCrit) => origCrit + statMods.critAdd)); val.Emit(OpCodes.Stloc, locOrigCrit); } val.Index = 0; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "baseArmor") }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_armor") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_armor") })) { val.EmitDelegate>((Func)((float oldArmor) => oldArmor + statMods.armorAdd)); } } } internal class UnusedCode { } } namespace DeltaruneMod.Unlocks { public class NEOMithrixUnlock : BaseAchievement { } internal class RiskOfRuneUnlocks { public static UnlockableDef roaringKnightUnlockableDef; public static void Init() { } } } namespace DeltaruneMod.NeoMithrix { public class NeoMithrixController { private static bool playerHadThornRing; public NeoMithrixController() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { //IL_00f9: 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_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); if (body.isPlayerControlled && body.inventory.GetItemCount(ItemBase.instance.ItemDef) > 0) { playerHadThornRing = true; Debug.Log((object)"Player had thorn ring."); } if (playerHadThornRing) { if (((Object)body).name == "BrotherBody(Clone)" && body.inventory.GetItemCountPermanent(ItemBase.instance.ItemDef) <= 0) { self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.SetEquipmentIndex(EliteBase.instance.EliteEquip.equipmentIndex, true); Debug.Log((object)"Giving basic mithrix item."); } else if (((Object)body).name == "BrotherGlassBody(Clone)" && body.inventory.GetItemCountPermanent(ItemBase.instance.ItemDef) <= 0) { self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.SetEquipmentIndex(EliteBase.instance.EliteEquip.equipmentIndex, true); Debug.Log((object)"Giving glass mithrix item."); } else if (((Object)body).name == "BrotherHurtBody(Clone)" && body.inventory.GetItemCountPermanent(ItemBase.instance.ItemDef) <= 0) { self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.SetEquipmentIndex(EliteBase.instance.EliteEquip.equipmentIndex, true); Debug.Log((object)"Giving hurt mithrix item."); } else if (((Object)body).name == "ITBrotherBody(Clone)" && body.inventory.GetItemCountPermanent(ItemBase.instance.ItemDef) <= 0) { self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); self.inventory.SetEquipmentIndex(EliteBase.instance.EliteEquip.equipmentIndex, true); Debug.Log((object)"Giving IT mithrix item."); } } } } public class NeoMithrixItem : ItemBase { public override string ItemName => "NEO_MITHRIX_BASE_ITEM"; public override string ItemLangTokenName => "NEO_MITHRIX_BASE"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("neo_chestplate.prefab"); public override Sprite ItemIcon => null; public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "chest", localPos = new Vector3(-0.02253f, -0.24776f, 0.26671f), localAngles = new Vector3(340.4726f, 7.2708f, 350.1845f), localScale = new Vector3(13.03703f, 14.24153f, 15.06375f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (!NetworkServer.active || !Object.op_Implicit((Object)(object)sender.inventory) || GetCount(sender) <= 0) { return; } if (sender.GetBuffCount(ThornRing.frostbite) > 0) { for (int i = 0; i < sender.GetBuffCount(ThornRing.frostbite); i++) { sender.RemoveBuff(ThornRing.frostbite); Debug.Log((object)"Removing fortbite stacks!"); } } args.healthMultAdd += 8f; args.armorTotalMult += 0.5f; args.attackSpeedMultAdd += 2f; args.critDamageMultAdd += 2f; args.critAdd += 1.25f; args.regenMultAdd += 2f; args.damageMultAdd += 2f; } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class NeoMithrixLeftWing : ItemBase { public override string ItemName => "NEO_MITHRIX_LEFT_WING_DISPLAY_ITEM"; public override string ItemLangTokenName => "NEO_MITHRIX_LEFT_WING_DISPLAY_ITEM"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("neo_left_wing.prefab"); public override Sprite ItemIcon => null; public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "chest", localPos = new Vector3(-0.24608f, 0.298f, -0.2235f), localAngles = new Vector3(22.15644f, 326.9847f, 325.871f), localScale = new Vector3(32.06147f, 23.74224f, 9.22609f) } }); return val; } public override void Hooks() { } public override void Init() { CreateItem(); CreateLang(); } } public class NeoMithrixLimb : ItemBase { public override string ItemName => "NEO_MITHRIX_LIMB_DISPLAY_ITEM"; public override string ItemLangTokenName => "NEO_MITHRIX_LIMB_DISPLAY_ITEM"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("neo_limb.prefab"); public override Sprite ItemIcon => null; public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0173: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[4] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmR", localPos = new Vector3(2.21972f, -0.3514f, 0.97877f), localAngles = new Vector3(359.5706f, 336.0472f, 355.0849f), localScale = new Vector3(50.67373f, 10.90218f, 37.61541f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfL", localPos = new Vector3(1.69327f, -0.87295f, -2.68867f), localAngles = new Vector3(357.1952f, 58.53083f, 350.397f), localScale = new Vector3(68.1146f, 14.93527f, 46.738f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfR", localPos = new Vector3(2.03953f, 1.32916f, 2.46837f), localAngles = new Vector3(358.2022f, 130.2431f, 171.4975f), localScale = new Vector3(68.1146f, 14.93527f, 46.738f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmL", localPos = new Vector3(2.66172f, 0.04324f, MathF.E * -147f / 292f), localAngles = new Vector3(8.13478f, 26.6752f, 5.05343f), localScale = new Vector3(60.19924f, 12.65326f, 39.0168f) } }); return val; } public override void Hooks() { } public override void Init() { CreateItem(); CreateLang(); } } public class NeoMithrixRightWing : ItemBase { public override string ItemName => "NEO_MITHRIX_RIGHT_WING_DISPLAY_ITEM"; public override string ItemLangTokenName => "NEO_MITHRIX_RIGHT_WING_DISPLAY_ITEM"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("neo_right_wing.prefab"); public override Sprite ItemIcon => null; public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "chest", localPos = new Vector3(0.34145f, 0.30649f, -0.20338f), localAngles = new Vector3(349.2747f, 212.71f, 321.6776f), localScale = new Vector3(40.64867f, 23.74224f, 9.22609f) } }); return val; } public override void Hooks() { } public override void Init() { CreateItem(); CreateLang(); } } } namespace DeltaruneMod.Items { public abstract class ItemBase : ItemBase where T : ItemBase { public static T instance { get; private set; } public ItemBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ItemBase was instantiated twice"); } instance = this as T; } } public abstract class ItemBase { public ItemDef ItemDef; public abstract string ItemName { get; } public abstract string ItemLangTokenName { get; } public abstract string ItemPickupDesc { get; } public abstract string ItemFullDescription { get; } public abstract string ItemLore { get; } public abstract ItemTier Tier { get; } public virtual ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[0]; public abstract GameObject ItemModel { get; } public abstract Sprite ItemIcon { get; } public virtual string CorruptsItem { get; set; } = null; public virtual UnlockableDef ItemUnlockableDef { get; set; } = null; public virtual bool CanRemove { get; } = true; public virtual bool AIBlacklisted { get; set; } = false; public virtual bool PrinterBlacklisted { get; set; } = false; public virtual bool RequireUnlock { get; set; } = true; public abstract bool isChapter1 { get; } public abstract bool isChapter2 { get; } public abstract bool isChapter3 { get; } public abstract bool isChapter4 { get; } public string ConfigCategory => "Item: " + ItemLangTokenName; public abstract void Init(); protected void CreateLang() { LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_NAME", ItemName); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_PICKUP", ItemPickupDesc); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_DESCRIPTION", ItemFullDescription); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_LORE", ItemLore); } public abstract ItemDisplayRuleDict CreateItemDisplayRules(); protected void CreateItem() { //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown if (AIBlacklisted) { ItemTags = new List(ItemTags) { (ItemTag)4 }.ToArray(); } ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = "ITEM_" + ItemLangTokenName; ItemDef.nameToken = "ITEM_" + ItemLangTokenName + "_NAME"; ItemDef.pickupToken = "ITEM_" + ItemLangTokenName + "_PICKUP"; ItemDef.descriptionToken = "ITEM_" + ItemLangTokenName + "_DESCRIPTION"; ItemDef.loreToken = "ITEM_" + ItemLangTokenName + "_LORE"; ItemDef.pickupModelPrefab = ItemModel; ItemDef.pickupIconSprite = ItemIcon; ItemDef.hidden = false; ItemDef.canRemove = CanRemove; ItemDef.deprecatedTier = Tier; if (ItemTags.Length != 0) { ItemDef.tags = ItemTags; } if (PrinterBlacklisted) { DeltarunePlugin.BlacklistedFromPrinter.Add(ItemDef); } if (Object.op_Implicit((Object)(object)ItemUnlockableDef)) { ItemDef.unlockableDef = ItemUnlockableDef; } ItemAPI.Add(new CustomItem(ItemDef, CreateItemDisplayRules())); } public abstract void Hooks(); public int GetCount(CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 0; } return body.inventory.GetItemCount(ItemDef); } public int GetCount(CharacterMaster master) { if (!Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)master.inventory)) { return 0; } return master.inventory.GetItemCount(ItemDef); } public static void BlacklistFromPrinter(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int listIndex = -1; int thisIndex = -1; ILLabel[] array = default(ILLabel[]); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchSwitch(x, ref array) }); bool flag = val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, ref thisIndex) }); bool flag2 = val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref listIndex) }); MethodReference val2 = default(MethodReference); val.GotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val2) }); if (!(flag && flag2)) { return; } val.Emit(OpCodes.Ldarg, thisIndex); val.Emit(OpCodes.Ldloc, listIndex); val.EmitDelegate>>((Action>)delegate(ShopTerminalBehavior shopTerminalBehavior, List list) { if (Object.op_Implicit((Object)(object)shopTerminalBehavior) && ((Object)((Component)shopTerminalBehavior).gameObject).name.Contains("Duplicator")) { list.RemoveAll((PickupIndex x) => DeltarunePlugin.BlacklistedFromPrinter.Contains(ItemCatalog.GetItemDef(PickupCatalog.GetPickupDef(x).itemIndex))); } }); } } public class DroneHealingBoost : ItemBase { public class DroneHealingBehavior : ItemBehavior { private float healTimer = 0f; private const float healInterval = 10f; private const float healFraction = 0.025f; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void FixedUpdate() { healTimer -= Time.fixedDeltaTime; if (healTimer <= 0f) { healTimer = 10f; FindAndHeal(base.body); } } private void OnDisable() { } private void FindAndHeal(CharacterBody drone) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown TeamIndex teamIndex = drone.teamComponent.teamIndex; Ray aimRay = ((Component)drone).GetComponent().GetAimRay(); TeamMask none = TeamMask.none; ((TeamMask)(ref none)).AddTeam(drone.master.teamIndex); BullseyeSearch val = new BullseyeSearch { viewer = drone, filterByDistinctEntity = true, filterByLoS = false, minDistanceFilter = 0f, maxDistanceFilter = 100f, maxAngleFilter = 360f, searchDirection = ((Ray)(ref aimRay)).direction, searchOrigin = ((Ray)(ref aimRay)).origin, sortMode = (SortMode)1, queryTriggerInteraction = (QueryTriggerInteraction)0, teamMaskFilter = none }; val.RefreshCandidates(); val.FilterOutGameObject(((Component)drone).gameObject); foreach (HurtBox result in val.GetResults()) { CharacterBody val2 = result.healthComponent?.body; if (Object.op_Implicit((Object)(object)val2) && (Object)(object)val2 != (Object)(object)drone) { try { EffectData val3 = new EffectData { origin = val2.transform.position, scale = 1f }; EffectManager.SpawnEffect(HealEffectPrefab, val3, true); } catch { Debug.Log((object)"NRE, don't spawn effect."); } float num = val2.healthComponent.fullCombinedHealth * 0.025f; val2.healthComponent.Heal(num, default(ProcChainMask), true); } } } } public static GameObject HealEffectPrefab; public override string ItemName => "DroneHealingBoost"; public override string ItemLangTokenName => "DRONE_HEAL_BOOST"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("guide_book.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("guide_book_icon.png"); public override bool isChapter1 => true; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { if (GetCount(self) > 0) { self.AddItemBehavior(GetCount(self)); Debug.Log((object)("Gave " + ((object)self)?.ToString() + " " + ItemName + ".")); } orig.Invoke(self); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || sender.isPlayerControlled || !Object.op_Implicit((Object)(object)sender.inventory)) { return; } int count = GetCount(sender); DroneHealingBehavior droneHealingBehavior = ((Component)sender).gameObject.GetComponent(); if (count > 0) { if (((Enum)sender.bodyFlags).HasFlag((Enum)(object)(BodyFlags)1024)) { sender.inventory.RemoveItem(ItemDef, 1); if (Object.op_Implicit((Object)(object)droneHealingBehavior)) { ((Behaviour)droneHealingBehavior).enabled = false; } } else if (!Object.op_Implicit((Object)(object)droneHealingBehavior)) { droneHealingBehavior = ((Component)sender).gameObject.AddComponent(); ((ItemBehavior)droneHealingBehavior).body = sender; ((Behaviour)droneHealingBehavior).enabled = true; } } if (count <= 0 && Object.op_Implicit((Object)(object)droneHealingBehavior)) { ((Behaviour)droneHealingBehavior).enabled = false; } } private static void CreateEffect() { HealEffectPrefab = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("guide_book_heal.prefab"), "guidebook_heal", true); Helpers.CreateEffectPrefab(HealEffectPrefab, isFollower: true); } public override void Init() { CreateItem(); CreateLang(); CreateEffect(); Hooks(); } } } namespace DeltaruneMod.Items.Yellow { public class MrPipis : ItemBase { public class MrPipisTracker : MonoBehaviour { private List allAffixes = Helpers.GetBuffs(2); public CharacterBody body; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void FixedUpdate() { foreach (BuffDef allAffix in allAffixes) { if (!body.HasBuff(allAffix) && (Object)(object)allAffix != (Object)(object)Buffs.AurelioniteBlessing && (Object)(object)allAffix != (Object)(object)Buffs.EliteAurelionite) { body.AddBuff(allAffix); } } } private void OnDisable() { foreach (BuffDef allAffix in allAffixes) { if (body.HasBuff(allAffix)) { body.RemoveBuff(allAffix); } } } } public override string ItemName => "Mr. Pipis"; public override string ItemLangTokenName => "MR_PIPIS"; public override string ItemPickupDesc => "Gain [ALL] elite buffs!"; public override string ItemFullDescription => "Provides all elite buffs (excluding Aurelionite's blessing)."; public override string ItemLore => "WOWZAS! You can't get THIS from an egg!"; public override ItemTier Tier => (ItemTier)4; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("mr_pipis.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("mr_pipis_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)31 }; public override bool PrinterBlacklisted { get { return base.PrinterBlacklisted; } set { base.PrinterBlacklisted = true; } } public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => true; public override bool isChapter4 => false; public override void Init() { CreateLang(); CreateItem(); Hooks(); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00426f, 0.28094f, -0.00592f), localAngles = new Vector3(353.7496f, 353.853f, 354.2567f), localScale = new Vector3(12.76023f, 16.23372f, 12.76023f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.00228f, 0.0628f, 0.03952f), localAngles = new Vector3(331.6837f, 17.06083f, 354.8333f), localScale = new Vector3(9.05695f, 12.89827f, 9.89628f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.00012f, 0.14728f, -0.00827f), localAngles = new Vector3(4.90821f, 83.88029f, 318.1501f), localScale = new Vector3(8.60173f, 10.61426f, 7.68438f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.25753f, 2.58962f, 1.20786f), localAngles = new Vector3(303.5001f, 137.2872f, 340.3238f), localScale = new Vector3(71.05827f, 91.78291f, 71.05827f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HeadCenter", localPos = new Vector3(-0.00976f, -0.16622f, 0.02857f), localAngles = new Vector3(339.7454f, 0.5669f, 354.8185f), localScale = new Vector3(12.66013f, 12.66013f, 15.70925f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00013f, 0.14606f, -0.09325f), localAngles = new Vector3(2.27543f, 348.6211f, 345.7619f), localScale = new Vector3(6.82893f, 7.70643f, 6.74123f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00885f, 0.20796f, 0.01862f), localAngles = new Vector3(359.5584f, 1.03469f, 353.8554f), localScale = new Vector3(8.35088f, 8.35088f, 8.35088f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(-0.3344f, -0.04913f, 0.41831f), localAngles = new Vector3(13.48484f, 348.6151f, 346.5744f), localScale = new Vector3(8.67167f, 7.96958f, 6.45425f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00889f, 0.18897f, 0.0452f), localAngles = new Vector3(21.75747f, 6.04681f, 9.19641f), localScale = new Vector3(8.36439f, 8.36439f, 8.15949f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-151f / (180f * MathF.E), 0.19218f, 0.66591f), localAngles = new Vector3(295.8134f, 350.4054f, 174.2124f), localScale = new Vector3(87.16365f, 99.29857f, 103.8343f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.03626f, 0.17108f, -0.01637f), localAngles = new Vector3(336.6772f, 351.1885f, 337.5962f), localScale = new Vector3(9.64486f, 9.54612f, 9.64486f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "GunStock", localPos = new Vector3(0.01195f, -0.32039f, 0.02558f), localAngles = new Vector3(76.31502f, 226.8212f, 213.0602f), localScale = new Vector3(6.96663f, 6.19495f, 6.19495f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.02832f, 0.07043f, 0.06621f), localAngles = new Vector3(328.4013f, 84.34533f, 35.42325f), localScale = new Vector3(8.81553f, 9.3033f, 7.34627f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.71728f, -73f / (102f * MathF.PI), -0.04492f), localAngles = new Vector3(288.7068f, 247.8444f, 183.6162f), localScale = new Vector3(13.41672f, 12.80579f, 12.2074f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pack", localPos = new Vector3(-0.20928f, 0.1406f, -0.22238f), localAngles = new Vector3(335.5866f, 33.30312f, 20.72316f), localScale = new Vector3(9.48945f, 9.31357f, 8.43507f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.05703f, 0.27612f, 0.11341f), localAngles = new Vector3(293.5728f, 356.797f, 23.95159f), localScale = new Vector3(12.79138f, 17.81891f, 15.91274f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00018f, -0.00465f, 0.00218f), localAngles = new Vector3(318.1143f, 9.05731f, 355.9294f), localScale = new Vector3(0.45699f, 0.45699f, 0.45699f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (!NetworkServer.active || !Object.op_Implicit((Object)(object)sender.inventory)) { return; } MrPipisTracker mrPipisTracker = ((Component)sender).GetComponent(); if (GetCount(sender) > 0) { if (!Object.op_Implicit((Object)(object)mrPipisTracker)) { mrPipisTracker = ((Component)sender).gameObject.AddComponent(); mrPipisTracker.body = sender; ((Behaviour)mrPipisTracker).enabled = true; } if (!((Behaviour)mrPipisTracker).enabled) { ((Behaviour)mrPipisTracker).enabled = true; } } else if (GetCount(sender) <= 0 && Object.op_Implicit((Object)(object)mrPipisTracker)) { ((Behaviour)mrPipisTracker).enabled = false; } } } public class Pipis : ItemBase { public override string ItemName => "Pipis"; public override string ItemLangTokenName => "PIPIS"; public override string ItemPickupDesc => "Increases ALL of your stats."; public override string ItemFullDescription => "Increases ALL stats by 5%.\nPearl be damned my boy ballin'."; public override string ItemLore => "You can't get this from an egg!"; public override ItemTier Tier => (ItemTier)4; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("pipis.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("pipis_icon.png"); public override ItemTag[] ItemTags { get { ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); return (ItemTag[])(object)array; } } public override bool PrinterBlacklisted { get { return base.PrinterBlacklisted; } set { base.PrinterBlacklisted = true; } } public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => true; public override bool isChapter4 => false; public override void Init() { CreateLang(); CreateItem(); Hooks(); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LeftJet", localPos = new Vector3(0.00013f, 0.01343f, 0.00686f), localAngles = new Vector3(22.89687f, 268.0432f, 258.2714f), localScale = new Vector3(6.9072f, 6.9072f, 6.9072f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.00725f, 0.12978f, 0.13905f), localAngles = new Vector3(357.6052f, 89.41378f, 342.1603f), localScale = new Vector3(9.75112f, 11.98992f, 9.75112f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MuzzleShotgun", localPos = new Vector3(-0.02101f, -0.00477f, 0.01479f), localAngles = new Vector3(283.734f, 62.9136f, 28.78585f), localScale = new Vector3(5.99235f, 4.61689f, 3.53847f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.3794f, 2.70397f, -0.97458f), localAngles = new Vector3(307.1695f, 173.5109f, 2.96273f), localScale = new Vector3(43.89983f, 71.05827f, 71.05827f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MuzzleRight", localPos = new Vector3(0.00286f, 0.01333f, -0.1631f), localAngles = new Vector3(1.78108f, 89.37039f, 87.38036f), localScale = new Vector3(12.83591f, 15.81911f, 13.84606f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ClavicleL", localPos = new Vector3(-0.16533f, 0.09445f, -0.10163f), localAngles = new Vector3(349.5243f, 83.51843f, 56.10131f), localScale = new Vector3(6.82893f, 6.82893f, 6.82893f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.01925f, 0.19819f, -0.09577f), localAngles = new Vector3(286.5604f, 24.27891f, 103.4976f), localScale = new Vector3(6.88069f, 11.03788f, 5.78616f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Eye", localPos = new Vector3(-0.00365f, 0.80307f, 0.01732f), localAngles = new Vector3(1.07244f, 104.6857f, 9.88337f), localScale = new Vector3(20.04582f, 23.37344f, 17.21499f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MechHandRight", localPos = new Vector3(-0.04124f, 0.32469f, 0.04654f), localAngles = new Vector3(15.33141f, 189.3875f, 78.24608f), localScale = new Vector3(7.36798f, 13.29883f, 7.36798f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(1.08672f, 1.76753f, 0.084f), localAngles = new Vector3(0.90842f, 268.449f, 232.6822f), localScale = new Vector3(64.47551f, 95.74067f, 64.47551f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.03565f, 0.07075f, 0.01312f), localAngles = new Vector3(9.92061f, 146.7857f, 17.66426f), localScale = new Vector3(4.8577f, 7.78581f, 4.07227f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "GunBarrel", localPos = new Vector3(-0.00422f, 0.63713f, -0.00013f), localAngles = new Vector3(2.21753f, 266.1243f, 174.4695f), localScale = new Vector3(6.33012f, 9.30456f, 5.06844f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CannonEnd", localPos = new Vector3(0.10334f, 0.00193f, 0.0155f), localAngles = new Vector3(23.73183f, 114.4923f, 301.8614f), localScale = new Vector3(11.51731f, 13.92004f, 13.6393f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.24121f, 0.03468f, -0.05723f), localAngles = new Vector3(1.51737f, 351.2228f, 259.804f), localScale = new Vector3(13.09572f, 17.80788f, 9.28489f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pack", localPos = new Vector3(0.18237f, -0.31841f, -0.16186f), localAngles = new Vector3(321.2907f, 71.28646f, 1.76035f), localScale = new Vector3(8.24892f, 7.33238f, 7.33238f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.00591f, 0.21158f, 0.12662f), localAngles = new Vector3(7.60785f, 236.6935f, 268.9621f), localScale = new Vector3(17.39792f, 13.6196f, 9.26764f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.01144f, 0.01106f, 0.00398f), localAngles = new Vector3(14.68918f, 284.3936f, 34.94466f), localScale = new Vector3(0.12866f, 0.12866f, 0.12866f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (GetCount(sender) > 0) { float num = 0.05f * (float)GetCount(sender); args.armorAdd += num; args.healthMultAdd += num; args.moveSpeedMultAdd += num; args.regenMultAdd += num; args.attackSpeedMultAdd += num; args.damageMultAdd += num; args.critDamageMultAdd += num; args.critAdd += num; } } } } namespace DeltaruneMod.Items.VoidTier3 { public class GasterMask : ItemBase { public class ThingyMaBobber : MonoBehaviour { private void Start() { } } public static GameObject? CorruptedEffect; public static GameObject? CorruptedEffectHolder; public static BuffDef? CorruptedBuff; private static Dictionary lastTimeCloneSpawned = new Dictionary(); private static int CorruptConversionTime; private const int CorruptionBaseTime = 10; private const int CorruptionMultTime = 10; public override string ItemName => "Mystery Man's Mask"; public override string ItemLangTokenName => "GASTER_MASK"; public override string ItemPickupDesc => "Enemies that fall below 10% hp become corrupted allies."; public override string ItemFullDescription => "Enemies gain corruption when hit, when below 10% hp\nenemies become corrupted allies for 10 seconds (+5 seconds per stack)."; public override string ItemLore => "ENTRY NUMBER SEVENTEEN\nDARK DARKER YET DARKER\nTHE DARKNESS KEEPS GROWING\nTHE SHADOWS CUTTING DEEPER\nPHOTON READINGS NEGATIVE\nTHIS NEXT EXPERIMENT SEEMS\nVERY\nVERY\nINTERESTING\n...\nWHAT DO YOU TWO THINK?"; public override ItemTier Tier => (ItemTier)8; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("jim_carry.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("gaster_mask_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)31, (ItemTag)3 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00484f, 0.15576f, 0.17125f), localAngles = new Vector3(1.25397f, 11.50918f, 6.27662f), localScale = new Vector3(20.17389f, 16.41514f, 14.26258f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.06212f, 0.18936f, 0.06251f), localAngles = new Vector3(343.725f, 48.58814f, 87.27997f), localScale = new Vector3(20.71162f, 11.90766f, 20.163f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.04526f, 0.43044f, 0.00021f), localAngles = new Vector3(310.7578f, 272.6447f, 200.3735f), localScale = new Vector3(8.16914f, 10.08745f, 22.35655f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.03019f, 2.26872f, -1.59739f), localAngles = new Vector3(352.7149f, 184.7088f, 5.8332f), localScale = new Vector3(156.4683f, 154.412f, 137.6366f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HeadCenter", localPos = new Vector3(-0.02221f, -0.14321f, 0.14116f), localAngles = new Vector3(23.69127f, 0.49073f, 4.00108f), localScale = new Vector3(18.76241f, 18.76241f, 23.30275f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00277f, -0.00501f, 0.06621f), localAngles = new Vector3(44.7427f, 2.09911f, 11.68187f), localScale = new Vector3(13.09389f, 12.52534f, 17.95528f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00327f, 0.00105f, 0.13535f), localAngles = new Vector3(17.26723f, 1.85906f, 3.79916f), localScale = new Vector3(16.98133f, 16.98133f, 16.98133f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(0.01572f, -0.71368f, 0.45949f), localAngles = new Vector3(35.03239f, 355.333f, 5.21368f), localScale = new Vector3(10.81663f, 11.5587f, 15.57455f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.00682f, 0.01759f, 0.12759f), localAngles = new Vector3(21.5564f, 357.711f, 8.21154f), localScale = new Vector3(16.32249f, 16.32249f, 16.32249f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmR", localPos = new Vector3(0.64784f, 4.53546f, -0.38265f), localAngles = new Vector3(328.7607f, 126.7533f, 196.0015f), localScale = new Vector3(105.2913f, 105.2913f, 105.2913f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.00626f, -0.05815f, 0.06957f), localAngles = new Vector3(45.36594f, 6.86109f, 4.36906f), localScale = new Vector3(20.47853f, 22.18686f, 16.38765f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfR", localPos = new Vector3(0.03037f, 0.4968f, -0.00454f), localAngles = new Vector3(322.3176f, 103.4467f, 189.6833f), localScale = new Vector3(5.93988f, 5.93988f, 5.93988f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pelvis", localPos = new Vector3(0.15373f, 0.24446f, 0.03026f), localAngles = new Vector3(340.4142f, 73.74163f, 188.0902f), localScale = new Vector3(11.62083f, 14.08597f, 13.00007f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.01803f, 0.07721f, -0.01165f), localAngles = new Vector3(301.0483f, 110.7157f, 352.321f), localScale = new Vector3(27.02637f, 26.15091f, 23.47674f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00883f, 0.00561f, 0.08645f), localAngles = new Vector3(31.61168f, 16.3422f, 8.38587f), localScale = new Vector3(16.20963f, 17.43578f, 17.43578f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.02389f, 0.08106f, 0.09232f), localAngles = new Vector3(39.72403f, 14.81765f, 12.42787f), localScale = new Vector3(35.0727f, 35.0727f, 35.0727f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.00038f, 0.00367f, 0.00505f), localAngles = new Vector3(40.00007f, 8.95804f, 18.94578f), localScale = new Vector3(0.92104f, 0.58765f, 0.86567f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); } private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); GameObject attacker = damageInfo.attacker; if (!Object.op_Implicit((Object)(object)attacker)) { return; } CharacterBody component = attacker.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } CharacterBody component2 = victim.GetComponent(); if (!Object.op_Implicit((Object)(object)component2) || ((Enum)component2.bodyFlags).HasFlag((Enum)(object)(BodyFlags)2) || component2.isPlayerControlled || !NetworkServer.active || GetCount(component) <= 0) { return; } int count = GetCount(component); float num = 0.1f; if (!component2.HasBuff(CorruptedBuff)) { component2.AddBuff(CorruptedBuff); } if (!(component2.healthComponent.health <= component2.maxHealth * num)) { return; } float time = Time.time; if (!lastTimeCloneSpawned.TryGetValue(component, out var value) || !(time - value < 0.05f)) { lastTimeCloneSpawned[component] = time; if (((Object)component2).name != "VoidInfestorBody(Clone)" && ((Object)component2).name != "VoidInfestorBody" && ((Object)component2.master).name != "VoidInfestorMaster(Clone)" && ((Object)component2.master).name != "VoidInfestorMaster") { ConvertEnemy(component2, component); } } } private void ConvertEnemy(CharacterBody target, CharacterBody owner) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0130: 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) if (!Object.op_Implicit((Object)(object)((Component)target).GetComponent())) { ((Component)target).gameObject.AddComponent(); ModelLocator modelLocator = target.modelLocator; if (Object.op_Implicit((Object)(object)modelLocator)) { modelLocator.dontReleaseModelOnDeath = true; } target.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); target.rigidbody.velocity = Vector3.zero; target.master.teamIndex = (TeamIndex)4; target.teamComponent.teamIndex = (TeamIndex)4; BaseAI component = ((Component)target.master).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.enemyAttention = 0f; component.ForceAcquireNearestEnemyIfNoCurrentEnemy(); } CorruptConversionTime = 10 + (GetCount(owner) - 1) * 10; CharacterBody val = Util.TryToCreateGhost(target, owner, CorruptConversionTime); val.AddBuff(Buffs.EliteVoid); ModelLocator modelLocator2 = val.modelLocator; if (Object.op_Implicit((Object)(object)modelLocator2)) { modelLocator2.dontReleaseModelOnDeath = true; } EffectData val2 = new EffectData { scale = 1f }; val2.SetNetworkedObjectReference(((Component)val).gameObject); EffectManager.SpawnEffect(CorruptedEffect, val2, true); target.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } public void CreateEffect() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) CorruptedEffect = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("wingdingeffect"), "gaster_corrupt_effect", false); CorruptedEffect.transform.localScale = new Vector3(1f, 1f, 1f); Helpers.CreateEffectPrefab(CorruptedEffect, isFollower: true); } public void CreateBuff() { CorruptedBuff = ScriptableObject.CreateInstance(); ((Object)CorruptedBuff).name = "CorruptedDebuff"; CorruptedBuff.iconSprite = DeltarunePlugin.MainAssets.LoadAsset("corrupt_effect_icon.png"); CorruptedBuff.canStack = false; CorruptedBuff.isDebuff = true; ContentAddition.AddBuffDef(CorruptedBuff); } public void SetupVoidItemConversion() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) ItemDef itemDef = Addressables.LoadAssetAsync((object)"RoR2/Base/GhostOnKill/GhostOnKill.asset").WaitForCompletion(); ItemRelationshipProvider val = ScriptableObject.CreateInstance(); ((Object)val).name = "HappiestMaskToMysterMansMaskConversion"; val.relationshipType = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion(); val.relationships = (Pair[])(object)new Pair[1] { new Pair { itemDef1 = itemDef, itemDef2 = ItemDef } }; ContentAddition.AddItemRelationshipProvider(val); } public override void Init() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) CreateItem(); SetupVoidItemConversion(); CreateLang(); CreateEffect(); CreateBuff(); Hooks(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("jim_carry.prefab"), "GasterMaskPickup", false); val.transform.localScale = new Vector3(650f, 650f, 650f); ItemDef.pickupModelPrefab = val; } } public class HammerJustice : ItemBase { public class ShellController : MonoBehaviour { private readonly int maxBounces = 3; public int currBounces = 0; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void FixedUpdate() { } private void OnDisable() { } } public static GameObject ProjectilePrefab; public override string ItemName => "Hammer of Justice"; public override string ItemLangTokenName => "HAMMER_JUSTICE"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)8; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("hammer_justice.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("hammer_justice_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => true; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public void CreateProjectile() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: 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_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown float procCoefficient = 1f; int num = 75; int num2 = 20; int num3 = 180; ProjectilePrefab = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("Prefabs/Projectiles/FMJ"), "ShellProjectile", true); GameObject val = DeltarunePlugin.MainAssets.LoadAsset("hammer_justice.prefab"); val.AddComponent(); val.AddComponent(); val.transform.localScale = new Vector3(100f, 100f, 100f); ProjectileController component = ProjectilePrefab.GetComponent(); component.procCoefficient = procCoefficient; component.ghostPrefab = val; ProjectilePrefab.GetComponent().teamIndex = (TeamIndex)1; ProjectileDamage component2 = ProjectilePrefab.GetComponent(); component2.damageType = DamageTypeCombo.op_Implicit((DamageType)4194304); component2.damage = 0f; ProjectileIntervalOverlapAttack component3 = ProjectilePrefab.GetComponent(); Object.Destroy((Object)(object)component3); ProjectileTargetComponent targetComponent = ProjectilePrefab.AddComponent(); ProjectileDirectionalTargetFinder val2 = ProjectilePrefab.AddComponent(); val2.lookRange = num; val2.lookCone = num2; val2.targetSearchInterval = 0.1f; val2.onlySearchIfNoTarget = true; val2.allowTargetLoss = false; val2.testLoS = false; val2.ignoreAir = false; val2.flierAltitudeTolerance = float.PositiveInfinity; val2.targetComponent = targetComponent; ProjectileSteerTowardTarget val3 = ProjectilePrefab.AddComponent(); val3.targetComponent = targetComponent; val3.rotationSpeed = num3; val3.yAxisOnly = false; ProjectileSimple component4 = ProjectilePrefab.GetComponent(); component4.enableVelocityOverLifetime = true; component4.updateAfterFiring = true; component4.velocityOverLifetime = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f), new Keyframe(2f, 70f) }); Helpers.CreateNetworkedProjectilePrefab(ProjectilePrefab); } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.OnSkillActivated += new hook_OnSkillActivated(CharacterBody_OnSkillActivated); } private void CharacterBody_OnSkillActivated(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill) { orig.Invoke(self, skill); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.skillLocator)) { SkillLocator skillLocator = self.skillLocator; if ((Object)(object)skillLocator.primary == (Object)(object)skill && GetCount(self) > 0) { FireShellProjectile(self); } } } private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { orig.Invoke(self, damageInfo, victim); CharacterBody component = damageInfo.attacker.GetComponent(); CharacterBody component2 = victim.GetComponent(); int count = GetCount(component); } public void FireShellProjectile(CharacterBody player) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) float num = 4f; float num2 = 1.5f; float damage = player.damage * (num * (num2 * (float)GetCount(player))); float force = 2f; float maxDistance = 300f; float speedOverride = 50f; byte comboNumber = 3; InputBankTest inputBank = player.inputBank; Ray val = default(Ray); ((Ray)(ref val))..ctor(inputBank.aimOrigin, inputBank.aimDirection); ProjectileManager obj = ProjectileManager.instance; FireProjectileInfo val2 = new FireProjectileInfo { projectilePrefab = ProjectilePrefab, position = ((Ray)(ref val)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), owner = ((Component)player).gameObject, damage = damage, force = force, crit = Util.CheckRoll(player.crit, player.master), damageColorIndex = (DamageColorIndex)0 }; ((FireProjectileInfo)(ref val2)).speedOverride = speedOverride; val2.maxDistance = maxDistance; val2.comboNumber = comboNumber; obj.FireProjectile(val2); } public void CreateSFX() { } public override void Init() { } } } namespace DeltaruneMod.Items.Tier3 { internal class GuideBook : ItemBase { public override string ItemName => "Sage's Manual"; public override string ItemLangTokenName => "GUIDE_BOOK"; public override string ItemPickupDesc => "Teaches all drones a healing prayer."; public override string ItemFullDescription => "All drones can now additionally cast a heal prayer,\nhealing for 2.5% hp every 10 seconds (+1% hp per stack)."; public override string ItemLore => "You tried to read the handcrafted manual, but it was so dense it made your head spin...\nPerhaps just the chapter on healing will be good for now..."; public override ItemTier Tier => (ItemTier)1; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("guide_book.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("guide_book_icon.png"); public override bool isChapter1 => true; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.06842f, -0.06525f, 0.00302f), localAngles = new Vector3(344.6374f, 10.5189f, 172.5793f), localScale = new Vector3(11.24511f, 12.75054f, 12.75054f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "BowHinge2L", localPos = new Vector3(-0.01511f, -0.12038f, -0.04515f), localAngles = new Vector3(40.99971f, 359.4588f, 0.25029f), localScale = new Vector3(20.1074f, 12.97089f, 15.01608f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MuzzlePistol", localPos = new Vector3(0.00462f, 0.07294f, -0.24116f), localAngles = new Vector3(23.59849f, 87.6305f, 336.2294f), localScale = new Vector3(2.71367f, 4.69018f, 2.90618f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.07447f, 0.64331f, -1.79574f), localAngles = new Vector3(75.89338f, 94.53836f, 185.0458f), localScale = new Vector3(145.8154f, 161.3661f, 145.8154f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MuzzleLeft", localPos = new Vector3(0.21551f, 0.07161f, -0.24095f), localAngles = new Vector3(344.467f, 179.7876f, 178.1696f), localScale = new Vector3(10.38355f, 10.38355f, 10.38355f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmL", localPos = new Vector3(0.00965f, 0.19812f, -0.0943f), localAngles = new Vector3(341.6551f, 268.496f, 179.2602f), localScale = new Vector3(8.24085f, 7.88303f, 8.8454f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.08936f, 0.00467f, 0.06222f), localAngles = new Vector3(345.8772f, 20.92191f, 177.8589f), localScale = new Vector3(10.62848f, 10.62848f, 10.62848f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(0.41321f, -0.38063f, 0.19475f), localAngles = new Vector3(13.43373f, 343.3212f, 21.37775f), localScale = new Vector3(14.47604f, 15.15385f, 15.43011f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MechBase", localPos = new Vector3(0.20024f, 0.40954f, 0.35092f), localAngles = new Vector3(14.93578f, 90.2113f, 14.04156f), localScale = new Vector3(5.11029f, 4.13625f, 4.33906f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MouthMuzzle", localPos = new Vector3(-1.32711f, 2.22417f, 2.74239f), localAngles = new Vector3(359.0917f, 42.2724f, 63.16629f), localScale = new Vector3(75.89112f, 75.89112f, 75.89112f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(0.00749f, 0.16526f, 0.03505f), localAngles = new Vector3(71.62508f, 193.732f, 183.1327f), localScale = new Vector3(14.82975f, 11.77351f, 12.56107f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootL", localPos = new Vector3(0.01065f, 0.03102f, 0.10055f), localAngles = new Vector3(350.7331f, 80.90894f, 225.1298f), localScale = new Vector3(3.5252f, 3.48996f, 3.53609f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.13241f, 0.03476f, -0.08426f), localAngles = new Vector3(48.72685f, 157.9988f, 295.8664f), localScale = new Vector3(14.89942f, 17.31997f, 12.4162f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pack", localPos = new Vector3(-0.07427f, -0.05237f, -0.39707f), localAngles = new Vector3(332.633f, 92.34814f, 354.5216f), localScale = new Vector3(7.42348f, 5.85202f, 6.0095f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ClavL", localPos = new Vector3(-0.10036f, 0.79036f, -0.31671f), localAngles = new Vector3(63.96176f, 129.177f, 16.81915f), localScale = new Vector3(10.35707f, 10.35707f, 10.35707f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.30605f, -0.02151f, -0.1316f), localAngles = new Vector3(293.5251f, 187.9981f, 294.4022f), localScale = new Vector3(4.5489f, 5.00249f, 5.00249f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Hips", localPos = new Vector3(0.00527f, 0.00014f, 0.00049f), localAngles = new Vector3(17.59271f, 355.3093f, 344.7248f), localScale = new Vector3(0.34789f, 0.34789f, 0.34789f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (!NetworkServer.active) { return; } int count = GetCount(sender); if (Object.op_Implicit((Object)(object)sender.inventory) && count > 0) { GuideBookBehavior guideBookBehavior = ((Component)sender).GetComponent(); if (!Object.op_Implicit((Object)(object)guideBookBehavior) && Object.op_Implicit((Object)(object)sender.inventory) && count > 0) { guideBookBehavior = ((Component)sender).gameObject.AddComponent(); ((ItemBehavior)guideBookBehavior).body = sender; ((ItemBehavior)guideBookBehavior).stack = count; } else if (Object.op_Implicit((Object)(object)guideBookBehavior) && count <= 0) { ((Behaviour)guideBookBehavior).enabled = false; } else if (Object.op_Implicit((Object)(object)guideBookBehavior) && count > 0 && !((Behaviour)guideBookBehavior).enabled) { ((Behaviour)guideBookBehavior).enabled = true; } if (Object.op_Implicit((Object)(object)guideBookBehavior)) { ((ItemBehavior)guideBookBehavior).stack = count; } } } public override void Init() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) CreateItem(); CreateLang(); Hooks(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("guide_book.prefab"), "SageManualPickup", true); val.transform.localScale = new Vector3(2f, 2f, 2f); ItemDef.pickupModelPrefab = val; } } public class GuideBookBehavior : ItemBehavior { private int previousStack; private void OnEnable() { ulong num = Run.instance.seed ^ (ulong)Run.instance.stageClearCount; UpdateAllMinions(base.stack); MasterSummon.onServerMasterSummonGlobal += OnServerMasterSummonGlobal; } private void OnDisable() { MasterSummon.onServerMasterSummonGlobal -= OnServerMasterSummonGlobal; UpdateAllMinions(0); } private void FixedUpdate() { if (previousStack != base.stack) { UpdateAllMinions(base.stack); } } private void OnServerMasterSummonGlobal(MasterSummonReport summonReport) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.body) || !Object.op_Implicit((Object)(object)base.body.master) || !((Object)(object)base.body.master == (Object)(object)summonReport.leaderMasterInstance)) { return; } CharacterMaster summonMasterInstance = summonReport.summonMasterInstance; if (Object.op_Implicit((Object)(object)summonMasterInstance)) { CharacterBody body = summonMasterInstance.GetBody(); if (Object.op_Implicit((Object)(object)body)) { UpdateMinionInventory(summonMasterInstance.inventory, body.bodyFlags, base.stack); } } } private void UpdateAllMinions(int newStack) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.body)) { return; } CharacterBody body = base.body; if (!Object.op_Implicit((Object)(object)(((Object)(object)body != (Object)null) ? body.master : null))) { return; } MinionGroup val = MinionGroup.FindGroup(((NetworkBehaviour)body.master).netId); if (val == null) { return; } MinionOwnership[] members = val.members; foreach (MinionOwnership val2 in members) { if (!Object.op_Implicit((Object)(object)val2)) { continue; } CharacterMaster component = ((Component)val2).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory)) { CharacterBody body2 = component.GetBody(); if (Object.op_Implicit((Object)(object)body2)) { UpdateMinionInventory(component.inventory, body2.bodyFlags, newStack); } } } previousStack = newStack; } private void UpdateMinionInventory(Inventory inventory, BodyFlags bodyFlags, int newStack) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Invalid comparison between Unknown and I4 if ((Object.op_Implicit((Object)(object)inventory) && newStack > 0 && (bodyFlags & 2) > 0) || (bodyFlags & 0x2000) > 0) { if ((bodyFlags & 0x400) <= 0) { int itemCount = inventory.GetItemCount(ItemBase.instance.ItemDef); if (itemCount < base.stack) { inventory.GiveItem(ItemBase.instance.ItemDef, base.stack - itemCount); } else if (itemCount > base.stack) { inventory.RemoveItem(ItemBase.instance.ItemDef, itemCount - base.stack); } } } else { inventory.ResetItem(ItemBase.instance.ItemDef); } } } public class BigShot : ItemBase { [RequireComponent(typeof(TeamFilter))] public class BigShotBehavior : ItemBehavior { public BuffDef BigShotBuff; public float reloadTimer; public SkillLocator skillLocator; public InputBankTest inputBank; public int BigShotThreshold = 10; public float DmgMult = 77.7f; public float StackDmgMult = 22.2f; public uint MaxBigShotStacks = 30u; public float TotalDamageCalc; public float TotalGoldGained = 0f; public int BaseCost = 25; private bool TimeForABigShot; public GameObject projectilePrefab; private void Awake() { ((Behaviour)this).enabled = false; } private void Start() { } private void OnEnable() { if (Object.op_Implicit((Object)(object)base.body)) { base.body.onSkillActivatedServer += OnSkillActivated; skillLocator = ((Component)base.body).GetComponent(); inputBank = ((Component)base.body).GetComponent(); } } private void OnDisable() { if (Object.op_Implicit((Object)(object)base.body)) { base.body.onSkillActivatedServer -= OnSkillActivated; if (NetworkServer.active) { int num = 10000; while (base.body.HasBuff(BigShotBuff) && num > 0) { num--; base.body.RemoveBuff(BigShotBuff); } } } inputBank = null; skillLocator = null; } private void FixedUpdate() { if (NetworkServer.active) { DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef((DifficultyIndex)1); TotalDamageCalc = base.body.damage * (DmgMult + StackDmgMult * (float)(base.stack - 1)); int difficultyScaledCost = Run.instance.GetDifficultyScaledCost(BaseCost); long num = difficultyScaledCost * MaxBigShotStacks; if (base.body.GetBuffCount(BigShotBuff) >= MaxBigShotStacks + 1) { base.body.RemoveBuff(BigShotBuff); } if (TotalGoldGained >= (float)num) { TotalGoldGained = num; } if (TotalGoldGained >= (float)difficultyScaledCost) { base.body.AddBuff(BigShotBuff); TotalGoldGained -= difficultyScaledCost; } if (base.body.GetBuffCount(BigShotBuff) >= BigShotThreshold && !TimeForABigShot) { TimeForABigShot = true; } } } private void OnSkillActivated(GenericSkill skill) { //IL_004d: 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) if (!NetworkServer.active) { return; } SkillLocator val = skillLocator; if ((Object)(object)(((Object)(object)val != (Object)null) ? val.primary : null) == (Object)(object)skill && TimeForABigShot) { ShootBigShot(); EffectManager.SimpleSoundEffect(BigShotSFX.index, base.body.corePosition, true); for (int i = 0; i < BigShotThreshold; i++) { base.body.RemoveBuff(BigShotBuff); } TimeForABigShot = false; } } private void ShootBigShot() { //IL_000f: 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_001c: 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { Ray aimRay = GetAimRay(); ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((Component)this).gameObject, damage = TotalDamageCalc, force = 4f, crit = Util.CheckRoll(base.body.crit, base.body.master), damageColorIndex = (DamageColorIndex)0 }); } } private Ray GetAimRay() { //IL_000c: 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) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) return new Ray(base.body.inputBank.aimOrigin, base.body.inputBank.aimDirection); } } public Sprite BuffIcon = DeltarunePlugin.MainAssets.LoadAsset("big_shot_effect_icon.png"); public BuffDef BigShotBuff; public uint TotalStages = 0u; public uint GoldIncreasePerStage = 25u; internal GameObject ProjectilePrefab; public static NetworkSoundEventDef BigShotSFX; public override string ItemName => "Dealmaker"; public override string ItemLangTokenName => "BIGSHOT"; public override string ItemPickupDesc => "Gain stacks of [Big Shot] on gold gain."; public override string ItemFullDescription => "+30% gold gain.\nOn gold gain, gain 1 stack of [Big Shot].\nOn 10 stacks, shoot a projectile on primary skill dealing 777% dmg (+222% per stack)."; public override string ItemLore => "As the days became more dull, and bussiness started to dry, a call came in.\nIt's your chance... a once in a lifetime chance... to become a [Big Shot]."; public override ItemTier Tier => (ItemTier)2; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("big_shot.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("big_shot_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)31 }; public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override void Init() { CreateLang(); CreateItem(); CreateBuff(); CreateSFX(); CreateProjectile(); Hooks(); } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(BigShotEffect); CharacterMaster.GiveMoney += new hook_GiveMoney(BigShotMoneyEffect); Stage.onStageStartGlobal += Stage_onStageStartGlobal; } private void Stage_onStageStartGlobal(Stage obj) { if (NetworkServer.active && obj.sceneDef.cachedName != "bazaar") { TotalStages++; Debug.Log((object)("Total Stages: " + TotalStages)); } } public void BigShotMoneyEffect(orig_GiveMoney orig, CharacterMaster self, uint amount) { if (NetworkServer.active && Object.op_Implicit((Object)(object)self.GetBody())) { CharacterBody body = self.GetBody(); int count = GetCount(body); BigShotBehavior component = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)body.inventory) && count > 0) { uint num = (uint)Mathf.CeilToInt((float)amount * 0.3f); amount += num; if (Object.op_Implicit((Object)(object)component)) { component.TotalGoldGained += amount; } } } orig.Invoke(self, amount); } public void BigShotEffect(CharacterBody sender, StatHookEventArgs args) { int count = GetCount(sender); BigShotBehavior bigShotBehavior = ((Component)sender).GetComponent(); if (Object.op_Implicit((Object)(object)sender.inventory) && count > 0 && !Object.op_Implicit((Object)(object)bigShotBehavior)) { bigShotBehavior = ((Component)sender).gameObject.AddComponent(); ((ItemBehavior)bigShotBehavior).body = sender; ((ItemBehavior)bigShotBehavior).stack = count; bigShotBehavior.BigShotBuff = BigShotBuff; bigShotBehavior.projectilePrefab = ProjectilePrefab; } else if (Object.op_Implicit((Object)(object)bigShotBehavior) && count <= 0) { ((Behaviour)bigShotBehavior).enabled = false; } else if (Object.op_Implicit((Object)(object)bigShotBehavior) && count > 0 && !((Behaviour)bigShotBehavior).enabled) { ((Behaviour)bigShotBehavior).enabled = true; } if (Object.op_Implicit((Object)(object)bigShotBehavior)) { ((ItemBehavior)bigShotBehavior).stack = count; } } public void CreateBuff() { BigShotBuff = ScriptableObject.CreateInstance(); ((Object)BigShotBuff).name = "BigShotBuff"; BigShotBuff.iconSprite = BuffIcon; BigShotBuff.canStack = true; BigShotBuff.isDebuff = false; ContentAddition.AddBuffDef(BigShotBuff); } public void CreateSFX() { BigShotSFX = Helpers.CreateNetworkSoundEventDef("Play_BIGSHOT"); } public void CreateProjectile() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) GameObject ghost = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("big_shot_projectile.prefab"), "BigShotGhost", false); ghost.AddComponent(); ghost.AddComponent(); ghost.transform.localScale = new Vector3(180f, 180f, 180f); ProjectilePrefab = Helpers.ModifyVanillaPrefab("RoR2/DLC1/PrimarySkillShuriken/ShurikenProjectile.prefab", "BigShotProjectile", shouldNetwork: false, delegate(GameObject shurikenPrefab2) { shurikenPrefab2.GetComponent().ghostPrefab = ghost; shurikenPrefab2.GetComponent().startSound = ""; ProjectileSimple component = shurikenPrefab2.GetComponent(); component.desiredForwardSpeed *= 1.2f; return shurikenPrefab2; }); Helpers.CreateNetworkedProjectilePrefab(ProjectilePrefab); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_09f0: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_0a2d: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a48: Unknown result type (might be due to invalid IL or missing references) //IL_0a5e: Unknown result type (might be due to invalid IL or missing references) //IL_0a63: Unknown result type (might be due to invalid IL or missing references) //IL_0a68: Unknown result type (might be due to invalid IL or missing references) //IL_0a69: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.0181f, 0.18318f, 0.11438f), localAngles = new Vector3(359.9379f, 89.13351f, 344.7787f), localScale = new Vector3(14f, 14f, 14f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.05111f, 0.20041f, 0.05749f), localAngles = new Vector3(71.13284f, 0.85515f, 269.7938f), localScale = new Vector3(10.65627f, 10.65627f, 10.65627f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.4929f, 2.87609f, -0.55534f), localAngles = new Vector3(3.62907f, 268.6543f, 301.4389f), localScale = new Vector3(71.05827f, 71.05827f, 71.05827f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HeadCenter", localPos = new Vector3(-0.01001f, -0.04382f, 0.06658f), localAngles = new Vector3(359.9916f, 87.82423f, 5.2221f), localScale = new Vector3(12.66013f, 12.66013f, 12.66013f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00812f, 0.04364f, 0.07607f), localAngles = new Vector3(1.42508f, 90.78919f, 359.603f), localScale = new Vector3(6.82893f, 6.82893f, 6.82893f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00841f, 0.10428f, 0.1014f), localAngles = new Vector3(358.1436f, 86.20536f, 0.08487f), localScale = new Vector3(8.35088f, 8.35088f, 8.35088f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(-0.01f, -1.06369f, 0.55248f), localAngles = new Vector3(1.072f, 89.76335f, 9.88333f), localScale = new Vector3(13.6413f, 13.6413f, 13.6413f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00822f, 0.06086f, 0.09935f), localAngles = new Vector3(357.9385f, 87.69575f, 1.17614f), localScale = new Vector3(8.36439f, 8.36439f, 8.36439f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.09198f, 2.71101f, 0.6164f), localAngles = new Vector3(0.90842f, 268.449f, 232.6822f), localScale = new Vector3(103.8343f, 103.8343f, 103.8343f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00992f, 0.02677f, 0.06682f), localAngles = new Vector3(359.7724f, 91.02103f, 7.08265f), localScale = new Vector3(10.78019f, 10.78019f, 10.78019f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.0085f, 0.09478f, 0.10477f), localAngles = new Vector3(2.16612f, 88.15824f, 337.8445f), localScale = new Vector3(8.60173f, 8.60173f, 8.60173f) } }); val.Add("mdlHeretic", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.02105f, -0.87071f, 0.01385f), localAngles = new Vector3(355.2848f, 47.55381f, 355.0908f), localScale = new Vector3(0.20392f, 0.20392f, 0.20392f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MuzzlePistol", localPos = new Vector3(-0.02261f, 0.08256f, -0.26332f), localAngles = new Vector3(313.8425f, 83.98895f, 185.9064f), localScale = new Vector3(4.2464f, 3.18434f, 3.18434f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.05952f, 0.11334f, 0.0741f), localAngles = new Vector3(15.16286f, 99.01782f, 299.4797f), localScale = new Vector3(8.81553f, 7.34627f, 7.34627f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.28516f, 0.06555f, -0.01708f), localAngles = new Vector3(1.14554f, 359.4018f, 259.1054f), localScale = new Vector3(18.30414f, 15.68926f, 15.68926f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.01224f, 0.12337f, 0.0967f), localAngles = new Vector3(3.5382f, 92.96323f, 345.6394f), localScale = new Vector3(8.24892f, 7.33238f, 7.33238f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.03355f, 0.13485f, 0.09933f), localAngles = new Vector3(7.05586f, 94.36584f, 356.7482f), localScale = new Vector3(15.23684f, 15.23684f, 15.23684f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00062f, 0.00413f, 0.00324f), localAngles = new Vector3(0.92012f, 90.02956f, 357.8276f), localScale = new Vector3(0.57343f, 0.57343f, 0.57343f) } }); return val; } } public class RoaringBlade : ItemBase { public class SwoonDamageTracker : ItemBehavior { public float currHealth; public float prevHealth; public bool canSwoon; private float swoonTimer = 0f; private float swoonTimerInterval = 1f; private void Start() { canSwoon = true; } private void FixedUpdate() { if (!canSwoon) { swoonTimer -= Time.fixedDeltaTime; if (swoonTimer <= 0f) { canSwoon = true; swoonTimer = swoonTimerInterval; } } } public void DoSwoonDamage() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { float num = (prevHealth - currHealth) * (float)(base.stack + 1); float num2 = base.body.healthComponent.health - num; HealthComponent healthComponent = base.body.healthComponent; healthComponent.health -= num; if (base.body.healthComponent.health - num > base.body.maxHealth) { ResetSwoonStats(); return; } EffectManager.SpawnEffect(SwoonModelPrefab, new EffectData { origin = base.body.transform.position, scale = 1f }, true); EffectManager.SimpleSoundEffect(SwoonSFX.index, base.body.corePosition, true); Debug.Log((object)("Swooned " + ((Object)base.body).name + " for " + num + "!")); Debug.Log((object)("Prev HP " + prevHealth + " | Old Curr HP " + currHealth)); canSwoon = false; } } public void ResetSwoonStats() { prevHealth = 0f; currHealth = 0f; } } public class SwoonEffectController : NetworkBehaviour { private void Start() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) Animator component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.Play("swoon_animation", 0, 0f); } component.speed = 18f; Transform val = ((Component)this).transform.Find("Roaring_Blade1"); Transform val2 = ((Component)this).transform.Find("Roaring_Blade"); GameObject val3 = Object.Instantiate(SwoonEffectPrefabL, val); val3.transform.localPosition = Vector3.zero; val3.transform.localScale = new Vector3(10f, 10f, 10f); GameObject val4 = Object.Instantiate(SwoonEffectPrefabR, val2); val4.transform.localPosition = Vector3.zero; val4.transform.localScale = new Vector3(10f, 10f, 10f); Object.Destroy((Object)(object)((Component)this).gameObject, 0.35f); } } public static BuffDef SwoonBuff; public static Sprite SwoonEffectIcon = DeltarunePlugin.MainAssets.LoadAsset("swoon_effect_icon.png"); public static GameObject SwoonModelPrefab; public static GameObject SwoonEffectPrefabL; public static GameObject SwoonEffectPrefabR; public static NetworkSoundEventDef SwoonSFX; private int MaxSwoonStacks = 3; public override string ItemName => "Roaring Blade"; public override string ItemLangTokenName => "ROARING_BLADE"; public override string ItemPickupDesc => "Stack swoon on hit, total damage dealt prior reapplies after 3 stacks."; public override string ItemFullDescription => "50% chance to apply Swoon. Upon reaching 3 stacks, reapply 200% of all damage dealt back to enemy (+100% per stack)."; public override string ItemLore => "You pick up the strange, cold blade...\nShivers crawl down your spine as you lift it into the air.\nA strange feeling emerges from it, you can feel it speaking... crying... hurting...\nYou respond to its call, its anger, you move forward, gripping the blade tightly, changed ever so slightly."; public override ItemTier Tier => (ItemTier)2; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("roaring_blade.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("roaring_blade_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)31 }; public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.03424f, 0.24531f, -0.28029f), localAngles = new Vector3(29.02806f, 9.87036f, 0.15779f), localScale = new Vector3(43.11241f, 48.88401f, 48.88401f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.15683f, 0.03304f, -0.05687f), localAngles = new Vector3(8.67311f, 301.7072f, 343.5933f), localScale = new Vector3(32.31651f, 20.56886f, 31.46058f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.35631f, 0.30782f, -1.88334f), localAngles = new Vector3(4.96775f, 356.1217f, 343.4172f), localScale = new Vector3(342.7814f, 342.7814f, 342.7814f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(0.61056f, 0.2345f, 0.19811f), localAngles = new Vector3(351.2091f, 161.5561f, 217.4899f), localScale = new Vector3(50.83732f, 50.83732f, 50.83732f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ClavicleR", localPos = new Vector3(0.19937f, -0.11671f, -0.00412f), localAngles = new Vector3(351.81f, 103.9537f, 14.96851f), localScale = new Vector3(26.79127f, 25.62798f, 28.75669f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(0.64632f, 0.31625f, 0.05835f), localAngles = new Vector3(350.5506f, 180.2126f, 212.7281f), localScale = new Vector3(63.08693f, 63.08693f, 63.08693f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(-1.09289f, -0.17844f, 0.06287f), localAngles = new Vector3(6.32783f, 163.8389f, 43.61153f), localScale = new Vector3(64.85601f, 64.85601f, 64.85601f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(0.05452f, 0.96759f, 0.03388f), localAngles = new Vector3(342.5309f, 38.24583f, 185.2787f), localScale = new Vector3(43.79625f, 43.79625f, 43.79625f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.40245f, -0.11621f, -0.95978f), localAngles = new Vector3(349.0351f, 87.08124f, 49.89027f), localScale = new Vector3(545.4311f, 545.4311f, 545.4311f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(0.13571f, 0.20722f, -0.26261f), localAngles = new Vector3(6.9968f, 350.0926f, 341.5277f), localScale = new Vector3(44.86234f, 37.9991f, 37.9991f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.03685f, 0.04701f, -0.19537f), localAngles = new Vector3(351.7767f, 8.65373f, 346.0138f), localScale = new Vector3(46.44885f, 26.87783f, 2.25375f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ToeR", localPos = new Vector3(-0.05914f, 0.23115f, -0.02773f), localAngles = new Vector3(359.2351f, 160.0996f, 254.6561f), localScale = new Vector3(15.71294f, 15.71294f, 15.71294f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.00696f, -0.22984f, -0.10106f), localAngles = new Vector3(19.71435f, 168.1724f, 315.2494f), localScale = new Vector3(35.84454f, 41.6678f, 29.87045f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.21611f, -0.41288f, 0.0538f), localAngles = new Vector3(296.2543f, 222.2426f, 355.6819f), localScale = new Vector3(18.60245f, 27.97708f, 27.97708f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pack", localPos = new Vector3(0.31906f, -0.45957f, -0.1822f), localAngles = new Vector3(336.2322f, 23.51318f, 346.6137f), localScale = new Vector3(47.03091f, 41.80524f, 41.80524f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.01625f, 0.17917f, 0.0463f), localAngles = new Vector3(354.49f, 266.0255f, 41.55928f), localScale = new Vector3(55.72091f, 55.72091f, 55.72091f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(0.00839f, 0.00898f, 0.00293f), localAngles = new Vector3(334.2737f, 179.8516f, 182.9772f), localScale = new Vector3(0.91639f, 0.91639f, 0.91639f) } }); return val; } public override void Init() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) CreateItem(); CreateLang(); CreateBuff(); CreateSFX(); CreateSwoonEffect(); Hooks(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("roaring_blade.prefab"), "RoaringBladePickup", false); val.transform.localScale = new Vector3(2f, 2f, 2f); ItemDef.pickupModelPrefab = val; } public void CreateBuff() { SwoonBuff = ScriptableObject.CreateInstance(); ((Object)SwoonBuff).name = "SwoonDebuff"; SwoonBuff.iconSprite = SwoonEffectIcon; SwoonBuff.canStack = true; SwoonBuff.isDebuff = true; ContentAddition.AddBuffDef(SwoonBuff); } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(SwoonEffect); } private void SwoonEffect(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { orig.Invoke(self, damageInfo, victim); try { GameObject attacker = damageInfo.attacker; if (!Object.op_Implicit((Object)(object)attacker)) { return; } CharacterBody component = attacker.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } CharacterBody component2 = victim.GetComponent(); if (!Object.op_Implicit((Object)(object)component2) || component2.isPlayerControlled || !NetworkServer.active || !Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component2)) { return; } SwoonDamageTracker swoonDamageTracker = ((Component)component2).GetComponent(); int count = GetCount(component); if (!Object.op_Implicit((Object)(object)swoonDamageTracker) && Object.op_Implicit((Object)(object)component.inventory) && count > 0) { swoonDamageTracker = ((Component)component2).gameObject.AddComponent(); ((ItemBehavior)swoonDamageTracker).body = component2; ((ItemBehavior)swoonDamageTracker).stack = count; } else if (Object.op_Implicit((Object)(object)swoonDamageTracker) && count <= 0) { ((Behaviour)swoonDamageTracker).enabled = false; } else if (Object.op_Implicit((Object)(object)swoonDamageTracker) && count > 0 && !((Behaviour)swoonDamageTracker).enabled) { ((Behaviour)swoonDamageTracker).enabled = true; } if (Object.op_Implicit((Object)(object)swoonDamageTracker)) { ((ItemBehavior)swoonDamageTracker).stack = count; } if (Object.op_Implicit((Object)(object)swoonDamageTracker) && count > 0 && swoonDamageTracker.canSwoon && component2.GetBuffCount(SwoonBuff) <= MaxSwoonStacks && Util.CheckRoll(50f, component.master)) { component2.AddBuff(SwoonBuff); } if (Object.op_Implicit((Object)(object)swoonDamageTracker) && component2.GetBuffCount(SwoonBuff) <= 1) { swoonDamageTracker.prevHealth = component2.healthComponent.health; } if (Object.op_Implicit((Object)(object)swoonDamageTracker) && component2.GetBuffCount(SwoonBuff) >= MaxSwoonStacks) { swoonDamageTracker.currHealth = component2.healthComponent.health; swoonDamageTracker.DoSwoonDamage(); for (int i = 0; i <= MaxSwoonStacks; i++) { component2.RemoveBuff(SwoonBuff); } } } catch { Debug.Log((object)"Please check swoon effect DeltaruneMod"); } } private static void CreateSwoonEffect() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) SwoonModelPrefab = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("swoon.prefab"), "swoon_main", true); SwoonModelPrefab.transform.localScale = new Vector3(130f, 130f, 130f); SwoonEffectController component = SwoonModelPrefab.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = SwoonModelPrefab.AddComponent(); } Helpers.CreateEffectPrefab(SwoonModelPrefab, isFollower: false); SwoonEffectPrefabL = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("swoon_left.prefab"), "swoon_left", true); SwoonEffectPrefabR = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("swoon_right.prefab"), "swoon_right", true); Helpers.AddEffectPrefabToContentAddition(SwoonEffectPrefabL); Helpers.AddEffectPrefabToContentAddition(SwoonEffectPrefabR); } public void CreateSFX() { SwoonSFX = Helpers.CreateNetworkSoundEventDef("Play_snd_knight_cut"); } } public class ScrapBall : ItemBase { private const float StatMulti = 0.05f; public static List consumedItems = new List(); public override string ItemName => "Junk Ball"; public override string ItemLangTokenName => "SCRAP_BALL"; public override string ItemPickupDesc => "Gain a boost to damage and attack speed for each consumed item you own."; public override string ItemFullDescription => "Gain a 5% boost to damage and attack speed for each consumed item you own. (+5% per stack)"; public override string ItemLore => "You reach into your pocket and find a small ball full of accumulated things in your pocket.\n\nYou look at the ball of junk in admiration of the useless itmes you've accumulated... Nothing happened."; public override ItemTier Tier => (ItemTier)2; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("junk_ball.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("scrap_ball_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override void Init() { CreateItem(); CreateLang(); CreateItemDisplayRules(); Hooks(); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootL", localPos = new Vector3(0.00155f, 0.18369f, -0.03625f), localAngles = new Vector3(12.71502f, 118.5311f, 27.65873f), localScale = new Vector3(3.43066f, 3.43066f, 3.43066f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.05813f, 0.29579f, -0.03698f), localAngles = new Vector3(344.4833f, 157.2875f, 24.74886f), localScale = new Vector3(3.00498f, 2.64008f, 3.00498f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(1.48266f, 0.89384f, 0.76922f), localAngles = new Vector3(346.6342f, 290.7388f, 291.0602f), localScale = new Vector3(64.77013f, 64.77013f, 64.77013f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.35174f, 0.2505f, -0.02213f), localAngles = new Vector3(314.914f, 17.67926f, 111.525f), localScale = new Vector3(7.94387f, 7.33221f, 7.7634f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.08869f, 0.1156f, 0.05396f), localAngles = new Vector3(335.5005f, 89.55374f, 161.365f), localScale = new Vector3(4.43965f, 4.43965f, 4.43965f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighL", localPos = new Vector3(0.08383f, 0.06065f, 0.02712f), localAngles = new Vector3(353.3118f, 275.5083f, 186.1312f), localScale = new Vector3(7.12055f, 7.12055f, 7.12055f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.53256f, 0.72782f, -0.46537f), localAngles = new Vector3(347.8391f, 274.0605f, 346.7606f), localScale = new Vector3(15.32926f, 15.32926f, 15.32926f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighL", localPos = new Vector3(0.05372f, 0.07789f, 0.07749f), localAngles = new Vector3(318.7485f, 78.9231f, 15.94955f), localScale = new Vector3(6.26722f, 7.77087f, 7.77087f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(-1.68466f, 0.80861f, 1.56104f), localAngles = new Vector3(345.425f, 279.6749f, 238.6632f), localScale = new Vector3(54.54406f, 54.54406f, 54.54406f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootL", localPos = new Vector3(0.03731f, 0.10456f, -0.07764f), localAngles = new Vector3(325.7554f, 162.5365f, 92.34225f), localScale = new Vector3(4.41354f, 4.41354f, 4.41354f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootR", localPos = new Vector3(-0.007f, 0.12154f, -0.07454f), localAngles = new Vector3(47.78607f, 8.74319f, 143.9257f), localScale = new Vector3(3.05221f, 3.05221f, 3.05221f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(-0.14299f, 0.03259f, -0.03299f), localAngles = new Vector3(354.3749f, 132.6399f, 300.215f), localScale = new Vector3(5.93916f, 6.90403f, 4.9493f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.01618f, -0.19109f, -0.28981f), localAngles = new Vector3(43.93672f, 216.2693f, 305.2357f), localScale = new Vector3(10.53911f, 10.25567f, 9.03356f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.04061f, 0.10606f, 0.09827f), localAngles = new Vector3(33.35695f, 358.3484f, 175.5982f), localScale = new Vector3(6.29222f, 5.59305f, 5.59305f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmL", localPos = new Vector3(0.112f, 0.25971f, -0.09989f), localAngles = new Vector3(347.2914f, 292.1277f, 127.8913f), localScale = new Vector3(10.62006f, 10.62006f, 10.62006f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (GetCount(sender) <= 0) { return; } int num = 0; if (consumedItems.Count <= 0) { GetConsumedItems(); } foreach (ItemDef consumedItem in consumedItems) { num += sender.inventory.GetItemCountEffective(consumedItem); } args.damageTotalMult += (float)num * 0.05f; args.attackSpeedMultAdd += (float)num * 0.05f; } private void GetConsumedItems() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) List list = new List(); list.Add("HealingPotionConsumed"); list.Add("TonicAffliction"); list.Add("TeleportOnLowHealthConsumed"); list.Add("FragileDamageBonusConsumed"); list.Add("ExtraLifeVoidConsumed"); list.Add("ExtraLifeConsumed"); list.Add("LowerPricedChestsConsumed"); list.Add("RegeneratingScrapConsumed"); AllItemsEnumerator enumerator = ItemCatalog.allItems.GetEnumerator(); try { while (((AllItemsEnumerator)(ref enumerator)).MoveNext()) { ItemIndex current = ((AllItemsEnumerator)(ref enumerator)).Current; ItemDef itemDef = ItemCatalog.GetItemDef(current); foreach (string item in list) { if (item.Equals(((Object)itemDef).name)) { consumedItems.Add(itemDef); } } } } finally { ((IDisposable)(AllItemsEnumerator)(ref enumerator)).Dispose(); } consumedItems.Add(ItemBase.instance.ItemDef); consumedItems.Add(ItemBase.instance.ItemDef); } } } namespace DeltaruneMod.Items.Tier2 { public class ShopSight : ItemBase { public class AddShrineCount : ItemBehavior { public ShrineChanceBehavior shrine; private void Start() { ShrineChanceBehavior obj = shrine; obj.maxPurchaseCount += base.stack; } } public override string ItemName => "Shopkeeper's Sight"; public override string ItemLangTokenName => "SHOP_SIGHT"; public override string ItemPickupDesc => "Gain an addition use at Shrines of Chance."; public override string ItemFullDescription => "Gain +1 uses at Shrines of Chance (+1 per stack)."; public override string ItemLore => "Hee hee... Welcome, travellers.\nWhat do you like to buy? \nMy eye? Ha ha ha ha, I can barter with you."; public override ItemTier Tier => (ItemTier)1; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("thorn_ring.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("shop_sight_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override bool isChapter1 => true; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ShrineChanceBehavior.AddShrineStack += new hook_AddShrineStack(ShopSightEffect); } private void ShopSightEffect(orig_AddShrineStack orig, ShrineChanceBehavior self, Interactor activator) { CharacterBody component = ((Component)activator).GetComponent(); int count = GetCount(component); AddShrineCount addShrineCount = ((Component)self).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)addShrineCount) && Object.op_Implicit((Object)(object)component.inventory) && count > 0) { addShrineCount = ((Component)self).gameObject.AddComponent(); } if (Object.op_Implicit((Object)(object)addShrineCount) && Object.op_Implicit((Object)(object)component.inventory) && count > 0) { addShrineCount.shrine = self; ((ItemBehavior)addShrineCount).stack = count; } orig.Invoke(self, activator); } public override void Init() { } } public class SusieAxe : ItemBase { [RequireComponent(typeof(TeamFilter))] public class PrimarySkillSusieAxeBehavior : ItemBehavior { public const int numShurikensBase = 2; public float damageCoefficientBase = 6f; public float damageCoefficientPerStack = 2f; public const float force = 4f; public float reloadTime = 5f; public float reloadTimer; public float healPercent = 0.05f; public SkillLocator skillLocator; public GameObject projectilePrefab; public GameObject susieProjPrefab; public BuffDef SusieAxeBuff; public InputBankTest inputBank; private void Awake() { ((Behaviour)this).enabled = false; } private void Start() { } private void OnEnable() { if (Object.op_Implicit((Object)(object)base.body)) { base.body.onSkillActivatedServer += OnSkillActivated; skillLocator = ((Component)base.body).GetComponent(); inputBank = ((Component)base.body).GetComponent(); } } private void OnDisable() { if (Object.op_Implicit((Object)(object)base.body)) { base.body.onSkillActivatedServer -= OnSkillActivated; if (NetworkServer.active) { int num = 10000; while (base.body.HasBuff(SusieAxeBuff) && num > 0) { num--; base.body.RemoveBuff(SusieAxeBuff); } } } inputBank = null; skillLocator = null; } private void OnSkillActivated(GenericSkill skill) { //IL_0078: 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) if (!NetworkServer.active) { return; } SkillLocator val = skillLocator; if (((Object)(object)(((Object)(object)val != (Object)null) ? val.primary : null) == (Object)(object)skill || (Object)(object)(((Object)(object)val != (Object)null) ? val.secondary : null) == (Object)(object)skill) && base.body.GetBuffCount(SusieAxeBuff) > 0) { FireSusieAxe(); EffectManager.SimpleSoundEffect(RudeBusterSFX.index, base.body.corePosition, true); base.body.RemoveBuff(SusieAxeBuff); float num = base.body.maxHealth * healPercent; if (base.body.healthComponent.health + num > base.body.maxHealth) { base.body.healthComponent.health = base.body.maxHealth; return; } HealthComponent healthComponent = base.body.healthComponent; healthComponent.health += num; } } private void FixedUpdate() { if (!NetworkServer.active) { return; } int num = 2; if (base.body.GetBuffCount(SusieAxeBuff) < num) { float num2 = reloadTime; reloadTimer += Time.fixedDeltaTime; while (reloadTimer > num2 && base.body.GetBuffCount(SusieAxeBuff) < num) { base.body.AddBuff(SusieAxeBuff); reloadTimer -= num2; } } } private void FireSusieAxe() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_004f: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = GetAimRay(); float damage = base.body.damage * (damageCoefficientBase + damageCoefficientPerStack * (float)(base.stack - 1)); ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((Component)this).gameObject, damage = damage, force = 4f, crit = Util.CheckRoll(base.body.crit, base.body.master), damageColorIndex = (DamageColorIndex)3, comboNumber = 3 }); } private Ray GetAimRay() { //IL_000c: 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) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) return new Ray(base.body.inputBank.aimOrigin, base.body.inputBank.aimDirection); } } public Sprite BuffIcon = DeltarunePlugin.MainAssets.LoadAsset("rude_buster_effect_icon.png"); internal GameObject ProjectilePrefab; public static BuffDef SusieAxeBuff; public static NetworkSoundEventDef RudeBusterSFX; public override string ItemName => "Monster's Axe"; public override string ItemLangTokenName => "SUSIE_AXE"; public override string ItemPickupDesc => "Shoot a Rude Buster on Primary or Secondary skill and activate UltimateHeal."; public override string ItemFullDescription => "On Primary or Seconary skill activation, fire a Rude Buster and activate UtilmateHeal.\nRude Buster: Shoot a projectile that deals 600% base damage (+200% per stack).\nRude Buster reloads every 5 seconds, up to 2 charges.\nUltimateHeal: Heal 5% hp on use."; public override string ItemLore => "\"Where did you find this?\" ... \"This is the axe that ended the roaring!\"\n\"It's owner was Susie the Hero... though she perferred many other names...\"\n\"The other names?? Well... some include Violent Ax Susie, Susiezilla, AS- maybe I shouldn't tell you this..."; public override ItemTier Tier => (ItemTier)1; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("susie_axe.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("monsters_axe_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)31 }; public override bool isChapter1 => true; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override void Init() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) CreateItem(); CreateLang(); CreateBuff(); CreateSoundEffect(); CreateProjectile(); Hooks(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("susie_axe.prefab"), "SusieAxePickup", false); val.transform.localScale = new Vector3(1.3f, 1.3f, 1.3f); ItemDef.pickupModelPrefab = val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(SusieAxeEffect); } public void SusieAxeEffect(CharacterBody sender, StatHookEventArgs args) { int count = GetCount(sender); PrimarySkillSusieAxeBehavior primarySkillSusieAxeBehavior = ((Component)sender).GetComponent(); if (!Object.op_Implicit((Object)(object)primarySkillSusieAxeBehavior) && Object.op_Implicit((Object)(object)sender.inventory) && count > 0) { primarySkillSusieAxeBehavior = ((Component)sender).gameObject.AddComponent(); ((ItemBehavior)primarySkillSusieAxeBehavior).body = sender; ((ItemBehavior)primarySkillSusieAxeBehavior).stack = count; primarySkillSusieAxeBehavior.projectilePrefab = ProjectilePrefab; primarySkillSusieAxeBehavior.SusieAxeBuff = SusieAxeBuff; } else if (Object.op_Implicit((Object)(object)primarySkillSusieAxeBehavior) && count <= 0) { ((Behaviour)primarySkillSusieAxeBehavior).enabled = false; } else if (Object.op_Implicit((Object)(object)primarySkillSusieAxeBehavior) && count > 0 && !((Behaviour)primarySkillSusieAxeBehavior).enabled) { ((Behaviour)primarySkillSusieAxeBehavior).enabled = true; } if (Object.op_Implicit((Object)(object)primarySkillSusieAxeBehavior)) { ((ItemBehavior)primarySkillSusieAxeBehavior).stack = count; } } public void CreateBuff() { SusieAxeBuff = ScriptableObject.CreateInstance(); ((Object)SusieAxeBuff).name = "SusieAxeBuff"; SusieAxeBuff.iconSprite = BuffIcon; SusieAxeBuff.canStack = true; SusieAxeBuff.isDebuff = false; ContentAddition.AddBuffDef(SusieAxeBuff); } public void CreateSoundEffect() { RudeBusterSFX = Helpers.CreateNetworkSoundEventDef("Play_rude_buster"); } public void CreateProjectile() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) GameObject ghost = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("rude_buster.prefab"), "SusieAxeGhost", false); ghost.AddComponent(); ghost.AddComponent(); ghost.transform.localScale = new Vector3(150f, 150f, 150f); ProjectilePrefab = Helpers.ModifyVanillaPrefab("RoR2/DLC1/PrimarySkillShuriken/ShurikenProjectile.prefab", "SusieAxeProjectile", shouldNetwork: false, delegate(GameObject shurikenPrefab) { shurikenPrefab.GetComponent().ghostPrefab = ghost; shurikenPrefab.GetComponent().startSound = ""; ProjectileSimple component = shurikenPrefab.GetComponent(); component.desiredForwardSpeed *= 0.5f; return shurikenPrefab; }); Helpers.CreateNetworkedProjectilePrefab(ProjectilePrefab); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.34926f, 0.25313f, -0.41051f), localAngles = new Vector3(14.01768f, 50.88708f, 82.11794f), localScale = new Vector3(23.74224f, 23.74224f, 23.74224f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pelvis", localPos = new Vector3(0.09873f, -0.13067f, 0.02605f), localAngles = new Vector3(23.6536f, 93.07247f, 24.55241f), localScale = new Vector3(25.51046f, 16.67866f, 25.51046f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "UpperArmL", localPos = new Vector3(0.40818f, 0.30742f, 0.55069f), localAngles = new Vector3(2.01947f, 281.0584f, 67.86629f), localScale = new Vector3(166.2022f, 166.2022f, 166.2022f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.28472f, 0.15643f, -0.12816f), localAngles = new Vector3(354.5077f, 347.7494f, 281.5692f), localScale = new Vector3(50.83732f, 50.83732f, 50.83732f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.12374f, 0.37286f, -0.03677f), localAngles = new Vector3(5.54981f, 275.2047f, 216.0641f), localScale = new Vector3(18.16601f, 18.16601f, 18.16601f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.18235f, -0.04304f, -0.42368f), localAngles = new Vector3(340.2831f, 185.451f, 340.5156f), localScale = new Vector3(24.97854f, 24.97854f, 24.97854f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(-1.09289f, 0.13743f, -0.11748f), localAngles = new Vector3(3.25975f, 162.9752f, 33.30826f), localScale = new Vector3(30.4944f, 30.4944f, 30.4944f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.28829f, 0.38631f, 0.02157f), localAngles = new Vector3(6.18454f, 3.13923f, 148.0287f), localScale = new Vector3(13.47214f, 13.47214f, 13.47214f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-2.4045f, -1.67265f, 2.1141f), localAngles = new Vector3(354.3773f, 254.687f, 358.6025f), localScale = new Vector3(121.9903f, 121.9903f, 121.9903f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.34605f, 0.39082f, -0.10218f), localAngles = new Vector3(5.15182f, 25.06269f, 146.8649f), localScale = new Vector3(14.66418f, 14.66418f, 14.66418f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(0.09482f, 0.14564f, 0.01243f), localAngles = new Vector3(331.879f, 77.49539f, 210.0147f), localScale = new Vector3(15.98449f, 15.98449f, 15.98449f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CannonEnd", localPos = new Vector3(0.13748f, -0.11991f, 0.07944f), localAngles = new Vector3(4.53002f, 272.7654f, 4.84901f), localScale = new Vector3(21.07476f, 24.49854f, 17.5623f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.04536f, -0.42105f, 0.09325f), localAngles = new Vector3(320.1729f, 10.61689f, 101.4086f), localScale = new Vector3(21.83015f, 18.71156f, 18.71156f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.2744f, -0.30065f, 0.07598f), localAngles = new Vector3(328.4284f, 358.3063f, 35.0899f), localScale = new Vector3(15.67788f, 13.93588f, 13.93588f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.01619f, -0.62815f, 0.30422f), localAngles = new Vector3(4.056f, 154.1342f, 354.7828f), localScale = new Vector3(8f, 8f, 8f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Back", localPos = new Vector3(-0.00243f, -0.00212f, -0.00694f), localAngles = new Vector3(347.736f, 180.3236f, 41.70065f), localScale = new Vector3(0.60172f, 0.60172f, 0.60172f) } }); return val; } } public class TensionBow : ItemBase { private class TPTimer : MonoBehaviour { private readonly float timerInterval = 5f; private float timer = 0f; public CharacterBody player; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { if (!Object.op_Implicit((Object)(object)player)) { Debug.Log((object)"Player not found! Destroying..."); Object.Destroy((Object)(object)this); } timer = timerInterval; } private void FixedUpdate() { timer -= Time.deltaTime; if (timer <= 0f) { TPUp(); timer = timerInterval; } } private void TPUp() { Debug.Log((object)"Adding TP!"); player.AddBuff(TPBuff); } } public static BuffDef TPBuff; private readonly float multi = 0.5f; public override string ItemName => "Tension Bow"; public override string ItemLangTokenName => "TEN_BOW"; public override string ItemPickupDesc => "Gain 1% TP every 5 seconds. Gain +0.5 attack speed and armor per TP%."; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)1; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("tension_bow.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("tension_bow_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } private void CreateBuff() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) TPBuff = ScriptableObject.CreateInstance(); ((Object)TPBuff).name = "TPBuff"; TPBuff.buffColor = Color.yellow; TPBuff.canStack = true; TPBuff.isDebuff = false; TPBuff.isHidden = false; ContentAddition.AddBuffDef(TPBuff); } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); TPTimer component = ((Component)self).GetComponent(); if (GetCount(self) > 0 && !Object.op_Implicit((Object)(object)component)) { component = ((Component)self).gameObject.AddComponent(); component.player = self; ((Behaviour)component).enabled = true; } else if (GetCount(self) <= 0 && Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (GetCount(sender) > 0 && sender.HasBuff(TPBuff)) { int buffCount = sender.GetBuffCount(TPBuff); double num = Math.Floor((float)buffCount / 5f); int count = GetCount(sender); float num2 = (float)(buffCount * count) * multi; args.armorAdd += num2; args.attackSpeedMultAdd += num2; } } public override void Init() { } } } namespace DeltaruneMod.Items.Tier1 { public class JackKeyNf : ItemBase { private class JackNOffTimer : MonoBehaviour { private readonly float timerInterval = 30f; private float timer = 0f; public CharacterBody player; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { if (!Object.op_Implicit((Object)(object)player)) { Debug.Log((object)"Player not found! Destroying..."); Object.Destroy((Object)(object)this); } timer = timerInterval; } private void FixedUpdate() { timer -= Time.fixedDeltaTime; if (timer <= 0f) { YourTakingTooLong(); timer = timerInterval; } } private void YourTakingTooLong() { Debug.Log((object)"Adding speed buff!"); player.AddBuff(JackBuff); } } public static Sprite BuffIcon = DeltarunePlugin.MainAssets.LoadAsset("jack_key_buff_icon.png"); public static BuffDef JackBuff; private readonly float multi = 0.05f; private readonly float baseMulti = 0.01f; public override string ItemName => "Closet Key"; public override string ItemLangTokenName => "JACK_KEY"; public override string ItemPickupDesc => "Every 30 seconds on stage, move 5% faster."; public override string ItemFullDescription => "Every 30 seconds on stage, gain 5% movement speed (+1% per stack) [resets after each stage]."; public override string ItemLore => "Stumbling around in the darkness, you enter a room.\nIn this void there is nothing to see but a faint glow.\nA drawer is shown, you see the surrounding but no one is here, it looks like a study of sorts...\nAs you open the drawer the light shines brightly, \nyou feel a strange pulse, your mind racing, a strange voice calls to you.\nThe laughter is taunting you, the words in your mind, ringing, \n\"YOU'RE TAKING TOO LONG\"."; public override ItemTier Tier => (ItemTier)0; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("sugma_balls.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("jack_key_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => true; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)29 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.1798f, 0.49651f, -0.04438f), localAngles = new Vector3(350.9123f, 102.8262f, 174.6391f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(0.12523f, 0.57639f, 0.02619f), localAngles = new Vector3(17.53846f, 74.32281f, 173.9909f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MainWeapon", localPos = new Vector3(-0.33806f, -0.16264f, 0.10024f), localAngles = new Vector3(338.4061f, 341.8553f, 342.4209f), localScale = new Vector3(40.17231f, 40.17231f, 40.17231f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(-0.35322f, -0.65284f, -0.83172f), localAngles = new Vector3(36.83676f, 79.64436f, 347.0035f), localScale = new Vector3(200f, 200f, 200f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MuzzleRight", localPos = new Vector3(-0.28417f, 0.53592f, -0.1511f), localAngles = new Vector3(346.3751f, 101.7892f, 180.4147f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighL", localPos = new Vector3(0.22521f, 0.76136f, 0.1713f), localAngles = new Vector3(342.6173f, 269.3727f, 178.4107f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighL", localPos = new Vector3(0.24248f, 0.70388f, 0.12107f), localAngles = new Vector3(343.777f, 256.632f, 178.1319f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "WeaponPlatform", localPos = new Vector3(-0.19147f, 0.16725f, -0.25981f), localAngles = new Vector3(354.1692f, 102.2908f, 71.60953f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.35432f, -0.24068f, -0.19672f), localAngles = new Vector3(25.01427f, 96.96656f, 30.84815f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmL", localPos = new Vector3(-1.82523f, 3.39563f, 0.22619f), localAngles = new Vector3(29.40898f, 158.3239f, 83.72023f), localScale = new Vector3(60.59527f, 60.59527f, 60.59527f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(-0.54048f, -0.33216f, -0.12587f), localAngles = new Vector3(24.03601f, 74.05122f, 1.67272f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.22293f, 0.81333f, 0.1847f), localAngles = new Vector3(340.2833f, 97.1996f, 200.2289f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ShoulderR", localPos = new Vector3(-0.48522f, 0.15462f, -0.26142f), localAngles = new Vector3(293.772f, 200.9876f, 39.2971f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pack", localPos = new Vector3(0.20191f, -0.7463f, -0.1612f), localAngles = new Vector3(332.633f, 92.34814f, 354.5216f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ClavL", localPos = new Vector3(-0.18452f, 1.06937f, 0.56602f), localAngles = new Vector3(63.28513f, 319.1324f, 162.1586f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.46152f, -0.46659f, -0.54141f), localAngles = new Vector3(28.38098f, 357.0819f, 39.38975f), localScale = new Vector3(40f, 40f, 40f) } }); return val; } private void CreateBuff() { JackBuff = ScriptableObject.CreateInstance(); ((Object)JackBuff).name = "JackBuff"; JackBuff.iconSprite = ItemIcon; JackBuff.canStack = true; JackBuff.isDebuff = false; JackBuff.isHidden = false; ContentAddition.AddBuffDef(JackBuff); } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); JackNOffTimer component = ((Component)self).GetComponent(); if (GetCount(self) > 0 && !Object.op_Implicit((Object)(object)component)) { component = ((Component)self).gameObject.AddComponent(); component.player = self; ((Behaviour)component).enabled = true; } else if (GetCount(self) <= 0 && Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (GetCount(sender) > 0 && sender.HasBuff(JackBuff)) { int buffCount = sender.GetBuffCount(JackBuff); int num = GetCount(sender) - 1; float num2 = (float)buffCount * (baseMulti + (float)num * multi); args.moveSpeedMultAdd += num2; } } public override void Init() { CreateItem(); CreateLang(); CreateBuff(); Hooks(); GameObject pickupModelPrefab = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("jackkeynoff.prefab"), "JackKeyPickup", false); ItemDef.pickupModelPrefab = pickupModelPrefab; } } public class LancerCard : ItemBase { private bool canUseEffect = false; public override string ItemName => "Jack of Spades"; public override string ItemLangTokenName => "LANCER_CARD"; public override string ItemPickupDesc => "Free unlock on stage start."; public override string ItemFullDescription => "Gain 1 free unlock per stage (+1 per 2 collected afterwards)"; public override string ItemLore => "You hear a faint hohoho...\nThis is just a card right..?"; public override ItemTier Tier => (ItemTier)0; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("lancer_card.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("lancer_card_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)20 }; public override bool isChapter1 => true; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override void Init() { CreateLang(); CreateItem(); Hooks(); } public override void Hooks() { //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 CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); CharacterMaster.OnServerStageBegin += new hook_OnServerStageBegin(CharacterMaster_OnServerStageBegin); } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); int count = GetCount(self); if (GetCount(self) <= 0 || !canUseEffect) { return; } for (int i = 0; i < count; i++) { if (i == 0 || i % 2 == 0) { body.AddBuff(Buffs.FreeUnlocks.buffIndex); } Debug.Log((object)("Added lancer unlock effect to " + ((Object)body).name)); } AkSoundEngine.PostEvent(2353227689u, ((Component)body).gameObject); } private void CharacterMaster_OnServerStageBegin(orig_OnServerStageBegin orig, CharacterMaster self, Stage stage) { orig.Invoke(self, stage); if (stage.sceneDef.cachedName != "bazaar") { canUseEffect = true; } else { canUseEffect = false; } } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_09f0: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_0a2d: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a48: Unknown result type (might be due to invalid IL or missing references) //IL_0a5e: Unknown result type (might be due to invalid IL or missing references) //IL_0a63: Unknown result type (might be due to invalid IL or missing references) //IL_0a68: Unknown result type (might be due to invalid IL or missing references) //IL_0a69: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighL", localPos = new Vector3(0.05621f, -0.01305f, 0.08701f), localAngles = new Vector3(336.7992f, 346.0364f, 319.8058f), localScale = new Vector3(20f, 20f, 20f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "BowBase", localPos = new Vector3(-0.26323f, 0.06472f, -0.00032f), localAngles = new Vector3(40.349f, 147.5673f, 337.1469f), localScale = new Vector3(20f, 20f, 20f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-1.19104f, 1.84019f, 1.95193f), localAngles = new Vector3(359.9579f, 12.5627f, 352.9454f), localScale = new Vector3(180f, 180f, 180f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pelvis", localPos = new Vector3(0.25831f, -0.01319f, 0.00067f), localAngles = new Vector3(352.5149f, 453f / MathF.E, 141.9863f), localScale = new Vector3(20f, 20f, 20f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmR", localPos = new Vector3(0.031f, 0.1832f, 0.08832f), localAngles = new Vector3(353.5615f, 90.10542f, 144.1951f), localScale = new Vector3(12f, 12f, 12f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighL", localPos = new Vector3(0.08579f, 0.03093f, 0.06917f), localAngles = new Vector3(2.88064f, 153.149f, 143.3174f), localScale = new Vector3(20f, 20f, 20f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(0.19925f, 0.49019f, 0.65711f), localAngles = new Vector3(341.0073f, 109.2714f, 2.21412f), localScale = new Vector3(30f, 30f, 30f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.1606f, 0.11101f, 0.1941f), localAngles = new Vector3(5.31841f, 245.6385f, 338.9428f), localScale = new Vector3(24f, 24f, 24f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(-0.23574f, -0.03458f, 0.09329f), localAngles = new Vector3(38.25168f, 191.5127f, 279.8038f), localScale = new Vector3(200f, 200f, 200f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfL", localPos = new Vector3(-0.00602f, -0.02117f, -0.07068f), localAngles = new Vector3(355.5136f, 266.9259f, 124.83f), localScale = new Vector3(15f, 15f, 15f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(0.05233f, 0.07269f, 0.14273f), localAngles = new Vector3(6.88681f, 285.7394f, 323.3983f), localScale = new Vector3(15f, 15f, 15f) } }); val.Add("mdlHeretic", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.02105f, -0.87071f, 0.01385f), localAngles = new Vector3(355.2848f, 47.55381f, 355.0908f), localScale = new Vector3(0.20392f, 0.20392f, 0.20392f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "GunBarrel", localPos = new Vector3(-0.02802f, 0.17708f, -0.13867f), localAngles = new Vector3(285.2631f, 200.9528f, 236.2997f), localScale = new Vector3(12f, 12f, 12f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.00512f, 0.04804f, -0.20226f), localAngles = new Vector3(342.1225f, 91.86257f, 310.8853f), localScale = new Vector3(18f, 18f, 18f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.08207f, -0.47537f, 0.27714f), localAngles = new Vector3(14.88056f, 194.516f, 218.5694f), localScale = new Vector3(28f, 28f, 28f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfR", localPos = new Vector3(0.049f, 0.27209f, 0.01171f), localAngles = new Vector3(349.9406f, 174.9632f, 139.0277f), localScale = new Vector3(15f, 15f, 15f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.15619f, 0.47124f, -0.87054f), localAngles = new Vector3(14.75215f, 229.616f, 57.08662f), localScale = new Vector3(30f, 30f, 30f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.00671f, 0.00172f, -0.00149f), localAngles = new Vector3(10.40342f, 336.8046f, 152.8039f), localScale = new Vector3(1f, 1f, 1f) } }); return val; } } public class TennaBuckle : ItemBase { public override string ItemName => "Showrunner's Buckle"; public override string ItemLangTokenName => "TENNABUCKLE"; public override string ItemPickupDesc => "10% more gold gain."; public override string ItemFullDescription => "10% more gold gain (+5% per stack)"; public override string ItemLore => "Mr. Tenna has been looking for this for weeks!\nI should give it back... but its so shinyyyy..."; public override ItemTier Tier => (ItemTier)0; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("tenna_buckle.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("tenna_buckle_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)31 }; public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override void Init() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) CreateItem(); CreateLang(); Hooks(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("tenna_buckle.prefab"), "TennaBucklePickup", true); val.transform.localScale = new Vector3(2f, 2f, 2f); ItemDef.pickupModelPrefab = val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterMaster.GiveMoney += new hook_GiveMoney(TennaBuckleEffect); } public void TennaBuckleEffect(orig_GiveMoney orig, CharacterMaster self, uint amount) { if (NetworkServer.active && Object.op_Implicit((Object)(object)self.GetBody())) { int count = GetCount(self); if (Object.op_Implicit((Object)(object)self.inventory) && count > 0) { uint num = (uint)Mathf.CeilToInt((float)amount * (0.1f + 0.05f * (float)(count - 1))); amount += num; } orig.Invoke(self, amount); } } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_09f0: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_0a2d: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a48: Unknown result type (might be due to invalid IL or missing references) //IL_0a5e: Unknown result type (might be due to invalid IL or missing references) //IL_0a63: Unknown result type (might be due to invalid IL or missing references) //IL_0a68: Unknown result type (might be due to invalid IL or missing references) //IL_0a69: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(-0.0049f, 0.04183f, 0.15285f), localAngles = new Vector3(3.26827f, 0.79509f, 357.778f), localScale = new Vector3(5f, 5f, 5f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pelvis", localPos = new Vector3(-0.00059f, -0.05429f, -0.13213f), localAngles = new Vector3(4.33248f, 172.0518f, 175.0657f), localScale = new Vector3(4f, 4f, 4f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Hip", localPos = new Vector3(1.68019f, 2.66642f, -0.00804f), localAngles = new Vector3(2.27094f, 90.44276f, 358.5837f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pelvis", localPos = new Vector3(-0.00244f, 0.01116f, -0.22892f), localAngles = new Vector3(8.86381f, 178.4863f, 179.1359f), localScale = new Vector3(5f, 5f, 5f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighL", localPos = new Vector3(0.06536f, 0.21384f, 0.15102f), localAngles = new Vector3(7.82877f, 39.70278f, 166.4932f), localScale = new Vector3(4f, 4f, 4f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(0.00605f, 0.12349f, 0.14855f), localAngles = new Vector3(8.56603f, 341.2049f, 178.9855f), localScale = new Vector3(4f, 4f, 4f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(0.07716f, -0.07133f, 0.72874f), localAngles = new Vector3(6.35499f, 10.55185f, 357.6271f), localScale = new Vector3(8f, 8f, 8f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighR", localPos = new Vector3(-0.06006f, 0.42304f, 0.19245f), localAngles = new Vector3(336.7605f, 335.6627f, 138.7854f), localScale = new Vector3(5f, 5f, 5f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.18475f, 4.63483f, -0.05588f), localAngles = new Vector3(325.9449f, 21.35626f, 353.344f), localScale = new Vector3(40f, 40f, 40f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(0.00148f, 0.11693f, 0.1787f), localAngles = new Vector3(3.00358f, 359.9656f, 357.4811f), localScale = new Vector3(6f, 6f, 6f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Stomach", localPos = new Vector3(-0.00105f, 0.01815f, 0.18323f), localAngles = new Vector3(356.1403f, 359.3785f, 359.7015f), localScale = new Vector3(6f, 5f, 5f) } }); val.Add("mdlHeretic", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.02105f, -0.87071f, 0.01385f), localAngles = new Vector3(355.2848f, 47.55381f, 355.0908f), localScale = new Vector3(0.20392f, 0.20392f, 0.20392f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfL", localPos = new Vector3(0.11341f, 0.09869f, 0.03613f), localAngles = new Vector3(3.19188f, 80.9049f, 190.4413f), localScale = new Vector3(4f, 4f, 4f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pelvis", localPos = new Vector3(0.13101f, 0.05237f, 0.03156f), localAngles = new Vector3(2.45553f, 71.95915f, 181.5351f), localScale = new Vector3(5f, 5f, 5f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pelvis", localPos = new Vector3(0.10473f, 0.13733f, -0.01701f), localAngles = new Vector3(287.2553f, 149.4112f, 296.2607f), localScale = new Vector3(6f, 6f, 6f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.10687f, 0.06086f, 0.10486f), localAngles = new Vector3(345.366f, 347.541f, 357.0169f), localScale = new Vector3(5f, 5f, 5f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pelvis", localPos = new Vector3(-0.01761f, -0.02624f, 0.19554f), localAngles = new Vector3(358.0899f, 0.41444f, 357.5107f), localScale = new Vector3(9f, 9f, 9f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Hips", localPos = new Vector3(0.00042f, 0.00033f, 0.00586f), localAngles = new Vector3(348.6603f, 4.18738f, 359.9568f), localScale = new Vector3(0.1158f, 0.1158f, 0.05478f) } }); return val; } } } namespace DeltaruneMod.Items.Tier1.Gacha { public class BlueRibbon : ItemBase { public const float BlueRibbionHealingMult = 0.05f; public const float BlueRibbionAttackSpeedMult = 0.05f; public override string ItemName => "Blue Ribbon"; public override string ItemLangTokenName => "BLUE_RIBBON"; public override string ItemPickupDesc => "Provides a boost in healing and attack speed."; public override string ItemFullDescription => "Gain a 5% to healing and attack speed (+5% per stack)."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)5; public override GameObject ItemModel => null; public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("blue_ribbon_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)9 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (GetCount(sender) > 0) { args.healthTotalMult += 0.05f * (float)GetCount(sender); args.attackSpeedMultAdd += 0.05f * (float)GetCount(sender); } } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class ExecBuffet : ItemBase { private readonly float healAmount = 100f; public override string ItemName => "ExecBuffet"; public override string ItemLangTokenName => "EXEC_BUFFET"; public override string ItemPickupDesc => "Heal party +100 HP on low health."; public override string ItemFullDescription => "Heal party +100 HP on low health."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)5; public override GameObject ItemModel => null; public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("exec_buffet_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)9 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.OnTakeDamageServer += new hook_OnTakeDamageServer(CharacterBody_OnTakeDamageServer); } private void CharacterBody_OnTakeDamageServer(orig_OnTakeDamageServer orig, CharacterBody self, DamageReport damageReport) { //IL_0155: 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_018d: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); if (GetCount(self) <= 0) { return; } float health = self.healthComponent.health; float maxHealth = self.maxHealth; double num = (double)maxHealth * 0.4; if (!((double)health <= num)) { return; } foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList) { if (readOnlyInstances.isPlayerControlled) { float health2 = readOnlyInstances.healthComponent.health; float maxHealth2 = readOnlyInstances.maxHealth; float num2 = health2 + healAmount; if (num2 <= maxHealth2) { HealthComponent healthComponent = readOnlyInstances.healthComponent; healthComponent.health += healAmount; } else { readOnlyInstances.healthComponent.health = maxHealth2; } readOnlyInstances.AddTimedBuff(Buffs.Immune, 0.5f); Debug.Log((object)(((Object)readOnlyInstances).name + " healed!")); } Debug.Log((object)(((object)readOnlyInstances)?.ToString() + " found.")); } self.inventory.RemoveItemPermanent(ItemBase.instance.ItemDef.itemIndex, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef.itemIndex, 1); CharacterMasterNotificationQueue.SendTransformNotification(self.master, ItemBase.instance.ItemDef.itemIndex, ItemBase.instance.ItemDef.itemIndex, (TransformationType)0); } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class ExecBuffetConsumed : ItemBase { private readonly float healAmount = 100f; public override string ItemName => "ExecBuffet (Consumed)"; public override string ItemLangTokenName => "EXEC_BUFFET_USED"; public override string ItemPickupDesc => "A dinner for executives, just not a good one..."; public override string ItemFullDescription => "A dinner for executives, just not a good one..."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)5; public override GameObject ItemModel => null; public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("exec_buffet_icon_consumed.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)9 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class GachaBall : ItemBase { private class GachaBallTimer : MonoBehaviour { private readonly float timerInterval = 90f; private float timer = 0f; public int stackCount = 0; public CharacterBody player; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { if (!Object.op_Implicit((Object)(object)player)) { Debug.Log((object)"Player not found! Destroying..."); Object.Destroy((Object)(object)this); } timer = timerInterval; } private void FixedUpdate() { timer -= Time.fixedDeltaTime; if (timer <= 0f) { GAMBLE(); timer = timerInterval; } } private void GAMBLE() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < stackCount; i++) { ItemDef val = gachaItems[Random.Range(0, gachaItems.Count)]; player.inventory.GiveItemTemp(val.itemIndex, 1f); Debug.Log((object)("Gave " + ((Object)player).name + " " + ((Object)val).name)); } } } public static List gachaItems = new List(); public override string ItemName => "Grand Prize"; public override string ItemLangTokenName => "GACHA_BALL"; public override string ItemPickupDesc => "Gain a temporary gacha pull on stage start."; public override string ItemFullDescription => "Gain a random item from the gacha item pool on stage start (+1 item per stack)."; public override string ItemLore => "Congradulations! You are our 397th WINNER!\nFor being our 397th WINNER, you will recieve a CONSOLATION PRIZE.\n\n\n\n*Consolation prize subject to an 80% tax."; public override ItemTier Tier => (ItemTier)0; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("gacha_ball.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("gacha_ball_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.09767f, 0.18165f, 0.23138f), localAngles = new Vector3(25.59187f, 108.3924f, 357.5829f), localScale = new Vector3(3.43066f, 3.43066f, 3.43066f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.09767f, 0.18165f, 0.23138f), localAngles = new Vector3(25.59187f, 108.3924f, 357.5829f), localScale = new Vector3(3.43066f, 3.43066f, 3.43066f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MainWheelL", localPos = new Vector3(-0.80123f, 0.01261f, -0.05036f), localAngles = new Vector3(22.03093f, 193.1643f, 293.1384f), localScale = new Vector3(41.25451f, 41.25451f, 41.25451f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.14757f, 0.47531f, -0.17837f), localAngles = new Vector3(63.61968f, 206.9357f, 211.2521f), localScale = new Vector3(2.87533f, 2.87533f, 2.87533f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootL", localPos = new Vector3(0.00697f, 0.082f, -0.0516f), localAngles = new Vector3(358.5168f, 247.8026f, 98.09467f), localScale = new Vector3(2.16937f, 2.16937f, 2.16937f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfR", localPos = new Vector3(-0.00903f, -0.02159f, -0.01258f), localAngles = new Vector3(332.2478f, 140.918f, 214.9979f), localScale = new Vector3(2.87252f, 2.87252f, 2.87252f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootBackL", localPos = new Vector3(-0.04999f, 1.32125f, -0.01616f), localAngles = new Vector3(13.91979f, 83.61308f, 188.4137f), localScale = new Vector3(4.1695f, 4.1695f, 4.1695f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MechLowerArmL", localPos = new Vector3(0.11835f, 0.54309f, 0.00279f), localAngles = new Vector3(31.08598f, 331.5507f, 199.0387f), localScale = new Vector3(2.21822f, 3.05491f, 2.6062f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.18318f, 3.87908f, 1.49318f), localAngles = new Vector3(11.95531f, 265.0479f, 75.21944f), localScale = new Vector3(47.10388f, 47.10388f, 47.10388f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Neck", localPos = new Vector3(-0.23606f, -0.01474f, 0.04785f), localAngles = new Vector3(20.43124f, 28.62147f, 52.04087f), localScale = new Vector3(3.35465f, 3.35465f, 3.35465f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfL", localPos = new Vector3(-0.07775f, 0.31852f, 0.01962f), localAngles = new Vector3(4.41864f, 230.4836f, 309.8528f), localScale = new Vector3(1.23245f, 1.23245f, 1.23245f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LargeExhaust2L", localPos = new Vector3(-0.02756f, -0.00821f, 0.02134f), localAngles = new Vector3(351.5643f, 26.98711f, 125.3889f), localScale = new Vector3(4.40777f, 4.14464f, 3.6732f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Wheel", localPos = new Vector3(-0.74618f, -0.00219f, 0.01216f), localAngles = new Vector3(11.1291f, 331.6624f, 74.44159f), localScale = new Vector3(5.0823f, 5.04516f, 4.35625f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "ThighL", localPos = new Vector3(0.0395f, -0.00441f, -0.10403f), localAngles = new Vector3(3.30137f, 74.72095f, 184.1599f), localScale = new Vector3(2.50045f, 2.22258f, 2.22258f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.06796f, 0.33392f, -0.4559f), localAngles = new Vector3(355.5451f, 115.7917f, 341.5839f), localScale = new Vector3(2.83273f, 2.83273f, 2.83273f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { orig.Invoke(self, body); if (gachaItems.Count <= 0) { GetGachaItems(); } try { foreach (ItemDef gachaItem in gachaItems) { int itemCountEffective = self.inventory.GetItemCountEffective(gachaItem); for (int i = 0; i < itemCountEffective; i++) { self.inventory.RemoveItemPermanent(gachaItem, 1); Debug.Log((object)("Removed " + ((Object)gachaItem).name + " from " + ((Object)self).name)); } } } catch { Debug.Log((object)"Error removing gacha items."); } if (GetCount(self) > 0) { for (int j = 0; j < GetCount(self); j++) { ItemDef val = gachaItems[Random.Range(0, gachaItems.Count)]; self.inventory.GiveItemPermanent(val, 1); Debug.Log((object)("Gave " + ((Object)self).name + " " + ((Object)val).name)); } } } private void GetGachaItems() { gachaItems.Add(ItemBase.instance.ItemDef); gachaItems.Add(ItemBase.instance.ItemDef); gachaItems.Add(ItemBase.instance.ItemDef); gachaItems.Add(ItemBase.instance.ItemDef); gachaItems.Add(ItemBase.instance.ItemDef); } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class GingerGuard : ItemBase { public const float GingerGuardArmorMult = 0.05f; public override string ItemName => "Ginger Guard"; public override string ItemLangTokenName => "GINGER_GUARD"; public override string ItemPickupDesc => "Provides a boost in armor."; public override string ItemFullDescription => "Gain a 5% increase to armor (+5% per stack)."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)5; public override GameObject ItemModel => null; public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("ginger_guard_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)9 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (GetCount(sender) > 0) { args.armorTotalMult += 0.05f * (float)GetCount(sender); } } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class GoldenIdol : ItemBase { private readonly float xpGainMult = 0.2f; public override string ItemName => "Gold Tenna Statue"; public override string ItemLangTokenName => "GOLDEN_IDOL"; public override string ItemPickupDesc => "Gain 20% more experience."; public override string ItemFullDescription => "Gain 20% more experience. (+20% per stack)"; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)5; public override GameObject ItemModel => null; public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("golden_idol_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)9 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown DeathRewards.OnKilledServer += new hook_OnKilledServer(DeathRewards_OnKilledServer); } private void DeathRewards_OnKilledServer(orig_OnKilledServer orig, DeathRewards self, DamageReport damageReport) { CharacterBody attackerBody = damageReport.attackerBody; uint expReward = self.expReward; if (GetCount(attackerBody) > 0) { Debug.Log((object)("XP Bonus Added: " + expReward)); float num = xpGainMult * (float)GetCount(attackerBody); uint num2 = (uint)Mathf.CeilToInt((float)expReward * num); self.expReward += num2; Debug.Log((object)(" -> " + self.expReward)); } orig.Invoke(self, damageReport); } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class TVDinner : ItemBase { private readonly float healAmount = 100f; public override string ItemName => "TVDinner"; public override string ItemLangTokenName => "TV_DINNER"; public override string ItemPickupDesc => "Heal +100 HP on low health."; public override string ItemFullDescription => "Heal +100 HP on low health."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)5; public override GameObject ItemModel => null; public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("tv_dinner_icon.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)9 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.OnTakeDamageServer += new hook_OnTakeDamageServer(CharacterBody_OnTakeDamageServer); } private void CharacterBody_OnTakeDamageServer(orig_OnTakeDamageServer orig, CharacterBody self, DamageReport damageReport) { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); float health = self.healthComponent.health; float maxHealth = self.maxHealth; float num = health + healAmount; bool flag = num <= maxHealth; double num2 = (double)maxHealth * 0.4; if (GetCount(self) > 0 && (double)health <= num2) { if (flag) { HealthComponent healthComponent = self.healthComponent; healthComponent.health += healAmount; } else { self.healthComponent.health = maxHealth; } self.AddTimedBuff(Buffs.Immune, 0.5f); self.inventory.RemoveItemPermanent(ItemBase.instance.ItemDef.itemIndex, 1); self.inventory.GiveItemPermanent(ItemBase.instance.ItemDef.itemIndex, 1); CharacterMasterNotificationQueue.SendTransformNotification(self.master, ItemBase.instance.ItemDef.itemIndex, ItemBase.instance.ItemDef.itemIndex, (TransformationType)0); Debug.Log((object)(((Object)self).name + " healed!")); } } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class TVDinnerConsumed : ItemBase { public override string ItemName => "TVDinner (Consumed)"; public override string ItemLangTokenName => "TV_DINNER_USED"; public override string ItemPickupDesc => "Not very much of a banquet..."; public override string ItemFullDescription => "Not very much of a banquet..."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)5; public override GameObject ItemModel => null; public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("tv_dinner_icon_consumed.png"); public override bool isChapter1 => false; public override bool isChapter2 => false; public override bool isChapter3 => true; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)9 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } } namespace DeltaruneMod.Items.Spamton { public class BrokenHeart : ItemBase { public class BeadBehavior : ItemBehavior { private const float secondsPerProjectile = 2f; private const int baseMaxProjectiles = 3; private const float baseOrbitRadius = 2f; private const float baseDamageCoefficient = 1.997f; private float projectileTimer; public GameObject projectilePrefab; public DeployableSlot orbDeployable; public event Action onDisabled; public static int GetMaxProjectiles(Inventory inventory) { return 3; } public void InitializeOrbiter(ProjectileOwnerOrbiter orbiter, BeadProjectileController controller) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) BeadProjectileController controller2 = controller; float num = base.body.radius + 2f; Quaternion val = Quaternion.AngleAxis(Random.Range(180f, 180f), Vector3.up); Quaternion val2 = Quaternion.AngleAxis(Random.Range(0f, 180f), Vector3.forward); Vector3 val3 = val * val2 * Vector3.up; float num2 = Random.Range(30f, -210f); orbiter.Initialize(val3, num, 180f, num2); onDisabled += DestroyOrbiter; void DestroyOrbiter(BeadBehavior beadBehavior) { if (Object.op_Implicit((Object)(object)controller2)) { controller2.Detonate(); } } } private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void OnDisable() { this.onDisabled?.Invoke(this); this.onDisabled = null; } private void FixedUpdate() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) projectileTimer += Time.fixedDeltaTime; if (!base.body.master.IsDeployableLimited(orbDeployable) && projectileTimer > 2f) { projectileTimer = 0f; Ray val = default(Ray); ((Ray)(ref val))..ctor(base.body.inputBank.aimOrigin, base.body.inputBank.aimDirection); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = projectilePrefab; val2.crit = base.body.RollCrit(); val2.damage = base.body.damage * 1.997f * (float)base.stack; val2.damageColorIndex = (DamageColorIndex)3; val2.force = 0f; val2.owner = ((Component)base.body).gameObject; val2.position = base.body.transform.position; val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(90f, 0f, 0f); val2.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)2); FireProjectileInfo val3 = val2; ProjectileManager.instance.FireProjectile(val3); } } } [DisallowMultipleComponent] [RequireComponent(typeof(ProjectileOwnerOrbiter))] [RequireComponent(typeof(ProjectileController))] [RequireComponent(typeof(ProjectileImpactExplosion))] public class BeadProjectileController : MonoBehaviour { private ProjectileImpactExplosion explosion; public void OnEnable() { explosion = ((Component)this).GetComponent(); if (NetworkServer.active) { ProjectileController component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component.owner)) { AcquireOwner(component); } else { component.onInitialized += AcquireOwner; } } } private void AcquireOwner(ProjectileController controller) { controller.onInitialized -= AcquireOwner; CharacterBody component = controller.owner.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ProjectileOwnerOrbiter component2 = ((Component)this).GetComponent(); ((Component)component).GetComponent().InitializeOrbiter(component2, this); } } public void Detonate() { if (Object.op_Implicit((Object)(object)explosion)) { ((ProjectileExplosion)explosion).Detonate(); } } } public static GameObject orbProjectile; public static GameObject ShardPrefab = DeltarunePlugin.MainAssets.LoadAsset("spam_projectile.prefab"); public DeployableSlot BeadOrbs; public const int MaxOrbs = 3; public const float OrbCooldown = 2f; public override string ItemName => "Misshapen Heart"; public override string ItemLangTokenName => "BROKE_HEART"; public override string ItemPickupDesc => "Spawn an orbiting, armor piercing projectile every 2 seconds."; public override string ItemFullDescription => "Every 2 seconds, spawn an armor piercing projectile that orbits the player in stasis.\nSpawn up to 3 maximum projectiles, deals 199.7% base damage (+199.7% per stack)."; public override string ItemLore => "Distorted laughter emanates from the dark and empty room.\nThe laughter is mixed with another emotion... you can feel it, its an overwhelming sadness reverberating within.\nYou walk closer, feeling its pain as its emotions take control of you.\n\n\"Is this you?\", you call out, but no one awnsers.\nYou pick up the ominous heart, you can feel it, the rush, the excitement, the laughter, the pain...\nAll these emotions swell inside you, you feel the DETERMINATION, \nthe DETERMINATION to become a [[Big Shot]]."; public override ItemTier Tier => (ItemTier)2; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("mis_heart.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("mis_heart_icon"); public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.18475f, 0.43531f, 0.06669f), localAngles = new Vector3(12.71502f, 118.5311f, 27.65873f), localScale = new Vector3(3.43066f, 3.43066f, 3.43066f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.07347f, 0.26925f, -0.11147f), localAngles = new Vector3(344.4833f, 157.2875f, 24.74886f), localScale = new Vector3(6.42886f, 4.20317f, 6.42886f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-1.91492f, 0.54265f, 0.99989f), localAngles = new Vector3(346.6342f, 290.7388f, 291.0602f), localScale = new Vector3(64.77013f, 64.77013f, 64.77013f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HeadCenter", localPos = new Vector3(-0.04275f, 0.13148f, 0.07674f), localAngles = new Vector3(319.3107f, 338.2517f, 340.6354f), localScale = new Vector3(8.52303f, 8.52303f, 8.52303f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.10766f, 0.11525f, -0.03917f), localAngles = new Vector3(335.8464f, 270.3703f, 4.12816f), localScale = new Vector3(7.05254f, 7.05254f, 7.05254f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.13464f, 0.14899f, -0.00139f), localAngles = new Vector3(339.0311f, 93.592f, 334.2282f), localScale = new Vector3(7.12055f, 7.12055f, 7.12055f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.91288f, 1.32861f, -0.03517f), localAngles = new Vector3(347.8391f, 274.0605f, 346.7606f), localScale = new Vector3(8.68742f, 8.68742f, 8.68742f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.13462f, 0.17267f, 0.02228f), localAngles = new Vector3(318.7485f, 78.92309f, 15.94955f), localScale = new Vector3(3.60433f, 5.22948f, 5.22948f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-1.79498f, 1.44784f, 0.20349f), localAngles = new Vector3(355.5392f, 290.8363f, 240.7348f), localScale = new Vector3(47.10388f, 47.10388f, 47.10388f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.10906f, 0.06376f, 0.07416f), localAngles = new Vector3(336.4185f, 90.84381f, 355.8852f), localScale = new Vector3(3.35465f, 3.35465f, 3.35465f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.10538f, 0.04744f, 0.02644f), localAngles = new Vector3(343.5705f, 93.7125f, 16.36206f), localScale = new Vector3(2.16919f, 2.16919f, 2.16919f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.19268f, 0.02681f, -0.04928f), localAngles = new Vector3(354.3749f, 132.6399f, 300.215f), localScale = new Vector3(5.93916f, 6.90403f, 4.9493f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.14696f, -0.077f, 0.17095f), localAngles = new Vector3(11.1291f, 331.6624f, 74.4416f), localScale = new Vector3(6.34747f, 5.4407f, 5.4407f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.13128f, 0.06277f, -0.04087f), localAngles = new Vector3(346.1569f, 100.6667f, 336.058f), localScale = new Vector3(5.50237f, 4.89099f, 4.89099f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.18457f, 0.12766f, -0.0558f), localAngles = new Vector3(355.5451f, 115.7917f, 341.5839f), localScale = new Vector3(5.0728f, 5.0728f, 5.0728f) } }); return val; } public override void Hooks() { //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 CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(CharacterMaster_OnInventoryChanged); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) try { int count = GetCount(sender); int itemCount = sender.inventory.GetItemCount(ItemBase.instance.ItemDef); int itemCount2 = sender.inventory.GetItemCount(ItemBase.instance.ItemDef); if (count > 0 && itemCount > 0 && itemCount2 > 0) { sender.inventory.RemoveItemPermanent(ItemDef, 1); sender.inventory.RemoveItemPermanent(ItemBase.instance.ItemDef, 1); sender.inventory.RemoveItemPermanent(ItemBase.instance.ItemDef, 1); if (DeltarunePlugin.antiFunMode.Value) { sender.inventory.GiveItemPermanent(ItemBase.instance.ItemDef, 1); } else { PickupDropletController.CreatePickupDroplet(new PickupIndex(ItemBase.instance.ItemDef.itemIndex), sender.transform.position, sender.transform.forward * 1f); } } } catch { } } private void CharacterMaster_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); int count = GetCount(self); CharacterBody body = self.GetBody(); if (!Object.op_Implicit((Object)(object)body)) { return; } BeadBehavior component = ((Component)body).GetComponent(); if (count > 0) { if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)body).gameObject.AddComponent(); ((ItemBehavior)component).body = body; ((ItemBehavior)component).stack = count; ((Behaviour)component).enabled = true; component.projectilePrefab = orbProjectile; component.orbDeployable = BeadOrbs; } else if (Object.op_Implicit((Object)(object)component)) { ((ItemBehavior)component).stack = count; } } else if (count <= 0 && Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } public void CreatePrefab() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) BeadOrbs = DeployableAPI.RegisterDeployableSlot(new GetDeployableSameSlotLimit(limit)); GameObject ghost = PrefabAPI.InstantiateClone(ShardPrefab, "ShardPrefabGhost", false); ghost.AddComponent(); ghost.AddComponent(); ghost.transform.localScale = new Vector3(10f, 10f, 10f); orbProjectile = Helpers.ModifyVanillaPrefab("RoR2/DLC1/LunarSun/LunarSunProjectile.prefab", "BrokenHeartProjectile", shouldNetwork: false, delegate(GameObject lunarSunProjectile) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) lunarSunProjectile.GetComponent().ghostPrefab = ghost; lunarSunProjectile.GetComponent().startSound = ""; float desiredForwardSpeed = lunarSunProjectile.GetComponent().desiredForwardSpeed; lunarSunProjectile.GetComponent().desiredForwardSpeed = desiredForwardSpeed * 5f; lunarSunProjectile.GetComponent().oscillate = false; lunarSunProjectile.GetComponent().deployableSlot = BeadOrbs; Object.DestroyImmediate((Object)(object)lunarSunProjectile.GetComponent()); lunarSunProjectile.AddComponent(); return lunarSunProjectile; }); Helpers.CreateNetworkedProjectilePrefab(orbProjectile); static int limit(CharacterMaster self, int deployableCountMultiplier) { return 3; } } public override void Init() { CreateItem(); CreateLang(); CreatePrefab(); Hooks(); } } public class CommRing : ItemBase { public override string ItemName => "Commemorative Ring"; public override string ItemLangTokenName => "COMM_RING"; public override string ItemPickupDesc => "10% increased luck at Suspicious Exchange."; public override string ItemFullDescription => "Gain a 10% higher roll chance at Suspicious Exchange."; public override string ItemLore => "WHEN KIDS LIKE YOU ARE [Beating People Up],\n[Spitting] IN THEIR EYES, THROWING SAND IN THEIR [Face],\n[Stomping] ON THEIR TOES, YANKING THEIR [Noses],\nAND NOT EVEN GIVING THEM A SINGLE CENT FOR IT!?\nYOU SHOULD HAVE DONE ALL THAT EARLIER!\nAND BEEN THE FIRST TO OWN MY [Commemorative Ring]\nTOO BAD! SEE YOU KID!"; public override ItemTier Tier => (ItemTier)1; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("comm_ring.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("comm_ring_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0734: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_074f: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Unknown result type (might be due to invalid IL or missing references) //IL_07c3: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Unknown result type (might be due to invalid IL or missing references) //IL_07de: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Unknown result type (might be due to invalid IL or missing references) //IL_0857: Unknown result type (might be due to invalid IL or missing references) //IL_085c: Unknown result type (might be due to invalid IL or missing references) //IL_0872: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Unknown result type (might be due to invalid IL or missing references) //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_0897: Unknown result type (might be due to invalid IL or missing references) //IL_0898: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(0.04363f, 0.15085f, -0.01218f), localAngles = new Vector3(291.7313f, 35.89888f, 149.2341f), localScale = new Vector3(3.56431f, 3.56431f, 3.56431f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.05961f, 0.12799f, -0.08759f), localAngles = new Vector3(345.1665f, 257.8601f, 270.5199f), localScale = new Vector3(3.15649f, 3.23952f, 3.15649f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { childName = "HandR", localPos = new Vector3(0.08838f, 1.41659f, -134f / (147f * MathF.PI)), localAngles = new Vector3(330.1074f, 280.9893f, 352.4626f), localScale = new Vector3(44.27621f, 47.79814f, 54.67879f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.00876f, 0.18284f, -0.0207f), localAngles = new Vector3(345.7541f, 323.9921f, 201.2191f), localScale = new Vector3(4.03277f, 4.03277f, 3.98001f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(0.00375f, 0.18175f, 0.02323f), localAngles = new Vector3(331.9111f, 208.5898f, 186.1979f), localScale = new Vector3(1.85204f, 1.85204f, 1.85204f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Finger22R", localPos = new Vector3(-0.03671f, 0.06605f, -0.01452f), localAngles = new Vector3(5.30467f, 205.4741f, 164.3929f), localScale = new Vector3(3.2169f, 3.2169f, 3.2169f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootFrontR", localPos = new Vector3(-0.00529f, 1.19196f, -0.00011f), localAngles = new Vector3(4.4797f, 193.5389f, 177.6235f), localScale = new Vector3(23.56433f, 23.56433f, 23.56433f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MechFinger23R", localPos = new Vector3(0.00017f, 0.00674f, 0.05709f), localAngles = new Vector3(78.41496f, 195.9934f, 13.50731f), localScale = new Vector3(5.70147f, 5.70147f, 5.70147f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Finger11L", localPos = new Vector3(-0.07039f, 0.71007f, 0.73747f), localAngles = new Vector3(9.3553f, 270.8647f, 167.1162f), localScale = new Vector3(57.55627f, 57.55627f, 57.55627f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Finger22R", localPos = new Vector3(0.0298f, 0.01229f, 0.00559f), localAngles = new Vector3(349.821f, 190.0275f, 176.9839f), localScale = new Vector3(3.98387f, 3.98387f, 3.98387f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(0.05029f, 0.13514f, -0.02388f), localAngles = new Vector3(320.5668f, 121.0486f, 243.9749f), localScale = new Vector3(2.58858f, 2.5314f, 2.56262f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "RingFinger", localPos = new Vector3(-9E-05f, 0.08173f, 0.00036f), localAngles = new Vector3(346.3212f, 77.13857f, 175.9458f), localScale = new Vector3(2.9766f, 3.46018f, 2.4805f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "OvenDoor", localPos = new Vector3(-0.25566f, 0.01406f, 0.01958f), localAngles = new Vector3(356.8177f, 3.85665f, 358.8758f), localScale = new Vector3(11.68215f, 11.63221f, 5.70363f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.0104f, 0.12534f, -0.00118f), localAngles = new Vector3(310.499f, 327.4647f, 205.2438f), localScale = new Vector3(2.78946f, 2.47952f, 2.47952f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(0.09605f, 0.26009f, 0.00275f), localAngles = new Vector3(353.4551f, 18.60704f, 348.559f), localScale = new Vector3(5.31966f, 5.31966f, 5.31966f) } }); return val; } public override void Hooks() { } public override void Init() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) CreateItem(); CreateLang(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("comm_ring.prefab"), "LightBulbPickup", false); val.transform.localScale = new Vector3(1.3f, 1.3f, 1.3f); ItemDef.pickupModelPrefab = val; } } public class FinalForm : ItemBase { public class BeadBehavior : ItemBehavior { private const float secondsPerProjectile = 1f; private const int baseMaxProjectiles = 16; private const float baseOrbitRadius = 2f; private const float baseDamageCoefficient = 1.997f; private float projectileTimer; public GameObject projectilePrefab; public DeployableSlot orbDeployable; public event Action onDisabled; public static int GetMaxProjectiles(Inventory inventory) { return 16; } public void InitializeOrbiter(ProjectileOwnerOrbiter orbiter, BeadProjectileController controller) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) BeadProjectileController controller2 = controller; float num = base.body.radius + 2f; Quaternion val = Quaternion.AngleAxis(Random.Range(180f, 180f), Vector3.up); Quaternion val2 = Quaternion.AngleAxis(Random.Range(0f, 180f), Vector3.forward); Vector3 val3 = val * val2 * Vector3.up; float num2 = Random.Range(30f, -210f); orbiter.Initialize(val3, num, 180f, num2); onDisabled += DestroyOrbiter; void DestroyOrbiter(BeadBehavior beadBehavior) { if (Object.op_Implicit((Object)(object)controller2)) { controller2.Detonate(); } } } private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void OnDisable() { this.onDisabled?.Invoke(this); this.onDisabled = null; } private void FixedUpdate() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) projectileTimer += Time.fixedDeltaTime; if (!base.body.master.IsDeployableLimited(orbDeployable) && projectileTimer > 1f) { projectileTimer = 0f; Ray val = default(Ray); ((Ray)(ref val))..ctor(base.body.inputBank.aimOrigin, base.body.inputBank.aimDirection); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = projectilePrefab; val2.crit = base.body.RollCrit(); val2.damage = base.body.damage * 1.997f * (float)base.stack; val2.damageColorIndex = (DamageColorIndex)3; val2.force = 0f; val2.owner = ((Component)base.body).gameObject; val2.position = base.body.transform.position; val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(90f, 0f, 0f); val2.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)2); FireProjectileInfo val3 = val2; ProjectileManager.instance.FireProjectile(val3); } } } [DisallowMultipleComponent] [RequireComponent(typeof(ProjectileOwnerOrbiter))] [RequireComponent(typeof(ProjectileController))] [RequireComponent(typeof(ProjectileImpactExplosion))] public class BeadProjectileController : MonoBehaviour { private ProjectileImpactExplosion explosion; public void OnEnable() { explosion = ((Component)this).GetComponent(); if (NetworkServer.active) { ProjectileController component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component.owner)) { AcquireOwner(component); } else { component.onInitialized += AcquireOwner; } } } private void AcquireOwner(ProjectileController controller) { controller.onInitialized -= AcquireOwner; CharacterBody component = controller.owner.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ProjectileOwnerOrbiter component2 = ((Component)this).GetComponent(); ((Component)component).GetComponent().InitializeOrbiter(component2, this); } } public void Detonate() { if (Object.op_Implicit((Object)(object)explosion)) { ((ProjectileExplosion)explosion).Detonate(); } } } public static GameObject orbProjectile; public static GameObject ShardPrefab = DeltarunePlugin.MainAssets.LoadAsset("spam_projectile.prefab"); public DeployableSlot FinalFormOrbs; public const int MaxOrbs = 16; public const float OrbCooldown = 1f; public static float LightningDamageMultiplier = 0.33f; public static float critPercent = 0.25f; public static float additionalCritPercent = 0.1f; public override string ItemName => "N.E.O."; public override string ItemLangTokenName => "FINAL_FORM"; public override string ItemPickupDesc => "Gain the perfected effects of all three NEO items..."; public override string ItemFullDescription => "Perfected Heart: Every " + 1f + " seconds, spawn an armor piercing projectile that orbits the player in stasis.\nSpawn up to " + 16 + " maximum projectiles, deals 199.7% base damage (+199.7% per stack).\n\nPerfected Core: Gain a permenant " + critPercent * 100f + "% crit chance. (+" + additionalCritPercent * 100f + "% per stack)\n\nPerfected Bulb: All forms of lightning damage are increased by " + LightningDamageMultiplier * 100f + "% (+" + LightningDamageMultiplier * 100f + "% per stack)."; public override string ItemLore => "Upon getting the final piece you have a vision.\nIt's unlike anything you've ever felt before, you feel a wave of emotion, things that were broken mend, things mended become perfect, YOU become perfect.\nA voice calls to you, \"[Heaven], are you WATCHING? IT'S TIME TO MAKE A VERY [SPECIAL] DEAL...\"\nYou make the deal...\nIt has a name, it's the final form, your final form, the HEART SHAPED OBJECT beats in your chest, before violently extruding from your body.\nYou pickup your reward, you made a deal and now its a part of you, and you, a part of it.\nIt's name is N.E.O."; public override ItemTier Tier => (ItemTier)4; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("final_form.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("final_form_icon"); public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)3 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.29043f, -0.02646f, 0.15993f), localAngles = new Vector3(354.9149f, 167.6319f, 3.93012f), localScale = new Vector3(5.52715f, 5.66094f, 5.66094f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.50492f, -0.10487f, 0.01353f), localAngles = new Vector3(5.92784f, 140.589f, 5.70529f), localScale = new Vector3(8.0404f, 8.1219f, 7.18788f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Neck", localPos = new Vector3(-2.33612f, 0.66576f, 3.35203f), localAngles = new Vector3(357.8803f, 186.4762f, 357.1776f), localScale = new Vector3(58.55358f, 58.55358f, 58.55358f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CannonHeadR", localPos = new Vector3(0.2886f, 0.01301f, -0.11433f), localAngles = new Vector3(55.82204f, 329.8341f, 339.3175f), localScale = new Vector3(4.7932f, 4.7932f, 4.7932f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.17492f, -0.21243f, 0.33896f), localAngles = new Vector3(354.6992f, 192.206f, 341.9989f), localScale = new Vector3(6.17744f, 6.17744f, 6.17744f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.22129f, -0.02885f, 0.11114f), localAngles = new Vector3(17.24668f, 174.8952f, 350.5795f), localScale = new Vector3(5.30776f, 5.30776f, 3.60387f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-1.06139f, 0.2354f, 0.48228f), localAngles = new Vector3(352.137f, 164.5131f, 356.5106f), localScale = new Vector3(17.00706f, 17.00706f, 17.00706f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.25857f, -0.06008f, 0.17796f), localAngles = new Vector3(3.82091f, 175.997f, 350.7232f), localScale = new Vector3(5.74637f, 6.19757f, 6.19757f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "UpperArmL", localPos = new Vector3(-2.68845f, 3.69412f, -2.61108f), localAngles = new Vector3(350.7655f, 0.58101f, 168.6521f), localScale = new Vector3(59.79227f, 59.79227f, 59.79227f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.12893f, 0.20509f, 0.25282f), localAngles = new Vector3(357.6487f, 212.0068f, 355.0177f), localScale = new Vector3(5.0544f, 5.0544f, 5.41385f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.28084f, -0.00622f, -0.01841f), localAngles = new Vector3(11.57164f, 129.4686f, 340.8464f), localScale = new Vector3(5.43432f, 5.43432f, 5.43432f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "UpperArmL", localPos = new Vector3(0.04481f, 0.37664f, 0.25784f), localAngles = new Vector3(8.14335f, 142.9294f, 168.6543f), localScale = new Vector3(4.52354f, 5.25842f, 4.89493f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.1089f, 0.26473f, 0.23636f), localAngles = new Vector3(71.0227f, 335.4342f, 54.50938f), localScale = new Vector3(7.97052f, 7.86754f, 6.83188f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pack", localPos = new Vector3(-0.08516f, 0.12197f, -0.34407f), localAngles = new Vector3(327.7921f, 356.1507f, 49.77155f), localScale = new Vector3(3.16199f, 3.25608f, 3.29963f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.59992f, -0.26726f, 0.14843f), localAngles = new Vector3(4.056f, 154.1342f, 354.7828f), localScale = new Vector3(9.8243f, 9.8243f, 9.8243f) } }); return val; } public override void Hooks() { //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 //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(CharacterMaster_OnInventoryChanged); LightningOrb.OnArrival += new hook_OnArrival(LightningOrb_OnArrival); SimpleLightningStrikeOrb.OnArrival += new hook_OnArrival(SimpleLightningStrikeOrb_OnArrival); LightningStrikeOrb.OnArrival += new hook_OnArrival(LightningStrikeOrb_OnArrival); VoidLightningOrb.OnArrival += new hook_OnArrival(VoidLightningOrb_OnArrival); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (GetCount(sender) > 0) { args.critAdd += critPercent * 100f + (float)(GetCount(sender) - 1) * (additionalCritPercent * 100f); } } private void VoidLightningOrb_OnArrival(orig_OnArrival orig, VoidLightningOrb self) { GameObject attacker = self.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled) { self.damageValue *= 1f + LightningDamageMultiplier * (float)GetCount(component); } } orig.Invoke(self); } private void LightningStrikeOrb_OnArrival(orig_OnArrival orig, LightningStrikeOrb self) { GameObject attacker = ((GenericDamageOrb)self).attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled) { ((GenericDamageOrb)self).damageValue = ((GenericDamageOrb)self).damageValue * (1f + LightningDamageMultiplier * (float)GetCount(component)); } } orig.Invoke(self); } private void SimpleLightningStrikeOrb_OnArrival(orig_OnArrival orig, SimpleLightningStrikeOrb self) { GameObject attacker = ((GenericDamageOrb)self).attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled) { ((GenericDamageOrb)self).damageValue = ((GenericDamageOrb)self).damageValue * (1f + LightningDamageMultiplier * (float)GetCount(component)); } } orig.Invoke(self); } private void LightningOrb_OnArrival(orig_OnArrival orig, LightningOrb self) { GameObject attacker = self.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled) { self.damageValue *= 1f + LightningDamageMultiplier * (float)GetCount(component); } } orig.Invoke(self); } private void CharacterMaster_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); int count = GetCount(self); CharacterBody body = self.GetBody(); if (!Object.op_Implicit((Object)(object)body)) { return; } BeadBehavior component = ((Component)body).GetComponent(); if (count > 0) { if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)body).gameObject.AddComponent(); ((ItemBehavior)component).body = body; ((ItemBehavior)component).stack = count; ((Behaviour)component).enabled = true; component.projectilePrefab = orbProjectile; component.orbDeployable = FinalFormOrbs; } else if (Object.op_Implicit((Object)(object)component)) { ((ItemBehavior)component).stack = count; } } else if (count <= 0 && Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } public void CreatePrefab() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) FinalFormOrbs = DeployableAPI.RegisterDeployableSlot(new GetDeployableSameSlotLimit(limit)); orbProjectile = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("Prefabs/Projectiles/LunarSunProjectile"), "BeadProjectile", false); GameObject ghost = PrefabAPI.InstantiateClone(ShardPrefab, "ShardPrefabGhostNeo", false); ghost.AddComponent(); ghost.AddComponent(); ghost.transform.localScale = new Vector3(10f, 10f, 10f); orbProjectile = Helpers.ModifyVanillaPrefab("RoR2/DLC1/LunarSun/LunarSunProjectile.prefab", "NeoProjectile", shouldNetwork: false, delegate(GameObject lunarSunProjectile) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) lunarSunProjectile.GetComponent().ghostPrefab = ghost; lunarSunProjectile.GetComponent().startSound = ""; float desiredForwardSpeed = lunarSunProjectile.GetComponent().desiredForwardSpeed; lunarSunProjectile.GetComponent().desiredForwardSpeed = desiredForwardSpeed * 5f; lunarSunProjectile.GetComponent().oscillate = false; lunarSunProjectile.GetComponent().deployableSlot = FinalFormOrbs; Object.DestroyImmediate((Object)(object)lunarSunProjectile.GetComponent()); lunarSunProjectile.AddComponent(); return lunarSunProjectile; }); Helpers.CreateNetworkedProjectilePrefab(orbProjectile); static int limit(CharacterMaster self, int deployableCountMultiplier) { return 16; } } public override void Init() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) CreateItem(); CreateLang(); CreatePrefab(); Hooks(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("final_form.prefab"), "FinalFormPickup", false); val.transform.localScale = new Vector3(2f, 2f, 2f); ItemDef.pickupModelPrefab = val; } } public class Kromer : ItemBase { public override string ItemName => "1 [KROMER]"; public override string ItemLangTokenName => "KROMER"; public override string ItemPickupDesc => "DON'T WORRY! FOR OUR [No Money Back Guarantee]"; public override string ItemFullDescription => "Does nothing...\n\n\nWhy are you still reading??"; public override string ItemLore => "Smells like KROMER."; public override ItemTier Tier => (ItemTier)5; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("kromer.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("kromer.png"); public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)9 }; public override void Init() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) CreateLang(); CreateItem(); Hooks(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("kromer.prefab"), "KromerPickup", true); val.transform.localScale = new Vector3(2f, 2f, 2f); ItemDef.pickupModelPrefab = val; } public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(KromerEffect); } private void KromerEffect(CharacterBody sender, StatHookEventArgs args) { KromerEffectComponenent component = ((Component)sender).GetComponent(); if (Object.op_Implicit((Object)(object)sender.inventory) && ((GetCount(sender) > 50) & !Object.op_Implicit((Object)(object)component))) { component = ((Component)sender).gameObject.AddComponent(); component.body = sender; ((Behaviour)component).enabled = true; } } } public class KromerEffectComponenent : ItemBehavior { public CharacterBody body; private void Start() { CharacterMaster master = body.master; master.luck -= 1f; Debug.Log((object)"Thats too much Kromer... (-1 Luck)"); } } public class LightBulb : ItemBase { public static float damageMultiplier = 0.25f; public override string ItemName => "Fractured Light"; public override string ItemLangTokenName => "LIGHT_BULB"; public override string ItemPickupDesc => "Increase all lightning damage by 25%."; public override string ItemFullDescription => "All forms of lightning damage are increased by 25% (+25% per stack)."; public override string ItemLore => "A dim light shines from the dark...\nIt flickers faintly. The light that showed the way is gone.\nYou feel the darkness swell around you on all sides until suddenly the bulb is on again.\nThe void retreats as you grab the bulb and run back to where you came from.\n\"Does its light repel the dark... or is the dark scared of something greater, more ominous from within?\""; public override ItemTier Tier => (ItemTier)0; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("light_bulb.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("light_bulb_icon"); public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.15149f, 0.44434f, -0.11223f), localAngles = new Vector3(15.5804f, 308.87f, 36.10917f), localScale = new Vector3(4.97053f, 4.97053f, 4.97053f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.18911f, 0.20662f, -0.05561f), localAngles = new Vector3(28.58928f, 22.22084f, 271.2374f), localScale = new Vector3(5.50717f, 5.01193f, 5.50717f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-1.93378f, 2.60226f, 1.85581f), localAngles = new Vector3(13.14056f, 265.5432f, 359.9856f), localScale = new Vector3(41.06096f, 41.06096f, 41.06096f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CannonHeadL", localPos = new Vector3(0.17584f, 0.23346f, 0.18431f), localAngles = new Vector3(351.3961f, 300.2342f, 273.4574f), localScale = new Vector3(7.02379f, 6.73428f, 6.73428f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(-0.04949f, -0.14778f, 0.12593f), localAngles = new Vector3(68.03916f, 230.585f, 238.6301f), localScale = new Vector3(5.39778f, 5.39778f, 5.39778f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.00234f, 0.05735f, 0.09209f), localAngles = new Vector3(297.0692f, 265.8345f, 263.1639f), localScale = new Vector3(4.31714f, 4.31714f, 4.31714f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "PlatformBase", localPos = new Vector3(-0.5871f, 1.447f, -0.59961f), localAngles = new Vector3(20.805f, 216.0389f, 354.5287f), localScale = new Vector3(7.52245f, 7.52245f, 7.52245f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MechUpperArmL", localPos = new Vector3(0.11877f, 0.35057f, -6E-05f), localAngles = new Vector3(57.87173f, 342.4818f, 255.1724f), localScale = new Vector3(5.50575f, 5.50575f, 5.50575f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(1.83877f, 1.022f, 3.80196f), localAngles = new Vector3(52.74911f, 273.6116f, 226.3601f), localScale = new Vector3(47.67143f, 45.41201f, 47.67143f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.20673f, 0.17749f, -0.09678f), localAngles = new Vector3(12.17691f, 327.2426f, 51.37902f), localScale = new Vector3(3.38769f, 3.38769f, 3.38769f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.16504f, 0.15646f, -0.209f), localAngles = new Vector3(333.8095f, 20.49624f, 284.8171f), localScale = new Vector3(3.62923f, 3.62923f, 3.62923f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootL", localPos = new Vector3(0.0831f, 0.16522f, 0.00469f), localAngles = new Vector3(322.6733f, 349.8335f, 260.642f), localScale = new Vector3(4.38116f, 4.30193f, 3.80032f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Cleaver", localPos = new Vector3(-0.02f, 0.50133f, -0.02706f), localAngles = new Vector3(315.6261f, 81.94097f, 277.6905f), localScale = new Vector3(5.13661f, 4.40281f, 4.40281f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "UpperArmR", localPos = new Vector3(-0.03095f, 0.08804f, 0.06031f), localAngles = new Vector3(307.6126f, 114.2467f, 35.58443f), localScale = new Vector3(5.30269f, 4.7135f, 4.7135f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.13591f, 0.66485f, -0.03529f), localAngles = new Vector3(353.4294f, 125.2011f, 323.0759f), localScale = new Vector3(5.38082f, 5.38082f, 5.38082f) } }); return val; } public override void Hooks() { //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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown LightningOrb.OnArrival += new hook_OnArrival(LightningOrb_OnArrival); SimpleLightningStrikeOrb.OnArrival += new hook_OnArrival(SimpleLightningStrikeOrb_OnArrival); LightningStrikeOrb.OnArrival += new hook_OnArrival(LightningStrikeOrb_OnArrival); VoidLightningOrb.OnArrival += new hook_OnArrival(VoidLightningOrb_OnArrival); } private void VoidLightningOrb_OnArrival(orig_OnArrival orig, VoidLightningOrb self) { GameObject attacker = self.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled) { self.damageValue *= 1f + damageMultiplier * (float)GetCount(component); } } orig.Invoke(self); } private void LightningStrikeOrb_OnArrival(orig_OnArrival orig, LightningStrikeOrb self) { GameObject attacker = ((GenericDamageOrb)self).attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled) { ((GenericDamageOrb)self).damageValue = ((GenericDamageOrb)self).damageValue * (1f + damageMultiplier * (float)GetCount(component)); } } orig.Invoke(self); } private void SimpleLightningStrikeOrb_OnArrival(orig_OnArrival orig, SimpleLightningStrikeOrb self) { GameObject attacker = ((GenericDamageOrb)self).attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled) { ((GenericDamageOrb)self).damageValue = ((GenericDamageOrb)self).damageValue * (1f + damageMultiplier * (float)GetCount(component)); } } orig.Invoke(self); } private void LightningOrb_OnArrival(orig_OnArrival orig, LightningOrb self) { GameObject attacker = self.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.isPlayerControlled) { self.damageValue *= 1f + damageMultiplier * (float)GetCount(component); } } orig.Invoke(self); } public override void Init() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) CreateItem(); CreateLang(); Hooks(); GameObject val = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset("light_bulb.prefab"), "LightBulbPickup", false); val.transform.localScale = new Vector3(1.5f, 1.5f, 1.5f); ItemDef.pickupModelPrefab = val; } } public class MalfunctiongCore : ItemBase { public class MalfunctioningCoreEffect : MonoBehaviour { private float timer = 0f; private float minTime = 5f; private float maxTime = 20f; private bool appliedCrit = false; public CharacterBody body; public int itemStacks = 0; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void OnDisable() { } private void FixedUpdate() { timer -= Time.fixedDeltaTime; if (timer <= 0f) { CritEffect(); if (timer <= (float)(-3 + (itemStacks - 1) * -1)) { timer = Random.Range(minTime, maxTime); appliedCrit = false; critReady = false; } } } public void CritEffect() { if (!appliedCrit) { appliedCrit = true; critReady = true; } } } public static float critPercent = 0.25f; public static bool critReady = false; public override string ItemName => "Malfunctioning Core"; public override string ItemLangTokenName => "MALFUNCTION_CORE"; public override string ItemPickupDesc => "Crit chance randomly increases by 25% for 3 seconds."; public override string ItemFullDescription => "Every 5 to 20 seconds, gain a " + critPercent * 100f + "% crit chance increase for 3 seconds (+1 second per stack)."; public override string ItemLore => "\"Is it... pulsing?\" \"What even is this?\"\n\"I got it from a salesman, he said he'd take some junk off my hand for something much more valuable...\"\n\"I have a bad feeling about this, something just feels... off. I think you should get rid of it.\"\n\"You're just jealous! The man said I could become a... a.. . . . [BIG SHOT].\"\n\nThe room is filled with laughter, anger, jealousy, then.., finally.., silence."; public override ItemTier Tier => (ItemTier)1; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("yoru_orb_plus.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("malfunction_core_icon"); public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.01379f, 0.0643f, -0.0393f), localAngles = new Vector3(7.65642f, 337.7309f, 355.4065f), localScale = new Vector3(21.78017f, 20.15846f, 23.01508f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.0827f, 0.03344f, -0.01415f), localAngles = new Vector3(22.50764f, 82.01157f, 357.0022f), localScale = new Vector3(19.47546f, 17.23778f, 17.62996f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.40881f, 2.837f, 1.8306f), localAngles = new Vector3(353.6656f, 279.3937f, 111.3867f), localScale = new Vector3(162.097f, 125.9607f, 133.589f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HeadCenter", localPos = new Vector3(-0.15761f, -0.07392f, -0.0629f), localAngles = new Vector3(356.2096f, 344.9958f, 289.955f), localScale = new Vector3(20.48202f, 20.67847f, 24.16052f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.04168f, 0.18974f, -0.20211f), localAngles = new Vector3(2.45667f, 262.3736f, 243.0552f), localScale = new Vector3(16.12042f, 21.62177f, 16.12042f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.02591f, 0.09248f, -0.24747f), localAngles = new Vector3(340.2831f, 185.451f, 340.5156f), localScale = new Vector3(8.82175f, 8.82175f, 8.82175f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.05924f, -0.03185f, 0.03543f), localAngles = new Vector3(354.8709f, 163.4293f, 6.06552f), localScale = new Vector3(44.22409f, 44.22409f, 44.22409f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.01479f, 0.24686f, -0.04453f), localAngles = new Vector3(346.3226f, 12.50503f, 165.8035f), localScale = new Vector3(15.66406f, 20.50996f, 17.59725f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.94664f, 1.31489f, 0.42623f), localAngles = new Vector3(354.3773f, 254.687f, 358.6025f), localScale = new Vector3(38.86275f, 41.16689f, 62.41214f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.05099f, 0.14721f, 0.01876f), localAngles = new Vector3(5.15182f, 25.06269f, 146.8649f), localScale = new Vector3(14.66418f, 14.66418f, 14.66418f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.16941f, 0.11642f, 0.01702f), localAngles = new Vector3(300.6795f, 48.27805f, 224.9956f), localScale = new Vector3(18.52118f, 19.57209f, 18.73416f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.06421f, -0.16104f, 0.02439f), localAngles = new Vector3(4.53002f, 272.7654f, 4.84901f), localScale = new Vector3(25.34135f, 24.49854f, 21.83678f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.05366f, 0.0278f, -0.10864f), localAngles = new Vector3(320.1729f, 10.61689f, 101.4086f), localScale = new Vector3(24.11722f, 25.65147f, 25.65147f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.03639f, -0.06952f, -0.1154f), localAngles = new Vector3(29.66408f, 351.0713f, 1.08804f), localScale = new Vector3(21.67765f, 22.25531f, 18.31414f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.01617f, -0.05655f, 0.03941f), localAngles = new Vector3(354.7198f, 153.0287f, 359.5688f), localScale = new Vector3(23.88494f, 31.14603f, 25.87784f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { MalfunctioningCoreEffect component = ((Component)sender).GetComponent(); if (GetCount(sender) > 0) { if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)sender).gameObject.AddComponent(); component.itemStacks = GetCount(sender); component.body = sender; ((Behaviour)component).enabled = true; } else if (Object.op_Implicit((Object)(object)component)) { component.itemStacks = GetCount(sender); } else if (!((Behaviour)component).enabled) { ((Behaviour)component).enabled = true; } } else if (Object.op_Implicit((Object)(object)component) && GetCount(sender) <= 0) { ((Behaviour)component).enabled = false; } if (GetCount(sender) > 0 && critReady) { args.critAdd += critPercent * 100f; } } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } } namespace DeltaruneMod.Items.Lunar { public class DevilsKnife : ItemBase { public class WorldRevolvingEffect : MonoBehaviour { private float timer = 0f; private float maxTime = 10f; public CharacterBody body; public int itemStacks = 0; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void FixedUpdate() { timer -= Time.fixedDeltaTime; if (timer <= 0f) { ChaosChaos(); timer = maxTime; } } public void ChaosChaos() { BuffDef val; while (true) { val = buffs[Random.Range(0, buffs.Count)]; if (!body.HasBuff(val)) { break; } Debug.Log((object)(((Object)body).name + " already has buff " + ((Object)val).name + "! Cycling to next buff...")); } body.AddTimedBuff(val, (float)(5 + itemStacks * 5)); Debug.Log((object)("Added random buff:" + ((Object)val).name + " to " + ((Object)body).name)); } private void OnDisable() { } } public static List buffs = new List(); public override string ItemName => "Devilsknife"; public override string ItemLangTokenName => "DEVIL_KNIFE"; public override string ItemPickupDesc => "Gain a random effect every 10 seconds for 10 seconds..."; public override string ItemFullDescription => "Grants WORLD REVOLVING every 10 seconds.\nWORLD REVOLVING: Gain a random effect every 10 seconds.\nRandom effect duration increased by +5 seconds per stack."; public override string ItemLore => "You hear incomprehensible laughter and the world starts to spin.\nYou crave... CHAOS."; public override ItemTier Tier => (ItemTier)3; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("devils_knife.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("devils_knife_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)31 }; public override bool isChapter1 => true; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override void Init() { CreateItem(); CreateLang(); Hooks(); } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (buffs.Count <= 0) { buffs = Helpers.GetBuffs(99); } WorldRevolvingEffect component = ((Component)sender).GetComponent(); if (GetCount(sender) > 0) { if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)sender).gameObject.AddComponent(); component.itemStacks = GetCount(sender); component.body = sender; ((Behaviour)component).enabled = true; } else if (Object.op_Implicit((Object)(object)component)) { component.itemStacks = GetCount(sender); } else if (!((Behaviour)component).enabled) { ((Behaviour)component).enabled = true; } } else if (Object.op_Implicit((Object)(object)component) && GetCount(sender) <= 0) { ((Behaviour)component).enabled = false; } } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.0918f, 0.28106f, -0.19443f), localAngles = new Vector3(355.1112f, 194.2511f, 10.04704f), localScale = new Vector3(18.03568f, 18.03568f, 18.03568f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.06383f, 0.06582f, -0.13282f), localAngles = new Vector3(21.00448f, 143.5025f, 12.78009f), localScale = new Vector3(15.62801f, 15.62801f, 15.68787f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.02745f, 0.10979f, -0.20252f), localAngles = new Vector3(14.5175f, 172.3048f, 11.61553f), localScale = new Vector3(16.23359f, 16.23359f, 16.23359f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.77362f, 1.61468f, -1.71633f), localAngles = new Vector3(354.6938f, 186.0387f, 17.37543f), localScale = new Vector3(173.4925f, 173.4925f, 173.4925f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(-0.06029f, 0.27899f, -0.02909f), localAngles = new Vector3(0.03962f, 357.7523f, 73.14256f), localScale = new Vector3(30.58468f, 30.58468f, 30.58468f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.07952f, 0.14904f, -0.18145f), localAngles = new Vector3(3.58573f, 3.50644f, 338.7134f), localScale = new Vector3(16.85899f, 16.85899f, 16.85899f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.00552f, 0.1537f, -0.25501f), localAngles = new Vector3(335.9026f, 177.474f, 74.81831f), localScale = new Vector3(16.95792f, 16.95792f, 16.95792f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(-0.34876f, -0.13709f, 0.27158f), localAngles = new Vector3(1.87692f, 267.5815f, 248.1591f), localScale = new Vector3(40.3113f, 40.3113f, 40.3113f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.09222f, 0.05228f, -0.36294f), localAngles = new Vector3(342.0858f, 176.2473f, 159.1659f), localScale = new Vector3(19.74982f, 19.74982f, 19.74982f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(1.85098f, -0.29846f, 0.82102f), localAngles = new Vector3(310.729f, 40.41219f, 76.69464f), localScale = new Vector3(91.30646f, 91.30646f, 91.30646f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.01588f, 0.00531f, -0.25708f), localAngles = new Vector3(0.98438f, 19.50697f, 301.9747f), localScale = new Vector3(23.92296f, 23.92296f, 23.92296f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "GunStock", localPos = new Vector3(0.07663f, -0.00201f, -0.06209f), localAngles = new Vector3(273.7904f, 32.73811f, 110.7573f), localScale = new Vector3(2.15812f, 2.32198f, 2.32198f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.05944f, 0.05716f, -0.23154f), localAngles = new Vector3(344.676f, 6.65559f, 332.8428f), localScale = new Vector3(20.51301f, 17.09416f, 17.09416f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.08292f, -0.40159f, 0.00578f), localAngles = new Vector3(301.4835f, 177.4607f, 252.1901f), localScale = new Vector3(16.43113f, 14.08382f, 14.08382f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(-0.08968f, 0.16127f, -0.3987f), localAngles = new Vector3(349.7654f, 12.93527f, 20.32264f), localScale = new Vector3(18.98264f, 16.87346f, 16.87346f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00613f, 0.42402f, 0.07981f), localAngles = new Vector3(351.1979f, 260.1143f, 336.6507f), localScale = new Vector3(18.54679f, 18.54679f, 18.54679f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(-0.00513f, 0.00236f, -0.00172f), localAngles = new Vector3(15.54062f, 339.6257f, 61.98112f), localScale = new Vector3(0.4012f, 0.4012f, 0.4012f) } }); return val; } } public class ThornRing : ItemBase { public static BuffDef frostbite; public static bool healthAmputated = false; public static Sprite FrostbiteEffectIcon = DeltarunePlugin.MainAssets.LoadAsset("snowgrave_effect_icon.png"); public override string ItemName => "Ring of Regret"; public override string ItemLangTokenName => "THORN_RING"; public override string ItemPickupDesc => "Receive pain to become stronger."; public override string ItemFullDescription => "Apply 1 stack of frostbite on hit (+1 per stack)\nStacks of frostbite cause enemies to freeze.\nLose 30% hp (10% hp per stack)."; public override string ItemLore => "[Angel], [Angel] \nARE YOU LOOKING FOR THE [Ring]\n OF [Thorns] ?"; public override ItemTier Tier => (ItemTier)3; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset("thorn_ring.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset("thorn_ring_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(0.04669f, 0.16169f, -0.01152f), localAngles = new Vector3(291.7313f, 35.89888f, 149.2341f), localScale = new Vector3(9.08816f, 9.08816f, 9.08816f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.06185f, 0.13062f, -0.08525f), localAngles = new Vector3(345.1665f, 257.8601f, 270.5199f), localScale = new Vector3(11.79088f, 12.10101f, 11.79088f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.01161f, 0.19996f, -0.02145f), localAngles = new Vector3(345.7541f, 323.9921f, 201.2191f), localScale = new Vector3(17.70485f, 17.70485f, 17.47323f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(0.00205f, 0.18314f, 0.02396f), localAngles = new Vector3(331.9111f, 208.5898f, 186.1979f), localScale = new Vector3(5.52692f, 5.52692f, 5.52692f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Finger22R", localPos = new Vector3(0.02569f, 0.04368f, -0.02502f), localAngles = new Vector3(344.3791f, 171.3167f, 179.5275f), localScale = new Vector3(13.25547f, 16.42367f, 10.72907f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FootFrontR", localPos = new Vector3(-0.01287f, 1.18832f, -0.0293f), localAngles = new Vector3(4.4797f, 193.5389f, 177.6235f), localScale = new Vector3(100.0454f, 100.0454f, 100.0454f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "MechFinger23R", localPos = new Vector3(0.01341f, 0.01209f, 0.07881f), localAngles = new Vector3(78.415f, 195.9934f, 13.50731f), localScale = new Vector3(30.7553f, 30.7553f, 30.7553f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Finger11L", localPos = new Vector3(-0.21772f, 0.50604f, 0.76034f), localAngles = new Vector3(9.3553f, 270.8647f, 167.1162f), localScale = new Vector3(250.6978f, 250.6978f, 250.6978f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Finger22R", localPos = new Vector3(0.0298f, 0.01229f, 0.00559f), localAngles = new Vector3(349.821f, 190.0275f, 176.9839f), localScale = new Vector3(14.2909f, 14.2909f, 14.2909f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandL", localPos = new Vector3(0.05166f, 0.13287f, -0.02415f), localAngles = new Vector3(320.5668f, 121.0486f, 243.9749f), localScale = new Vector3(10.78896f, 10.62206f, 11.96763f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "RingFinger", localPos = new Vector3(-0.00086f, 0.07828f, -0.00452f), localAngles = new Vector3(346.3212f, 77.13858f, 175.9458f), localScale = new Vector3(11.62079f, 13.5087f, 13.63391f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Wheel", localPos = new Vector3(0.50003f, 0.19972f, 0.04703f), localAngles = new Vector3(271.4667f, 53.71669f, 310.0683f), localScale = new Vector3(27.85436f, 27.73527f, 27.16877f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(-0.0121f, 0.12903f, 0.00147f), localAngles = new Vector3(310.499f, 327.4647f, 205.2438f), localScale = new Vector3(8.85501f, 8.93391f, 8.93391f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HandR", localPos = new Vector3(0.0936f, 0.26244f, 0.014f), localAngles = new Vector3(353.4551f, 18.60704f, 348.559f), localScale = new Vector3(18.38745f, 18.38745f, 18.38745f) } }); return val; } public override void Init() { CreateItem(); CreateLang(); Hooks(); } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (!NetworkServer.active) { return; } int count = GetCount(sender); if (!Object.op_Implicit((Object)(object)sender.inventory) || count <= 0) { return; } float num = 0.3f + 0.1f * (float)(count - 1); if (num >= 0.7f) { num = 0.7f; } args.healthTotalMult *= 1f - num; ItemDef itemDef = ItemBase.instance.ItemDef; int itemCount = sender.inventory.GetItemCount(itemDef); if (itemCount > 0) { for (int i = 0; i < itemCount; i++) { sender.inventory.RemoveItem(itemDef, 1); sender.inventory.GiveItem(ItemDef, 1); } } } public void CreateEffect() { frostbite = Buffs.Frost; ((Object)frostbite).name = "FrostbiteDebuff"; frostbite.iconSprite = FrostbiteEffectIcon; frostbite.isDebuff = true; } private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { orig.Invoke(self, damageInfo, victim); if (!NetworkServer.active) { return; } GameObject attacker = damageInfo.attacker; if (!Object.op_Implicit((Object)(object)attacker)) { return; } CharacterBody component = attacker.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !component.isPlayerControlled) { return; } CharacterBody component2 = victim.GetComponent(); if (!Object.op_Implicit((Object)(object)component2) || component2.isPlayerControlled) { return; } int count = GetCount(component); if (!Object.op_Implicit((Object)(object)frostbite)) { CreateEffect(); } if (!(((Object)component2).name == "BrotherBody(Clone)") && !(((Object)component2).name == "ITBrotherBody(Clone)") && !(((Object)component2).name == "BrotherHurtBody(Clone)") && !(((Object)component2).name == "BrotherGlassBody(Clone)") && component.isPlayerControlled && count > 0) { for (int i = 0; i < count; i++) { component2.AddBuff(frostbite); } } } } } namespace DeltaruneMod.Interactables { public abstract class InteractableBase : InteractableBase where T : InteractableBase { public static T instance { get; private set; } public InteractableBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting PurchaseInteractableBase/Interactable was instantiated twice"); } instance = this as T; } } public abstract class InteractableBase { public abstract string InteractableName { get; } public abstract string InteractableContext { get; } public abstract string InteractableLangToken { get; } public abstract GameObject InteractableModel { get; } public abstract bool isChapter1 { get; } public abstract bool isChapter2 { get; } public abstract bool isChapter3 { get; } public abstract bool isChapter4 { get; } public string ConfigCategory => "Interactable: " + InteractableLangToken; public abstract void Init(); protected void CreateLang() { LanguageAPI.Add("INTERACTABLE_" + InteractableLangToken + "_NAME", InteractableName); LanguageAPI.Add("INTERACTABLE_" + InteractableLangToken + "_CONTEXT", InteractableContext); } } } namespace DeltaruneMod.Interactables.SusExchange { public class Trashcan : InteractableBase { public static readonly string gloablLangToken = "SPAMTON_TRASH"; public static GameObject InteractableBodyModelPrefab; public static InteractableSpawnCard InteractableSpawnCard; public static Sprite common_bg = DeltarunePlugin.MainAssets.LoadAsset("spamton_trash_bg_common"); public static Sprite uncommon_bg = DeltarunePlugin.MainAssets.LoadAsset("spamton_trash_bg_uncommon"); public static Sprite rare_bg = DeltarunePlugin.MainAssets.LoadAsset("spamton_trash_bg_rare"); public override string InteractableName => "Suspicious Exchange"; public override string InteractableContext => "WANNA CHANCE TO BECOME A [[Big Shot]]? "; public override string InteractableLangToken => gloablLangToken; public override GameObject InteractableModel => DeltarunePlugin.MainAssets.LoadAsset("spamton_shop.prefab"); public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override void Init() { CreateInteractable(); CreateInteractableSpawnCard(); CreateLang(); } public void CreateInteractable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: 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_020c: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) InteractableBodyModelPrefab = PrefabAPI.InstantiateClone(InteractableModel, "trachcan"); InteractableBodyModelPrefab.AddComponent(); InteractableBodyModelPrefab.transform.localScale = new Vector3(1.5f, 1.5f, 1.5f); PurchaseInteraction val = InteractableBodyModelPrefab.AddComponent(); val.displayNameToken = "INTERACTABLE_" + InteractableLangToken + "_NAME"; val.contextToken = "INTERACTABLE_" + InteractableLangToken + "_CONTEXT"; val.available = true; val.setUnavailableOnTeleporterActivated = false; val.isShrine = true; val.isGoldShrine = false; PingInfoProvider val2 = InteractableBodyModelPrefab.AddComponent(); val2.pingIconOverride = DeltarunePlugin.MainAssets.LoadAsset("spamton_ping.png"); Highlight component = InteractableBodyModelPrefab.GetComponent(); component.targetRenderer = (Renderer)(object)(from x in InteractableBodyModelPrefab.GetComponentsInChildren() where ((Object)((Component)x).gameObject).name.Contains("polySurface51") select x).Single(); component.strength = 1f; component.highlightColor = (HighlightColor)0; Transform transform = new GameObject("HologramPivot").transform; transform.SetParent(InteractableBodyModelPrefab.transform); transform.localPosition = new Vector3(0f, 0.9f, 1f); HologramProjector val3 = InteractableBodyModelPrefab.AddComponent(); val3.hologramPivot = transform; val3.displayDistance = 10f; val3.disableHologramRotation = false; GameObject val4 = new GameObject("HologramText"); val4.transform.SetParent(transform); val4.transform.localPosition = Vector3.zero; TextMeshPro val5 = val4.AddComponent(); ((TMP_Text)val5).text = ""; ((TMP_Text)val5).fontSize = 6f; ((Graphic)val5).color = Color.red; ((TMP_Text)val5).alignment = (TextAlignmentOptions)514; val4.AddComponent(); Components.TextController textController = InteractableBodyModelPrefab.AddComponent(); textController.textMesh = val5; GameObject val6 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Scrapper/ScrapperPickerPanel.prefab").WaitForCompletion(), "TrashcanPickerPanel"); Transform val7 = val6.transform.Find("MainPanel/Juice/BG"); if ((Object)(object)val7 != (Object)null) { Image component2 = ((Component)val7).GetComponent(); int num = Random.Range(0, 100); component2.sprite = common_bg; if (num >= 66 && num < 93) { component2.sprite = uncommon_bg; } else if (num >= 93) { component2.sprite = rare_bg; } Color color = ((Graphic)component2).color; color.a = 1f; ((Graphic)component2).color = color; } Transform val8 = val6.transform.Find("MainPanel/Juice/Label"); if ((Object)(object)val8 != (Object)null) { LanguageTextMeshController component3 = ((Component)val8).GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.token = "SHOP FOR BIG [[Big] DEALS. NOW!!!!"; } } NetworkUIPromptController val9 = InteractableBodyModelPrefab.AddComponent(); TrashcanPickerManager trashcanPickerManager = InteractableBodyModelPrefab.AddComponent(); PickupPickerController val10 = InteractableBodyModelPrefab.AddComponent(); val10.panelPrefab = val6; val10.onPickupSelected = new PickupIndexUnityEvent(); ((UnityEvent)(object)val10.onPickupSelected).AddPersistentListener(trashcanPickerManager.HandleSelection); val10.onServerInteractionBegin = new InteractorUnityEvent(); ((UnityEvent)(object)val10.onServerInteractionBegin).AddPersistentListener(trashcanPickerManager.HandleInteraction); val10.cutoffDistance = 10f; val10.contextString = "INTERACTABLE_" + InteractableLangToken + "_CONTEXT"; trashcanPickerManager.pickerController = val10; InteractableBodyModelPrefab.GetComponent().targetRenderer = (Renderer)(object)InteractableBodyModelPrefab.GetComponentInChildren(); GameObject val11 = new GameObject(); GameObject val12 = Object.Instantiate(val11, InteractableBodyModelPrefab.transform); ((Collider)val12.AddComponent()).isTrigger = true; val12.AddComponent().entity = InteractableBodyModelPrefab; PrefabAPI.RegisterNetworkPrefab(InteractableBodyModelPrefab); } public void CreateInteractableSpawnCard() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown InteractableSpawnCard = ScriptableObject.CreateInstance(); ((Object)InteractableSpawnCard).name = "DeltaruneMod".ToUpper() + "_isSpamtonTrash"; ((SpawnCard)InteractableSpawnCard).prefab = InteractableBodyModelPrefab; ((SpawnCard)InteractableSpawnCard).sendOverNetwork = true; ((SpawnCard)InteractableSpawnCard).hullSize = (HullClassification)1; ((SpawnCard)InteractableSpawnCard).nodeGraphType = (GraphType)0; ((SpawnCard)InteractableSpawnCard).requiredFlags = (NodeFlags)0; ((SpawnCard)InteractableSpawnCard).forbiddenFlags = (NodeFlags)24; ((SpawnCard)InteractableSpawnCard).directorCreditCost = 5; ((SpawnCard)InteractableSpawnCard).occupyPosition = true; InteractableSpawnCard.orientToFloor = false; InteractableSpawnCard.maxSpawnsPerStage = 1; InteractableSpawnCard.skipSpawnWhenSacrificeArtifactEnabled = false; DirectorCard card = new DirectorCard { selectionWeight = 50, spawnCard = (SpawnCard)(object)InteractableSpawnCard }; DirectorCardHolder val = new DirectorCardHolder { Card = card, InteractableCategory = (InteractableCategory)4 }; Helpers.AddNewInteractable(val); } } public class TrashcanBehaviorOLD : NetworkBehaviour { public PurchaseInteraction purchaseInteraction; private GameObject shrineUseEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/ShrineUseEffect.prefab").WaitForCompletion(); public List allItems = new List(); public List allTier1 = new List(); public List allTier2 = new List(); public List allTier3 = new List(); public List allTakeableItems = new List(); public ItemDef kromer; public ItemDef pearl; public ItemDef shinyPearl; public ItemDef pipis; public ItemDef mrPipis; public ItemDef commRing; private int timesUsed = 10; public void Start() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Invalid comparison between Unknown and I4 //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)Run.instance)) { purchaseInteraction.SetAvailable(true); ((Component)this).GetComponent()?.SetText("1 ITEM"); } AkSoundEngine.PostEvent(3865094552u, ((Component)this).gameObject); allItems = Helpers.GetItems(99); allTier1 = Helpers.GetItems(0); allTier2 = Helpers.GetItems(1); allTier3 = Helpers.GetItems(2); for (ItemIndex val = (ItemIndex)0; (int)val < ItemCatalog.itemCount; val = (ItemIndex)(val + 1)) { ItemDef itemDef = ItemCatalog.GetItemDef(val); if ((Object)(object)itemDef != (Object)null) { if (((Object)itemDef).name == "Pearl") { allTakeableItems.Add(itemDef); pearl = itemDef; } else if (((Object)itemDef).name == "ShinyPearl") { allTakeableItems.Add(itemDef); shinyPearl = itemDef; } else if (((Object)itemDef).name == "ITEM_KROMER") { kromer = itemDef; } else if (((Object)itemDef).name == "ITEM_PIPIS") { pipis = itemDef; } else if (((Object)itemDef).name == "ITEM_MR_PIPIS") { mrPipis = itemDef; } else if (((Object)itemDef).name == "ITEM_COMM_RING") { commRing = itemDef; } } } ((UnityEvent)(object)purchaseInteraction.onPurchase).AddListener((UnityAction)OnPurchase); } public void FixedUpdate() { if (NetworkServer.active && Object.op_Implicit((Object)(object)Run.instance)) { if (timesUsed > 0) { ((Component)this).GetComponent()?.SetText(timesUsed + " USES"); } else if (timesUsed <= 0) { ((Component)this).GetComponent()?.SetText("CLOSED"); } } } [Server] public void OnPurchase(Interactor interactor) { //IL_0029: 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) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown if (NetworkServer.active) { if (timesUsed >= 0) { EffectManager.SpawnEffect(shrineUseEffect, new EffectData { origin = ((Component)this).gameObject.transform.position, rotation = Quaternion.identity, scale = 3f, color = Color32.op_Implicit(Color.blue) }, true); ApplySpamtonShop(interactor); } else if (timesUsed < 0) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: SHOP IS [Closed for the season] TRY AGAIN [Next time]." }); purchaseInteraction.available = false; } timesUsed--; } } public void ApplySpamtonShop(Interactor interactor) { //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Expected O, but got Unknown //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Expected O, but got Unknown //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Invalid comparison between Unknown and I4 //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Invalid comparison between Unknown and I4 //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Expected O, but got Unknown //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Expected O, but got Unknown //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Starting shop purchase"); CharacterBody component = ((Component)interactor).GetComponent(); Transform transform = component.transform; List allPermenantItemsFromInventory = Helpers.GetAllPermenantItemsFromInventory(component.inventory); List list = new List(); ItemDef val = allTier2[Random.Range(0, allTier2.Count)]; ItemDef val2 = allTier3[Random.Range(0, allTier3.Count)]; ItemDef val3 = null; ItemDef val4 = null; if (!Object.op_Implicit((Object)(object)component.inventory)) { return; } Debug.Log((object)"Finding takeable items"); allTakeableItems.AddRange(allTier1); allTakeableItems.AddRange(allTier2); for (int i = 0; i < allTakeableItems.Count; i++) { if (allPermenantItemsFromInventory.Contains(allTakeableItems[i])) { list.Add(allTakeableItems[i]); } } if (list.Count <= 0) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: NO [[Usable]] ITEMS." }); timesUsed++; return; } Debug.Log((object)"Picking item"); ItemDef val5; try { val5 = list[Random.Range(0, list.Count)]; if (list.Contains(shinyPearl)) { val5 = list[list.IndexOf(shinyPearl)]; } else if (list.Contains(pearl)) { val5 = list[list.IndexOf(pearl)]; } else if (list.Contains(kromer) && component.inventory.GetItemCount(kromer) >= 10) { val5 = list[list.IndexOf(kromer)]; } val3 = val5; } catch { return; } Debug.Log((object)"Starting transaction"); if ((Object)(object)val5 == (Object)(object)pearl) { component.inventory.RemoveItem(val5, 1); val4 = pipis; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: YOUR FIRST STEP TO BECOMING A [[Big shot]]. [" + (timesUsed - 1) + "] tries left." }); } else if ((Object)(object)val5 == (Object)(object)shinyPearl) { component.inventory.RemoveItem(val5, 1); val4 = mrPipis; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: YOU WON WON WON MY [[Hyperlink blocked]]. [" + (timesUsed - 1) + "] tries left." }); } else if ((Object)(object)val5 == (Object)(object)kromer) { for (int j = 0; j < 10; j++) { component.inventory.RemoveItem(kromer, 1); } val4 = commRing; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: YOU ARE THE FIRST TO OWN MY [Commemorative Ring]!!! [" + (timesUsed - 1) + "] tries left." }); } else { component.inventory.RemoveItem(val5, 1); int num = 40; if (Util.CheckRoll((float)num, component.master)) { if ((int)val5.tier == 0) { val4 = val; } else if ((int)val5.tier == 1) { val4 = val2; } Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: THAT'S A REAL [[Big Shot]] MOVE KID!!! YOU'RE JUST LIKE [Me]... [" + (timesUsed - 1) + "] tries left." }); } else { val4 = kromer; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: DELICIOUS KROMER. [" + (timesUsed - 1) + "] tries left." }); } } Debug.Log((object)("Taking " + ((object)val3)?.ToString() + ", Giving " + (object)val4)); PickupIndex val6 = default(PickupIndex); ((PickupIndex)(ref val6))..ctor(val3.itemIndex); PickupIndex val7 = default(PickupIndex); ((PickupIndex)(ref val7))..ctor(val4.itemIndex); PickupDef pickupDef = ((PickupIndex)(ref val6)).pickupDef; AkSoundEngine.PostEvent(2011881192u, ((Component)this).gameObject); ScrapperController.CreateItemTakenOrb(component.corePosition, ((Component)this).gameObject, pickupDef.itemIndex); PickupDropletController.CreatePickupDroplet(val7, transform.position, transform.forward * 20f); } } public class TrashcanPickerManager : NetworkBehaviour { private enum ShopItemCosts { Bulb = 3, Ring = 6, Core = 6, Heart = 10, Pipis = 2, MrPipis = 3 } public PickupPickerController pickerController; public Transform iconTransform; [SyncVar] public float coefficient; private Interactor interactor; public static readonly int maxUses = DeltarunePlugin.susExchangeMaxUses.Value; public static int uses; public List allItems = new List(); public List allTier1 = new List(); public List allTier2 = new List(); public List allTier3 = new List(); public List allTakeableItems = new List(); public ItemDef pearl; public ItemDef shinyPearl; public void Start() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) if (!DeltarunePlugin.susExchangeMusicDisabled.Value) { AkSoundEngine.PostEvent(3865094552u, ((Component)this).gameObject); } uses = maxUses; allItems = Helpers.GetItems(99); allTier1 = Helpers.GetItems(0); allTier2 = Helpers.GetItems(1); allTier3 = Helpers.GetItems(2); allTier3.Remove(ItemBase.instance.ItemDef); allTakeableItems.AddRange(allTier1); allTakeableItems.AddRange(allTier2); allTakeableItems.Remove(ItemBase.instance.ItemDef); allTakeableItems.Remove(ItemBase.instance.ItemDef); allTakeableItems.Remove(ItemBase.instance.ItemDef); for (ItemIndex val = (ItemIndex)0; (int)val < ItemCatalog.itemCount; val = (ItemIndex)(val + 1)) { ItemDef itemDef = ItemCatalog.GetItemDef(val); if ((Object)(object)itemDef != (Object)null) { if (((Object)itemDef).name == "Pearl") { pearl = itemDef; } else if (((Object)itemDef).name == "ShinyPearl") { shinyPearl = itemDef; } } } } public List ListTakeableInventoryItems(List allInventoryItems) { List list = new List(); CharacterBody component = ((Component)interactor).GetComponent(); for (int i = 0; i < allTakeableItems.Count; i++) { if (allInventoryItems.Contains(allTakeableItems[i])) { list.Add(allTakeableItems[i]); } } return list; } public void HandleSelection(int selection) { //IL_0032: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Expected O, but got Unknown //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Expected O, but got Unknown //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06a3: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Expected O, but got Unknown //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Expected O, but got Unknown //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Invalid comparison between Unknown and I4 //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Expected O, but got Unknown //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Invalid comparison between Unknown and I4 //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Expected O, but got Unknown if (!NetworkServer.active) { return; } ((Component)this).GetComponent().ClearParticipant(); if (!Object.op_Implicit((Object)(object)interactor)) { return; } PickupDef pickupDef = PickupCatalog.GetPickupDef(new PickupIndex(selection)); CharacterBody component = ((Component)interactor).GetComponent(); ItemIndex itemIndex = pickupDef.itemIndex; ItemTier tier = ItemCatalog.GetItemDef(itemIndex).tier; List allPermenantItemsFromInventory = Helpers.GetAllPermenantItemsFromInventory(component.inventory); List list = new List(); int num = 0; ItemDef val = allTier2[Random.Range(0, allTier2.Count)]; ItemDef val2 = allTier3[Random.Range(0, allTier3.Count)]; ItemDef val3 = null; Debug.Log((object)"Finding takeable items"); list = ListTakeableInventoryItems(allPermenantItemsFromInventory); num = list.Count; Debug.Log((object)"Deciding item to give"); if (itemIndex == ItemBase.instance.ItemDef.itemIndex) { val3 = ItemBase.instance.ItemDef; for (int i = 0; i < 2; i++) { component.inventory.RemoveItem(pearl, 1); } Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: YOUR FIRST STEP TO BECOMING A [[Big shot]]. [" + (uses - 1) + "] tries left." }); } else if (itemIndex == ItemBase.instance.ItemDef.itemIndex) { val3 = ItemBase.instance.ItemDef; for (int j = 0; j < 3; j++) { component.inventory.RemoveItem(shinyPearl, 1); } Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: YOU WON WON WON MY [[Hyperlink blocked]]. [" + (uses - 1) + "] tries left." }); } else if (itemIndex == ItemBase.instance.ItemDef.itemIndex) { itemIndex = ItemBase.instance.ItemDef.itemIndex; for (int k = 0; k < 6; k++) { component.inventory.RemoveItem(ItemBase.instance.ItemDef, 1); } val3 = ItemBase.instance.ItemDef; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: YOU ARE THE FIRST TO OWN MY [[Commemorative Ring]]. [" + (uses - 1) + "] tries left." }); } else if (itemIndex == ItemBase.instance.ItemDef.itemIndex) { itemIndex = ItemBase.instance.ItemDef.itemIndex; for (int l = 0; l < 3; l++) { component.inventory.RemoveItem(ItemBase.instance.ItemDef, 1); } val3 = ItemBase.instance.ItemDef; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: HEY WATCH WHERE YOU'RE [[Looking]]!!! [" + (uses - 1) + "] tries left." }); } else if (itemIndex == ItemBase.instance.ItemDef.itemIndex) { itemIndex = ItemBase.instance.ItemDef.itemIndex; for (int m = 0; m < 6; m++) { component.inventory.RemoveItem(ItemBase.instance.ItemDef, 1); } val3 = ItemBase.instance.ItemDef; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: MY SIGNATURE [[Orb]] FOR SA-[[Error]]!! [" + (uses - 1) + "] tries left." }); } else if (itemIndex == ItemBase.instance.ItemDef.itemIndex) { itemIndex = ItemBase.instance.ItemDef.itemIndex; for (int n = 0; n < 10; n++) { component.inventory.RemoveItem(ItemBase.instance.ItemDef, 1); } val3 = ItemBase.instance.ItemDef; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: MY POOR OL' HEART CAN'T TAKE THIS LOSS!! [[Help me...]] [" + (uses - 1) + "] tries left." }); } else if (itemIndex == ItemBase.instance.ItemDef.itemIndex) { int itemCount = component.inventory.GetItemCount(ItemBase.instance.ItemDef); int num2 = DeltarunePlugin.susExchangeChance.Value + itemCount * 10; ItemDef val4 = list[Random.Range(0, num)]; itemIndex = val4.itemIndex; component.inventory.RemoveItem(itemIndex, 1); if (Util.CheckRoll((float)num2, component.master)) { val3 = (ItemDef)(((int)val4.tier == 0) ? val : (((int)val4.tier != 1) ? ((object)ItemBase.instance.ItemDef) : ((object)val2))); Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: THAT'S A REAL [[Big Shot]] MOVE KID!!! YOU'RE JUST LIKE [Me]... [" + (uses - 1) + "] tries left." }); } else { val3 = ItemBase.instance.ItemDef; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "[TRASH DWELLER]: DELICIOUS KROMER. [" + (uses - 1) + "] tries left." }); } } Debug.Log((object)("Taken " + ((object)(ItemIndex)(ref itemIndex)).ToString() + " | Given " + (object)val3)); Transform transform = component.transform; PickupIndex val5 = default(PickupIndex); ((PickupIndex)(ref val5))..ctor(val3.itemIndex); PickupDropletController.CreatePickupDroplet(val5, transform.position, transform.forward * 20f); CharacterMasterNotificationQueue.SendTransformNotification(component.master, itemIndex, val3.itemIndex, (TransformationType)0); AkSoundEngine.PostEvent(2011881192u, ((Component)this).gameObject); uses--; if (uses <= 0) { RpcHandleDeactivateClient(); pickerController.SetAvailable(false); } Debug.Log((object)"Finished Interaction."); EffectManager.SpawnEffect(Resources.Load("Prefabs/Effects/ShrineUseEffect"), new EffectData { origin = ((Component)this).gameObject.transform.position, rotation = Quaternion.identity, scale = 1f, color = Color32.op_Implicit(Color.yellow) }, true); } public void HandleInteraction(Interactor interactor) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } this.interactor = interactor; List