using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.VoidBarnacle.Weapon;
using EntityStates.VoidRaidCrab;
using EntityStates.VoidRaidCrab.Joint;
using EntityStates.VoidRaidCrab.Weapon;
using FathomlessVoidling.Components;
using FathomlessVoidling.Controllers;
using FathomlessVoidling.EntityStates;
using FathomlessVoidling.EntityStates.Barnacle;
using FathomlessVoidling.EntityStates.Haunt;
using FathomlessVoidling.EntityStates.Primary;
using FathomlessVoidling.EntityStates.Secondary;
using FathomlessVoidling.EntityStates.Special;
using FathomlessVoidling.EntityStates.Utility;
using FathomlessVoidling.Hooks;
using HG.Reflection;
using Microsoft.CodeAnalysis;
using On.EntityStates.VoidBarnacle.Weapon;
using On.EntityStates.VoidRaidCrab;
using On.RoR2;
using On.RoR2.Projectile;
using On.RoR2.VoidRaidCrab;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.EntityLogic;
using RoR2.Mecanim;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.VoidRaidCrab;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using RoR2BepInExPack.GameAssetPathsBetter;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Playables;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.SceneManagement;
using UnityEngine.Timeline;
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: OptIn]
[assembly: NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyInformationalVersion("1.0.0+1b7754b368dfaa4e10a93fa7c139d0dbe8221ce1")]
[assembly: AssemblyProduct("FathomlessVoidling")]
[assembly: AssemblyTitle("FathomlessVoidling")]
[assembly: AssemblyCompany("FathomlessVoidling")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace FathomlessVoidling
{
internal static class Log
{
internal static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
private static string getLogPrefix(string callerPath, string callerMemberName, int callerLineNumber)
{
int num = callerPath.LastIndexOf("FathomlessVoidling");
if (num >= 0)
{
callerPath = callerPath.Substring(num + "FathomlessVoidling".Length + 1);
}
return $"{callerPath}:{callerLineNumber} ({callerMemberName}) ";
}
internal static void Error(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1)
{
_logSource.LogError((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data));
}
internal static void Error_NoCallerPrefix(object data)
{
_logSource.LogError(data);
}
internal static void Fatal(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1)
{
_logSource.LogFatal((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data));
}
internal static void Fatal_NoCallerPrefix(object data)
{
_logSource.LogFatal(data);
}
internal static void Info(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1)
{
_logSource.LogInfo((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data));
}
internal static void Info_NoCallerPrefix(object data)
{
_logSource.LogInfo(data);
}
internal static void Message(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1)
{
_logSource.LogMessage((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data));
}
internal static void Message_NoCallerPrefix(object data)
{
_logSource.LogMessage(data);
}
internal static void Warning(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1)
{
_logSource.LogWarning((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data));
}
internal static void Warning_NoCallerPrefix(object data)
{
_logSource.LogWarning(data);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Nuxlar.FathomlessVoidling", "FathomlessVoidling", "1.0.6")]
public class Main : BaseUnityPlugin
{
public const string PluginGUID = "Nuxlar.FathomlessVoidling";
public const string PluginAuthor = "Nuxlar";
public const string PluginName = "FathomlessVoidling";
public const string PluginVersion = "1.0.6";
public static ModdedDamageType gravityDamageType = DamageAPI.ReserveDamageType();
public static Material abyssalTerrainMat = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_itdampcave.matDCTerrainFloorInfiniteTower_mat).WaitForCompletion();
public static Material abyssalPillarMat = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_itdampcave.matDCTerrainGiantColumnsInfiniteTower_mat).WaitForCompletion();
public static Material abyssalColumnMat = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_itdampcave.matDCTerrainSmallColumnInfiniteTower_mat).WaitForCompletion();
public static Material abyssalBoulderMat = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_itdampcave.matDCBoulderInfiniteTower_mat).WaitForCompletion();
public static Material abyssalBridgeMat = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_itdampcave.matDCTerrainWallsInfiniteTower_mat).WaitForCompletion();
public static Material abyssalRuinMat = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_itdampcave.matTrimSheetLemurianRuinsHeavyInfiniteTower_mat).WaitForCompletion();
public static Material abyssalChainMat = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_itdampcave.matTrimSheetLemurianMetalLightInfiniteTower_mat).WaitForCompletion();
public static Material abyssalStalagmiteMat = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_itdampcave.matDCStalagmiteInfiniteTower_mat).WaitForCompletion();
public static GameObject spawnEffect;
public static CharacterSpawnCard jointCard = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)RoR2_DLC1_VoidRaidCrab.cscVoidRaidCrabJoint_asset).WaitForCompletion();
public static SpawnCard bigVoidlingCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)RoR2_DLC1_VoidRaidCrab.cscVoidRaidCrab_asset).WaitForCompletion();
public static TimelineAsset introTimeline = Addressables.LoadAssetAsync<TimelineAsset>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabIntroTimeiline_playable).WaitForCompletion();
public static GameObject chargeVoidRain;
public static GameObject voidRainTracer = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.TracerVoidRaidCrabTripleBeamSmall_prefab).WaitForCompletion();
public static GameObject voidRainExplosion = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabTripleBeamExplosion_prefab).WaitForCompletion();
public static GameObject voidRainWarning = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.MultiBeamRayIndicator_prefab).WaitForCompletion();
public static GameObject voidRainPortalEffect;
public static GameObject eyeMissileProjectile;
public static GameObject eyeBlastChargeEffect;
public static GameObject eyeBlastMuzzleFlash;
public static GameObject raidTeleportEffect;
public static LoopSoundDef lsdVoidMegaCrabDeathBomb = Addressables.LoadAssetAsync<LoopSoundDef>((object)RoR2_DLC1_VoidMegaCrab.lsdVoidMegaCrabDeathBomb_asset).WaitForCompletion();
public static GameObject chargeWardWipeChargeEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabWardWipeChargeup_prefab).WaitForCompletion();
public static GameObject fireWardWipeMuzzleFlash = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabWardWipeMuzzleflash_prefab).WaitForCompletion();
public static BuffDef bdWardWipeFog = Addressables.LoadAssetAsync<BuffDef>((object)RoR2_DLC1_VoidRaidCrab.bdVoidRaidCrabWardWipeFog_asset).WaitForCompletion();
public static InteractableSpawnCard iscSafeWard = Addressables.LoadAssetAsync<InteractableSpawnCard>((object)RoR2_DLC1_VoidRaidCrab.iscVoidRaidSafeWard_asset).WaitForCompletion();
public static SkillDef sdWardWipe;
public static SkillDef sdSingularity;
private static SkillDef sdMaze;
private static SkillDef sdMultiBeam;
public static GameObject barnacleMuzzleFlash = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleMuzzleflash_prefab).WaitForCompletion();
public static GameObject gravityBulletChargeEffect;
public static GameObject gravityBulletProjectile;
public static GameObject gravityBombProjectile;
public static SpawnCard voidlingHauntCard = (SpawnCard)(object)ScriptableObject.CreateInstance<CharacterSpawnCard>();
public static GameObject groundedGravityEffect;
public static GameObject airborneGravityEffect;
public static GameObject mazePortalEffect;
public static GameObject mazeMuzzleEffect;
public static GameObject mazeLaserPrefab;
public static GameObject mazeWarningPrefab;
public static GameObject mazeChargeUpPrefab;
public static GameObject mazeImpactEffect;
public static GameObject wSingularityProjectile;
public static SpawnCard locusPortalCard = Addressables.LoadAssetAsync<SpawnCard>((object)RoR2_DLC1_PortalVoid.iscVoidPortal_asset).WaitForCompletion();
private static CharacterBody jointBody;
private static CharacterBody bossBody;
public static bool infernoEnabled = false;
internal static Main Instance { get; private set; }
public static string PluginDirectory { get; private set; }
public static bool RooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
public void Awake()
{
Instance = this;
infernoEnabled = Chainloader.PluginInfos.ContainsKey("HIFU.Inferno");
Log.Init(((BaseUnityPlugin)this).Logger);
ModConfig.Init();
AddContent();
LoadAssets();
CreateVoidlingHaunt();
CreateNewEyeMissiles();
CreateGravityProjectiles();
CreateSingularityProjectile();
TweakBigVoidling();
TweakBigVoidlingMaster();
RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(TweaksAfterLoad));
new ConnectHooks();
}
private void TweaksAfterLoad()
{
//IL_0006: 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_001c: 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_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
CharacterBody obj = jointBody;
obj.bodyFlags = (BodyFlags)(obj.bodyFlags | 0x4810);
CharacterBody obj2 = bossBody;
obj2.bodyFlags = (BodyFlags)(obj2.bodyFlags | 0x4810);
bossBody.baseNameToken = "[ Voidling ]";
bossBody.subtitleNameToken = "Augur of the Abyss";
jointBody = null;
bossBody = null;
GameObject obj3 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon.FrogInteractable_prefab).WaitForCompletion();
PurchaseInteraction component = obj3.GetComponent<PurchaseInteraction>();
component.costType = (CostTypeIndex)0;
component.cost = 0;
obj3.GetComponent<FrogController>().maxPets = 1;
}
private void AddContent()
{
//IL_0002: 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_0012: 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_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: 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_0062: 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_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
bool flag = default(bool);
ContentAddition.AddEntityState<BetterSpawnState>(ref flag);
ContentAddition.AddEntityState<JointSpawnState>(ref flag);
ContentAddition.AddEntityState<ChargeVoidRain>(ref flag);
ContentAddition.AddEntityState<FireVoidRain>(ref flag);
ContentAddition.AddEntityState<ChargeEyeBlast>(ref flag);
ContentAddition.AddEntityState<FireEyeBlast>(ref flag);
ContentAddition.AddEntityState<BaseMazeAttackState>(ref flag);
ContentAddition.AddEntityState<EnterMaze>(ref flag);
ContentAddition.AddEntityState<ExitMaze>(ref flag);
ContentAddition.AddEntityState<MazeAttack>(ref flag);
ContentAddition.AddEntityState<WanderingSingularity>(ref flag);
ContentAddition.AddEntityState<VoidlingHauntManager>(ref flag);
ContentAddition.AddEntityState<ChargeGravityBullet>(ref flag);
ContentAddition.AddEntityState<FireGravityBullet>(ref flag);
ContentAddition.AddEntityState<ChargeWardWipeNux>(ref flag);
ContentAddition.AddEntityState<FireWardWipeNux>(ref flag);
}
public static List<CharacterBody> GetPlayerBodies()
{
List<CharacterBody> list = new List<CharacterBody>();
foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
{
if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.master))
{
CharacterBody body = instance.master.GetBody();
if (Object.op_Implicit((Object)(object)body))
{
list.Add(body);
}
}
}
return list;
}
private static void CreateNewEyeMissiles()
{
//IL_0005: 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_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: 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_00bc: 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_010f: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: 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_0181: Unknown result type (might be due to invalid IL or missing references)
//IL_018b: Unknown result type (might be due to invalid IL or missing references)
//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
//IL_01db: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabImpact1_prefab).WaitForCompletion();
GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMissileGhost_prefab).WaitForCompletion();
GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMissileProjectile_prefab).WaitForCompletion();
val3 = PrefabAPI.InstantiateClone(val3, "FathomlessEyeProjectile", true);
val2 = PrefabAPI.InstantiateClone(val2, "FathomlessEyeProjectileGhost", false);
val = PrefabAPI.InstantiateClone(val, "FathomlessEyeProjectileImpact", false);
val3.GetComponent<ProjectileController>().ghostPrefab = val2;
val3.AddComponent<StasisMissileComponent>();
val3.GetComponent<ProjectileSimple>().desiredForwardSpeed = 125f;
ProjectileImpactExplosion obj = val3.AddComponent<ProjectileImpactExplosion>();
((ProjectileExplosion)obj).blastRadius = 6f;
obj.impactEffect = val;
obj.destroyOnWorld = true;
obj.lifetime = 5f;
((ProjectileExplosion)obj).blastDamageCoefficient = 1f;
((ProjectileExplosion)obj).falloffModel = (FalloffModel)2;
Object.Destroy((Object)(object)val3.GetComponent<ProjectileSingleTargetImpact>());
ProjectileSteerTowardTarget component = val3.GetComponent<ProjectileSteerTowardTarget>();
component.rotationSpeed = 10f;
((Behaviour)component).enabled = false;
ProjectileDirectionalTargetFinder component2 = val3.GetComponent<ProjectileDirectionalTargetFinder>();
component2.lookCone = 360f;
component2.lookRange = 100f;
Transform transform = val3.transform;
transform.localScale *= 4f;
Transform val4 = val2.transform.Find("FlashRing");
if (Object.op_Implicit((Object)(object)val4))
{
MainModule main = ((Component)val4).GetComponent<ParticleSystem>().main;
((MainModule)(ref main)).duration = ((MainModule)(ref main)).duration * 3f;
((MainModule)(ref main)).startLifetimeMultiplier = ((MainModule)(ref main)).startLifetimeMultiplier * 3f;
}
foreach (Transform item in val2.transform)
{
item.localScale *= 4f;
}
foreach (Transform item2 in val.transform)
{
item2.localScale *= 4f;
}
ContentAddition.AddEffect(val);
ContentAddition.AddProjectile(val3);
eyeMissileProjectile = val3;
}
private static void TweakBigVoidlingMaster()
{
//IL_0005: 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_022c: Unknown result type (might be due to invalid IL or missing references)
//IL_0233: Unknown result type (might be due to invalid IL or missing references)
//IL_023a: Unknown result type (might be due to invalid IL or missing references)
//IL_024c: Unknown result type (might be due to invalid IL or missing references)
//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_01f2: 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_02ac: 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_02cc: Unknown result type (might be due to invalid IL or missing references)
//IL_02ee: 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_0278: Unknown result type (might be due to invalid IL or missing references)
//IL_0291: Unknown result type (might be due to invalid IL or missing references)
GameObject obj = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMaster_prefab).WaitForCompletion();
Object.Destroy((Object)(object)obj.GetComponent<VoidRaidCrabAISkillDriverController>());
foreach (AISkillDriver item in obj.GetComponents<AISkillDriver>().ToList())
{
switch (item.customName)
{
case "Channel Gauntlet 1":
case "Channel Gauntlet 2":
case "GravityBump":
Object.Destroy((Object)(object)item);
break;
case "FireMissiles":
item.movementType = (MovementType)1;
((Behaviour)item).enabled = true;
item.noRepeat = true;
item.buttonPressType = (ButtonPressType)0;
item.activationRequiresAimConfirmation = false;
item.nextHighPriorityOverride = null;
break;
case "FireMultiBeam":
item.movementType = (MovementType)1;
item.aimType = (AimType)1;
item.skillSlot = (SkillSlot)1;
((Behaviour)item).enabled = true;
item.maxUserHealthFraction = float.PositiveInfinity;
item.activationRequiresAimConfirmation = false;
item.noRepeat = true;
item.buttonPressType = (ButtonPressType)0;
item.nextHighPriorityOverride = null;
break;
case "SpinBeam":
item.movementType = (MovementType)1;
item.aimType = (AimType)1;
item.skillSlot = (SkillSlot)2;
item.maxUserHealthFraction = float.PositiveInfinity;
item.buttonPressType = (ButtonPressType)0;
item.driverUpdateTimerOverride = 1f;
item.nextHighPriorityOverride = null;
item.activationRequiresAimConfirmation = false;
break;
case "Vacuum Attack":
item.movementType = (MovementType)1;
item.aimType = (AimType)1;
((Behaviour)item).enabled = false;
item.maxUserHealthFraction = float.PositiveInfinity;
item.buttonPressType = (ButtonPressType)0;
item.driverUpdateTimerOverride = 1f;
item.nextHighPriorityOverride = null;
break;
case "WardWipe":
item.movementType = (MovementType)1;
item.aimType = (AimType)1;
((Behaviour)item).enabled = false;
item.maxUserHealthFraction = float.PositiveInfinity;
item.buttonPressType = (ButtonPressType)0;
item.driverUpdateTimerOverride = 1f;
item.nextHighPriorityOverride = null;
item.requiredSkill = null;
break;
case "LookAtTarget":
item.movementType = (MovementType)1;
break;
}
}
}
private static void CreateGravityProjectiles()
{
//IL_0005: 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_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00c2: 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_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_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_010e: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0121: 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_0136: Unknown result type (might be due to invalid IL or missing references)
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: Unknown result type (might be due to invalid IL or missing references)
//IL_0214: Unknown result type (might be due to invalid IL or missing references)
//IL_026b: 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_02e2: Unknown result type (might be due to invalid IL or missing references)
//IL_0362: Unknown result type (might be due to invalid IL or missing references)
//IL_036c: Unknown result type (might be due to invalid IL or missing references)
//IL_037e: Unknown result type (might be due to invalid IL or missing references)
//IL_0388: Unknown result type (might be due to invalid IL or missing references)
//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
//IL_043f: Unknown result type (might be due to invalid IL or missing references)
//IL_0444: Unknown result type (might be due to invalid IL or missing references)
//IL_04e8: Unknown result type (might be due to invalid IL or missing references)
//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0514: Unknown result type (might be due to invalid IL or missing references)
//IL_0519: Unknown result type (might be due to invalid IL or missing references)
groundedGravityEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabGravityBumpExplosionGround_prefab).WaitForCompletion();
groundedGravityEffect.GetComponent<EffectComponent>().soundName = "Play_voidDevastator_death";
airborneGravityEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabGravityBumpExplosionAir_prefab).WaitForCompletion();
airborneGravityEffect.GetComponent<EffectComponent>().soundName = "Play_voidDevastator_death";
Material val = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabGravityBumpSphere_mat).WaitForCompletion();
Material val2 = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabGravityBumpGem_mat).WaitForCompletion();
Material sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabParticleBlue_mat).WaitForCompletion();
Material sharedMaterial2 = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabGravityBumpWarning_mat).WaitForCompletion();
GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Nullifier.NullifierPreBombGhost_prefab).WaitForCompletion();
GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Nullifier.NullifierExplosion_prefab).WaitForCompletion();
Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Nullifier.NullifierBombProjectile_prefab).WaitForCompletion();
Material[] sharedMaterials = (Material[])(object)new Material[2] { val, val2 };
GameObject obj = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleImpactExplosion_prefab).WaitForCompletion();
GameObject obj2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleCharge_prefab).WaitForCompletion();
GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleBullet_prefab).WaitForCompletion();
GameObject val6 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidBarnacle.VoidBarnacleBulletGhost_prefab).WaitForCompletion(), "GravityBulletGhostNux", false);
((Renderer)((Component)val6.transform.GetChild(3)).GetComponent<MeshRenderer>()).sharedMaterials = sharedMaterials;
((Component)val6.transform.Find("Point Light")).GetComponent<Light>().color = new Color(6f / 85f, 6f / 85f, 1f, 1f);
((Renderer)((Component)val6.transform.Find("Flames")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = sharedMaterial;
gravityBulletChargeEffect = PrefabAPI.InstantiateClone(obj2, "GravityBulletChargeEffectNux", false);
Transform child = gravityBulletChargeEffect.transform.GetChild(0);
((Renderer)((Component)child.Find("Fire")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = sharedMaterial;
((Component)child.Find("Point Light")).GetComponent<Light>().color = new Color(0.6627451f, 47f / 51f, 50f / 51f, 1f);
((Renderer)((Component)child.Find("Sphere")).GetComponent<MeshRenderer>()).sharedMaterials = sharedMaterials;
GameObject val7 = PrefabAPI.InstantiateClone(obj, "GravityBulletExplosionEffectNux", false);
((Component)val7.transform.Find("Point Light")).GetComponent<Light>().color = new Color(9f / 85f, 41f / 85f, 0.972549f, 1f);
((Renderer)((Component)val7.transform.Find("ExplosionSphere, Stars (1)")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = val;
gravityBulletProjectile = PrefabAPI.InstantiateClone(val5, "GravityBulletNux", true);
gravityBulletProjectile.GetComponent<ProjectileController>().ghostPrefab = val6;
gravityBulletProjectile.GetComponent<ProjectileImpactExplosion>().impactEffect = val7;
ContentAddition.AddEffect(val7);
ContentAddition.AddProjectile(gravityBulletProjectile);
GameObject obj3 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Nullifier.NullifierPreBombProjectile_prefab).WaitForCompletion(), "GravityPreBombProjectileNux", true);
GameObject val8 = PrefabAPI.InstantiateClone(val3, "GravityPreBombGhostNux", false);
GameObject val9 = PrefabAPI.InstantiateClone(val4, "GravityBombExplosionEffectNux", false);
ProjectileController component = obj3.GetComponent<ProjectileController>();
component.ghostPrefab = val8;
component.cannotBeDeleted = true;
ProjectileImpactExplosion component2 = obj3.GetComponent<ProjectileImpactExplosion>();
((ProjectileExplosion)component2).blastRadius = 10f;
component2.impactEffect = val9;
component2.lifetime = 2f;
((ProjectileExplosion)component2).childrenProjectilePrefab = null;
gravityBombProjectile = obj3;
Transform transform = gravityBombProjectile.transform;
transform.localScale *= 2f;
Transform transform2 = val8.transform;
transform2.localScale *= 2f;
((Renderer)((Component)val8.transform.Find("Vacuum Radial")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = sharedMaterial2;
Transform obj4 = val8.transform.Find("Sphere");
obj4.localScale *= 2f;
ObjectScaleCurve component3 = ((Component)obj4).GetComponent<ObjectScaleCurve>();
component3.timeMax = 2f;
component3.baseScale = new Vector3(4f, 4f, 4f);
((Renderer)((Component)obj4).GetComponent<MeshRenderer>()).sharedMaterials = sharedMaterials;
((Renderer)((Component)val8.transform.Find("Vacuum Stars")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = sharedMaterial;
ParticleSystem[] componentsInChildren = ((Component)val8.transform).GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main = componentsInChildren[i].main;
((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * 1.5f;
((MainModule)(ref main)).duration = ((MainModule)(ref main)).duration * 2f;
((MainModule)(ref main)).startLifetimeMultiplier = ((MainModule)(ref main)).startLifetimeMultiplier * 2f;
}
((Renderer)((Component)val9.transform.Find("Vacuum Stars")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = sharedMaterial;
((Renderer)((Component)val9.transform.Find("Vacuum Radial")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = sharedMaterial2;
Transform obj5 = val9.transform.Find("Sphere");
((Renderer)((Component)obj5).GetComponent<MeshRenderer>()).sharedMaterial = val;
Transform transform3 = ((Component)obj5).transform;
transform3.localScale *= 2f;
componentsInChildren = ((Component)val9.transform).GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main2 = componentsInChildren[i].main;
((MainModule)(ref main2)).startSizeMultiplier = ((MainModule)(ref main2)).startSizeMultiplier * 1.2f;
}
ContentAddition.AddEffect(val9);
ContentAddition.AddProjectile(gravityBombProjectile);
}
private static void CreateVoidlingHaunt()
{
//IL_0005: 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_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_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
//IL_002d: 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_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: 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_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0129: Expected O, but got Unknown
//IL_0133: 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_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
//IL_0267: Unknown result type (might be due to invalid IL or missing references)
//IL_026c: Unknown result type (might be due to invalid IL or missing references)
//IL_027b: Unknown result type (might be due to invalid IL or missing references)
//IL_0280: Unknown result type (might be due to invalid IL or missing references)
//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
//IL_031f: Unknown result type (might be due to invalid IL or missing references)
SpawnCard spawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)RoR2_DLC1_VoidBarnacle.cscVoidBarnacle_asset).WaitForCompletion();
DirectorCard val = new DirectorCard
{
selectionWeight = 1,
spawnCard = spawnCard
};
GameObject obj = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_BrotherHaunt.BrotherHauntMaster_prefab).WaitForCompletion();
GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_BrotherHaunt.BrotherHauntBody_prefab).WaitForCompletion(), "VoidlingHauntNux", true);
GameObject val3 = PrefabAPI.InstantiateClone(obj, "VoidlingHauntNuxMaster", true);
GameObject val4 = new GameObject("Barnacle Director");
val4.SetActive(false);
val4.transform.parent = val2.transform;
CombatDirector obj2 = val4.AddComponent<CombatDirector>();
DirectorCardCategorySelection val5 = ScriptableObject.CreateInstance<DirectorCardCategorySelection>();
val5.AddCategory("BarnacleMania", 4f);
val5.AddCard(0, val);
obj2.customName = "Barnacle Director";
obj2.expRewardCoefficient = 0.2f;
obj2.minSeriesSpawnInterval = 0.1f;
obj2.maxSeriesSpawnInterval = 1f;
obj2.minRerollSpawnInterval = 4.333333f;
obj2.maxRerollSpawnInterval = 8.333333f;
obj2.creditMultiplier = 0.3f;
obj2.targetPlayers = true;
obj2.monsterCards = val5;
obj2.teamIndex = (TeamIndex)4;
obj2.monsterCredit = 150f;
obj2.onSpawnedServer = new OnSpawnedServer();
obj2.moneyWaveIntervals = (RangeFloat[])(object)new RangeFloat[1]
{
new RangeFloat
{
min = 1f,
max = 1f
}
};
val2.GetComponent<CharacterBody>().baseNameToken = "Voidling Haunt";
val3.GetComponent<CharacterMaster>().bodyPrefab = val2;
SkillDef val6 = ScriptableObject.CreateInstance<SkillDef>();
val6.skillName = "Gravity Well Nux";
((Object)val6).name = "Gravity Well Nux";
val6.skillNameToken = "Gravity Well Nux";
val6.activationState = new SerializableEntityStateType(typeof(VoidlingHauntManager));
val6.activationStateMachineName = "Weapon";
val6.interruptPriority = (InterruptPriority)9;
val6.baseMaxStock = 1;
val6.baseRechargeInterval = 60f;
val6.rechargeStock = 1;
val6.requiredStock = 1;
val6.stockToConsume = 1;
val6.dontAllowPastMaxStocks = true;
val6.beginSkillCooldownOnSkillEnd = true;
val6.canceledFromSprinting = false;
val6.forceSprintDuringState = false;
val6.fullRestockOnAssign = false;
val6.resetCooldownTimerOnUse = false;
val6.isCombatSkill = true;
val6.mustKeyPress = false;
val6.cancelSprintingOnActivation = false;
ContentAddition.AddSkillDef(val6);
Object.Destroy((Object)(object)val2.GetComponent<GenericSkill>());
EntityStateMachine component = val2.GetComponent<EntityStateMachine>();
component.initialStateType = new SerializableEntityStateType(typeof(VoidlingHauntManager));
component.mainStateType = new SerializableEntityStateType(typeof(VoidlingHauntManager));
SkillLocator component2 = val2.GetComponent<SkillLocator>();
GenericSkill val7 = val2.AddComponent<GenericSkill>();
val7.skillName = "VHauntNuxPrimary";
SkillFamily val8 = ScriptableObject.CreateInstance<SkillFamily>();
((Object)val8).name = "VHauntNuxPrimaryFamily";
val8.variants = (Variant[])(object)new Variant[1]
{
new Variant
{
skillDef = val6
}
};
val7._skillFamily = val8;
ContentAddition.AddSkillFamily(val8);
component2.primary = val7;
ContentAddition.AddBody(val2);
ContentAddition.AddMaster(val3);
voidlingHauntCard.prefab = val3;
voidlingHauntCard.sendOverNetwork = true;
voidlingHauntCard.nodeGraphType = (GraphType)1;
}
private static void TweakBigVoidling()
{
//IL_0005: 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_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: 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_00b5: 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_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabBody_prefab).WaitForCompletion();
ModelLocator component = val.GetComponent<ModelLocator>();
CharacterBody component2 = val.GetComponent<CharacterBody>();
component2.baseMaxHealth = 1000f;
bossBody = component2;
FogDamageController component3 = val.GetComponent<FogDamageController>();
if (Object.op_Implicit((Object)(object)component3))
{
component3.healthFractionPerSecond = 0.01f;
component3.healthFractionRampCoefficientPerSecond = 0.1f;
}
SkillLocator component4 = val.GetComponent<SkillLocator>();
component4.primary.skillFamily.variants[0].skillDef.activationState = new SerializableEntityStateType(typeof(ChargeEyeBlast));
component4.secondary.skillFamily.variants = (Variant[])(object)new Variant[1]
{
new Variant
{
skillDef = sdMultiBeam
}
};
component4.utility.skillFamily.variants = (Variant[])(object)new Variant[1]
{
new Variant
{
skillDef = sdMaze
}
};
List<EntityStateMachine> list = val.GetComponents<EntityStateMachine>().ToList();
for (int i = 0; i < list.Count; i++)
{
EntityStateMachine val2 = list[i];
if (val2.customName == "Body")
{
val2.initialStateType = new SerializableEntityStateType(typeof(BetterSpawnState));
}
}
Animator component5 = ((Component)component.modelTransform).gameObject.GetComponent<Animator>();
component5.applyRootMotion = true;
component5.avatar = AvatarBuilder.BuildGenericAvatar(((Component)component5).gameObject, "ROOT");
GameObject gameObject = ((Component)component.modelTransform).gameObject;
PrintController obj = gameObject.AddComponent<PrintController>();
obj.printTime = 8.5f;
obj.disableWhenFinished = true;
obj.startingPrintHeight = -20f;
obj.maxPrintHeight = 200f;
obj.startingPrintBias = -10f;
obj.maxPrintBias = 0f;
obj.animateFlowmapPower = false;
obj.startingFlowmapPower = 0f;
obj.maxFlowmapPower = 0f;
obj.printCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f);
((Component)obj).gameObject.SetActive(true);
gameObject.AddComponent<RandomBlinkController>();
foreach (SurfaceDefProvider item in ((Component)gameObject.transform.Find("VoidRaidCrabArmature").Find("ROOT").Find("LegBase")).GetComponentsInChildren<SurfaceDefProvider>().ToList())
{
((Component)item).gameObject.layer = (int)(ref LayerIndex.defaultLayer);
}
}
private static void LoadAssets()
{
//IL_0005: 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_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: 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_0086: 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_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Unknown result type (might be due to invalid IL or missing references)
//IL_010f: Unknown result type (might be due to invalid IL or missing references)
//IL_0143: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: 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_01a9: Unknown result type (might be due to invalid IL or missing references)
//IL_01ae: 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_01e6: Unknown result type (might be due to invalid IL or missing references)
//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0222: Unknown result type (might be due to invalid IL or missing references)
//IL_0227: Unknown result type (might be due to invalid IL or missing references)
//IL_0231: Unknown result type (might be due to invalid IL or missing references)
//IL_0236: Unknown result type (might be due to invalid IL or missing references)
//IL_026f: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: Unknown result type (might be due to invalid IL or missing references)
//IL_0292: Unknown result type (might be due to invalid IL or missing references)
//IL_0332: Unknown result type (might be due to invalid IL or missing references)
//IL_0337: Unknown result type (might be due to invalid IL or missing references)
//IL_0305: Unknown result type (might be due to invalid IL or missing references)
//IL_030a: Unknown result type (might be due to invalid IL or missing references)
//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
//IL_040b: Unknown result type (might be due to invalid IL or missing references)
//IL_0410: Unknown result type (might be due to invalid IL or missing references)
//IL_053c: Unknown result type (might be due to invalid IL or missing references)
//IL_0541: Unknown result type (might be due to invalid IL or missing references)
//IL_056d: Unknown result type (might be due to invalid IL or missing references)
//IL_0440: Unknown result type (might be due to invalid IL or missing references)
//IL_044a: Unknown result type (might be due to invalid IL or missing references)
//IL_0465: Unknown result type (might be due to invalid IL or missing references)
//IL_058f: Unknown result type (might be due to invalid IL or missing references)
//IL_0594: Unknown result type (might be due to invalid IL or missing references)
//IL_05c3: Unknown result type (might be due to invalid IL or missing references)
//IL_05c8: Unknown result type (might be due to invalid IL or missing references)
//IL_0602: Unknown result type (might be due to invalid IL or missing references)
//IL_0607: Unknown result type (might be due to invalid IL or missing references)
//IL_0676: Unknown result type (might be due to invalid IL or missing references)
//IL_067b: Unknown result type (might be due to invalid IL or missing references)
//IL_06a4: Unknown result type (might be due to invalid IL or missing references)
//IL_06a9: Unknown result type (might be due to invalid IL or missing references)
//IL_06dd: Unknown result type (might be due to invalid IL or missing references)
//IL_06e2: Unknown result type (might be due to invalid IL or missing references)
//IL_070a: Unknown result type (might be due to invalid IL or missing references)
//IL_070f: Unknown result type (might be due to invalid IL or missing references)
//IL_07b0: Unknown result type (might be due to invalid IL or missing references)
//IL_07b5: Unknown result type (might be due to invalid IL or missing references)
//IL_07a1: Unknown result type (might be due to invalid IL or missing references)
//IL_07e9: Unknown result type (might be due to invalid IL or missing references)
//IL_07ee: Unknown result type (might be due to invalid IL or missing references)
//IL_083c: Unknown result type (might be due to invalid IL or missing references)
//IL_0841: Unknown result type (might be due to invalid IL or missing references)
//IL_0873: Unknown result type (might be due to invalid IL or missing references)
//IL_08b8: Unknown result type (might be due to invalid IL or missing references)
//IL_08bd: Unknown result type (might be due to invalid IL or missing references)
//IL_08f0: Unknown result type (might be due to invalid IL or missing references)
//IL_08f5: Unknown result type (might be due to invalid IL or missing references)
//IL_095c: Unknown result type (might be due to invalid IL or missing references)
//IL_0961: Unknown result type (might be due to invalid IL or missing references)
//IL_096b: Unknown result type (might be due to invalid IL or missing references)
//IL_0970: Unknown result type (might be due to invalid IL or missing references)
//IL_098d: Unknown result type (might be due to invalid IL or missing references)
//IL_0992: Unknown result type (might be due to invalid IL or missing references)
//IL_099c: Unknown result type (might be due to invalid IL or missing references)
//IL_09a1: Unknown result type (might be due to invalid IL or missing references)
//IL_09be: Unknown result type (might be due to invalid IL or missing references)
//IL_09c3: Unknown result type (might be due to invalid IL or missing references)
//IL_09ce: Unknown result type (might be due to invalid IL or missing references)
//IL_09fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0a02: Unknown result type (might be due to invalid IL or missing references)
//IL_0a1f: Unknown result type (might be due to invalid IL or missing references)
//IL_0a24: Unknown result type (might be due to invalid IL or missing references)
//IL_0a43: Unknown result type (might be due to invalid IL or missing references)
//IL_0a4d: Unknown result type (might be due to invalid IL or missing references)
//IL_0a52: Unknown result type (might be due to invalid IL or missing references)
//IL_0a6f: Unknown result type (might be due to invalid IL or missing references)
//IL_0a74: Unknown result type (might be due to invalid IL or missing references)
Addressables.LoadAssetAsync<SceneDef>((object)RoR2_DLC1_voidraid.voidraid_asset).WaitForCompletion().blockOrbitalSkills = false;
raidTeleportEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_gauntlets.VoidRaidCrabGauntletTeleportEffect_prefab).WaitForCompletion();
raidTeleportEffect.GetComponent<EffectComponent>().soundName = "Play_voidRaid_fog_explode";
MainModule main = ((Component)raidTeleportEffect.transform.Find("OmniSparks")).GetComponent<ParticleSystem>().main;
MinMaxGradient startColor = ((MainModule)(ref main)).startColor;
MainModule main2 = ((Component)raidTeleportEffect.transform.Find("Sphere, Brief")).GetComponent<ParticleSystem>().main;
MainModule main3 = ((Component)raidTeleportEffect.transform.Find("Sphere, Long")).GetComponent<ParticleSystem>().main;
((MainModule)(ref main2)).startColor = startColor;
((MainModule)(ref main3)).startColor = startColor;
Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidSafeWard_prefab).WaitForCompletion().GetComponent<VerticalTubeZone>()
.radius = 16f;
Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_VoidRaidCrab.matVoidRaidCrabSpinBeamSphere1_mat).WaitForCompletion();
Material sharedMaterial = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_PortalVoid.matPortalVoidCenter_mat).WaitForCompletion();
mazeChargeUpPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpinBeamChargeUp_prefab).WaitForCompletion(), "MazeChargeUpEffectNux", false);
ParticleSystem[] componentsInChildren = ((Component)mazeChargeUpPrefab.transform).GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main4 = componentsInChildren[i].main;
((MainModule)(ref main4)).startSizeMultiplier = ((MainModule)(ref main4)).startSizeMultiplier * 1.5f;
}
mazeImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.LaserImpactEffect_prefab).WaitForCompletion(), "MazeImpactEffectNux", false);
componentsInChildren = ((Component)mazeImpactEffect.transform).GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main5 = componentsInChildren[i].main;
((MainModule)(ref main5)).startSizeMultiplier = ((MainModule)(ref main5)).startSizeMultiplier / 2f;
}
ContentAddition.AddEffect(mazeImpactEffect);
PostProcessProfile sharedProfile = Addressables.LoadAssetAsync<PostProcessProfile>((object)RoR2_Base_title_PostProcessing.ppLocalNullifier_asset).WaitForCompletion();
((ParameterOverride<Color>)(object)Addressables.LoadAssetAsync<PostProcessProfile>((object)RoR2_DLC1_voidraid.ppSceneVoidRaidStageStarry_asset).WaitForCompletion().GetSetting<RampFog>()
.fogColorStart).value = new Color(0.2687f, 0.2429f, 0.2429f, 0.075f);
mazeLaserPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpinBeamVFX_prefab).WaitForCompletion(), "MazeLaserVFXNux");
mazeLaserPrefab.AddComponent<NetworkIdentity>();
Transform obj = mazeLaserPrefab.transform.Find("Mesh, Additive");
obj.localScale *= 3f;
obj.localPosition = new Vector3(0f, 0f, 50.16f);
Transform child = mazeLaserPrefab.transform.Find("Point Light, End").GetChild(0);
((Component)child).gameObject.SetActive(true);
((Component)child).GetComponent<PostProcessVolume>().sharedProfile = sharedProfile;
componentsInChildren = ((Component)mazeLaserPrefab.transform).GetComponentsInChildren<ParticleSystem>();
foreach (ParticleSystem val in componentsInChildren)
{
if (((Object)((Component)val).gameObject).name != "MuzzleRayParticles")
{
MainModule main6 = val.main;
((MainModule)(ref main6)).startSizeMultiplier = ((MainModule)(ref main6)).startSizeMultiplier * 3f;
}
}
mazeWarningPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpinBeamVFX_prefab).WaitForCompletion(), "MazeWarningVFXNux");
for (int num = mazeWarningPrefab.transform.childCount - 1; num >= 0; num--)
{
Transform child2 = mazeWarningPrefab.transform.GetChild(num);
if (((Object)child2).name != "Mesh, Additive" && ((Object)child2).name != "Mesh, Transparent")
{
Object.Destroy((Object)(object)((Component)child2).gameObject);
}
}
VfxKillBehavior component = mazeWarningPrefab.GetComponent<VfxKillBehavior>();
if (Object.op_Implicit((Object)(object)component))
{
Object.Destroy((Object)(object)component);
}
DestroyOnTimer component2 = mazeWarningPrefab.GetComponent<DestroyOnTimer>();
if (Object.op_Implicit((Object)(object)component2))
{
component2.duration = 2f;
}
Material sharedMaterial2 = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_voidstage.matVoidBoostPath_mat).WaitForCompletion();
Material sharedMaterial3 = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Common.matVoidDeathBombAreaIndicatorFront_mat).WaitForCompletion();
Transform val2 = mazeWarningPrefab.transform.Find("Mesh, Additive");
if (Object.op_Implicit((Object)(object)val2))
{
val2.localScale *= 3f;
val2.localPosition = new Vector3(0f, 0f, 50.16f);
MeshRenderer component3 = ((Component)val2).GetComponent<MeshRenderer>();
((Renderer)((Component)val2.GetChild(0)).GetComponent<MeshRenderer>()).sharedMaterial = sharedMaterial3;
ObjectScaleCurve obj2 = ((Component)val2).gameObject.AddComponent<ObjectScaleCurve>();
obj2.resetOnAwake = true;
obj2.timeMax = 1f;
obj2.curveX = AnimationCurve.Linear(0f, 0f, 1f, 1f);
obj2.curveY = AnimationCurve.Linear(0f, 0f, 1f, 1f);
obj2.curveZ = AnimationCurve.Linear(0f, 1f, 1f, 1f);
obj2.overallCurve = AnimationCurve.Linear(0f, 1f, 1f, 1f);
if (Object.op_Implicit((Object)(object)component3))
{
((Renderer)component3).sharedMaterial = sharedMaterial2;
}
}
GameObject val3 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpinBeamChargeUp_prefab).WaitForCompletion(), "MazeMuzzleEffectNux", false);
val3.transform.eulerAngles = new Vector3(90f, 0f, 0f);
componentsInChildren = ((Component)val3.transform).GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main7 = componentsInChildren[i].main;
((MainModule)(ref main7)).duration = ((MainModule)(ref main7)).duration * 1.25f;
}
mazeMuzzleEffect = val3;
GameObject val4 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidMegaCrab.VoidMegaCrabSpawnEffect_prefab).WaitForCompletion(), "MazePortalEffectNux", false);
val4.GetComponent<DestroyOnTimer>().duration = 5f;
componentsInChildren = val4.GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main8 = componentsInChildren[i].main;
((MainModule)(ref main8)).startSizeMultiplier = ((MainModule)(ref main8)).startSizeMultiplier * 2f;
((MainModule)(ref main8)).startLifetimeMultiplier = ((MainModule)(ref main8)).startLifetimeMultiplier * 4f;
}
((Renderer)((Component)val4.transform.Find("Ring").GetChild(0)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = sharedMaterial;
mazePortalEffect = val4;
ContentAddition.AddEffect(mazePortalEffect);
eyeBlastMuzzleFlash = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMuzzleflashEyeMissiles_prefab).WaitForCompletion(), "EyeBlastMuzzleFlashNux", false);
ContentAddition.AddEffect(eyeBlastMuzzleFlash);
eyeBlastChargeEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabChargeEyeMissiles_prefab).WaitForCompletion(), "EyeBlastChargeEffectNux", false);
componentsInChildren = ((Component)eyeBlastChargeEffect.transform).GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main9 = componentsInChildren[i].main;
((MainModule)(ref main9)).startSizeMultiplier = ((MainModule)(ref main9)).startSizeMultiplier * 2f;
}
voidRainPortalEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Nullifier.NullifierSpawnEffect_prefab).WaitForCompletion(), "VoidRainPortalEffect", false);
((Renderer)((Component)voidRainPortalEffect.transform.Find("Ring").GetChild(0)).GetComponent<ParticleSystemRenderer>()).sharedMaterial = sharedMaterial;
ContentAddition.AddEffect(voidRainPortalEffect);
Transform val5 = voidRainWarning.transform.Find("HitIndicator");
if (Object.op_Implicit((Object)(object)val5))
{
Transform val6 = voidRainWarning.transform.Find("FurthestHitRecipient");
if (Object.op_Implicit((Object)(object)val6))
{
val5.SetParent(val6);
val5.localPosition = Vector3.zero;
}
}
chargeVoidRain = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabTripleBeamChargeUp_prefab).WaitForCompletion(), "ChargeVoidRainNuxEffect", false);
componentsInChildren = ((Component)chargeVoidRain.transform).GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main10 = componentsInChildren[i].main;
((MainModule)(ref main10)).startSizeMultiplier = ((MainModule)(ref main10)).startSizeMultiplier * 1.5f;
((MainModule)(ref main10)).duration = ((MainModule)(ref main10)).duration * 7f;
((MainModule)(ref main10)).startLifetimeMultiplier = ((MainModule)(ref main10)).startLifetimeMultiplier * 7f;
}
spawnEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSpawnEffect_prefab).WaitForCompletion(), "FathomlessVoidlingSpawnEffect", false);
spawnEffect.transform.localScale = new Vector3(15f, 15f, 15f);
spawnEffect.GetComponent<DestroyOnTimer>().duration = 12f;
componentsInChildren = ((Component)spawnEffect.transform.GetChild(0).GetChild(1)).GetComponentsInChildren<ParticleSystem>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
MainModule main11 = componentsInChildren[i].main;
((MainModule)(ref main11)).duration = ((MainModule)(ref main11)).duration * 1.75f;
}
ContentAddition.AddEffect(spawnEffect);
GameObject obj3 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabJointBody_prefab).WaitForCompletion();
obj3.AddComponent<JointThresholdController>();
obj3.AddComponent<LegControllerNetworkHelper>();
CharacterBody component4 = obj3.GetComponent<CharacterBody>();
component4.baseMaxHealth = ModConfig.jointBaseHealth.Value;
component4.levelMaxHealth = ModConfig.jointLevelHealth.Value;
component4.baseRegen = 0f;
component4.levelRegen = 0f;
jointBody = component4;
obj3.GetComponent<EntityStateMachine>().initialStateType = new SerializableEntityStateType(typeof(JointSpawnState));
sdWardWipe = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_DLC1_VoidRaidCrab.RaidCrabWardWipe_asset).WaitForCompletion();
sdWardWipe.activationState = new SerializableEntityStateType(typeof(ChargeWardWipeNux));
sdSingularity = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_DLC1_VoidRaidCrab.RaidCrabVacuumAttack_asset).WaitForCompletion();
sdSingularity.activationState = new SerializableEntityStateType(typeof(WanderingSingularity));
sdSingularity.interruptPriority = (InterruptPriority)2;
if (ModConfig.singularityCooldown.Value > 0f)
{
sdSingularity.baseRechargeInterval = ModConfig.singularityCooldown.Value;
}
sdMaze = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_DLC1_VoidRaidCrab.RaidCrabSpinBeam_asset).WaitForCompletion();
sdMaze.activationState = new SerializableEntityStateType(typeof(EnterMaze));
sdMaze.baseRechargeInterval = ModConfig.mazeCooldown.Value;
sdMaze.interruptPriority = (InterruptPriority)2;
sdMultiBeam = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_DLC1_VoidRaidCrab.RaidCrabMultiBeam_asset).WaitForCompletion();
sdMultiBeam.activationState = new SerializableEntityStateType(typeof(ChargeVoidRain));
sdMultiBeam.baseRechargeInterval = ModConfig.multiBeamCooldown.Value;
}
private static void CreateSingularityProjectile()
{
//IL_0005: 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_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_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_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Unknown result type (might be due to invalid IL or missing references)
//IL_0165: Unknown result type (might be due to invalid IL or missing references)
//IL_0180: Unknown result type (might be due to invalid IL or missing references)
//IL_0289: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.KillSphereVfxPlaceholder_prefab).WaitForCompletion();
val = PrefabAPI.InstantiateClone(val, "WSingularitySphere", false);
GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabSuckLoopFX_prefab).WaitForCompletion();
val2 = PrefabAPI.InstantiateClone(val2, "WSingularityCenter", false);
GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_VoidRaidCrab.VoidRaidCrabMissileProjectile_prefab).WaitForCompletion();
val3 = PrefabAPI.InstantiateClone(val3, "WSingularityProjectile", true);
GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_LunarWisp.LunarWispTrackingBombGhost_prefab).WaitForCompletion();
val4 = PrefabAPI.InstantiateClone(val4, "WSingularityGhost", false);
LoopSoundDef flightSoundLoop = Addressables.LoadAssetAsync<LoopSoundDef>((object)RoR2_DLC1_VoidRaidCrab.lsdVoidRaidCrabVacuumAttack_asset).WaitForCompletion();
Object.Destroy((Object)(object)val.GetComponent<VFXTransformController>());
Object.Destroy((Object)(object)val2.GetComponent<VFXTransformController>());
val.transform.localScale = new Vector3(20f, 20f, 20f);
foreach (Transform item in val4.transform)
{
Object.Destroy((Object)(object)((Component)item).gameObject);
}
val2.transform.parent = val4.transform;
val.transform.parent = val4.transform;
((Component)val.transform.GetChild(1).GetChild(1)).gameObject.SetActive(false);
val2.GetComponent<VFXAttributes>().vfxIntensity = (VFXIntensity)0;
val.GetComponent<VFXAttributes>().vfxIntensity = (VFXIntensity)0;
foreach (Transform item2 in val3.transform)
{
Object.Destroy((Object)(object)((Component)item2).gameObject);
}
Object.Destroy((Object)(object)val3.GetComponent<BoxCollider>());
Object.Destroy((Object)(object)val3.GetComponent<ProjectileSingleTargetImpact>());
val3.AddComponent<SingularityComponent>();
SphereCollider val5 = val3.AddComponent<SphereCollider>();
val5.radius = 19f;
((Collider)val5).isTrigger = true;
val3.GetComponent<Rigidbody>().useGravity = false;
ProjectileDirectionalTargetFinder component = val3.GetComponent<ProjectileDirectionalTargetFinder>();
component.allowTargetLoss = false;
component.lookCone = 360f;
component.lookRange = 1000f;
ProjectileController component2 = val3.GetComponent<ProjectileController>();
component2.ghostPrefab = val4;
component2.cannotBeDeleted = true;
component2.flightSoundLoop = flightSoundLoop;
component2.myColliders = (Collider[])(object)new Collider[1] { (Collider)val5 };
ProjectileSimple component3 = val3.GetComponent<ProjectileSimple>();
component3.desiredForwardSpeed = 15f;
component3.lifetime = 30f;
component3.enableVelocityOverLifetime = true;
component3.velocityOverLifetime = AnimationCurve.Linear(0f, 1f, 1f, 0.5f);
val3.transform.localScale = Vector3.one;
ContentAddition.AddProjectile(val3);
wSingularityProjectile = val3;
}
public static void CreateTube(Transform parent)
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Expected O, but got Unknown
//IL_001d: 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_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: 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_0111: Unknown result type (might be due to invalid IL or missing references)
//IL_0121: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: Unknown result type (might be due to invalid IL or missing references)
//IL_014d: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: 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)
GameObject val = new GameObject("WallHolder");
val.transform.parent = parent;
val.transform.position = Vector3.zero;
val.transform.localPosition = new Vector3(-2.5f, 0f, 0f);
GameObject val2 = GameObject.CreatePrimitive((PrimitiveType)2);
((Renderer)val2.GetComponent<MeshRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)RoR2_DLC1_GameModes_InfiniteTowerRun_ITAssets.matITSafeWardAreaIndicator1_mat).WaitForCompletion();
Object.Destroy((Object)(object)val2.GetComponent<CapsuleCollider>());
MeshCollider colliderToIgnore = val2.AddComponent<MeshCollider>();
val2.transform.localScale = new Vector3(115f, 1250f, 115f);
((Object)val2).name = "Cheese Deterrent";
val2.transform.SetParent(val.transform);
val2.transform.localPosition = Vector3.zero;
val2.layer = LayerIndex.world.intVal;
GameObject val3 = new GameObject("DisableCollisions");
val3.transform.parent = val2.transform;
val3.transform.localScale = new Vector3(0.0091f, 0.0008f, 0.0091f);
val3.layer = LayerIndex.entityPrecise.intVal;
val3.AddComponent<DisableCollisionsIfInTrigger>().colliderToIgnore = (Collider)(object)colliderToIgnore;
SphereCollider component = val3.GetComponent<SphereCollider>();
component.radius = 85f;
((Collider)component).isTrigger = true;
GameObject val4 = new GameObject("MazeSpawnPointController");
val4.transform.parent = parent;
val4.transform.position = Vector3.zero;
val4.AddComponent<MazeSpawnPointController>();
}
}
public static class ModConfig
{
internal static ConfigFile FVConfig;
public static ConfigEntry<bool> enableFog;
public static ConfigEntry<float> jointBaseHealth;
public static ConfigEntry<float> jointLevelHealth;
public static ConfigEntry<float> mazeCooldown;
public static ConfigEntry<float> multiBeamCooldown;
public static ConfigEntry<float> singularityCooldown;
public static ConfigEntry<float> hauntP1Cooldown;
public static ConfigEntry<float> hauntP2Cooldown;
public static ConfigEntry<float> gravityBombChance;
public static ConfigEntry<int> eyeBlastMissileCount;
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static void Init()
{
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Expected O, but got Unknown
if (Main.RooInstalled)
{
InitRoO();
}
FVConfig = new ConfigFile(Paths.ConfigPath + "\\com.Nuxlar.FathomlessVoidling.cfg", true);
enableFog = FVConfig.BindOption("General", "Enable Fog", defaultValue: false, "Enables void fog in Void Locus.", restartRequired: false);
jointBaseHealth = FVConfig.BindOptionSteppedSlider("Stats", "Base Health", 1500f, 25f, "Base health for joints", 500f, 3000f);
jointLevelHealth = FVConfig.BindOptionSteppedSlider("Stats", "Level Health", 425f, 25f, "Health gained per level for joints", 100f, 1000f);
eyeBlastMissileCount = FVConfig.BindOptionSlider("Skills", "Eye Blast Missile Count", 6, "Number of missiles fired per wave during Eye Blast", 1f, 20f, restartRequired: false);
mazeCooldown = FVConfig.BindOptionSteppedSlider("Skills", "Maze Cooldown", 45f, 1f, "Cooldown for Maze attack", 10f, 90f);
multiBeamCooldown = FVConfig.BindOptionSteppedSlider("Skills", "Portal Beam Cooldown", 15f, 1f, "Cooldown for Portal Beam attack", 5f, 30f);
singularityCooldown = FVConfig.BindOptionSteppedSlider("Skills", "Singularity Cooldown", 60f, 1f, "Cooldown for Wandering Singularity attack", 10f, 90f);
hauntP1Cooldown = FVConfig.BindOptionSteppedSlider("Haunt", "P1 Cooldown", 30f, 1f, "Gravity bomb downtime in Phase 1", 5f, 120f, restartRequired: false);
hauntP2Cooldown = FVConfig.BindOptionSteppedSlider("Haunt", "P2/P3 Cooldown", 20f, 1f, "Gravity bomb downtime in Phase 2/3", 5f, 120f);
gravityBombChance = FVConfig.BindOptionSteppedSlider("Haunt", "Gravity Bomb Chance", 0.15f, 0.01f, "Chance per second to fire a gravity bomb during uptime (higher chance = much more bombs)", 0.01f, 1f, restartRequired: false);
WipeConfig();
}
private static void WipeConfig()
{
((Dictionary<ConfigDefinition, string>)typeof(ConfigFile).GetProperty("OrphanedEntries", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(FVConfig)).Clear();
FVConfig.Save();
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static void InitRoO()
{
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Expected O, but got Unknown
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Expected O, but got Unknown
try
{
ModSettingsManager.SetModDescription("Fathomless Voidling", "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
byte[] array = File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)Main.Instance).Info.Location), "icon.png"));
Texture2D val = new Texture2D(256, 256);
ImageConversion.LoadImage(val, array);
ModSettingsManager.SetModIcon(Sprite.Create(val, new Rect(0f, 0f, 256f, 256f), new Vector2(0.5f, 0.5f)), "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
}
catch (Exception data)
{
Log.Error(data, "C:\\Users\\romym\\OneDrive\\Desktop\\RoR2Mods\\FathomlessVoidling2\\FathomlessVoidling\\ModConfig.cs", "InitRoO", 135);
}
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static ConfigEntry<T> BindOption<T>(this ConfigFile myConfig, string section, string name, T defaultValue, string description = "", bool restartRequired = true)
{
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Expected O, but got Unknown
if ((defaultValue is int || defaultValue is float) ? true : false)
{
return myConfig.BindOptionSlider(section, name, defaultValue, description, 0f, 20f, restartRequired);
}
if (string.IsNullOrEmpty(description))
{
description = name;
}
if (restartRequired)
{
description += " (restart required)";
}
ConfigEntry<T> val = myConfig.Bind<T>(section, name, defaultValue, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>()));
if (Main.RooInstalled)
{
TryRegisterOption<T>(val, restartRequired);
}
return val;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static ConfigEntry<T> BindOptionSlider<T>(this ConfigFile myConfig, string section, string name, T defaultValue, string description = "", float min = 0f, float max = 20f, bool restartRequired = true)
{
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Expected O, but got Unknown
if (!(defaultValue is int) && !(defaultValue is float))
{
return myConfig.BindOption(section, name, defaultValue, description, restartRequired);
}
if (string.IsNullOrEmpty(description))
{
description = name;
}
string text = description;
T val = defaultValue;
description = text + " (Default: " + val?.ToString() + ")";
if (restartRequired)
{
description += " (restart required)";
}
AcceptableValueBase val2 = (AcceptableValueBase)((typeof(T) == typeof(int)) ? ((object)new AcceptableValueRange<int>((int)min, (int)max)) : ((object)new AcceptableValueRange<float>(min, max)));
ConfigEntry<T> val3 = myConfig.Bind<T>(section, name, defaultValue, new ConfigDescription(description, val2, Array.Empty<object>()));
if (Main.RooInstalled)
{
TryRegisterOptionSlider<T>(val3, min, max, restartRequired);
}
return val3;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static ConfigEntry<T> BindOptionSteppedSlider<T>(this ConfigFile myConfig, string section, string name, T defaultValue, float increment = 1f, string description = "", float min = 0f, float max = 20f, bool restartRequired = true)
{
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Expected O, but got Unknown
if (string.IsNullOrEmpty(description))
{
description = name;
}
string text = description;
T val = defaultValue;
description = text + " (Default: " + val?.ToString() + ")";
if (restartRequired)
{
description += " (restart required)";
}
ConfigEntry<T> val2 = myConfig.Bind<T>(section, name, defaultValue, new ConfigDescription(description, (AcceptableValueBase)(object)new AcceptableValueRange<float>(min, max), Array.Empty<object>()));
if (Main.RooInstalled)
{
TryRegisterOptionSteppedSlider<T>(val2, increment, min, max, restartRequired);
}
return val2;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static void TryRegisterOption<T>(ConfigEntry<T> entry, bool restartRequired)
{
//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_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Expected O, but got Unknown
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Expected O, but got Unknown
if (entry is ConfigEntry<string> val)
{
ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(val, new InputFieldConfig
{
submitOn = (SubmitEnum)6,
restartRequired = restartRequired
}), "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
}
else if (entry is ConfigEntry<bool> val2)
{
ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(val2, restartRequired), "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
}
else if (entry is ConfigEntry<KeyboardShortcut> val3)
{
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(val3, restartRequired), "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
}
else if (typeof(T).IsEnum)
{
ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)entry, restartRequired), "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
}
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static void TryRegisterOptionSlider<T>(ConfigEntry<T> entry, float min, float max, bool restartRequired)
{
//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_0018: 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_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Expected O, but got Unknown
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Expected O, but got Unknown
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Expected O, but got Unknown
if (entry is ConfigEntry<int> val)
{
ModSettingsManager.AddOption((BaseOption)new IntSliderOption(val, new IntSliderConfig
{
min = (int)min,
max = (int)max,
formatString = "{0:0.00}",
restartRequired = restartRequired
}), "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
}
else if (entry is ConfigEntry<float> val2)
{
ModSettingsManager.AddOption((BaseOption)new SliderOption(val2, new SliderConfig
{
min = min,
max = max,
FormatString = "{0:0.00}",
restartRequired = restartRequired
}), "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
}
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static void TryRegisterOptionSteppedSlider<T>(ConfigEntry<T> entry, float increment, float min, float max, bool restartRequired)
{
//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_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: 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_003d: Expected O, but got Unknown
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
if (entry is ConfigEntry<float> val)
{
ModSettingsManager.AddOption((BaseOption)new StepSliderOption(val, new StepSliderConfig
{
increment = increment,
min = min,
max = max,
FormatString = "{0:0.00}",
restartRequired = restartRequired
}), "Nuxlar.FathomlessVoidling", "FathomlessVoidling");
}
}
}
}
namespace FathomlessVoidling.Hooks
{
public class ConnectHooks
{
[CompilerGenerated]
private static class <>O
{
public static hook_RequestFog <0>__PreventFog;
public static Action<Stage> <1>__SpawnCauldrons;
public static hook_AttemptToSpawnAllEligiblePortals <2>__SpawnVoidMoonPortal;
}
public ConnectHooks()
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Expected O, but got Unknown
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Expected O, but got Unknown
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Expected O, but got Unknown
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Expected O, but got Unknown
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Expected O, but got Unknown
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Expected O, but got Unknown
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Expected O, but got Unknown
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Expected O, but got Unknown
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Expected O, but got Unknown
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_0127: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Expected O, but got Unknown
GlobalEventManager.onServerDamageDealt += ApplyGravityDamageType;
SceneDirector.Start += new hook_Start(TweakBossDirector);
HealthComponent.SendDamageDealt += new hook_SendDamageDealt(ThresholdCheck);
CharacterMaster.OnBodyStart += new hook_OnBodyStart(FixPipReviveBug);
LegController.RegenerateServer += new hook_RegenerateServer(PreventJointRegen);
VoidRaidGauntletController.Start += new hook_Start(ArenaTweaks);
VoidRaidGauntletController.RpcActivateDonut += new hook_RpcActivateDonut(DeactivateDonutRoof);
VoidRaidGauntletController.TryOpenGauntlet += new hook_TryOpenGauntlet(BlockGauntletInPhase3);
ProjectileDirectionalTargetFinder.SearchForTarget += new hook_SearchForTarget(TweakSingularitySearch);
ChargeFire.OnEnter += new hook_OnEnter(LazyMf);
DeathState.OnEnter += new hook_OnEnter(FixDeathState);
DeathState.OnExit += new hook_OnExit(KillJointsOnDeath);
object obj = <>O.<0>__PreventFog;
if (obj == null)
{
hook_RequestFog val = PreventFog;
<>O.<0>__PreventFog = val;
obj = (object)val;
}
VoidStageMissionController.RequestFog += (hook_RequestFog)obj;
Stage.onServerStageBegin += SpawnCauldrons;
object obj2 = <>O.<2>__SpawnVoidMoonPortal;
if (obj2 == null)
{
hook_AttemptToSpawnAllEligiblePortals val2 = SpawnVoidMoonPortal;
<>O.<2>__SpawnVoidMoonPortal = val2;
obj2 = (object)val2;
}
TeleporterInteraction.AttemptToSpawnAllEligiblePortals += (hook_AttemptToSpawnAllEligiblePortals)obj2;
}
private void ArenaTweaks(orig_Start orig, VoidRaidGauntletController self)
{
orig.Invoke(self);
int num = -1;
List<DonutInfo> list = self.followingDonuts.ToList();
for (int i = 0; i < list.Count; i++)
{
DonutInfo obj = list[i];
if (((Object)obj.root).name == "RaidBB")
{
list.RemoveAt(i);
}
if (((Object)obj.root).name == "RaidDC")
{
num = i;
}
}
self.followingDonuts = list.ToArray();
if (num == -1 || !Object.op_Implicit((Object)(object)self.followingDonuts[num].root))
{
return;
}
MeshRenderer[] componentsInChildren = self.followingDonuts[num].root.GetComponentsInChildren<MeshRenderer>();
foreach (MeshRenderer val in componentsInChildren)
{
GameObject gameObject = ((Component)val).gameObject;
Transform parent = gameObject.transform.parent;
if (!((Object)(object)gameObject != (Object)null))
{
continue;
}
if ((Object)(object)parent != (Object)null)
{
if (((Object)gameObject).name.Contains("Mesh") && ((Object)parent).name.Contains("Ruin") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalRuinMat;
}
if (((Object)gameObject).name.Contains("RuinBowl") && ((Object)parent).name.Contains("RuinMarker") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalRuinMat;
}
}
if ((((Object)gameObject).name.Contains("TerrainHG") || ((Object)gameObject).name.Contains("GiantStoneSlab")) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalTerrainMat;
}
if (((Object)gameObject).name.Contains("HeroPillar") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalPillarMat;
}
if (((Object)gameObject).name.Contains("Bridge") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalBridgeMat;
}
if (((Object)gameObject).name.Contains("Column") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalColumnMat;
}
if ((((Object)gameObject).name.Contains("Boulder") || ((Object)gameObject).name.Contains("mdlGeyser") || ((Object)gameObject).name.Contains("Pebble") || (((Object)gameObject).name.Contains("GiantRock") && !((Object)gameObject).name.Contains("Slab"))) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalBoulderMat;
}
if (((Object)gameObject).name.Contains("Stalagmite") && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalStalagmiteMat;
}
if ((((Object)gameObject).name.Contains("Ruin") || ((Object)gameObject).name.Contains("Chain")) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial))
{
((Renderer)val).sharedMaterial = Main.abyssalRuinMat;
}
}
}
private void DeactivateDonutRoof(orig_RpcActivateDonut orig, VoidRaidGauntletController self, int donutIndex)
{
orig.Invoke(self, donutIndex);
DonutInfo currentDonut = self.currentDonut;
object obj;
if (currentDonut == null)
{
obj = null;
}
else
{
GameObject root = currentDonut.root;
obj = ((root != null) ? root.transform : null);
}
Transform val = (Transform)obj;
if (!Object.op_Implicit((Object)(object)val))
{
return;
}
if (((Object)val).name == "RaidDC")
{
Transform val2 = val.Find("HOLDER: ROOF");
if (Object.op_Implicit((Object)(object)val2) && ((Component)val2).gameObject.activeSelf)
{
((Component)val2).gameObject.SetActive(false);
}
}
Transform val3 = val.Find("HOLDER: Scripting");
if (!Object.op_Implicit((Object)(object)val3))
{
return;
}
Transform val4 = val3.Find("CombatDirector");
if (Object.op_Implicit((Object)(object)val4))
{
CombatDirector component = ((Component)val4).GetComponent<CombatDirector>();
if (Object.op_Implicit((Object)(object)component))
{
((Behaviour)component).enabled = false;
}
}
}
private bool BlockGauntletInPhase3(orig_TryOpenGauntlet orig, VoidRaidGauntletController self, Vector3 entrancePosition, NetworkInstanceId bossMasterId)
{
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
FathomlessMissionController instance = FathomlessMissionController.instance;
if (instance != null && instance.GetCurrentPhase() == 2)
{
return false;
}
return orig.Invoke(self, entrancePosition, bossMasterId);
}
private void PreventJointRegen(orig_RegenerateServer orig, LegController self)
{
}
private void FixPipReviveBug(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body)
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, body);
if (!body.isPlayerControlled)
{
return;
}
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name == "voidraid" && body.HasBuff(Buffs.Immune))
{
GameObject val = GameObject.Find("VoidRaidCrabBody(Clone)");
if (Object.op_Implicit((Object)(object)val))
{
val.GetComponent<VoidRaidCrabHealthBarOverlayProvider>().OnEnable();
}
}
}
private void LazyMf(orig_OnEnter orig, ChargeFire self)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name == "voidraid")
{
((EntityState)self).outer.SetState((EntityState)(object)new ChargeGravityBullet());
}
else
{
orig.Invoke(self);
}
}
private void FixDeathState(orig_OnEnter orig, DeathState self)
{
//IL_0101: 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)
if (((Object)((EntityState)self).characterBody).name == "VoidRaidCrabBody(Clone)")
{
self.animationStateName = "ChargeWipe";
self.animationPlaybackRateParam = "Wipe.playbackRate";
self.addPrintController = false;
orig.Invoke(self);
PrintController obj = ((Component)self.modelTransform).gameObject.AddComponent<PrintController>();
obj.printTime = self.printDuration;
((Behaviour)obj).enabled = true;
obj.startingPrintHeight = 200f;
obj.maxPrintHeight = 500f;
obj.startingPrintBias = self.startingPrintBias;
obj.maxPrintBias = self.maxPrintBias;
obj.disableWhenFinished = false;
obj.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
Transform val = ((EntityState)self).characterBody.transform.Find("WallHolder");
if (Object.op_Implicit((Object)(object)val))
{
Object.Destroy((Object)(object)((Component)val).gameObject);
}
CharacterBody val2 = FathomlessMissionController.instance?.hauntBody;
if (Object.op_Implicit((Object)(object)val2))
{
val2.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo));
}
}
else
{
orig.Invoke(self);
}
}
private void KillJointsOnDeath(orig_OnExit orig, DeathState self)
{
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Expected O, but got Unknown
orig.Invoke(self);
if (((Object)((EntityState)self).characterBody).name != "VoidRaidCrabBody(Clone)")
{
return;
}
if (Object.op_Implicit((Object)(object)VoidRaidGauntletController.instance))
{
VoidRaidGauntletController.instance.SpawnOutroPortal();
}
foreach (TeamComponent item in TeamComponent.GetTeamMembers((TeamIndex)4).ToList())
{
CharacterBody component = ((Component)item).GetComponent<CharacterBody>();
if (Object.op_Implicit((Object)(object)component) && !(((Object)component).name != "VoidRaidCrabJointBody(Clone)"))
{
EntityStateMachine val = ((IEnumerable<EntityStateMachine>)((Component)component).GetComponents<EntityStateMachine>()).FirstOrDefault((Func<EntityStateMachine, bool>)((EntityStateMachine e) => e.customName == "Body"));
if (Object.op_Implicit((Object)(object)val))
{
val.SetState((EntityState)new DeathState());
}
}
}
}
private void TriggerWardWipe()
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Expected O, but got Unknown
FathomlessMissionController instance = FathomlessMissionController.instance;
if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.voidlingBody))
{
CharacterBody voidlingBody = instance.voidlingBody;
voidlingBody.RemoveBuff(Buffs.HiddenInvincibility);
voidlingBody.healthComponent.TakeDamage(new DamageInfo
{
damage = 100000000f,
position = voidlingBody.corePosition
});
voidlingBody.AddBuff(Buffs.HiddenInvincibility);
EntityStateMachine val = ((Component)voidlingBody).gameObject.GetComponents<EntityStateMachine>().First((EntityStateMachine esm) => esm.customName == "Body");
voidlingBody.skillLocator.special.SetSkillOverride((object)val, Main.sdWardWipe, (SkillOverridePriority)4);
voidlingBody.skillLocator.special.AddOneStock();
if (Object.op_Implicit((Object)(object)instance.wardWipeDriver))
{
((Behaviour)instance.wardWipeDriver).enabled = true;
}
if (Object.op_Implicit((Object)(object)instance.singularityDriver))
{
((Behaviour)instance.singularityDriver).enabled = false;
}
if (Object.op_Implicit((Object)(object)instance.mazeDriver))
{
((Behaviour)instance.mazeDriver).enabled = false;
}
if (Object.op_Implicit((Object)(object)instance.fireMissileDriver))
{
((Behaviour)instance.fireMissileDriver).enabled = false;
}
if (Object.op_Implicit((Object)(object)instance.multibeamDriver))
{
((Behaviour)instance.multibeamDriver).enabled = false;
}
}
}
private void OnJointThreshold(HealthComponent hc, CharacterBody body, JointThresholdController jtc, float thresholdFraction, int phase)
{
body.AddBuff(Buffs.Immune);
hc.health = hc.fullHealth * thresholdFraction;
jtc.reachedThreshold = true;
FathomlessMissionController instance = FathomlessMissionController.instance;
if (Object.op_Implicit((Object)(object)instance))
{
if (phase == 0 && Object.op_Implicit((Object)(object)instance.singularityDriver) && !((Behaviour)instance.singularityDriver).enabled)
{
((Behaviour)instance.singularityDriver).enabled = true;
}
if (phase == 1 && Object.op_Implicit((Object)(object)instance.mazeDriver) && !((Behaviour)instance.mazeDriver).enabled)
{
((Behaviour)instance.mazeDriver).enabled = true;
body.skillLocator.special.AddOneStock();
}
}
if (JointThresholdController.AllJointsReachedThreshold())
{
TriggerWardWipe();
}
}
private void OnJointFinalThreshold(DamageReport damageReport, HealthComponent hc, CharacterBody body, JointThresholdController jtc)
{
//IL_0052: 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_009e: 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_00b9: Unknown result type (might be due to invalid IL or missing references)
damageReport.damageDealt = 0f;
hc.health = 1f;
body.AddBuff(Buffs.Immune);
jtc.reachedThreshold = true;
if (!JointThresholdController.AllJointsReachedThreshold())
{
return;
}
FathomlessMissionController instance = FathomlessMissionController.instance;
if (instance != null)
{
CharacterBody voidlingBody = instance.voidlingBody;
if (voidlingBody != null)
{
voidlingBody.healthComponent.Su