using System;
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 EntityStates;
using EntityStates.BrotherMonster;
using EntityStates.FalseSonBoss;
using EntityStates.VoidInfestor;
using HG;
using IL.RoR2;
using IL.RoR2.Artifacts;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On;
using On.EntityStates.BrotherMonster;
using On.EntityStates.FalseSonBoss;
using On.RoR2;
using On.RoR2.Artifacts;
using On.RoR2.UI.LogBook;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Artifacts;
using RoR2.CharacterAI;
using RoR2.ExpansionManagement;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.UI;
using RoR2.UI.LogBook;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("VanillaArtifactsPlus")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+7fd25348d090733203e33c8b952e9617a6625e69")]
[assembly: AssemblyProduct("VanillaArtifactsPlus")]
[assembly: AssemblyTitle("VanillaArtifactsPlus")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace VanillaArtifactsPlus
{
public class Command
{
[CompilerGenerated]
private static class <>O
{
public static hook_RebuildPickupGroups <0>__AddEliteEquipmentsToCommand;
public static hook_IsEquipmentAvailable <1>__Make_EliteEquipmentAvailable;
}
public static void OnArtifactDisable()
{
}
public static void OnArtifactEnable()
{
}
public static void Start()
{
//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>__AddEliteEquipmentsToCommand;
if (obj == null)
{
hook_RebuildPickupGroups val = AddEliteEquipmentsToCommand;
<>O.<0>__AddEliteEquipmentsToCommand = val;
obj = (object)val;
}
PickupTransmutationManager.RebuildPickupGroups += (hook_RebuildPickupGroups)obj;
object obj2 = <>O.<1>__Make_EliteEquipmentAvailable;
if (obj2 == null)
{
hook_IsEquipmentAvailable val2 = Make_EliteEquipmentAvailable;
<>O.<1>__Make_EliteEquipmentAvailable = val2;
obj2 = (object)val2;
}
Run.IsEquipmentAvailable += (hook_IsEquipmentAvailable)obj2;
}
private static bool Make_EliteEquipmentAvailable(orig_IsEquipmentAvailable orig, Run self, EquipmentIndex equipmentIndex)
{
//IL_0001: 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_0024: Unknown result type (might be due to invalid IL or missing references)
EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(equipmentIndex);
if (Object.op_Implicit((Object)(object)equipmentDef) && Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef))
{
return !self.IsEquipmentExpansionLocked(equipmentIndex);
}
return orig.Invoke(self, equipmentIndex);
}
private static void AddEliteEquipmentsToCommand(orig_RebuildPickupGroups orig)
{
List<EquipmentDef> list = new List<EquipmentDef>();
for (int i = 0; i < EliteCatalog.eliteDefs.Length; i++)
{
EliteDef val = EliteCatalog.eliteDefs[i];
EquipmentDef eliteEquipmentDef = val.eliteEquipmentDef;
if ((Object)(object)eliteEquipmentDef != (Object)null && !((Object)val).name.EndsWith("Gold") && eliteEquipmentDef.dropOnDeathChance > 0f)
{
list.Add(eliteEquipmentDef);
eliteEquipmentDef.canDrop = true;
eliteEquipmentDef.isBoss = true;
eliteEquipmentDef.isLunar = false;
}
}
orig.Invoke();
for (int j = 0; j < list.Count; j++)
{
list[j].canDrop = false;
}
}
}
public class DevotionEquipmentHolder : MonoBehaviour
{
public EquipmentIndex equipmentIndex = (EquipmentIndex)(-1);
public void OnEnable()
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
CharacterBody component = ((Component)this).GetComponent<CharacterBody>();
if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory))
{
equipmentIndex = component.inventory.currentEquipmentIndex;
}
}
}
public class Devotion
{
[CompilerGenerated]
private static class <>O
{
public static hook_SetOptionsFromInteractor <0>__VoidForLemurians;
public static hook_DropScrapOnDeath <1>__ScrapForVoids;
public static hook_Start <2>__TeleportMoreOften;
public static hook_OnDevotedBodyDead <3>__RemoveVoidDiosLikeRegular;
public static Manipulator <4>__ExpellVoidInfestorsAtLow;
public static ArtifactStateChangeDelegate <5>__OnDevotionArtifactEnabled;
public static ArtifactStateChangeDelegate <6>__OnDevotionArtifactDisabled;
public static Manipulator <7>__NoFogLemurianDamage;
}
public static void Start()
{
//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
//IL_0069: 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_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_018d: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_010e: Unknown result type (might be due to invalid IL or missing references)
//IL_010f: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: 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_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Unknown result type (might be due to invalid IL or missing references)
//IL_0143: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: 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_0156: 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_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_016a: 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_021d: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Expected O, but got Unknown
//IL_026c: Unknown result type (might be due to invalid IL or missing references)
//IL_0271: Unknown result type (might be due to invalid IL or missing references)
//IL_0277: Expected O, but got Unknown
//IL_024a: Unknown result type (might be due to invalid IL or missing references)
//IL_024f: Unknown result type (might be due to invalid IL or missing references)
//IL_0255: Expected O, but got Unknown
//IL_028d: Unknown result type (might be due to invalid IL or missing references)
//IL_0292: Unknown result type (might be due to invalid IL or missing references)
//IL_0298: Expected O, but got Unknown
object obj = <>O.<0>__VoidForLemurians;
if (obj == null)
{
hook_SetOptionsFromInteractor val = VoidForLemurians;
<>O.<0>__VoidForLemurians = val;
obj = (object)val;
}
PickupPickerController.SetOptionsFromInteractor += (hook_SetOptionsFromInteractor)obj;
object obj2 = <>O.<1>__ScrapForVoids;
if (obj2 == null)
{
hook_DropScrapOnDeath val2 = ScrapForVoids;
<>O.<1>__ScrapForVoids = val2;
obj2 = (object)val2;
}
DevotionInventoryController.DropScrapOnDeath += (hook_DropScrapOnDeath)obj2;
object obj3 = <>O.<2>__TeleportMoreOften;
if (obj3 == null)
{
hook_Start val3 = TeleportMoreOften;
<>O.<2>__TeleportMoreOften = val3;
obj3 = (object)val3;
}
DevotedLemurianController.Start += (hook_Start)obj3;
GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lemurian/Fireball.prefab").WaitForCompletion();
GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LemurianBruiser/LemurianBigFireball.prefab").WaitForCompletion();
val4.GetComponent<ProjectileDamage>().damageType.damageSource = (DamageSource)1;
val5.GetComponent<ProjectileDamage>().damageType.damageSource = (DamageSource)1;
GameObject val6 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/DevotedLemurianBody.prefab").WaitForCompletion();
GameObject val7 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/DevotedLemurianBruiserBody.prefab").WaitForCompletion();
CharacterBody component = val6.GetComponent<CharacterBody>();
CharacterBody component2 = val7.GetComponent<CharacterBody>();
val6.AddComponent<DevotionEquipmentHolder>();
val7.AddComponent<DevotionEquipmentHolder>();
if (WConfig.DevotionFlags.Value)
{
component.bodyFlags = (BodyFlags)(component.bodyFlags | 1);
component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 1);
component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x8000);
component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x8000);
component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x800);
component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x800);
}
component.lavaCooldown = 2f;
component2.lavaCooldown = 2f;
GameObject val8 = Addressables.LoadAssetAsync<GameObject>((object)"90b219aa7b48e824384c5abd65c30f70").WaitForCompletion();
AISkillDriver[] components = val8.GetComponents<AISkillDriver>();
components[0].minTargetHealthFraction = 0f;
components[1].minTargetHealthFraction = 0f;
components[2].minTargetHealthFraction = 0f;
components[5].minTargetHealthFraction = 0f;
components[7].minTargetHealthFraction = 0f;
components[7].minDistance = 30f;
components[7].minUserHealthFraction = 40f;
object obj4 = <>O.<3>__RemoveVoidDiosLikeRegular;
if (obj4 == null)
{
hook_OnDevotedBodyDead val9 = RemoveVoidDiosLikeRegular;
<>O.<3>__RemoveVoidDiosLikeRegular = val9;
obj4 = (object)val9;
}
DevotedLemurianController.OnDevotedBodyDead += (hook_OnDevotedBodyDead)obj4;
if (WConfig.DevotionVoidInfestor.Value)
{
object obj5 = <>O.<4>__ExpellVoidInfestorsAtLow;
if (obj5 == null)
{
Manipulator val10 = ExpellVoidInfestorsAtLow;
<>O.<4>__ExpellVoidInfestorsAtLow = val10;
obj5 = (object)val10;
}
HealthComponent.UpdateLastHitTime += (Manipulator)obj5;
}
object obj6 = <>O.<5>__OnDevotionArtifactEnabled;
if (obj6 == null)
{
ArtifactStateChangeDelegate val11 = OnDevotionArtifactEnabled;
<>O.<5>__OnDevotionArtifactEnabled = val11;
obj6 = (object)val11;
}
RunArtifactManager.onArtifactEnabledGlobal += (ArtifactStateChangeDelegate)obj6;
object obj7 = <>O.<6>__OnDevotionArtifactDisabled;
if (obj7 == null)
{
ArtifactStateChangeDelegate val12 = OnDevotionArtifactDisabled;
<>O.<6>__OnDevotionArtifactDisabled = val12;
obj7 = (object)val12;
}
RunArtifactManager.onArtifactDisabledGlobal += (ArtifactStateChangeDelegate)obj7;
}
private static void OnDevotionArtifactEnabled(RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
{
//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
if (!((Object)(object)artifactDef != (Object)(object)Artifacts.Devotion) && WConfig.DevotionFlags.Value)
{
object obj = <>O.<7>__NoFogLemurianDamage;
if (obj == null)
{
Manipulator val = NoFogLemurianDamage;
<>O.<7>__NoFogLemurianDamage = val;
obj = (object)val;
}
FogDamageController.MyFixedUpdate += (Manipulator)obj;
}
}
private static void OnDevotionArtifactDisabled(RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
{
//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
if (!((Object)(object)artifactDef != (Object)(object)Artifacts.Devotion) && WConfig.DevotionFlags.Value)
{
object obj = <>O.<7>__NoFogLemurianDamage;
if (obj == null)
{
Manipulator val = NoFogLemurianDamage;
<>O.<7>__NoFogLemurianDamage = val;
obj = (object)val;
}
FogDamageController.MyFixedUpdate -= (Manipulator)obj;
}
}
private static void ExpellVoidInfestorsAtLow(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
{
(Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"),
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "fragileDamageBonus")
}))
{
val.EmitDelegate<Func<HealthComponent, HealthComponent>>((Func<HealthComponent, HealthComponent>)delegate(HealthComponent self)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Invalid comparison between Unknown and I4
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_0180: 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_018c: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Unknown result type (might be due to invalid IL or missing references)
DevotedLemurianController val2 = default(DevotedLemurianController);
if ((int)self.body.teamComponent.teamIndex == 4 && self.combinedHealthFraction < 0.05f && Object.op_Implicit((Object)(object)self.body.master) && ((Component)self.body.master).TryGetComponent<DevotedLemurianController>(ref val2))
{
DevotionEquipmentHolder devotionEquipmentHolder = default(DevotionEquipmentHolder);
if (((Component)self.body).TryGetComponent<DevotionEquipmentHolder>(ref devotionEquipmentHolder))
{
self.body.inventory.SetEquipmentIndex(devotionEquipmentHolder.equipmentIndex, true);
}
if (val2.DevotedEvolutionLevel == 1)
{
val2._devotionInventoryController.GenerateEliteBuff(self.body, val2, true);
}
else if (val2.DevotedEvolutionLevel >= 3)
{
val2._devotionInventoryController.GenerateEliteBuff(self.body, val2, true);
}
else
{
self.body.inventory.SetEquipmentIndex((EquipmentIndex)(-1), true);
}
BaseAI component = ((Component)self.body.master).GetComponent<BaseAI>();
if (Object.op_Implicit((Object)(object)component))
{
component.currentEnemy.Reset();
}
self.Networkhealth = self.fullCombinedHealth * 0.05f;
self.body.master.teamIndex = (TeamIndex)1;
self.body.teamComponent.teamIndex = (TeamIndex)1;
EffectManager.SimpleImpactEffect(Infest.successfulInfestEffectPrefab, ((Component)self).transform.position, Vector3.up, false);
Vector3 corePosition = self.body.corePosition;
GameObject val3 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/VoidInfestorMaster.prefab").WaitForCompletion(), corePosition, Quaternion.identity);
CharacterMaster component2 = val3.GetComponent<CharacterMaster>();
if (Object.op_Implicit((Object)(object)component2))
{
component2.teamIndex = (TeamIndex)4;
NetworkServer.Spawn(val3);
component2.SpawnBodyHere();
}
}
return self;
});
}
else
{
Debug.LogWarning((object)"IL Failed : IL.RoR2.FogDamageController.FixedUpdate");
}
}
private static void RemoveVoidDiosLikeRegular(orig_OnDevotedBodyDead orig, DevotedLemurianController self)
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
if (self._devotionInventoryController.HasItem(Items.ExtraLifeVoid))
{
self._devotionInventoryController.RemoveItem(Items.ExtraLifeVoid.itemIndex, 1);
}
else
{
orig.Invoke(self);
}
}
private static void NoFogLemurianDamage(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f),
(Instruction x) => ILPatternMatchingExt.MatchMul(x)
}))
{
val.Next.Operand = 0f;
}
else
{
Debug.LogWarning((object)"IL Failed : IL.RoR2.FogDamageController.FixedUpdate");
}
}
private static void ScrapForVoids(orig_DropScrapOnDeath orig, DevotionInventoryController self, ItemIndex devotionItem, CharacterBody minionBody)
{
//IL_0003: 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_0010: 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_00b0: 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_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: 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_0032: 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_005a: Expected I4, but got Unknown
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: 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_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: 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_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, devotionItem, minionBody);
PickupIndex val = PickupIndex.none;
ItemDef itemDef = ItemCatalog.GetItemDef(devotionItem);
if ((Object)(object)itemDef != (Object)null)
{
ItemTier tier = itemDef.tier;
ItemTier val2 = tier;
switch (val2 - 3)
{
case 0:
val = PickupCatalog.FindPickupIndex(MiscPickups.LunarCoin.miscPickupIndex);
break;
case 3:
val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapWhite");
break;
case 4:
val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapGreen");
break;
case 5:
val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapRed");
break;
case 6:
val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapYellow");
break;
case 7:
val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapWhite");
break;
}
}
if (val != PickupIndex.none)
{
PickupDropletController.CreatePickupDroplet(val, minionBody.corePosition, Vector3.down * 15f);
}
}
private static void TeleportMoreOften(orig_Start orig, DevotedLemurianController self)
{
orig.Invoke(self);
self._leashDistSq = 18000f;
}
private static void VoidForLemurians(orig_SetOptionsFromInteractor orig, PickupPickerController self, Interactor activator)
{
bool flag = Object.op_Implicit((Object)(object)((Component)self).GetComponent<LemurianEggController>());
if (flag)
{
ItemTierCatalog.GetItemTierDef((ItemTier)10).canScrap = true;
if (WConfig.DevotionAllowVoids.Value)
{
ItemTierCatalog.GetItemTierDef((ItemTier)6).canScrap = true;
ItemTierCatalog.GetItemTierDef((ItemTier)7).canScrap = true;
ItemTierCatalog.GetItemTierDef((ItemTier)8).canScrap = true;
}
if (WConfig.DevotionAllowLunars.Value)
{
ItemTierCatalog.GetItemTierDef((ItemTier)3).canScrap = true;
}
}
orig.Invoke(self, activator);
if (flag)
{
ItemTierCatalog.GetItemTierDef((ItemTier)10).canScrap = false;
if (WConfig.DevotionAllowVoids.Value)
{
ItemTierCatalog.GetItemTierDef((ItemTier)6).canScrap = false;
ItemTierCatalog.GetItemTierDef((ItemTier)7).canScrap = false;
ItemTierCatalog.GetItemTierDef((ItemTier)8).canScrap = false;
}
if (WConfig.DevotionAllowLunars.Value)
{
ItemTierCatalog.GetItemTierDef((ItemTier)3).canScrap = false;
}
}
}
}
public class Dissonance
{
[CompilerGenerated]
private static class <>O
{
public static hook_HandleMixEnemyArtifact <0>__FindSkinForSkinnedEnemies;
public static hook_RebuildCards <1>__DissoanceLunerEliteAll;
public static hook_Start <2>__HalcyoniteShrineInteractable_Start;
}
public static DirectorCard DissoGolem = null;
public static DirectorCard DissoTitan = null;
public static DirectorCard DissoVermin = null;
public static DirectorCard DissoVerminFlying = null;
public static DirectorCard DissoBeetle = null;
public static DirectorCard DissoBeetleGuard = null;
public static DirectorCard DissoBeetleQueen = null;
public static DirectorCardCategorySelection dccsShrineHalcyoniteDissonance = ScriptableObject.CreateInstance<DirectorCardCategorySelection>();
public static List<SpawnCard> LunarifiedList;
public static void Start()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Expected O, but got Unknown
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
//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_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Expected O, but got Unknown
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Expected O, but got Unknown
Mixenemymaker();
object obj = <>O.<0>__FindSkinForSkinnedEnemies;
if (obj == null)
{
hook_HandleMixEnemyArtifact val = FindSkinForSkinnedEnemies;
<>O.<0>__FindSkinForSkinnedEnemies = val;
obj = (object)val;
}
ClassicStageInfo.HandleMixEnemyArtifact += (hook_HandleMixEnemyArtifact)obj;
object obj2 = <>O.<1>__DissoanceLunerEliteAll;
if (obj2 == null)
{
hook_RebuildCards val2 = DissoanceLunerEliteAll;
<>O.<1>__DissoanceLunerEliteAll = val2;
obj2 = (object)val2;
}
ClassicStageInfo.RebuildCards += (hook_RebuildCards)obj2;
object obj3 = <>O.<2>__HalcyoniteShrineInteractable_Start;
if (obj3 == null)
{
hook_Start val3 = HalcyoniteShrineInteractable_Start;
<>O.<2>__HalcyoniteShrineInteractable_Start = val3;
obj3 = (object)val3;
}
HalcyoniteShrineInteractable.Start += (hook_Start)obj3;
dccsShrineHalcyoniteDissonance.AddCategory("Golem", 10f);
dccsShrineHalcyoniteDissonance.AddCard(0, new DirectorCard
{
preventOverhead = false,
selectionWeight = 10
});
((Object)dccsShrineHalcyoniteDissonance).name = "dccsShrineHalcyoniteDissonance";
}
private static void PerfectedVoidForRelevantStage(orig_OnEnable orig, DirectorCore self)
{
orig.Invoke(self);
if (!NetworkServer.active || !Object.op_Implicit((Object)(object)RunArtifactManager.instance) || !RunArtifactManager.instance.IsArtifactEnabled(Artifacts.MixEnemy))
{
return;
}
string baseSceneName = SceneInfo.instance.sceneDef.baseSceneName;
if (baseSceneName == "moon2")
{
CombatDirector[] components = ((Component)self).GetComponents<CombatDirector>();
CombatDirector[] array = components;
foreach (CombatDirector val in array)
{
((UnityEvent<GameObject>)(object)val.onSpawnedServer).AddListener((UnityAction<GameObject>)PerfectedDissonanceOnMoon3);
}
CombatDirector component = GameObject.Find("SceneInfo/BrotherMissionController/BrotherEncounter, Phase 2/PhaseObjects/CombatDirector").GetComponent<CombatDirector>();
CombatDirector component2 = GameObject.Find("SceneInfo/BrotherMissionController/BrotherEncounter, Phase 3/PhaseObjects/CombatDirector").GetComponent<CombatDirector>();
((UnityEvent<GameObject>)(object)component.onSpawnedServer).AddListener((UnityAction<GameObject>)PerfectedDissonanceOnMoon);
((UnityEvent<GameObject>)(object)component2.onSpawnedServer).AddListener((UnityAction<GameObject>)PerfectedDissonanceOnMoon);
}
}
private static void HalcyoniteShrineInteractable_Start(orig_Start orig, HalcyoniteShrineInteractable self)
{
//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_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: 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);
if (!RunArtifactManager.instance.IsArtifactEnabled(Artifacts.MixEnemy))
{
return;
}
int num = (int)(self.monsterCredit * 0.6f);
WeightedSelection<DirectorCard> val = RoR2Content.mixEnemyMonsterCards.GenerateDirectorCardWeightedSelection();
int num2 = val.Count;
while (num2 > 0)
{
num2--;
if (val.GetChoice(num2).value.cost > num)
{
val.RemoveChoice(num2);
}
}
DirectorCard val2 = val.Evaluate(ClassicStageInfo.instance.rng.nextNormalizedFloat);
Debug.Log((object)("Halcyonite Card: " + (object)val2.GetSpawnCard()));
dccsShrineHalcyoniteDissonance.categories[0].cards[0].spawnCard = val2.GetSpawnCard();
dccsShrineHalcyoniteDissonance.categories[0].cards[0].spawnDistance = val2.spawnDistance;
self.activationDirector.eliteBias = 1.5f;
self.activationDirector.monsterCards = dccsShrineHalcyoniteDissonance;
}
public static void VoidElitesVoidStage(GameObject masterObject)
{
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Invalid comparison between Unknown and I4
//IL_0050: 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)
if (Run.instance.spawnRng.RangeInt(0, 3) == 0)
{
CharacterMaster component = masterObject.GetComponent<CharacterMaster>();
if (Object.op_Implicit((Object)(object)component) && component.hasBody && (int)component.inventory.currentEquipmentIndex == -1 && !((Enum)component.GetBody().bodyFlags).HasFlag((Enum)(object)(BodyFlags)1024))
{
component.inventory.SetEquipmentIndex(Equipment.EliteVoidEquipment.equipmentIndex);
}
}
}
public static void PerfectedDissonanceOnMoon3(GameObject masterObject)
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Invalid comparison between Unknown and I4
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
Inventory component = masterObject.GetComponent<Inventory>();
if ((int)component.currentEquipmentIndex == -1 && Run.instance.spawnRng.nextBool)
{
component.SetEquipmentIndex(Equipment.AffixLunar.equipmentIndex);
}
}
public static void PerfectedDissonanceOnMoon(GameObject masterObject)
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)masterObject).name.StartsWith("Lun"))
{
Inventory component = masterObject.GetComponent<Inventory>();
component.GiveItem(Items.BoostHp, 10);
component.SetEquipmentIndex(Equipment.AffixLunar.equipmentIndex);
}
}
public static void Mixenemymaker()
{
//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_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_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0219: Unknown result type (might be due to invalid IL or missing references)
//IL_0220: Unknown result type (might be due to invalid IL or missing references)
//IL_0225: 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_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_0248: Expected O, but got Unknown
DirectorCardCategorySelection val = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/MixEnemy/dccsMixEnemy.asset").WaitForCompletion();
DirectorCard val2 = new DirectorCard
{
spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav"),
preventOverhead = false,
selectionWeight = 1,
minimumStageCompletions = 0,
spawnDistance = (MonsterSpawnDistance)0
};
val.categories[0].selectionWeight = 3f;
val.categories[1].selectionWeight = 3f;
val.categories[2].selectionWeight = 4f;
val.categories[3].cards = val.categories[3].cards.Remove(val.categories[3].cards[0]);
val.AddCard(0, val2);
DissoVermin = val.categories[2].cards[11];
DissoVerminFlying = val.categories[2].cards[2];
DissoBeetle = val.categories[2].cards[1];
DissoBeetleGuard = val.categories[1].cards[0];
DissoBeetleQueen = val.categories[0].cards[0];
DissoGolem = val.categories[1].cards[5];
DissoTitan = val.categories[0].cards[9];
val.AddCard(0, val.categories[1].cards[10]);
val.AddCard(0, val.categories[1].cards[14]);
ArrayUtils.ArrayRemoveAtAndResize<DirectorCard>(ref val.categories[1].cards, 10, 1);
ArrayUtils.ArrayRemoveAtAndResize<DirectorCard>(ref val.categories[1].cards, 14, 1);
val.categories[2].cards[9].spawnDistance = (MonsterSpawnDistance)1;
val.categories[2].cards[12].spawnDistance = (MonsterSpawnDistance)1;
val.AddCard(2, new DirectorCard
{
spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscHermitCrab"),
selectionWeight = 1,
spawnDistance = (MonsterSpawnDistance)2
});
}
public static void DissoanceLunerEliteAll(orig_RebuildCards orig, ClassicStageInfo self, DirectorCardCategorySelection forcedMonsterCategory, DirectorCardCategorySelection forcedInteractableCategory)
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Invalid comparison between Unknown and I4
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, forcedMonsterCategory, forcedInteractableCategory);
if (!((Object)(object)self != (Object)null))
{
return;
}
if (LunarifiedList != null)
{
for (int i = 0; i < LunarifiedList.Count; i++)
{
LunarifiedList[i].eliteRules = (EliteRules)0;
}
LunarifiedList = null;
}
if (!Object.op_Implicit((Object)(object)RunArtifactManager.instance) || !RunArtifactManager.instance.IsArtifactEnabled(Artifacts.mixEnemyArtifactDef))
{
return;
}
if (LunarifiedList == null)
{
LunarifiedList = new List<SpawnCard>();
}
string baseSceneName = SceneInfo.instance.sceneDef.baseSceneName;
if (!(baseSceneName == "moon2") && !(baseSceneName == "itmoon"))
{
return;
}
Debug.Log((object)"Dissonance : Lunar Stage");
WeightedSelection<DirectorCard> monsterSelection = ClassicStageInfo.instance.monsterSelection;
for (int j = 0; j < monsterSelection.Count; j++)
{
SpawnCard spawnCard = monsterSelection.GetChoice(j).value.GetSpawnCard();
if ((int)spawnCard.eliteRules == 0)
{
LunarifiedList.Add(spawnCard);
spawnCard.eliteRules = (EliteRules)2;
}
}
}
public static void FindSkinForSkinnedEnemies(orig_HandleMixEnemyArtifact orig, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng)
{
//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_006a: 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_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0107: 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_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: 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_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
//IL_0221: Unknown result type (might be due to invalid IL or missing references)
//IL_0226: Unknown result type (might be due to invalid IL or missing references)
//IL_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_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0302: 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_0245: Unknown result type (might be due to invalid IL or missing references)
//IL_036b: Unknown result type (might be due to invalid IL or missing references)
//IL_0370: Unknown result type (might be due to invalid IL or missing references)
//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
//IL_031c: Unknown result type (might be due to invalid IL or missing references)
//IL_0321: Unknown result type (might be due to invalid IL or missing references)
//IL_038a: Unknown result type (might be due to invalid IL or missing references)
//IL_038f: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(monsterCategories, rng);
if (DissoTitan != null)
{
switch (rng.RangeInt(1, 5))
{
case 1:
DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanBlackBeach.asset").WaitForCompletion();
break;
case 2:
DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanDampCave.asset").WaitForCompletion();
break;
case 3:
DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGolemPlains.asset").WaitForCompletion();
break;
case 4:
DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGooLake.asset").WaitForCompletion();
break;
}
}
if (DissoGolem != null)
{
switch (rng.RangeInt(1, 5))
{
case 1:
DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolem.asset").WaitForCompletion();
break;
case 2:
DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemNature.asset").WaitForCompletion();
break;
case 3:
DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemSandy.asset").WaitForCompletion();
break;
case 4:
DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemSnowy.asset").WaitForCompletion();
break;
}
}
if (DissoVermin != null)
{
switch (rng.RangeInt(1, 3))
{
case 1:
DissoVermin.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/Vermin/cscVermin.asset").WaitForCompletion();
break;
case 2:
DissoVermin.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/Vermin/cscVerminSnowy.asset").WaitForCompletion();
break;
}
}
if (DissoVerminFlying != null)
{
switch (rng.RangeInt(1, 3))
{
case 1:
DissoVerminFlying.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/FlyingVermin/cscFlyingVermin.asset").WaitForCompletion();
break;
case 2:
DissoVerminFlying.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/FlyingVermin/cscFlyingVerminSnowy.asset").WaitForCompletion();
break;
}
}
if (DissoBeetle != null)
{
switch (rng.RangeInt(1, 3))
{
case 1:
DissoBeetle.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetle.asset").WaitForCompletion();
break;
case 2:
DissoBeetle.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetleSulfur.asset").WaitForCompletion();
break;
}
}
if (DissoBeetleGuard != null)
{
switch (rng.RangeInt(1, 3))
{
case 1:
DissoBeetleGuard.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"03978ad4a8751804a80940d5cfd4038b").WaitForCompletion();
break;
case 2:
DissoBeetleGuard.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"00c29c914e813454384bddaf6271eff1").WaitForCompletion();
break;
}
}
if (DissoBeetleQueen != null)
{
switch (rng.RangeInt(1, 3))
{
case 1:
DissoBeetleQueen.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"56a5ee1553328b34eb5996e7f77710c9").WaitForCompletion();
break;
case 2:
DissoBeetleQueen.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"0414c8a55b86c1d4e81037e3a7e45788").WaitForCompletion();
break;
}
}
}
}
public class Enigma
{
[CompilerGenerated]
private static class <>O
{
public static hook_CalculateEquipmentCooldownScale <0>__EnigmaCooldownReduction;
public static Action<EquipmentSlot, EquipmentIndex> <1>__EquipmentSlot_onServerEquipmentActivated;
public static Action <2>__SetTier;
public static Action <3>__SetLang;
public static hook_BuildPickupEntries <4>__LogBookController_BuildPickupEntries;
public static hook_GetPickupStatus <5>__LogBookController_GetPickupStatus;
}
public static ItemTierDef artifactItemTier = null;
public static ItemDef enigmaFragmentDef = null;
public static ItemDef eliteEnigmaFragmentDef = null;
public static float EnigmaFragmentCooldownReduction = 0.88f;
public static Color CustomColor = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)24));
public static void Start()
{
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
if (!WConfig.EnigmaInterrupt.Value)
{
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BossHunter").enigmaCompatible = false;
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BossHunterConsumed").enigmaCompatible = false;
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Recycle").enigmaCompatible = false;
}
if (WConfig.EnigmaMovement.Value)
{
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Jetpack").enigmaCompatible = true;
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/FireBallDash").enigmaCompatible = true;
}
else
{
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Jetpack").enigmaCompatible = false;
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/FireBallDash").enigmaCompatible = false;
}
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Tonic").enigmaCompatible = false;
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Meteor").enigmaCompatible = false;
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BurnNearby").enigmaCompatible = false;
LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/CrippleWard").enigmaCompatible = true;
Addressables.LoadAssetAsync<BuffDef>((object)"0cabe49fb119dcf4188d2a8c2e65edd2").WaitForCompletion().eliteDef = null;
}
public static void MakeEnigmaFragment()
{
//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_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Expected O, but got Unknown
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Expected O, but got Unknown
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0201: Unknown result type (might be due to invalid IL or missing references)
//IL_020b: Expected O, but got Unknown
//IL_0232: Unknown result type (might be due to invalid IL or missing references)
//IL_0237: Unknown result type (might be due to invalid IL or missing references)
//IL_0347: 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_0360: Expected O, but got Unknown
//IL_021c: Unknown result type (might be due to invalid IL or missing references)
//IL_0221: Unknown result type (might be due to invalid IL or missing references)
//IL_0227: Expected O, but got Unknown
artifactItemTier = ScriptableObject.CreateInstance<ItemTierDef>();
((Object)artifactItemTier).name = "ArtifactItemsItemTierDef";
artifactItemTier.isDroppable = false;
if (WConfig.DisplayEnigmaInLog.Value)
{
artifactItemTier.isDroppable = true;
}
artifactItemTier.canScrap = false;
artifactItemTier.canRestack = true;
artifactItemTier.colorIndex = (ColorIndex)24;
artifactItemTier.darkColorIndex = (ColorIndex)24;
artifactItemTier.tier = (ItemTier)11;
artifactItemTier.bgIconTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/ArtifactsVanilla/artifactBg.png");
ContentAddition.AddItemTierDef(artifactItemTier);
GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/PickupModels/Artifacts/PickupEnigma"), "PickupEnigmaFragment", false);
GameObject val2 = new GameObject("cameraPos");
GameObject val3 = new GameObject("focusPoint");
val2.transform.SetParent(val.transform, false);
val3.transform.SetParent(val.transform, false);
val2.transform.localPosition = new Vector3(-1.5f, 1f, 3f);
ModelPanelParameters val4 = val.AddComponent<ModelPanelParameters>();
val4.cameraPositionTransform = val2.transform;
val4.focusPointTransform = val3.transform;
GameObject val5 = PrefabAPI.InstantiateClone(val, "PickupEnigmaFragmentElite", false);
enigmaFragmentDef = ScriptableObject.CreateInstance<ItemDef>();
((Object)enigmaFragmentDef).name = "EnigmaFragment";
enigmaFragmentDef.nameToken = "ITEM_ENIGMAFRAGMENT_NAME";
enigmaFragmentDef.pickupToken = "ITEM_ENIGMAFRAGMENT_PICKUP";
enigmaFragmentDef.descriptionToken = "ITEM_ENIGMAFRAGMENT_DESC";
enigmaFragmentDef.pickupIconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/ArtifactsVanilla/enigmaFragment.png");
enigmaFragmentDef.pickupModelPrefab = val;
enigmaFragmentDef.loreToken = "";
enigmaFragmentDef.hidden = false;
enigmaFragmentDef.canRemove = false;
ItemDef obj = enigmaFragmentDef;
ItemTag[] array = new ItemTag[3];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
obj.tags = (ItemTag[])(object)array;
enigmaFragmentDef.deprecatedTier = (ItemTier)5;
ItemAPI.Add(new CustomItem(enigmaFragmentDef, Array.Empty<ItemDisplayRule>()));
object obj2 = <>O.<0>__EnigmaCooldownReduction;
if (obj2 == null)
{
hook_CalculateEquipmentCooldownScale val6 = EnigmaCooldownReduction;
<>O.<0>__EnigmaCooldownReduction = val6;
obj2 = (object)val6;
}
Inventory.CalculateEquipmentCooldownScale += (hook_CalculateEquipmentCooldownScale)obj2;
Material val7 = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"926e293c755c1964bb9a6612e94e76df").WaitForCompletion());
MeshRenderer component = ((Component)val5.transform.GetChild(0)).GetComponent<MeshRenderer>();
val7.SetTexture("_NormalTex", ((Renderer)component).material.GetTexture("_NormalTex"));
val7.SetFloat("_NormalStrength", 2f);
((Renderer)component).material = val7;
eliteEnigmaFragmentDef = ScriptableObject.CreateInstance<ItemDef>();
((Object)eliteEnigmaFragmentDef).name = "EnigmaFragmentElite";
eliteEnigmaFragmentDef.nameToken = "ITEM_ENIGMAFRAGMENTELITE_NAME";
eliteEnigmaFragmentDef.pickupToken = "ITEM_ENIGMAFRAGMENTELITE_PICKUP";
eliteEnigmaFragmentDef.descriptionToken = "ITEM_ENIGMAFRAGMENTELITE_DESC";
eliteEnigmaFragmentDef.pickupIconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/ArtifactsVanilla/enigmaFragmentElite.png");
eliteEnigmaFragmentDef.pickupModelPrefab = val5;
eliteEnigmaFragmentDef.loreToken = "";
eliteEnigmaFragmentDef.hidden = false;
eliteEnigmaFragmentDef.canRemove = false;
ItemDef obj3 = eliteEnigmaFragmentDef;
ItemTag[] array2 = new ItemTag[3];
RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
obj3.tags = (ItemTag[])(object)array2;
eliteEnigmaFragmentDef.deprecatedTier = (ItemTier)5;
ItemAPI.Add(new CustomItem(eliteEnigmaFragmentDef, Array.Empty<ItemDisplayRule>()));
EquipmentSlot.onServerEquipmentActivated += EquipmentSlot_onServerEquipmentActivated;
((ResourceAvailability)(ref ItemTierCatalog.availability)).CallWhenAvailable((Action)SetTier);
((ResourceAvailability)(ref ArtifactCatalog.availability)).CallWhenAvailable((Action)SetLang);
}
public static void SetLang()
{
Artifacts.Enigma.descriptionToken = "ARTIFACT_ENIGMA_NEW_DESCRIPTION";
}
public static void SetTier()
{
//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)
enigmaFragmentDef._itemTierDef = artifactItemTier;
eliteEnigmaFragmentDef._itemTierDef = artifactItemTier;
artifactItemTier.dropletDisplayPrefab = LegacyResourcesAPI.LoadAsync<GameObject>("Prefabs/ItemPickups/EquipmentOrb").WaitForCompletion();
}
private static void EquipmentSlot_onServerEquipmentActivated(EquipmentSlot self, EquipmentIndex eq)
{
//IL_003b: 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_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Invalid comparison between Unknown and I4
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
if (!Object.op_Implicit((Object)(object)self.characterBody) || !Object.op_Implicit((Object)(object)self.inventory))
{
return;
}
int itemCount = self.inventory.GetItemCount(eliteEnigmaFragmentDef);
if (itemCount > 0)
{
EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(eq);
BuffIndex val = BuffCatalog.eliteBuffIndices[self.rng.RangeInt(0, BuffCatalog.eliteBuffIndices.Length)];
if ((int)val != -1)
{
self.characterBody.AddTimedBuff(val, equipmentDef.cooldown * 0.75f * (float)itemCount);
}
}
}
private static float EnigmaCooldownReduction(orig_CalculateEquipmentCooldownScale orig, Inventory self)
{
int itemCount = self.GetItemCount(enigmaFragmentDef);
if (itemCount > 0)
{
float num = orig.Invoke(self);
return num * Mathf.Pow(EnigmaFragmentCooldownReduction, (float)itemCount);
}
return orig.Invoke(self);
}
public static void CallLate()
{
//IL_0039: 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_005d: 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_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Expected O, but got Unknown
//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_0123: Expected O, but got Unknown
int num = (int)((1f - EnigmaFragmentCooldownReduction) * 100f);
LanguageAPI.Add("ITEM_ENIGMAFRAGMENT_DESC", string.Format(Language.GetString("ITEM_ENIGMAFRAGMENT_DESC"), num));
EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(EquipmentCatalog.FindEquipmentIndex("EQUIPMENT_IMPULSEFROSTSHIELD"));
if ((Object)(object)equipmentDef != (Object)null)
{
equipmentDef.enigmaCompatible = false;
EquipmentCatalog.enigmaEquipmentList.Remove(equipmentDef.equipmentIndex);
}
equipmentDef = EquipmentCatalog.GetEquipmentDef(EquipmentCatalog.FindEquipmentIndex("EQUIPMENT_REUSER"));
if ((Object)(object)equipmentDef != (Object)null)
{
equipmentDef.enigmaCompatible = false;
EquipmentCatalog.enigmaEquipmentList.Remove(equipmentDef.equipmentIndex);
}
equipmentDef = EquipmentCatalog.GetEquipmentDef(EquipmentCatalog.FindEquipmentIndex("EQUIPMENT_Reducer"));
if ((Object)(object)equipmentDef != (Object)null)
{
equipmentDef.enigmaCompatible = false;
EquipmentCatalog.enigmaEquipmentList.Remove(equipmentDef.equipmentIndex);
}
if ((Object)(object)enigmaFragmentDef != (Object)null)
{
object obj = <>O.<4>__LogBookController_BuildPickupEntries;
if (obj == null)
{
hook_BuildPickupEntries val = LogBookController_BuildPickupEntries;
<>O.<4>__LogBookController_BuildPickupEntries = val;
obj = (object)val;
}
LogBookController.BuildPickupEntries += (hook_BuildPickupEntries)obj;
object obj2 = <>O.<5>__LogBookController_GetPickupStatus;
if (obj2 == null)
{
hook_GetPickupStatus val2 = LogBookController_GetPickupStatus;
<>O.<5>__LogBookController_GetPickupStatus = val2;
obj2 = (object)val2;
}
LogBookController.GetPickupStatus += (hook_GetPickupStatus)obj2;
}
}
private static EntryStatus LogBookController_GetPickupStatus(orig_GetPickupStatus orig, ref Entry entry, UserProfile viewerProfile)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Invalid comparison between Unknown and I4
//IL_006c: 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_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
PickupIndex val = (PickupIndex)entry.extraData;
PickupDef pickupDef = PickupCatalog.GetPickupDef(val);
ItemIndex val2 = (ItemIndex)((pickupDef == null) ? (-1) : ((int)pickupDef.itemIndex));
if ((int)val2 != -1)
{
ItemDef itemDef = ItemCatalog.GetItemDef(val2);
if ((Object)(object)itemDef._itemTierDef == (Object)(object)artifactItemTier && viewerProfile.HasUnlockable(itemDef.unlockableDef))
{
return (EntryStatus)4;
}
}
return orig.Invoke(ref entry, viewerProfile);
}
private static Entry[] LogBookController_BuildPickupEntries(orig_BuildPickupEntries orig, Dictionary<ExpansionDef, bool> expansionAvailability)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: 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_0043: 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)
if (Object.op_Implicit((Object)(object)enigmaFragmentDef))
{
UnlockableDef unlockableDef = Addressables.LoadAssetAsync<UnlockableDef>((object)"5f4704377f63edd48930460f5aa7a964").WaitForCompletion();
enigmaFragmentDef.unlockableDef = unlockableDef;
eliteEnigmaFragmentDef.unlockableDef = unlockableDef;
PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(enigmaFragmentDef.itemIndex)).unlockableDef = unlockableDef;
PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(eliteEnigmaFragmentDef.itemIndex)).unlockableDef = unlockableDef;
}
Entry[] result = orig.Invoke(expansionAvailability);
artifactItemTier.isDroppable = false;
return result;
}
public static GenericPickupController EnigmaFragmentMaker(orig_CreatePickup orig, ref CreatePickupInfo createPickupInfo)
{
//IL_0002: 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_0017: Invalid comparison between Unknown and I4
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
PickupDef pickupDef = PickupCatalog.GetPickupDef(((CreatePickupInfo)(ref createPickupInfo)).pickupIndex);
if (pickupDef != null && (int)pickupDef.equipmentIndex != -1)
{
EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(pickupDef.equipmentIndex);
bool flag = Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef) && equipmentDef.passiveBuffDef.isElite;
bool flag2 = false;
if (flag)
{
flag2 = true;
((CreatePickupInfo)(ref createPickupInfo)).pickupIndex = PickupCatalog.FindPickupIndex(eliteEnigmaFragmentDef.itemIndex);
}
else if (equipmentDef.enigmaCompatible)
{
flag2 = true;
((CreatePickupInfo)(ref createPickupInfo)).pickupIndex = PickupCatalog.FindPickupIndex(enigmaFragmentDef.itemIndex);
}
GenericPickupController val = orig.Invoke(ref createPickupInfo);
if (flag2 && Object.op_Implicit((Object)(object)((Component)val).gameObject) && Object.op_Implicit((Object)(object)val.pickupDisplay))
{
Util.PlaySound("Play_item_proc_crit_cooldown", ((Component)val).gameObject);
if (flag)
{
val.pickupDisplay.tier3ParticleEffect.SetActive(true);
val.pickupDisplay.bossParticleEffect.SetActive(true);
}
else
{
val.pickupDisplay.tier1ParticleEffect.SetActive(true);
}
val.pickupDisplay.equipmentParticleEffect.SetActive(true);
}
return val;
}
return orig.Invoke(ref createPickupInfo);
}
public static void EnigmaEquipmentGranter(orig_AttemptGrant orig, GenericPickupController self, CharacterBody body)
{
//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_000a: 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_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Invalid comparison between Unknown and I4
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Invalid comparison between Unknown and I4
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: 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_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Expected O, but got Unknown
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: 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_00ed: Expected O, but got Unknown
//IL_0159: 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_0179: 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_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_014f: Unknown result type (might be due to invalid IL or missing references)
//IL_0154: Unknown result type (might be due to invalid IL or missing references)
PickupIndex pickupIndex = self.pickupIndex;
EquipmentIndex equipmentIndex = ((PickupIndex)(ref pickupIndex)).equipmentIndex;
if ((int)equipmentIndex == -1)
{
orig.Invoke(self, body);
return;
}
bool flag = (int)body.inventory.currentEquipmentIndex != -1;
if (!flag && PickupCatalog.GetPickupDef(self.pickupIndex).itemIndex == enigmaFragmentDef.itemIndex)
{
self.pickupIndex = PickupCatalog.FindPickupIndex(EnigmaArtifactManager.GetRandomEquipment(EnigmaArtifactManager.serverInitialEquipmentRng, 0));
Util.PlaySound("Play_UI_insufficient_funds", ((Component)self).gameObject);
Util.PlaySound("Play_UI_insufficient_funds", ((Component)self).gameObject);
if (((NetworkBehaviour)body.master).hasAuthority)
{
CharacterMasterNotificationQueue notificationQueueForMaster = CharacterMasterNotificationQueue.GetNotificationQueueForMaster(body.master);
TransformationInfo val = new TransformationInfo((TransformationType)0, (object)enigmaFragmentDef);
pickupIndex = self.pickupIndex;
NotificationInfo val2 = new NotificationInfo((object)EquipmentCatalog.GetEquipmentDef(((PickupIndex)(ref pickupIndex)).pickupDef.equipmentIndex), val, false, 0);
notificationQueueForMaster.PushNotification(val2, 6f);
}
}
orig.Invoke(self, body);
if (flag)
{
EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(equipmentIndex);
EquipmentIndex equipmentIndex2 = Equipment.Fruit.equipmentIndex;
if (Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef) && equipmentDef.passiveBuffDef.isElite)
{
equipmentIndex2 = Equipment.AffixRed.equipmentIndex;
}
CreatePickupInfo val3 = default(CreatePickupInfo);
val3.position = ((Component)self).transform.position;
val3.rotation = ((Component)self).transform.rotation;
((CreatePickupInfo)(ref val3)).pickupIndex = PickupCatalog.FindPickupIndex(equipmentIndex2);
GenericPickupController.CreatePickup(ref val3);
Object.Destroy((Object)(object)((Component)self).gameObject);
}
}
}
public class Evolution
{
[CompilerGenerated]
private static class <>O
{
public static Manipulator <0>__Evolution_MoreItems;
public static hook_OnServerCardSpawnedGlobal <1>__Evo_VoidTeamCorrupted;
}
public static BasicPickupDropTable dtMonsterTeamLunarItem = ScriptableObject.CreateInstance<BasicPickupDropTable>();
public static ItemTag evoBlacklist = (ItemTag)94;
public static void Start()
{
//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_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Expected I4, but got Unknown
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_0128: Expected O, but got Unknown
//IL_00fb: 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_0106: Expected O, but got Unknown
BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier1Item.asset").WaitForCompletion();
BasicPickupDropTable val2 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier2Item.asset").WaitForCompletion();
BasicPickupDropTable val3 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier3Item.asset").WaitForCompletion();
ItemTag[] array = new ItemTag[7];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
array[6] = (ItemTag)(int)evoBlacklist;
ItemTag[] bannedItemTags = (val3.bannedItemTags = (val2.bannedItemTags = (val.bannedItemTags = (ItemTag[])(object)array)));
dtMonsterTeamLunarItem.bannedItemTags = bannedItemTags;
dtMonsterTeamLunarItem.tier1Weight = 0f;
dtMonsterTeamLunarItem.tier2Weight = 0f;
dtMonsterTeamLunarItem.tier3Weight = 0f;
dtMonsterTeamLunarItem.lunarItemWeight = 1f;
((PickupDropTable)dtMonsterTeamLunarItem).canDropBeReplaced = false;
((Object)dtMonsterTeamLunarItem).name = "dtMonsterTeamLunarItem";
if (!Chainloader.PluginInfos.ContainsKey("com.Moffein.EvolutionConfig"))
{
object obj = <>O.<0>__Evolution_MoreItems;
if (obj == null)
{
Manipulator val4 = Evolution_MoreItems;
<>O.<0>__Evolution_MoreItems = val4;
obj = (object)val4;
}
MonsterTeamGainsItemsArtifactManager.GrantMonsterTeamItem += (Manipulator)obj;
}
object obj2 = <>O.<1>__Evo_VoidTeamCorrupted;
if (obj2 == null)
{
hook_OnServerCardSpawnedGlobal val5 = Evo_VoidTeamCorrupted;
<>O.<1>__Evo_VoidTeamCorrupted = val5;
obj2 = (object)val5;
}
MonsterTeamGainsItemsArtifactManager.OnServerCardSpawnedGlobal += (hook_OnServerCardSpawnedGlobal)obj2;
}
private static void Evo_VoidTeamCorrupted(orig_OnServerCardSpawnedGlobal orig, SpawnResult spawnResult)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: 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_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Invalid comparison between Unknown and I4
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(spawnResult);
CharacterMaster val = (Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) ? spawnResult.spawnedInstance.GetComponent<CharacterMaster>() : null);
if (!Object.op_Implicit((Object)(object)val) || (int)val.teamIndex != 4)
{
return;
}
val.inventory.AddItemsFrom(MonsterTeamGainsItemsArtifactManager.monsterTeamInventory);
Enumerator<TransformationInfo> enumerator = ContagiousItemManager.transformationInfos.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
TransformationInfo current = enumerator.Current;
ContagiousItemManager.TryForceReplacement(val.inventory, current.originalItem);
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
private static void Evolution_MoreItems(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1),
(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Inventory", "GiveItemPermanent")
}))
{
val.EmitDelegate<Func<ItemIndex, ItemIndex>>((Func<ItemIndex, ItemIndex>)delegate(ItemIndex item)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Invalid comparison between Unknown and I4
//IL_0061: 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_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)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: 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_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)
//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)
ItemDef itemDef = ItemCatalog.GetItemDef(item);
if ((int)itemDef.tier == 3)
{
UniquePickup val2 = ((PickupDropTable)dtMonsterTeamLunarItem).GeneratePickup(MonsterTeamGainsItemsArtifactManager.treasureRng);
if (val2.pickupIndex != PickupIndex.none)
{
PickupDef pickupDef = PickupCatalog.GetPickupDef(val2.pickupIndex);
if (pickupDef != null)
{
return pickupDef.itemIndex;
}
}
}
return item;
});
val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1)
});
val.EmitDelegate<Func<int, int>>((Func<int, int>)delegate(int amount)
{
if (WConfig.EvoMoreItems.Value)
{
bool flag = false;
if (WConfig.EvoMoreAfterLoop.Value && MonsterTeamGainsItemsArtifactManager.currentItemIterator > 5)
{
flag = true;
}
else if (!WConfig.EvoMoreAfterLoop.Value)
{
flag = true;
}
if (flag)
{
switch ((MonsterTeamGainsItemsArtifactManager.currentItemIterator - 1) % MonsterTeamGainsItemsArtifactManager.dropPattern.Length)
{
case 0:
case 1:
return 3;
case 2:
case 3:
return 2;
case 4:
return 1;
}
}
}
return amount;
});
}
else
{
Debug.LogWarning((object)"IL Failed: Evolution_MoreItems");
}
}
}
public class Honor
{
[CompilerGenerated]
private static class <>O
{
public static hook_UpdateItemAvailability <0>__RemoveFireTrailFromWorm;
public static hook_PromoteIfHonor <1>__EliteOnlyArtifactManager_PromoteIfHonor;
public static hook_OnEnter <2>__EnterSkyLeap_OnEnter;
public static hook_OnEnter <3>__LunarGazeLeap_OnEnter;
}
public static List<EliteDef> minionEliteDefs;
public static void Start()
{
//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_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_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_0059: Expected O, but got Unknown
//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_007a: Expected O, but got Unknown
//IL_0090: 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_009b: Expected O, but got Unknown
object obj = <>O.<0>__RemoveFireTrailFromWorm;
if (obj == null)
{
hook_UpdateItemAvailability val = RemoveFireTrailFromWorm;
<>O.<0>__RemoveFireTrailFromWorm = val;
obj = (object)val;
}
CharacterBody.UpdateItemAvailability += (hook_UpdateItemAvailability)obj;
Addressables.LoadAssetAsync<EliteDef>((object)"RoR2/DLC1/EliteEarth/edEarthHonor.asset").WaitForCompletion().healthBoostCoefficient = 2f;
object obj2 = <>O.<1>__EliteOnlyArtifactManager_PromoteIfHonor;
if (obj2 == null)
{
hook_PromoteIfHonor val2 = EliteOnlyArtifactManager_PromoteIfHonor;
<>O.<1>__EliteOnlyArtifactManager_PromoteIfHonor = val2;
obj2 = (object)val2;
}
EliteOnlyArtifactManager.PromoteIfHonor += (hook_PromoteIfHonor)obj2;
object obj3 = <>O.<2>__EnterSkyLeap_OnEnter;
if (obj3 == null)
{
hook_OnEnter val3 = EnterSkyLeap_OnEnter;
<>O.<2>__EnterSkyLeap_OnEnter = val3;
obj3 = (object)val3;
}
EnterSkyLeap.OnEnter += (hook_OnEnter)obj3;
object obj4 = <>O.<3>__LunarGazeLeap_OnEnter;
if (obj4 == null)
{
hook_OnEnter val4 = LunarGazeLeap_OnEnter;
<>O.<3>__LunarGazeLeap_OnEnter = val4;
obj4 = (object)val4;
}
LunarGazeLeap.OnEnter += (hook_OnEnter)obj4;
}
private static void LunarGazeLeap_OnEnter(orig_OnEnter orig, LunarGazeLeap self)
{
orig.Invoke(self);
((EntityState)self).characterBody.outOfDangerStopwatch = -99999f;
}
private static void EliteOnlyArtifactManager_PromoteIfHonor(orig_PromoteIfHonor orig, CharacterMaster instanceMaster, Xoroshiro128Plus rng, EliteDef[] eliteDefs)
{
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Invalid comparison between Unknown and I4
if (WConfig.Honor_PerfectMithrix.Value && eliteDefs == null)
{
List<EliteDef> list = EliteOnlyArtifactManager.eliteDefs.ToList();
list.Add(Elites.Aurelionite);
if (Run.instance.stageClearCount > 6)
{
EliteDef[] eliteDefs2 = EliteCatalog.eliteDefs;
foreach (EliteDef val in eliteDefs2)
{
if ((int)val.devotionLevel == 2)
{
list.Add(val);
}
}
list.Remove(Elites.Lunar);
}
if (Object.op_Implicit((Object)(object)MoonBatteryMissionController.instance))
{
list.Add(Elites.Lunar);
list.Add(Elites.Lunar);
}
if (Object.op_Implicit((Object)(object)VoidRaidGauntletController.instance))
{
list.Add(Elites.Void);
list.Add(Elites.Void);
}
orig.Invoke(instanceMaster, Run.instance.bossRewardRng, list.ToArray());
}
else
{
orig.Invoke(instanceMaster, Run.instance.bossRewardRng, eliteDefs);
}
}
public static void OnArtifactEnable()
{
if (NetworkServer.active)
{
WConfig.cfgEliteWorms_Changed(null, null);
Honor_EliteTiers(activate: true);
if (!WConfig.Honor_PerfectMithrix.Value)
{
}
}
}
private static void EnterSkyLeap_OnEnter(orig_OnEnter orig, EnterSkyLeap self)
{
orig.Invoke(self);
((EntityState)self).characterBody.outOfDangerStopwatch = -99999f;
}
public static void OnArtifactDisable()
{
WConfig.cfgEliteWorms_Changed(null, null);
Honor_EliteTiers(activate: false);
}
public static void Honor_EliteTiers(bool activate)
{
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Invalid comparison between Unknown and I4
if (activate)
{
minionEliteDefs = new List<EliteDef>();
EliteDef[] eliteDefs = EliteCatalog.eliteDefs;
foreach (EliteDef val in eliteDefs)
{
if (((Object)val).name.EndsWith("Honor") && val.IsAvailable())
{
minionEliteDefs.Add(val);
}
}
}
else
{
minionEliteDefs = null;
}
if (!WConfig.Honor_RedoneElites.Value)
{
return;
}
float num = 2f;
if (activate)
{
num = 0.5f;
}
EliteDef[] eliteDefs2 = EliteCatalog.eliteDefs;
foreach (EliteDef val2 in eliteDefs2)
{
if ((int)val2.devotionLevel == 2)
{
val2.healthBoostCoefficient = Mathf.LerpUnclamped(1f, val2.healthBoostCoefficient, num);
val2.damageBoostCoefficient = Mathf.LerpUnclamped(1f, val2.damageBoostCoefficient, num);
}
}
for (int k = 0; k < CombatDirector.eliteTiers.Length; k++)
{
if (CombatDirector.eliteTiers[k].eliteTypes.Length != 0)
{
if ((Object)(object)CombatDirector.eliteTiers[k].eliteTypes[0] == (Object)(object)Elites.Poison)
{
CombatDirector.eliteTiers[k].costMultiplier = Mathf.LerpUnclamped(1f, CombatDirector.eliteTiers[k].costMultiplier, num);
}
else if ((Object)(object)CombatDirector.eliteTiers[k].eliteTypes[0] == (Object)(object)Elites.Lunar)
{
CombatDirector.eliteTiers[k].costMultiplier = Mathf.LerpUnclamped(1f, CombatDirector.eliteTiers[k].costMultiplier, num);
}
}
}
}
private static void Honor_SimuForceSpecialEliteType(orig_Initialize orig, InfiniteTowerExplicitSpawnWaveController self, int waveIndex, Inventory enemyInventory, GameObject spawnTargetObject)
{
if (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.EliteOnly) && WConfig.Honor_PerfectMithrix.Value)
{
if (((InfiniteTowerWaveController)self).rng.nextNormalizedFloat > 0.3f)
{
orig.Invoke(self, waveIndex, enemyInventory, spawnTargetObject);
return;
}
string name = ((Object)self.spawnList[0].spawnCard).name;
if (name.StartsWith("cscBrother"))
{
self.spawnList[0].eliteDef = Elites.Lunar;
}
else if (name.StartsWith("cscScavLunar"))
{
self.spawnList[0].eliteDef = Elites.Lunar;
}
else if (name.StartsWith("cscMiniVoidR"))
{
self.spawnList[0].eliteDef = Elites.Void;
}
else if (name.StartsWith("cscITVoidMe"))
{
self.spawnList[0].eliteDef = Elites.Void;
}
else if (name.StartsWith("cscVoidInfestor"))
{
self.spawnList[0].eliteDef = Elites.Void;
}
else if (name.StartsWith("cscFalseSon"))
{
self.spawnList[0].eliteDef = Elites.Aurelionite;
}
else if (name.StartsWith("cscTitanGold") && Run.instance.IsExpansionEnabled(Elites.Aurelionite.eliteEquipmentDef.requiredExpansion))
{
self.spawnList[0].eliteDef = Elites.Aurelionite;
}
}
orig.Invoke(self, waveIndex, enemyInventory, spawnTargetObject);
}
private static void RemoveFireTrailFromWorm(orig_UpdateItemAvailability orig, CharacterBody self)
{
orig.Invoke(self);
if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)((Component)self).GetComponent<WormBodyPositions2>()))
{
self.itemAvailability.hasFireTrail = false;
}
}
public static void MinionsInheritHonor(orig_AddMinion orig, NetworkInstanceId ownerId, MinionOwnership minion)
{
//IL_0002: 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)
//IL_002f: Invalid comparison between Unknown and I4
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(ownerId, minion);
if (NetworkServer.active)
{
Inventory component = ((Component)minion).gameObject.GetComponent<Inventory>();
if (Object.op_Implicit((Object)(object)component) && (int)component.currentEquipmentIndex == -1 && minionEliteDefs.Count > 0)
{
int index = VanillaArtifactsMain.Random.Next(minionEliteDefs.Count);
component.SetEquipmentIndex(minionEliteDefs[index].eliteEquipmentDef.equipmentIndex);
}
}
}
}
public class Kin
{
[CompilerGenerated]
private static class <>O
{
public static Manipulator <0>__IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1;
public static hook_HandleSingleMonsterTypeArtifact <1>__ClassicStageInfo_HandleSingleMonsterTypeArtifact;
}
public static DirectorCardCategorySelection KinBackup = ScriptableObject.CreateInstance<DirectorCardCategorySelection>();
public static SpawnCard KinNoRepeat;
public static void Start()
{
//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_002c: Expected O, but got Unknown
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Expected O, but got Unknown
((Object)KinBackup).name = "dcccBackupKinHelper";
object obj = <>O.<0>__IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1;
if (obj == null)
{
Manipulator val = IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1;
<>O.<0>__IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1 = val;
obj = (object)val;
}
ClassicStageInfo.HandleSingleMonsterTypeArtifact += (Manipulator)obj;
object obj2 = <>O.<1>__ClassicStageInfo_HandleSingleMonsterTypeArtifact;
if (obj2 == null)
{
hook_HandleSingleMonsterTypeArtifact val2 = ClassicStageInfo_HandleSingleMonsterTypeArtifact;
<>O.<1>__ClassicStageInfo_HandleSingleMonsterTypeArtifact = val2;
obj2 = (object)val2;
}
ClassicStageInfo.HandleSingleMonsterTypeArtifact += (hook_HandleSingleMonsterTypeArtifact)obj2;
}
private static void IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 40f)
}))
{
val.Next.Operand = 50f;
int index = val.Index;
val.Index = index + 1;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 50f)
});
val.Next.Operand = 60f;
}
else
{
Debug.LogWarning((object)"IL Failed: IL.IL_ClassicStageInfo_HandleMixEnemyArtifact");
}
}
private static void IL_ClassicStageInfo_HandleMixEnemyArtifact(ILContext il)
{
}
private static void ClassicStageInfo_HandleSingleMonsterTypeArtifact(orig_HandleSingleMonsterTypeArtifact orig, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng)
{
KinBackup.CopyFrom(monsterCategories);
orig.Invoke(monsterCategories, rng);
int num = 0;
SpawnCard spawnCard = monsterCategories.categories[0].cards[0].spawnCard;
if ((Object)(object)spawnCard == (Object)(object)KinNoRepeat)
{
do
{
num++;
monsterCategories.CopyFrom(KinBackup);
orig.Invoke(monsterCategories, rng);
spawnCard = monsterCategories.categories[0].cards[0].spawnCard;
}
while (num < 15 && (Object)(object)spawnCard == (Object)(object)KinNoRepeat);
}
if ((Object)(object)spawnCard != (Object)(object)KinNoRepeat)
{
Debug.Log((object)(num + " Cycles until non repeat"));
KinNoRepeat = spawnCard;
}
else if (num == 10)
{
Debug.Log((object)(num + " Cycles, stop looking for non repeat"));
}
KinBackup.Clear();
}
}
public class KinBossDropsForEnemies
{
[CompilerGenerated]
private static class <>O
{
public static Action <0>__ChangeLate;
public static hook_DropRewards <1>__BossGroup_DropRewards;
}
public static CharacterMaster tempClayMan;
public static void Start()
{
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Expected O, but got Unknown
((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)ChangeLate);
object obj = <>O.<1>__BossGroup_DropRewards;
if (obj == null)
{
hook_DropRewards val = BossGroup_DropRewards;
<>O.<1>__BossGroup_DropRewards = val;
obj = (object)val;
}
BossGroup.DropRewards += (hook_DropRewards)obj;
}
private static void BossGroup_DropRewards(orig_DropRewards orig, BossGroup self)
{
//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)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
if (self.bossDrops.Count > 0)
{
Run instance = Run.instance;
UniquePickup val = self.bossDrops[0];
if (instance.IsItemExpansionLocked(((PickupIndex)(ref val.pickupIndex)).pickupDef.itemIndex))
{
self.bossDrops.Clear();
}
}
orig.Invoke(self);
}
public static void ChangeLate()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: 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_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: 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_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: 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_00f7: 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_0109: 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_011c: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_013f: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_0163: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: 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_0188: 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_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01ac: 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_01cf: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
//IL_0205: Unknown result type (might be due to invalid IL or missing references)
//IL_0217: Unknown result type (might be due to invalid IL or missing references)
//IL_0218: Unknown result type (might be due to invalid IL or missing references)
//IL_0229: 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_024d: Unknown result type (might be due to invalid IL or missing references)
//IL_025f: 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_0271: Unknown result type (might be due to invalid IL or missing references)
//IL_0283: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: Unknown result type (might be due to invalid IL or missing references)
//IL_0295: Unknown result type (might be due to invalid IL or missing references)
//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
//IL_0301: Unknown result type (might be due to invalid IL or missing references)
//IL_0313: Unknown result type (might be due to invalid IL or missing references)
//IL_0314: Unknown result type (might be due to invalid IL or missing references)
//IL_0325: Unknown result type (might be due to invalid IL or missing references)
//IL_0337: Unknown result type (might be due to invalid IL or missing references)
//IL_0338: Unknown result type (might be due to invalid IL or missing references)
//IL_0349: Unknown result type (might be due to invalid IL or missing references)
//IL_035b: Unknown result type (might be due to invalid IL or missing references)
//IL_035c: Unknown result type (might be due to invalid IL or missing references)
//IL_036d: 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_0380: 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_03a3: Unknown result type (might be due to invalid IL or missing references)
//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
//IL_03fd: Unknown result type (might be due to invalid IL or missing references)
//IL_040f: Unknown result type (might be due to invalid IL or missing references)
//IL_0410: Unknown result type (might be due to invalid IL or missing references)
//IL_0421: Unknown result type (might be due to invalid IL or missing references)
//IL_0433: Unknown result type (might be due to invalid IL or missing references)
//IL_0434: Unknown result type (might be due to invalid IL or missing references)
((Component)BodyPrefabs.GolemBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.Knurl"
};
((Component)BodyPrefabs.HalcyoniteBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.Knurl"
};
((Component)BodyPrefabs.JellyfishBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.NovaOnLowHealth"
};
((Component)BodyPrefabs.BeetleBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.BeetleGland"
};
((Component)BodyPrefabs.BeetleGuardBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.BeetleGland"
};
((Component)BodyPrefabs.ClayBruiserBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.SiphonOnLowHealth"
};
((Component)BodyPrefabs.ClayGrenadierBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.SiphonOnLowHealth"
};
((Component)BodyPrefabs.WispBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.SprintWisp"
};
((Component)BodyPrefabs.GreaterWispBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.SprintWisp"
};
((Component)BodyPrefabs.LemurianBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.FireballsOnHit"
};
((Component)BodyPrefabs.LemurianBruiserBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.FireballsOnHit"
};
((Component)BodyPrefabs.ScorchlingBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.FireballsOnHit"
};
((Component)BodyPrefabs.ImpBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.BleedOnHitAndExplode"
};
((Component)BodyPrefabs.RoboBallMiniBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.RoboBallBuddy"
};
((Component)BodyPrefabs.IronHaulerBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.RoboBallBuddy"
};
((Component)BodyPrefabs.TankerBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.RoboBallBuddy"
};
((Component)BodyPrefabs.WorkerUnitBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.RoboBallBuddy"
};
((Component)BodyPrefabs.ParentBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.ParentEgg"
};
((Component)BodyPrefabs.ChildBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.ParentEgg"
};
((Component)BodyPrefabs.LunarExploderBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.Pearl"
};
((Component)BodyPrefabs.LunarGolemBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.Pearl"
};
((Component)BodyPrefabs.LunarWispBody).GetComponent<DeathRewards>().bossPickup = new SerializablePickupIndex
{
pickupName = "ItemIndex.Pearl"
};
((Component)BodyPrefabs.