Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Marixxe Is Mithrix v1.2.3
plugins/MarixxeIsMithrix.dll
Decompiled 2 years agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using MarixxeIsMithrix.Buff; using MarixxeIsMithrix.Couleur; using MarixxeIsMithrix.Dots; using MarixxeIsMithrix.Item; using MarixxeIsMithrix.Modules; using MarixxeIsMithrix.Orbs; using Microsoft.CodeAnalysis; using On.RoR2; using R2API; using RoR2; using RoR2.Orbs; using UnityEngine; using UnityEngine.AddressableAssets; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("MarixxeIsMithrix")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("MarixxeIsMithrix")] [assembly: AssemblyTitle("MarixxeIsMithrix")] [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 MarixxeIsMithrix { 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); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("MaxwellArmatria.MarixxeIsMithrix", "MarixxeIsMithrix", "1.0.6")] public class MarixxeIsMithrix : BaseUnityPlugin { public const string PluginGUID = "MaxwellArmatria.MarixxeIsMithrix"; public const string PluginAuthor = "MaxwellArmatria"; public const string PluginName = "MarixxeIsMithrix"; public const string PluginVersion = "1.0.6"; public static PluginInfo PInfo { get; private set; } public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); PInfo = ((BaseUnityPlugin)this).Info; Assets.Init(); CouleurCreator.CreateCouleur(); BuffCreator.CreateBuff(); ItemCreator.CreateItem(); DotsCreator.CreateDots(); OrbsCreator.CreateOrbs(); } private void Update() { //IL_0031: 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_0056: 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_0066: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)283)) { Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; Log.Info($"Player pressed F2. Spawning our custom item at coordinates {transform.position}"); PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(CrystalDivergence.crystalDivergence.itemIndex), transform.position, transform.forward * 20f); } if (Input.GetKeyDown((KeyCode)284)) { Transform transform2 = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; Log.Info($"Player pressed F2. Spawning our custom item at coordinates {transform2.position}"); PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(MalachiteAmbuyat.malachiteAmbuyat.itemIndex), transform2.position, transform2.forward * 20f); } } } } namespace MarixxeIsMithrix.Orbs { public class AmbuyatCelestineOrb : Orb { private const float speed = 30f; private Inventory targetInventory; public static void Init() { OrbAPI.AddOrb(typeof(AmbuyatCelestineOrb)); } public override void Begin() { //IL_0014: 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: 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_0033: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 30f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); HurtBox component = ((Component)base.target).GetComponent<HurtBox>(); CharacterBody val2 = ((component != null) ? ((Component)component.healthComponent).GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { targetInventory = val2.inventory; } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)targetInventory)) { AddCelestineAmbuyat(targetInventory); } } public static void AddCelestineAmbuyat(Inventory targetInventory) { targetInventory.GiveItem(CelestineAmbuyat.celestineAmbuyat, 1); } } internal class AmbuyatElectricOrb : Orb { private const float speed = 30f; private Inventory targetInventory; public static void Init() { OrbAPI.AddOrb(typeof(AmbuyatElectricOrb)); } public override void Begin() { //IL_0014: 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: 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_0033: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 30f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); HurtBox component = ((Component)base.target).GetComponent<HurtBox>(); CharacterBody val2 = ((component != null) ? ((Component)component.healthComponent).GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { targetInventory = val2.inventory; } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)targetInventory)) { AddElectricAmbuyat(targetInventory); } } public static void AddElectricAmbuyat(Inventory targetInventory) { targetInventory.GiveItem(ElectricAmbuyat.electricAmbuyat, 1); } } internal class AmbuyatFireOrb : Orb { private const float speed = 30f; private Inventory targetInventory; public static void Init() { OrbAPI.AddOrb(typeof(AmbuyatFireOrb)); } public override void Begin() { //IL_0014: 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: 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_0033: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 30f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); HurtBox component = ((Component)base.target).GetComponent<HurtBox>(); CharacterBody val2 = ((component != null) ? ((Component)component.healthComponent).GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { targetInventory = val2.inventory; } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)targetInventory)) { AddFireAmbuyat(targetInventory); } } public static void AddFireAmbuyat(Inventory targetInventory) { targetInventory.GiveItem(FireAmbuyat.fireAmbuyat, 1); } } internal class AmbuyatHealOrb : Orb { private const float speed = 30f; private Inventory targetInventory; public static void Init() { OrbAPI.AddOrb(typeof(AmbuyatHealOrb)); } public override void Begin() { //IL_0014: 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: 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_0033: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 30f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); HurtBox component = ((Component)base.target).GetComponent<HurtBox>(); CharacterBody val2 = ((component != null) ? ((Component)component.healthComponent).GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { targetInventory = val2.inventory; } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)targetInventory)) { AddHealAmbuyat(targetInventory); } } public static void AddHealAmbuyat(Inventory targetInventory) { targetInventory.GiveItem(HealAmbuyat.healAmbuyat, 1); } } internal class AmbuyatIceOrb : Orb { private const float speed = 30f; private Inventory targetInventory; public static void Init() { OrbAPI.AddOrb(typeof(AmbuyatIceOrb)); } public override void Begin() { //IL_0014: 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: 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_0033: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 30f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); HurtBox component = ((Component)base.target).GetComponent<HurtBox>(); CharacterBody val2 = ((component != null) ? ((Component)component.healthComponent).GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { targetInventory = val2.inventory; } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)targetInventory)) { AddIceAmbuyat(targetInventory); } } public static void AddIceAmbuyat(Inventory targetInventory) { targetInventory.GiveItem(IceAmbuyat.iceAmbuyat, 1); } } internal class AmbuyatMalachiteOrb : Orb { private const float speed = 30f; private Inventory targetInventory; public static void Init() { OrbAPI.AddOrb(typeof(AmbuyatMalachiteOrb)); } public override void Begin() { //IL_0014: 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: 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_0033: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 30f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); HurtBox component = ((Component)base.target).GetComponent<HurtBox>(); CharacterBody val2 = ((component != null) ? ((Component)component.healthComponent).GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { targetInventory = val2.inventory; } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)targetInventory)) { AddMalachiteAmbuyat(targetInventory); } } public static void AddMalachiteAmbuyat(Inventory targetInventory) { targetInventory.GiveItem(MalachiteAmbuyat.malachiteAmbuyat, 1); } } internal class AmbuyatPerfectedOrb : Orb { private const float speed = 30f; private Inventory targetInventory; public static void Init() { OrbAPI.AddOrb(typeof(AmbuyatPerfectedOrb)); } public override void Begin() { //IL_0014: 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: 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_0033: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 30f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); HurtBox component = ((Component)base.target).GetComponent<HurtBox>(); CharacterBody val2 = ((component != null) ? ((Component)component.healthComponent).GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { targetInventory = val2.inventory; } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)targetInventory)) { AddPerfectedAmbuyat(targetInventory); } } public static void AddPerfectedAmbuyat(Inventory targetInventory) { targetInventory.GiveItem(PerfectedAmbuyat.perfectedAmbuyat, 1); } } internal class AmbuyatVoidOrb : Orb { private const float speed = 30f; private Inventory targetInventory; public static void Init() { OrbAPI.AddOrb(typeof(AmbuyatVoidOrb)); } public override void Begin() { //IL_0014: 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: 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_0033: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 30f; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true); HurtBox component = ((Component)base.target).GetComponent<HurtBox>(); CharacterBody val2 = ((component != null) ? ((Component)component.healthComponent).GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { targetInventory = val2.inventory; } } public override void OnArrival() { if (Object.op_Implicit((Object)(object)targetInventory)) { AddVoidAmbuyat(targetInventory); } } public static void AddVoidAmbuyat(Inventory targetInventory) { targetInventory.GiveItem(VoidAmbuyat.voidAmbuyat, 1); } } } namespace MarixxeIsMithrix.Modules { public static class Assets { public static AssetBundle mainBundle; public const string bundleName = "marixxeisitem.bundle"; public const string assetBundleFolder = "AssetBundles"; public static string AssetBundlePath => Path.Combine(Path.GetDirectoryName(MarixxeIsMithrix.PInfo.Location), "AssetBundles", "marixxeisitem.bundle"); public static void Init() { mainBundle = AssetBundle.LoadFromFile(AssetBundlePath); } } public static class BuffCreator { public static void CreateBuff() { Order.Init(); PoisonAmbuyat.Init(); SlowAmbuyat.Init(); } } public static class CouleurCreator { public static void CreateCouleur() { MalachiteAmbuyatDoTColor.Init(); CrystalDivergenceDamageColor.Init(); } } public static class DotsCreator { public static void CreateDots() { PoisonAmbuyatDOT.Init(); } } public static class ItemCreator { public static void CreateItem() { MonsterCan.Init(); SelfFillingGatling.Init(); CrystalDivergence.Init(); LawAndOrder.Init(); Ambuyat.Init(); CelestineAmbuyat.Init(); ElectricAmbuyat.Init(); FireAmbuyat.Init(); HealAmbuyat.Init(); MalachiteAmbuyat.Init(); VoidAmbuyat.Init(); PerfectedAmbuyat.Init(); IceAmbuyat.Init(); } } internal class OrbsCreator { public static void CreateOrbs() { AmbuyatCelestineOrb.Init(); AmbuyatElectricOrb.Init(); AmbuyatFireOrb.Init(); AmbuyatHealOrb.Init(); AmbuyatIceOrb.Init(); AmbuyatMalachiteOrb.Init(); AmbuyatPerfectedOrb.Init(); AmbuyatVoidOrb.Init(); } } } namespace MarixxeIsMithrix.Item { internal class Ambuyat { [CompilerGenerated] private static class <>O { public static hook_OnCharacterDeath <0>__GlobalEventManager_OnCharacterDeath; } public static ItemDef ambuyat; public static void Init() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown ambuyat = ScriptableObject.CreateInstance<ItemDef>(); ((Object)ambuyat).name = "AMBUYAT_NAME"; ambuyat.nameToken = "AMBUYAT_NAME"; ambuyat.pickupToken = "AMBUYAT_PICKUP"; ambuyat.descriptionToken = "AMBUYAT_DESCRIPTION"; ambuyat.loreToken = "AMBUYAT_LORE"; ambuyat.tier = (ItemTier)1; ItemDef obj = ambuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; ambuyat._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier2Def.asset").WaitForCompletion(); ambuyat.pickupIconSprite = Assets.mainBundle.LoadAsset<Sprite>("Ambuyat"); ambuyat.pickupModelPrefab = Assets.mainBundle.LoadAsset<GameObject>("Ambuyat"); ambuyat.canRemove = true; ambuyat.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(ambuyat, val)); Hooks(); } public static void Hooks() { //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>__GlobalEventManager_OnCharacterDeath; if (obj == null) { hook_OnCharacterDeath val = GlobalEventManager_OnCharacterDeath; <>O.<0>__GlobalEventManager_OnCharacterDeath = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)obj; } public static void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager globalEventManager, DamageReport damageReport) { //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_0056: 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_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_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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0185: 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_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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) GameObject val = null; if (Object.op_Implicit((Object)(object)damageReport.victim)) { val = ((Component)damageReport.victim).gameObject; } CharacterBody victimBody = damageReport.victimBody; CharacterBody attackerBody = damageReport.attackerBody; CharacterMaster attackerMaster = damageReport.attackerMaster; Inventory val2 = (Object.op_Implicit((Object)(object)attackerMaster) ? attackerMaster.inventory : null); Vector3 val3 = Vector3.zero; Quaternion identity = Quaternion.identity; Vector3 zero = Vector3.zero; Transform transform = val.transform; if (Object.op_Implicit((Object)(object)transform)) { val3 = transform.position; identity = transform.rotation; zero = val3; } if (Object.op_Implicit((Object)(object)attackerBody)) { attackerBody.HandleOnKillEffectsServer(damageReport); if (Object.op_Implicit((Object)(object)attackerMaster) && Object.op_Implicit((Object)(object)val2)) { int itemCount = val2.GetItemCount(ambuyat); if (itemCount > 0 && Util.CheckRoll(50f, 0f, (CharacterMaster)null)) { if (victimBody.HasBuff(Buffs.AffixRed)) { AmbuyatFireOrb ambuyatFireOrb = new AmbuyatFireOrb(); ((Orb)ambuyatFireOrb).origin = val3; ((Orb)ambuyatFireOrb).target = Util.FindBodyMainHurtBox(attackerBody); OrbManager.instance.AddOrb((Orb)(object)ambuyatFireOrb); } if (victimBody.HasBuff(Buffs.AffixWhite)) { AmbuyatIceOrb ambuyatIceOrb = new AmbuyatIceOrb(); ((Orb)ambuyatIceOrb).origin = val3; ((Orb)ambuyatIceOrb).target = Util.FindBodyMainHurtBox(attackerBody); OrbManager.instance.AddOrb((Orb)(object)ambuyatIceOrb); } if (victimBody.HasBuff(Buffs.AffixBlue)) { AmbuyatElectricOrb ambuyatElectricOrb = new AmbuyatElectricOrb(); ((Orb)ambuyatElectricOrb).origin = val3; ((Orb)ambuyatElectricOrb).target = Util.FindBodyMainHurtBox(attackerBody); OrbManager.instance.AddOrb((Orb)(object)ambuyatElectricOrb); } if (victimBody.HasBuff(Buffs.AffixHaunted)) { AmbuyatCelestineOrb ambuyatCelestineOrb = new AmbuyatCelestineOrb(); ((Orb)ambuyatCelestineOrb).origin = val3; ((Orb)ambuyatCelestineOrb).target = Util.FindBodyMainHurtBox(attackerBody); OrbManager.instance.AddOrb((Orb)(object)ambuyatCelestineOrb); } if (victimBody.HasBuff(Buffs.AffixPoison)) { AmbuyatMalachiteOrb ambuyatMalachiteOrb = new AmbuyatMalachiteOrb(); ((Orb)ambuyatMalachiteOrb).origin = val3; ((Orb)ambuyatMalachiteOrb).target = Util.FindBodyMainHurtBox(attackerBody); OrbManager.instance.AddOrb((Orb)(object)ambuyatMalachiteOrb); } if (victimBody.HasBuff(Buffs.AffixLunar)) { AmbuyatPerfectedOrb ambuyatPerfectedOrb = new AmbuyatPerfectedOrb(); ((Orb)ambuyatPerfectedOrb).origin = val3; ((Orb)ambuyatPerfectedOrb).target = Util.FindBodyMainHurtBox(attackerBody); OrbManager.instance.AddOrb((Orb)(object)ambuyatPerfectedOrb); } if (victimBody.HasBuff(Buffs.EliteEarth)) { AmbuyatHealOrb ambuyatHealOrb = new AmbuyatHealOrb(); ((Orb)ambuyatHealOrb).origin = val3; ((Orb)ambuyatHealOrb).target = Util.FindBodyMainHurtBox(attackerBody); OrbManager.instance.AddOrb((Orb)(object)ambuyatHealOrb); } if (victimBody.HasBuff(Buffs.EliteVoid)) { AmbuyatVoidOrb ambuyatVoidOrb = new AmbuyatVoidOrb(); ((Orb)ambuyatVoidOrb).origin = val3; ((Orb)ambuyatVoidOrb).target = Util.FindBodyMainHurtBox(attackerBody); OrbManager.instance.AddOrb((Orb)(object)ambuyatVoidOrb); } } } } orig.Invoke(globalEventManager, damageReport); } } internal class CelestineAmbuyat { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; } public static ItemDef celestineAmbuyat; public static void Init() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown celestineAmbuyat = ScriptableObject.CreateInstance<ItemDef>(); celestineAmbuyat.hidden = true; ((Object)celestineAmbuyat).name = "CELESTINE_AMBUYAT_NAME"; celestineAmbuyat.nameToken = "CELESTINE_AMBUYAT_NAME"; celestineAmbuyat.pickupToken = "CELESTINE_AMBUYAT_PICKUP"; celestineAmbuyat.descriptionToken = "CELESTINE_AMBUYAT_DESCRIPTION"; celestineAmbuyat.loreToken = "CELESTINE_AMBUYAT_LORE"; celestineAmbuyat.canRemove = false; ItemDef obj = celestineAmbuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; celestineAmbuyat.tier = (ItemTier)5; celestineAmbuyat.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); celestineAmbuyat.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(celestineAmbuyat, val)); Hooks(); } public static void Hooks() { //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>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(celestineAmbuyat); if (itemCount > 0) { args.baseMoveSpeedAdd += 0.01f * (float)itemCount; } } } } internal class CrystalDivergence { [CompilerGenerated] private static class <>O { public static hook_TakeDamage <0>__HealthComponent_TakeDamage; } public static ItemDef crystalDivergence; public static void Init() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown crystalDivergence = ScriptableObject.CreateInstance<ItemDef>(); ((Object)crystalDivergence).name = "CRYSTAL_DIVERGENCE_NAME"; crystalDivergence.nameToken = "CRYSTAL_DIVERGENCE_NAME"; crystalDivergence.pickupToken = "CRYSTAL_DIVERGENCE_PICKUP"; crystalDivergence.descriptionToken = "CRYSTAL_DIVERGENCE_DESCRIPTION"; crystalDivergence.loreToken = "CRYSTAL_DIVERGENCE_LORE"; crystalDivergence.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; crystalDivergence.tier = (ItemTier)0; crystalDivergence._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion(); crystalDivergence.pickupIconSprite = Assets.mainBundle.LoadAsset<Sprite>("CrystalDivergence"); crystalDivergence.pickupModelPrefab = Assets.mainBundle.LoadAsset<GameObject>("CrystalDivergence"); crystalDivergence.canRemove = true; crystalDivergence.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(crystalDivergence, val)); Hooks(); } public static void Hooks() { //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>__HealthComponent_TakeDamage; if (obj == null) { hook_TakeDamage val = HealthComponent_TakeDamage; <>O.<0>__HealthComponent_TakeDamage = val; obj = (object)val; } HealthComponent.TakeDamage += (hook_TakeDamage)obj; } public static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_002e: 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_003e: 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_0062: Invalid comparison between Unknown and I4 //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && TryGetCount(val, out var count)) { Vector3 val2 = val.corePosition - damageInfo.position; if (count > 0 && ((Vector3)(ref val2)).sqrMagnitude > 169f) { if ((int)damageInfo.damageType == 0) { damageInfo.damageColorIndex = CrystalDivergenceDamageColor.crystalDivergenceDamageColorIndex; } damageInfo.damage *= 1f + (float)count * 0.075f; } } orig.Invoke(self, damageInfo); } public static bool TryGetCount(CharacterBody body, out int count) { count = 0; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } count = body.inventory.GetItemCount(crystalDivergence); return count > 0; } } internal class ElectricAmbuyat { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; } public static ItemDef electricAmbuyat; public static void Init() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown electricAmbuyat = ScriptableObject.CreateInstance<ItemDef>(); electricAmbuyat.hidden = true; ((Object)electricAmbuyat).name = "ELECTRIC_AMBUYAT_NAME"; electricAmbuyat.nameToken = "ELECTRIC_AMBUYAT_NAME"; electricAmbuyat.pickupToken = "ELECTRIC_AMBUYAT_PICKUP"; electricAmbuyat.descriptionToken = "ELECTRIC_AMBUYAT_DESCRIPTION"; electricAmbuyat.loreToken = "ELECTRIC_AMBUYAT_LORE"; electricAmbuyat.canRemove = false; ItemDef obj = electricAmbuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; electricAmbuyat.tier = (ItemTier)5; electricAmbuyat.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); electricAmbuyat.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(electricAmbuyat, val)); Hooks(); } public static void Hooks() { //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>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(electricAmbuyat); if (itemCount > 0) { args.baseShieldAdd += (float)itemCount; args.baseAttackSpeedAdd += 0.01f * (float)itemCount; } } } } internal class FireAmbuyat { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; } public static ItemDef fireAmbuyat; public static void Init() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown fireAmbuyat = ScriptableObject.CreateInstance<ItemDef>(); fireAmbuyat.hidden = true; ((Object)fireAmbuyat).name = "FIRE_AMBUYAT_NAME"; fireAmbuyat.nameToken = "FIRE_AMBUYAT_NAME"; fireAmbuyat.pickupToken = "FIRE_AMBUYAT_PICKUP"; fireAmbuyat.descriptionToken = "FIRE_AMBUYAT_DESCRIPTION"; fireAmbuyat.loreToken = "FIRE_AMBUYAT_LORE"; fireAmbuyat.canRemove = false; ItemDef obj = fireAmbuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; fireAmbuyat.tier = (ItemTier)5; fireAmbuyat.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); fireAmbuyat.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(fireAmbuyat, val)); Hooks(); } public static void Hooks() { //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>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(fireAmbuyat); if (itemCount > 0) { args.baseDamageAdd += (float)itemCount; args.baseHealthAdd += (float)itemCount; } } } } internal class HealAmbuyat { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; } public static ItemDef healAmbuyat; public static void Init() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown healAmbuyat = ScriptableObject.CreateInstance<ItemDef>(); healAmbuyat.hidden = true; ((Object)healAmbuyat).name = "HEAL_AMBUYAT_NAME"; healAmbuyat.nameToken = "HEAL_AMBUYAT_NAME"; healAmbuyat.pickupToken = "HEAL_AMBUYAT_PICKUP"; healAmbuyat.descriptionToken = "HEAL_AMBUYAT_DESCRIPTION"; healAmbuyat.loreToken = "HEAL_AMBUYAT_LORE"; healAmbuyat.canRemove = false; ItemDef obj = healAmbuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; healAmbuyat.tier = (ItemTier)5; healAmbuyat.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); healAmbuyat.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(healAmbuyat, val)); Hooks(); } public static void Hooks() { //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>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(healAmbuyat); if (itemCount > 0) { args.baseRegenAdd += 0.1f * (float)itemCount; } } } } internal class IceAmbuyat { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; public static hook_OnHitEnemy <1>__GlobalEventManager_OnHitEnemy; } public static ItemDef iceAmbuyat; public static void Init() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown iceAmbuyat = ScriptableObject.CreateInstance<ItemDef>(); iceAmbuyat.hidden = true; ((Object)iceAmbuyat).name = "ICE_AMBUYAT_NAME"; iceAmbuyat.nameToken = "ICE_AMBUYAT_NAME"; iceAmbuyat.pickupToken = "ICE_AMBUYAT_PICKUP"; iceAmbuyat.descriptionToken = "ICE_AMBUYAT_DESCRIPTION"; iceAmbuyat.loreToken = "ICE_AMBUYAT_LORE"; iceAmbuyat.canRemove = false; ItemDef obj = iceAmbuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; iceAmbuyat.tier = (ItemTier)5; iceAmbuyat.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); iceAmbuyat.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(iceAmbuyat, val)); Hooks(); } public static void Hooks() { //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 //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_003d: Expected O, but got Unknown object obj = <>O.<0>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; object obj2 = <>O.<1>__GlobalEventManager_OnHitEnemy; if (obj2 == null) { hook_OnHitEnemy val2 = GlobalEventManager_OnHitEnemy; <>O.<1>__GlobalEventManager_OnHitEnemy = val2; obj2 = (object)val2; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj2; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(SlowAmbuyat.slowAmbuyat)) { args.moveSpeedReductionMultAdd += (float)sender.GetBuffCount(SlowAmbuyat.slowAmbuyat) * 0.01f; } } public static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager globalEventManager, DamageInfo damageInfo, GameObject entity) { orig.Invoke(globalEventManager, damageInfo, entity); CharacterBody body = default(CharacterBody); CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref body) && entity.TryGetComponent<CharacterBody>(ref val) && TryGetCount(body, out var count) && count > 0 && val.GetBuffCount(SlowAmbuyat.slowAmbuyat) < count) { val.AddBuff(SlowAmbuyat.slowAmbuyat); } } public static bool TryGetCount(CharacterBody body, out int count) { count = 0; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } count = body.inventory.GetItemCount(iceAmbuyat); return count > 0; } } internal class LawAndOrder { [CompilerGenerated] private static class <>O { public static hook_OnHitEnemy <0>__GlobalEventManager_OnHitEnemy; public static hook_TakeDamage <1>__HealthComponent_TakeDamage; } public static ItemDef lawAndOrder; public static void Init() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown lawAndOrder = ScriptableObject.CreateInstance<ItemDef>(); ((Object)lawAndOrder).name = "LAW_AND_ORDER_NAME"; lawAndOrder.nameToken = "LAW_AND_ORDER_NAME"; lawAndOrder.pickupToken = "LAW_AND_ORDER_PICKUP"; lawAndOrder.descriptionToken = "LAW_AND_ORDER_DESCRIPTION"; lawAndOrder.loreToken = "LAW_AND_ORDER_LORE"; lawAndOrder.tier = (ItemTier)2; lawAndOrder.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; lawAndOrder._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier3Def.asset").WaitForCompletion(); lawAndOrder.pickupIconSprite = Assets.mainBundle.LoadAsset<Sprite>("LawAndOrder"); lawAndOrder.pickupModelPrefab = Assets.mainBundle.LoadAsset<GameObject>("LawAndOrder"); lawAndOrder.canRemove = true; lawAndOrder.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(lawAndOrder, val)); Hooks(); } public static void Hooks() { //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 //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_003d: Expected O, but got Unknown object obj = <>O.<0>__GlobalEventManager_OnHitEnemy; if (obj == null) { hook_OnHitEnemy val = GlobalEventManager_OnHitEnemy; <>O.<0>__GlobalEventManager_OnHitEnemy = val; obj = (object)val; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj; object obj2 = <>O.<1>__HealthComponent_TakeDamage; if (obj2 == null) { hook_TakeDamage val2 = HealthComponent_TakeDamage; <>O.<1>__HealthComponent_TakeDamage = val2; obj2 = (object)val2; } HealthComponent.TakeDamage += (hook_TakeDamage)obj2; } public static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { CharacterBody body = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref body) && TryGetCount(body, out var count) && count > 0 && self.body.HasBuff(Order.order)) { damageInfo.damage *= 1f + (float)self.body.GetBuffCount(Order.order) * ((float)count * 0.5f); } orig.Invoke(self, damageInfo); } public static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager globalEventManager, DamageInfo damageInfo, GameObject entity) { orig.Invoke(globalEventManager, damageInfo, entity); CharacterBody val = default(CharacterBody); CharacterBody val2 = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && entity.TryGetComponent<CharacterBody>(ref val2) && TryGetCount(val2, out var count) && damageInfo.damage >= val2.healthComponent.fullHealth * 0.5f && count > 0) { val.AddBuff(Order.order); } } public static bool TryGetCount(CharacterBody body, out int count) { count = 0; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } count = body.inventory.GetItemCount(lawAndOrder); return count > 0; } } internal class MalachiteAmbuyat { [CompilerGenerated] private static class <>O { public static hook_OnHitEnemy <0>__GlobalEventManager_OnHitEnemy; } public static ItemDef malachiteAmbuyat; public static void Init() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown malachiteAmbuyat = ScriptableObject.CreateInstance<ItemDef>(); malachiteAmbuyat.hidden = true; ((Object)malachiteAmbuyat).name = "MALACHITE_AMBUYAT_NAME"; malachiteAmbuyat.nameToken = "MALACHITE_AMBUYAT_NAME"; malachiteAmbuyat.pickupToken = "MALACHITE_AMBUYAT_PICKUP"; malachiteAmbuyat.descriptionToken = "MALACHITE_AMBUYAT_DESCRIPTION"; malachiteAmbuyat.loreToken = "MALACHITE_AMBUYAT_LORE"; malachiteAmbuyat.canRemove = false; ItemDef obj = malachiteAmbuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; malachiteAmbuyat.tier = (ItemTier)5; malachiteAmbuyat.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); malachiteAmbuyat.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(malachiteAmbuyat, val)); Hooks(); } public static void Hooks() { //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>__GlobalEventManager_OnHitEnemy; if (obj == null) { hook_OnHitEnemy val = GlobalEventManager_OnHitEnemy; <>O.<0>__GlobalEventManager_OnHitEnemy = val; obj = (object)val; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj; } public static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager globalEventManager, DamageInfo damageInfo, GameObject entity) { //IL_0039: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(globalEventManager, damageInfo, entity); CharacterBody body = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref body) && TryGetCount(body, out var _)) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = damageInfo.attacker; val.dotIndex = PoisonAmbuyatDOT.poisonAmbuyatDOTIndex; val.maxStacksFromAttacker = 10000u; val.victimObject = entity; val.duration = 7f; InflictDotInfo val2 = val; DotController.InflictDot(ref val2); } } public static bool TryGetCount(CharacterBody body, out int count) { count = 0; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } count = body.inventory.GetItemCount(malachiteAmbuyat); return count > 0; } } public class MonsterCan { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; } public static ItemDef monsterCan; public static void Init() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown monsterCan = ScriptableObject.CreateInstance<ItemDef>(); ((Object)monsterCan).name = "MONSTER_CAN_NAME"; monsterCan.nameToken = "MONSTER_CAN_NAME"; monsterCan.pickupToken = "MONSTER_CAN_PICKUP"; monsterCan.descriptionToken = "MONSTER_CAN_DESCRIPTION"; monsterCan.loreToken = "MONSTER_CAN_LORE"; monsterCan.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; monsterCan.tier = (ItemTier)2; monsterCan._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier3Def.asset").WaitForCompletion(); monsterCan.pickupIconSprite = Assets.mainBundle.LoadAsset<Sprite>("MonsterCan"); monsterCan.pickupModelPrefab = Assets.mainBundle.LoadAsset<GameObject>("MonsterCan"); monsterCan.canRemove = true; monsterCan.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(monsterCan, val)); Hooks(); } public static void Hooks() { //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>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(monsterCan); if (itemCount == 1) { args.primaryCooldownMultAdd += -0.1f; args.secondaryCooldownMultAdd += -0.1f; args.utilityCooldownMultAdd += -0.1f; args.specialCooldownMultAdd += -0.1f; args.moveSpeedMultAdd += 0.1f; args.attackSpeedMultAdd += 0.1f; args.regenMultAdd += 0.1f; } else if (itemCount > 1) { args.primaryCooldownMultAdd += -0.1f + -0.1f * (float)(itemCount - 1); args.secondaryCooldownMultAdd += -0.1f + -0.1f * (float)(itemCount - 1); args.utilityCooldownMultAdd += -0.1f + -0.1f * (float)(itemCount - 1); args.specialCooldownMultAdd += -0.1f + -0.1f * (float)(itemCount - 1); args.moveSpeedMultAdd += 0.1f + 0.1f * (float)(itemCount - 1); args.attackSpeedMultAdd += 0.1f + 0.1f * (float)(itemCount - 1); args.regenMultAdd += 0.1f + 0.1f * (float)(itemCount - 1); } } } } internal class PerfectedAmbuyat { [CompilerGenerated] private static class <>O { public static hook_TakeDamage <0>__HealthComponent_TakeDamage; } public static ItemDef perfectedAmbuyat; public static void Init() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown perfectedAmbuyat = ScriptableObject.CreateInstance<ItemDef>(); perfectedAmbuyat.hidden = true; ((Object)perfectedAmbuyat).name = "PERFECTED_AMBUYAT_NAME"; perfectedAmbuyat.nameToken = "PERFECTED_AMBUYAT_NAME"; perfectedAmbuyat.pickupToken = "PERFECTED_AMBUYAT_PICKUP"; perfectedAmbuyat.descriptionToken = "PERFECTED_AMBUYAT_DESCRIPTION"; perfectedAmbuyat.loreToken = "PERFECTED_AMBUYAT_LORE"; perfectedAmbuyat.canRemove = false; ItemDef obj = perfectedAmbuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; perfectedAmbuyat.tier = (ItemTier)5; perfectedAmbuyat.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); perfectedAmbuyat.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(perfectedAmbuyat, val)); Hooks(); } public static void Hooks() { //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>__HealthComponent_TakeDamage; if (obj == null) { hook_TakeDamage val = HealthComponent_TakeDamage; <>O.<0>__HealthComponent_TakeDamage = val; obj = (object)val; } HealthComponent.TakeDamage += (hook_TakeDamage)obj; } public static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { CharacterBody body = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref body) && TryGetCount(body, out var count) && count > 0) { CharacterBody body2 = self.body; body2.armor *= 1f - (float)count * 0.01f; } orig.Invoke(self, damageInfo); } public static bool TryGetCount(CharacterBody body, out int count) { count = 0; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } count = body.inventory.GetItemCount(perfectedAmbuyat); return count > 0; } } internal class PullRouge { public static ItemDef pullRouge; public static void Init() { //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown pullRouge = ScriptableObject.CreateInstance<ItemDef>(); ((Object)pullRouge).name = "PULL_ROUGE_NAME"; pullRouge.nameToken = "PULL_ROUGE_NAME"; pullRouge.pickupToken = "PULL_ROUGE_PICKUP"; pullRouge.descriptionToken = "PULL_ROUGE_DESCRIPTION"; pullRouge.loreToken = "PULL_ROUGE_LORE"; pullRouge._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier2Def.asset").WaitForCompletion(); pullRouge.pickupIconSprite = Assets.mainBundle.LoadAsset<Sprite>("pullRouge"); pullRouge.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); pullRouge.canRemove = true; pullRouge.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(pullRouge, val)); } } internal class SelfFillingGatling { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; } public static ItemDef selfFillingGatling; public static void Init() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown selfFillingGatling = ScriptableObject.CreateInstance<ItemDef>(); ((Object)selfFillingGatling).name = "SELF_FILLING_GATLING_NAME"; selfFillingGatling.nameToken = "SELF_FILLING_GATLING_NAME"; selfFillingGatling.pickupToken = "SELF_FILLING_GATLING_PICKUP"; selfFillingGatling.descriptionToken = "SELF_FILLING_GATLING_DESCRIPTION"; selfFillingGatling.loreToken = "SELF_FILLING_GATLING_LORE"; selfFillingGatling.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; selfFillingGatling.tier = (ItemTier)1; selfFillingGatling._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier2Def.asset").WaitForCompletion(); selfFillingGatling.pickupIconSprite = Assets.mainBundle.LoadAsset<Sprite>("SelfFillingGatling"); selfFillingGatling.pickupModelPrefab = Assets.mainBundle.LoadAsset<GameObject>("SelfFillingGatling"); selfFillingGatling.canRemove = true; selfFillingGatling.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(selfFillingGatling, val)); Hooks(); } public static void Hooks() { //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>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(selfFillingGatling); if (itemCount == 1) { args.levelAttackSpeedAdd += 0.02f; } else if (itemCount > 1) { args.levelAttackSpeedAdd += 0.02f + 0.01f * (float)(itemCount - 1); } } } } internal class VoidAmbuyat { [CompilerGenerated] private static class <>O { public static hook_TakeDamage <0>__HealthComponent_TakeDamage; } public static ItemDef voidAmbuyat; public static float dodgeChance = 0.005f; public static void Init() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown voidAmbuyat = ScriptableObject.CreateInstance<ItemDef>(); voidAmbuyat.hidden = true; ((Object)voidAmbuyat).name = "VOID_AMBUYAT_NAME"; voidAmbuyat.nameToken = "VOID_AMBUYAT_NAME"; voidAmbuyat.pickupToken = "VOID_AMBUYAT_PICKUP"; voidAmbuyat.descriptionToken = "VOID_AMBUYAT_DESCRIPTION"; voidAmbuyat.loreToken = "VOID_AMBUYAT_LORE"; voidAmbuyat.canRemove = false; ItemDef obj = voidAmbuyat; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; voidAmbuyat.tier = (ItemTier)5; voidAmbuyat.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); voidAmbuyat.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemAPI.Add(new CustomItem(voidAmbuyat, val)); Hooks(); } public static void Hooks() { //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>__HealthComponent_TakeDamage; if (obj == null) { hook_TakeDamage val = HealthComponent_TakeDamage; <>O.<0>__HealthComponent_TakeDamage = val; obj = (object)val; } HealthComponent.TakeDamage += (hook_TakeDamage)obj; } public static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Invalid comparison between Unknown and I4 CharacterBody body = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref body) && TryGetCount(body, out var count) && (damageInfo.damageType & 0x40) <= 0 && count > 0 && Util.CheckRoll(VoidAmbuyatReductionPercentage(dodgeChance * (float)count), 0f, (CharacterMaster)null)) { damageInfo.rejected = true; } orig.Invoke(self, damageInfo); } public static bool TryGetCount(CharacterBody body, out int count) { count = 0; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } count = body.inventory.GetItemCount(voidAmbuyat); return count > 0; } public static float VoidAmbuyatReductionPercentage(float totalDodge) { return 1f - 100f / (200f + totalDodge) * 100f; } } } namespace MarixxeIsMithrix.Dots { public static class PoisonAmbuyatDOT { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static CustomDotBehaviour <>9__3_0; internal void <Init>b__3_0(DotController dotController, DotStack dotStack) { float damage = 0f; CharacterBody body = null; if (Object.op_Implicit((Object)(object)dotStack.attackerObject) && dotStack.attackerObject.TryGetComponent<CharacterBody>(ref body) && MalachiteAmbuyat.TryGetCount(body, out var count)) { damage = (float)count * 1f; } dotStack.damage = damage; } } public static DotIndex poisonAmbuyatDOTIndex; public static DotDef poisonAmbuyatDOTDef; public static CustomDotBehaviour poisonAmbuyatDOTBehavior; public static void Init() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown poisonAmbuyatDOTDef = new DotDef { associatedBuff = PoisonAmbuyat.poisonAmbuyat, damageCoefficient = 1f, damageColorIndex = MalachiteAmbuyatDoTColor.malachiteAmbuyatDoTColorIndex, interval = 1f, resetTimerOnAdd = true }; object obj = <>c.<>9__3_0; if (obj == null) { CustomDotBehaviour val = delegate(DotController dotController, DotStack dotStack) { float damage = 0f; CharacterBody body = null; if (Object.op_Implicit((Object)(object)dotStack.attackerObject) && dotStack.attackerObject.TryGetComponent<CharacterBody>(ref body) && MalachiteAmbuyat.TryGetCount(body, out var count)) { damage = (float)count * 1f; } dotStack.damage = damage; }; <>c.<>9__3_0 = val; obj = (object)val; } poisonAmbuyatDOTBehavior = (CustomDotBehaviour)obj; poisonAmbuyatDOTIndex = DotAPI.RegisterDotDef(poisonAmbuyatDOTDef, poisonAmbuyatDOTBehavior, (CustomDotVisual)null); } } } namespace MarixxeIsMithrix.Couleur { internal class CrystalDivergenceDamageColor { public static DamageColorIndex crystalDivergenceDamageColorIndex = (DamageColorIndex)0; public static Color crystalDivergenceDamageColor = Color32.op_Implicit(new Color32((byte)9, (byte)115, (byte)219, byte.MaxValue)); public static void Init() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) crystalDivergenceDamageColorIndex = ColorsAPI.RegisterDamageColor(crystalDivergenceDamageColor); } } internal class MalachiteAmbuyatDoTColor { public static DamageColorIndex malachiteAmbuyatDoTColorIndex = (DamageColorIndex)0; public static Color malachiteAmbuyatDoTColor = Color32.op_Implicit(new Color32((byte)15, (byte)240, (byte)15, byte.MaxValue)); public static void Init() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) malachiteAmbuyatDoTColorIndex = ColorsAPI.RegisterDamageColor(malachiteAmbuyatDoTColor); } } } namespace MarixxeIsMithrix.Buff { internal class Order { public static BuffDef order; public static void Init() { order = ScriptableObject.CreateInstance<BuffDef>(); order.canStack = true; order.isDebuff = true; order.isHidden = false; order.isCooldown = false; order.iconSprite = Assets.mainBundle.LoadAsset<Sprite>("Order"); ContentAddition.AddBuffDef(order); } } internal class PoisonAmbuyat { public static BuffDef poisonAmbuyat; public static void Init() { poisonAmbuyat = ScriptableObject.CreateInstance<BuffDef>(); poisonAmbuyat.canStack = true; poisonAmbuyat.isDebuff = true; poisonAmbuyat.isHidden = false; poisonAmbuyat.isCooldown = false; poisonAmbuyat.iconSprite = Assets.mainBundle.LoadAsset<Sprite>("Order"); ContentAddition.AddBuffDef(poisonAmbuyat); } } internal class SlowAmbuyat { public static BuffDef slowAmbuyat; public static void Init() { slowAmbuyat = ScriptableObject.CreateInstance<BuffDef>(); slowAmbuyat.canStack = true; slowAmbuyat.isDebuff = true; slowAmbuyat.isHidden = false; slowAmbuyat.isCooldown = false; slowAmbuyat.iconSprite = Assets.mainBundle.LoadAsset<Sprite>("Order"); ContentAddition.AddBuffDef(slowAmbuyat); } } }