using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
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.Logging;
using EntityStates;
using EntityStates.Destructible;
using EntityStates.FalseSonBoss;
using EntityStates.MeridianEvent;
using EntityStates.PrimeMeridian;
using IL.RoR2;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates;
using On.EntityStates.Destructible;
using On.EntityStates.FalseSonBoss;
using On.EntityStates.MeridianEvent;
using On.EntityStates.PrimeMeridian;
using On.RoR2;
using R2API;
using RoR2;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using StormboundFalseSon.Main;
using StormboundFalseSon.Modules;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("StormboundFalseSon")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("StormboundFalseSon")]
[assembly: AssemblyTitle("StormboundFalseSon")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace StormboundFalseSon
{
internal static class Log
{
private static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
internal static void Debug(object data)
{
_logSource.LogDebug(data);
}
internal static void Error(object data)
{
_logSource.LogError(data);
}
internal static void Fatal(object data)
{
_logSource.LogFatal(data);
}
internal static void Info(object data)
{
_logSource.LogInfo(data);
}
internal static void Message(object data)
{
_logSource.LogMessage(data);
}
internal static void Warning(object data)
{
_logSource.LogWarning(data);
}
}
[BepInPlugin("com.Bloonjitsu7.StormboundFalseSon", "StormboundFalseSon", "0.1.1")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class StormboundFalseSonPlugin : BaseUnityPlugin
{
public void Awake()
{
Log.Init(((BaseUnityPlugin)this).Logger);
new ContentPacks().Initialize();
FalseSonChanges falseSonChanges = new FalseSonChanges();
falseSonChanges.Initialize();
}
}
}
namespace StormboundFalseSon.Modules
{
public static class DamageTypes
{
public static ModdedDamageType stormboundLightning = DamageAPI.ReserveDamageType();
public static ModdedDamageType stormboundLunarRuin = DamageAPI.ReserveDamageType();
public static ModdedDamageType stormboundLaser = DamageAPI.ReserveDamageType();
public static ModdedDamageType stormboundLaserTargeting = DamageAPI.ReserveDamageType();
}
public static class Buffs
{
internal static List<BuffDef> buffDefs = new List<BuffDef>();
internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden, bool ignoreNectar)
{
//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)
BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
((Object)val).name = buffName;
val.buffColor = buffColor;
val.canStack = canStack;
val.isDebuff = isDebuff;
val.eliteDef = null;
val.iconSprite = buffIcon;
val.isCooldown = isCooldown;
val.isHidden = isHidden;
val.ignoreGrowthNectar = ignoreNectar;
buffDefs.Add(val);
return val;
}
}
public static class EnemiesPlusUtils
{
public static void ReorderSkillDrivers(this GameObject master, AISkillDriver targetSkill, int targetIdx)
{
AISkillDriver[] components = master.GetComponents<AISkillDriver>();
master.ReorderSkillDrivers(components, Array.IndexOf(components, targetSkill), targetIdx);
}
public static void ReorderSkillDrivers(this GameObject master, AISkillDriver[] skills, int currentIdx, int targetIdx)
{
if (currentIdx < 0 || currentIdx >= skills.Length)
{
Log.Error($"{currentIdx} index not found or out of range. Must be less than {skills.Length}");
return;
}
string targetName = skills[currentIdx].customName;
if (targetIdx < 0 || targetIdx >= skills.Length)
{
Log.Error($"Unable to reorder skilldriver {targetName} into position {targetIdx}. target must be less than {skills.Length}");
}
else
{
if (targetIdx == currentIdx)
{
return;
}
Dictionary<string, string> dictionary = skills.Where((AISkillDriver s) => (Object)(object)s.nextHighPriorityOverride != (Object)null).ToDictionary((AISkillDriver s) => s.customName, (AISkillDriver s) => s.nextHighPriorityOverride.customName);
if (targetIdx > currentIdx)
{
master.AddComponentCopy<AISkillDriver>(skills[currentIdx]);
Object.DestroyImmediate((Object)(object)skills[currentIdx]);
}
for (int i = targetIdx; i < skills.Length; i++)
{
if (i != currentIdx)
{
master.AddComponentCopy<AISkillDriver>(skills[i]);
Object.DestroyImmediate((Object)(object)skills[i]);
}
}
skills = master.GetComponents<AISkillDriver>();
AISkillDriver val = ((IEnumerable<AISkillDriver>)skills).FirstOrDefault((Func<AISkillDriver, bool>)((AISkillDriver s) => s.customName == targetName));
if (!dictionary.Any())
{
return;
}
foreach (AISkillDriver val2 in skills)
{
string target = "";
if (val2.customName != null)
{
target = val2.customName;
}
if (Object.op_Implicit((Object)(object)val2) && dictionary.TryGetValue(val2.customName, out target))
{
AISkillDriver val3 = ((IEnumerable<AISkillDriver>)skills).FirstOrDefault((Func<AISkillDriver, bool>)((AISkillDriver s) => s.customName == target));
if (!((Object)(object)val3 == (Object)null))
{
val2.nextHighPriorityOverride = val3;
}
}
}
}
}
public static T GetCopyOf<T>(this Component comp, T other) where T : Component
{
Type type = ((object)comp).GetType();
if (type != ((object)other).GetType())
{
return default(T);
}
BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
PropertyInfo[] properties = type.GetProperties(bindingAttr);
PropertyInfo[] array = properties;
foreach (PropertyInfo propertyInfo in array)
{
if (propertyInfo.CanWrite)
{
try
{
propertyInfo.SetValue(comp, propertyInfo.GetValue(other, null), null);
}
catch
{
}
}
}
FieldInfo[] fields = type.GetFields(bindingAttr);
FieldInfo[] array2 = fields;
foreach (FieldInfo fieldInfo in array2)
{
fieldInfo.SetValue(comp, fieldInfo.GetValue(other));
}
return (T)(object)((comp is T) ? comp : null);
}
public static T AddComponentCopy<T>(this GameObject go, T toAdd) where T : Component
{
return ((Component)(object)go.AddComponent<T>()).GetCopyOf(toAdd);
}
}
public class Skills
{
public class AISkillDriverData
{
public GameObject masterPrefab;
public string customName;
public SkillSlot skillSlot;
public float minDistance = 0f;
public float maxDistance = float.PositiveInfinity;
public int desiredIndex = 0;
public float moveInputScale = 1f;
public MovementType movementType;
public AimType aimType;
public TargetType targetType;
public bool ignoreNodeGraph = false;
public float maxHealthFraction = float.PositiveInfinity;
public float minHealthFraction = float.NegativeInfinity;
public float maxTargetHealthFraction = float.PositiveInfinity;
public float minTargetHealthFraction = float.NegativeInfinity;
public bool requireReady = false;
public SkillDef requiredSkillDef = null;
public bool activationRequiresAimTargetLoS = false;
public bool activationRequiresAimConfirmation = false;
public bool activationRequiresTargetLoS = false;
public bool selectionRequiresAimTarget = false;
public bool selectionRequiresOnGround = false;
public bool selectionRequiresTargetLoS = false;
public bool selectionRequiresTargetNonFlier = false;
public int maxTimesSelected = -1;
public float driverUpdateTimerOverride = -1f;
public bool noRepeat = false;
public AISkillDriver nextHighPriorityOverride = null;
public bool shouldSprint = false;
public float aimVectorMaxSpeedOverride = -1f;
public ButtonPressType buttonPressType = (ButtonPressType)0;
}
public static AISkillDriver CreateAISkillDriver(AISkillDriverData data)
{
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: 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_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: Unknown result type (might be due to invalid IL or missing references)
//IL_0191: Unknown result type (might be due to invalid IL or missing references)
if (data == null || (Object)(object)data.masterPrefab == (Object)null)
{
Log.Error("Could not create AISkillDriver");
return null;
}
AISkillDriver val = data.masterPrefab.AddComponent<AISkillDriver>();
val.customName = data.customName;
val.skillSlot = data.skillSlot;
val.minDistance = data.minDistance;
val.maxDistance = data.maxDistance;
val.moveInputScale = data.moveInputScale;
val.movementType = data.movementType;
val.aimType = data.aimType;
val.moveTargetType = data.targetType;
val.ignoreNodeGraph = data.ignoreNodeGraph;
val.maxUserHealthFraction = data.maxHealthFraction;
val.minUserHealthFraction = data.minHealthFraction;
val.maxTargetHealthFraction = data.maxTargetHealthFraction;
val.minTargetHealthFraction = data.minTargetHealthFraction;
val.requireSkillReady = data.requireReady;
val.requiredSkill = data.requiredSkillDef;
val.activationRequiresAimConfirmation = data.activationRequiresAimConfirmation;
val.activationRequiresAimTargetLoS = data.activationRequiresAimTargetLoS;
val.activationRequiresTargetLoS = data.activationRequiresTargetLoS;
val.selectionRequiresAimTarget = data.selectionRequiresAimTarget;
val.selectionRequiresOnGround = data.selectionRequiresOnGround;
val.selectionRequiresTargetLoS = data.selectionRequiresTargetLoS;
val.selectionRequiresTargetNonFlier = data.selectionRequiresTargetNonFlier;
val.maxTimesSelected = data.maxTimesSelected;
val.driverUpdateTimerOverride = data.driverUpdateTimerOverride;
val.noRepeat = data.noRepeat;
val.nextHighPriorityOverride = data.nextHighPriorityOverride;
val.shouldSprint = data.shouldSprint;
val.aimVectorMaxSpeedOverride = data.aimVectorMaxSpeedOverride;
val.buttonPressType = data.buttonPressType;
data.masterPrefab.ReorderSkillDrivers(val, data.desiredIndex);
return val;
}
}
internal class ContentPacks : IContentPackProvider
{
internal ContentPack contentPack = new ContentPack();
public string identifier => "com.Bloonjitsu7.BloonModpackBaseMod";
public void Initialize()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
}
private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider)
{
addContentPackProvider.Invoke((IContentPackProvider)(object)this);
}
public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
{
contentPack.identifier = identifier;
contentPack.buffDefs.Add(Buffs.buffDefs.ToArray());
args.ReportProgress(1f);
yield break;
}
public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
{
ContentPack.Copy(contentPack, args.output);
args.ReportProgress(1f);
yield break;
}
public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
{
args.ReportProgress(1f);
yield break;
}
}
}
namespace StormboundFalseSon.Main
{
public class FalseSonChanges
{
public float phase1StrikeInterval = 3.5f;
public float phase2StrikeInterval = 4f;
public float phase3StrikeInterval = 4.5f;
public float phase1AmbientStrikeSpeed = 2f;
public float phase2AmbientStrikeSpeed = 1.75f;
public float phase3AmbientStrikeSpeed = 1.5f;
public int currentPhase = 0;
public List<LightningStrikePoint> lightningPoints;
private BlastAttack _blastInfo = null;
private Vector3[] testPattern = (Vector3[])(object)new Vector3[9]
{
new Vector3(0f, 0f, 0f),
new Vector3(30f, 0f, -30f),
new Vector3(30f, 0f, 0f),
new Vector3(30f, 0f, 30f),
new Vector3(0f, 0f, 30f),
new Vector3(-30f, 0f, 30f),
new Vector3(-30f, 0f, 0f),
new Vector3(-30f, 0f, -30f),
new Vector3(0f, 0f, -30f)
};
private static Vector3[] pattern1a = (Vector3[])(object)new Vector3[12]
{
new Vector3(0f, 0f, 30f),
new Vector3(15f, 0f, 27f),
new Vector3(27f, 0f, 15f),
new Vector3(30f, 0f, 0f),
new Vector3(27f, 0f, -15f),
new Vector3(15f, 0f, -27f),
new Vector3(0f, 0f, -30f),
new Vector3(-15f, 0f, -27f),
new Vector3(-27f, 0f, -15f),
new Vector3(-30f, 0f, 0f),
new Vector3(-27f, 0f, 15f),
new Vector3(-15f, 0f, 27f)
};
private static Vector3[] pattern1b = (Vector3[])(object)new Vector3[12]
{
new Vector3(12.5f, 0f, 12.5f),
new Vector3(12.5f, 0f, -12.5f),
new Vector3(-12.5f, 0f, 12.5f),
new Vector3(-12.5f, 0f, -12.5f),
new Vector3(25f, 0f, 25f),
new Vector3(25f, 0f, -25f),
new Vector3(-25f, 0f, 25f),
new Vector3(-25f, 0f, -25f),
new Vector3(37.5f, 0f, 37.5f),
new Vector3(37.5f, 0f, -37.5f),
new Vector3(-37.5f, 0f, 37.5f),
new Vector3(-37.5f, 0f, -37.5f)
};
private static Vector3[] pattern1c = (Vector3[])(object)new Vector3[36]
{
new Vector3(10f, 0f, 10f),
new Vector3(10f, 0f, -10f),
new Vector3(-10f, 0f, 10f),
new Vector3(-10f, 0f, -10f),
new Vector3(20f, 0f, 20f),
new Vector3(20f, 0f, -20f),
new Vector3(-20f, 0f, 20f),
new Vector3(-20f, 0f, -20f),
new Vector3(20f, 0f, 0f),
new Vector3(20f, 0f, -0f),
new Vector3(-20f, 0f, 0f),
new Vector3(-20f, 0f, -0f),
new Vector3(30f, 0f, 30f),
new Vector3(30f, 0f, -30f),
new Vector3(-30f, 0f, 30f),
new Vector3(-30f, 0f, -30f),
new Vector3(30f, 0f, 10f),
new Vector3(30f, 0f, -10f),
new Vector3(-30f, 0f, 10f),
new Vector3(-30f, 0f, -10f),
new Vector3(10f, 0f, 30f),
new Vector3(10f, 0f, -30f),
new Vector3(-10f, 0f, 30f),
new Vector3(-10f, 0f, -30f),
new Vector3(40f, 0f, 20f),
new Vector3(40f, 0f, -20f),
new Vector3(40f, 0f, 0f),
new Vector3(-40f, 0f, 20f),
new Vector3(-40f, 0f, -20f),
new Vector3(-40f, 0f, 0f),
new Vector3(20f, 0f, 40f),
new Vector3(-20f, 0f, 40f),
new Vector3(0f, 0f, 40f),
new Vector3(20f, 0f, -40f),
new Vector3(-20f, 0f, -40f),
new Vector3(0f, 0f, -40f)
};
private static Vector3[] pattern1d = (Vector3[])(object)new Vector3[12]
{
new Vector3(0f, 0f, 15f),
new Vector3(10f, 0f, 5f),
new Vector3(-10f, 0f, 5f),
new Vector3(0f, 0f, 45f),
new Vector3(10f, 0f, 35f),
new Vector3(-10f, 0f, 35f),
new Vector3(30f, 0f, 15f),
new Vector3(40f, 0f, 5f),
new Vector3(30f, 0f, -5f),
new Vector3(-30f, 0f, 15f),
new Vector3(-40f, 0f, 5f),
new Vector3(-30f, 0f, -5f)
};
private static Vector3[] pattern1e = (Vector3[])(object)new Vector3[12]
{
new Vector3(0f, 0f, 35f),
new Vector3(10f, 0f, 25f),
new Vector3(-10f, 0f, 25f),
new Vector3(0f, 0f, -35f),
new Vector3(10f, 0f, -25f),
new Vector3(-10f, 0f, -25f),
new Vector3(25f, 0f, 10f),
new Vector3(35f, 0f, 0f),
new Vector3(25f, 0f, -10f),
new Vector3(-25f, 0f, 10f),
new Vector3(-35f, 0f, 0f),
new Vector3(-25f, 0f, -10f)
};
public List<Vector3[]> patternList1 = new List<Vector3[]> { pattern1a, pattern1b, pattern1e };
private static Vector3[] pattern2a = (Vector3[])(object)new Vector3[16]
{
new Vector3(0f, 0f, 10f),
new Vector3(-10f, 0f, 20f),
new Vector3(0f, 0f, 20f),
new Vector3(10f, 0f, 20f),
new Vector3(-12f, 0f, 30f),
new Vector3(0f, 0f, 30f),
new Vector3(12f, 0f, 30f),
new Vector3(-14f, 0f, 40f),
new Vector3(0f, 0f, 40f),
new Vector3(14f, 0f, 40f),
new Vector3(-16f, 0f, 50f),
new Vector3(0f, 0f, 50f),
new Vector3(16f, 0f, 50f),
new Vector3(-18f, 0f, 60f),
new Vector3(0f, 0f, 60f),
new Vector3(18f, 0f, 60f)
};
private static Vector3[] pattern2b = (Vector3[])(object)new Vector3[16]
{
new Vector3(0f, 0f, 45f),
new Vector3(18f, 0f, 42f),
new Vector3(33f, 0f, 33f),
new Vector3(42f, 0f, 18f),
new Vector3(45f, 0f, 0f),
new Vector3(42f, 0f, -18f),
new Vector3(33f, 0f, -33f),
new Vector3(18f, 0f, -42f),
new Vector3(0f, 0f, -45f),
new Vector3(-18f, 0f, -42f),
new Vector3(-33f, 0f, -33f),
new Vector3(-42f, 0f, -18f),
new Vector3(-45f, 0f, 0f),
new Vector3(-42f, 0f, 18f),
new Vector3(-33f, 0f, 33f),
new Vector3(-18f, 0f, 42f)
};
private static Vector3[] pattern2c = (Vector3[])(object)new Vector3[36]
{
new Vector3(10f, 0f, 0f),
new Vector3(-10f, 0f, 0f),
new Vector3(0f, 0f, 10f),
new Vector3(0f, 0f, -10f),
new Vector3(20f, 0f, 10f),
new Vector3(20f, 0f, -10f),
new Vector3(-20f, 0f, 10f),
new Vector3(-20f, 0f, -10f),
new Vector3(30f, 0f, 20f),
new Vector3(30f, 0f, -20f),
new Vector3(30f, 0f, 0f),
new Vector3(-30f, 0f, 20f),
new Vector3(-30f, 0f, -20f),
new Vector3(-30f, 0f, 0f),
new Vector3(20f, 0f, 30f),
new Vector3(-20f, 0f, 30f),
new Vector3(0f, 0f, 30f),
new Vector3(20f, 0f, -30f),
new Vector3(-20f, 0f, -30f),
new Vector3(0f, 0f, -30f),
new Vector3(40f, 0f, 30f),
new Vector3(40f, 0f, -30f),
new Vector3(40f, 0f, 10f),
new Vector3(40f, 0f, -10f),
new Vector3(-40f, 0f, 30f),
new Vector3(-40f, 0f, -30f),
new Vector3(-40f, 0f, 10f),
new Vector3(-40f, 0f, -10f),
new Vector3(30f, 0f, 40f),
new Vector3(-30f, 0f, 40f),
new Vector3(10f, 0f, 40f),
new Vector3(-10f, 0f, 40f),
new Vector3(30f, 0f, -40f),
new Vector3(-30f, 0f, -40f),
new Vector3(10f, 0f, -40f),
new Vector3(-10f, 0f, -40f)
};
private static Vector3[] pattern2d = (Vector3[])(object)new Vector3[16]
{
new Vector3(10f, 0f, 27.5f),
new Vector3(10f, 0f, 40f),
new Vector3(10f, 0f, 52.5f),
new Vector3(10f, 0f, 15f),
new Vector3(-10f, 0f, 27.5f),
new Vector3(-10f, 0f, 40f),
new Vector3(-10f, 0f, 52.5f),
new Vector3(-10f, 0f, 15f),
new Vector3(25f, 0f, 10f),
new Vector3(25f, 0f, 22.5f),
new Vector3(25f, 0f, 35f),
new Vector3(25f, 0f, -2.5f),
new Vector3(-25f, 0f, 10f),
new Vector3(-25f, 0f, 22.5f),
new Vector3(-25f, 0f, 35f),
new Vector3(-25f, 0f, -2.5f)
};
public List<Vector3[]> patternList2 = new List<Vector3[]> { pattern2a, pattern2b, pattern2d };
public BullseyeSearch enemyFinder = new BullseyeSearch();
public static DotIndex devastatorDotIndex;
private static GameObject warningPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Common.TeamAreaIndicator__GroundOnly_prefab).WaitForCompletion();
private static GameObject stakePrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSon.LunarStake_prefab).WaitForCompletion();
private static GameObject devastatorEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_Elites_EliteBead.EliteBeadCrystalExplosionVFX_prefab).WaitForCompletion();
private static GameObject laserAimPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSon.FalseSonChargedLaser_prefab).WaitForCompletion();
public bool hardMode = false;
private static GameObject fs1BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBody_prefab).WaitForCompletion();
private static GameObject fs2BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBodyLunarShard_prefab).WaitForCompletion();
private static GameObject fs3BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBodyBrokenLunarShard_prefab).WaitForCompletion();
private static GameObject fs1MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossMaster_prefab).WaitForCompletion();
private static GameObject fs2MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLunarShardMaster_prefab).WaitForCompletion();
private static GameObject fs3MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLunarShardBrokenMaster_prefab).WaitForCompletion();
public AISkillDriver fs2pillarDriver;
public static BuffDef StormboundDevastatorDebuff;
public static BuffDef LaserTargetDebuff;
public float dashLightningTimer = 0f;
public float speedoverride = -1f;
public bool chargedStake = false;
public void Initialize()
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Expected O, but got Unknown
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Expected O, but got Unknown
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Expected O, but got Unknown
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Expected O, but got Unknown
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Expected O, but got Unknown
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Expected O, but got Unknown
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Expected O, but got Unknown
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Expected O, but got Unknown
//IL_010b: Unknown result type (might be due to invalid IL or missing references)
//IL_0115: Expected O, but got Unknown
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_0127: Expected O, but got Unknown
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Expected O, but got Unknown
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
//IL_014b: Expected O, but got Unknown
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Expected O, but got Unknown
//IL_0165: Unknown result type (might be due to invalid IL or missing references)
//IL_016f: Expected O, but got Unknown
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
//IL_0181: Expected O, but got Unknown
//IL_0189: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Expected O, but got Unknown
//IL_019b: Unknown result type (might be due to invalid IL or missing references)
//IL_01a5: Expected O, but got Unknown
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Expected O, but got Unknown
//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
//IL_01c9: Expected O, but got Unknown
//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
//IL_01db: Expected O, but got Unknown
//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Expected O, but got Unknown
//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Expected O, but got Unknown
//IL_0207: Unknown result type (might be due to invalid IL or missing references)
//IL_0211: Expected O, but got Unknown
//IL_0219: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Expected O, but got Unknown
//IL_022b: Unknown result type (might be due to invalid IL or missing references)
//IL_0235: Expected O, but got Unknown
CreateBuffs();
SetupAIFixes();
devastatorDotIndex = DotAPI.RegisterDotDef(0.75f, 0.5f, (DamageColorIndex)16, StormboundDevastatorDebuff, (CustomDotBehaviour)null, (CustomDotVisual)null);
HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamage);
GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt;
Run.onRunStartGlobal += Run_onRunStartGlobal;
Run.onRunDestroyGlobal += Run_onRunDestroyGlobal;
GlobalEventManager.ProcessHitEnemy += new Manipulator(LunarRuinDotFix);
FrozenState.OnEnter += new hook_OnEnter(OnFrozenStateEnter);
CorruptedPathsDash.GetNextStateAuthority += new hook_GetNextStateAuthority(CorruptedPathsDash_GetNextStateAuthority);
Phase1.FixedUpdate += new hook_FixedUpdate(OnPhase1Update);
Phase2.OnEnter += new hook_OnEnter(OnPhase2Enter);
Phase3.OnEnter += new hook_OnEnter(OnPhase3Enter);
Phase3.OnBossGroupDefeated += new hook_OnBossGroupDefeated(OnPhase3Finish);
FissureSlam.HasLoSToPlayer += new hook_HasLoSToPlayer(OnFissureSlamLoS);
FissureSlam.DetonateAuthority += new hook_DetonateAuthority(OnFissureSlamDetonate);
SwatAwayPlayersWindup.OnEnter += new hook_OnEnter(OnSwatEnter);
SwatAwayPlayersWindup.GetNextStateAuthority += new hook_GetNextStateAuthority(OnSwatState);
LunarRainDeathState.Explode += new hook_Explode(OnLunarSpikeExplode);
LunarRainDeathState.OnEnter += new hook_OnEnter(OnLunarSpikeEnter);
LunarRain.OnEnter += new hook_OnEnter(OnLunarRainEnter);
LunarGazeLeap.OnEnter += new hook_OnEnter(OnLeapEnter);
LunarGazeLaserCharge.OnEnter += new hook_OnEnter(OnLaserChargeEnter);
LunarGazeLaserFire.UpdateTargettingLasers += new hook_UpdateTargettingLasers(OnLaserTarget);
PrimeDevastator.FixedUpdate += new hook_FixedUpdate(OnDevastatorUpdate);
PrimeDevastator.CreateOrbChain += new hook_CreateOrbChain(OnDevastatorOrb);
CorruptedPathsDash.OnEnter += new hook_OnEnter(OnDashEnter);
CorruptedPathsDash.FixedUpdate += new hook_FixedUpdate(OnDashUpdate);
LightningStrikeInstance.SetupDefaultBlastInfo += new hook_SetupDefaultBlastInfo(OnSetupLightning);
TaintedOffering.FireProjectile += new hook_FireProjectile(OnTaintedOfferingFire);
TaintedOffering.FixedUpdate += new hook_FixedUpdate(OnTaintedOfferingUpdate);
TaintedOffering.OnEnter += new hook_OnEnter(OnTaintedOfferingEnter);
}
private void SetupAIFixes()
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: 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_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
//IL_03be: Unknown result type (might be due to invalid IL or missing references)
//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
//IL_059d: Unknown result type (might be due to invalid IL or missing references)
//IL_069a: Unknown result type (might be due to invalid IL or missing references)
//IL_06a2: Unknown result type (might be due to invalid IL or missing references)
//IL_06b2: Unknown result type (might be due to invalid IL or missing references)
//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
//IL_04d2: Unknown result type (might be due to invalid IL or missing references)
//IL_04da: Unknown result type (might be due to invalid IL or missing references)
//IL_0455: Unknown result type (might be due to invalid IL or missing references)
//IL_045a: Unknown result type (might be due to invalid IL or missing references)
//IL_0462: Unknown result type (might be due to invalid IL or missing references)
//IL_0467: Unknown result type (might be due to invalid IL or missing references)
//IL_046f: Unknown result type (might be due to invalid IL or missing references)
//IL_0474: Unknown result type (might be due to invalid IL or missing references)
//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
//IL_07b6: Unknown result type (might be due to invalid IL or missing references)
//IL_07be: Unknown result type (might be due to invalid IL or missing references)
//IL_0739: Unknown result type (might be due to invalid IL or missing references)
//IL_073e: Unknown result type (might be due to invalid IL or missing references)
//IL_0746: Unknown result type (might be due to invalid IL or missing references)
//IL_074b: Unknown result type (might be due to invalid IL or missing references)
//IL_0753: Unknown result type (might be due to invalid IL or missing references)
//IL_0758: Unknown result type (might be due to invalid IL or missing references)
Skills.AISkillDriverData data = new Skills.AISkillDriverData
{
masterPrefab = fs2MasterPrefab,
customName = "moveAroundPillars",
skillSlot = (SkillSlot)0,
requireReady = false,
maxDistance = 40f,
targetType = (TargetType)3,
movementType = (MovementType)0,
aimType = (AimType)1,
shouldSprint = true,
desiredIndex = 7,
driverUpdateTimerOverride = -1f
};
Skills.CreateAISkillDriver(data);
Skills.AISkillDriverData data2 = new Skills.AISkillDriverData
{
masterPrefab = fs3MasterPrefab,
customName = "moveAroundPillars",
skillSlot = (SkillSlot)0,
requireReady = false,
maxDistance = 40f,
targetType = (TargetType)3,
movementType = (MovementType)0,
aimType = (AimType)1,
shouldSprint = true,
desiredIndex = 7,
driverUpdateTimerOverride = -1f
};
Skills.CreateAISkillDriver(data2);
AISkillDriver val = null;
AISkillDriver[] components = fs1MasterPrefab.GetComponents<AISkillDriver>();
AISkillDriver[] array = components;
foreach (AISkillDriver val2 in array)
{
string customName = val2.customName;
Log.Debug("False Son p1 " + customName);
if (customName == "FissureSlam")
{
val2.maxDistance = 30f;
val2.ignoreNodeGraph = true;
val2.activationRequiresTargetLoS = false;
}
if (customName == "Corrupted Paths (Step Brothers)")
{
val = val2;
Log.Debug("maxDistance: " + val2.maxDistance);
Log.Debug("minDistance: " + val2.minDistance);
Log.Debug("movementType: " + ((object)(MovementType)(ref val2.movementType)).ToString());
Log.Debug("aimType: " + ((object)(AimType)(ref val2.aimType)).ToString());
Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val2.moveTargetType)).ToString());
Log.Debug("aimVectorMaxSpeedOverride: " + val2.aimVectorMaxSpeedOverride);
Log.Debug("aimVectorDampTimeOverride: " + val2.aimVectorDampTimeOverride);
}
}
AISkillDriver[] components2 = fs2MasterPrefab.GetComponents<AISkillDriver>();
AISkillDriver[] array2 = components2;
foreach (AISkillDriver val3 in array2)
{
string customName2 = val3.customName;
Log.Debug("False Son p2 " + customName2);
if (customName2 == "FissureSlam")
{
val3.maxDistance = 40f;
val3.ignoreNodeGraph = true;
val3.activationRequiresTargetLoS = false;
val3.selectionRequiresTargetLoS = false;
val3.movementType = (MovementType)1;
val3.shouldSprint = true;
}
if (customName2 == "Follow Last Known Target")
{
Log.Debug("maxDistance: " + val3.maxDistance);
Log.Debug("minDistance: " + val3.minDistance);
Log.Debug("movementType: " + ((object)(MovementType)(ref val3.movementType)).ToString());
Log.Debug("aimType: " + ((object)(AimType)(ref val3.aimType)).ToString());
Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val3.moveTargetType)).ToString());
Log.Debug("aimVectorMaxSpeedOverride: " + val3.aimVectorMaxSpeedOverride);
Log.Debug("aimVectorDampTimeOverride: " + val3.aimVectorDampTimeOverride);
val3.moveTargetType = (TargetType)3;
val3.aimType = (AimType)1;
val3.shouldSprint = true;
val3.movementType = (MovementType)1;
val3.ignoreNodeGraph = true;
val3.resetCurrentEnemyOnNextDriverSelection = false;
val3.activationRequiresTargetLoS = false;
}
if (customName2 == "SwatAwayPlayers")
{
if ((Object)(object)val != (Object)null && hardMode)
{
val3.maxDistance = val.maxDistance;
val3.minDistance = val.minDistance;
val3.activationRequiresTargetLoS = val.activationRequiresTargetLoS;
val3.activationRequiresAimTargetLoS = val.activationRequiresAimTargetLoS;
val3.aimType = val.aimType;
val3.movementType = val.movementType;
val3.moveTargetType = val.moveTargetType;
val3.aimVectorMaxSpeedOverride = val.aimVectorMaxSpeedOverride;
val3.aimVectorDampTimeOverride = val.aimVectorDampTimeOverride;
val3.selectionRequiresTargetLoS = false;
}
else
{
val3.maxDistance = 120f;
val3.minDistance = 20f;
val3.activationRequiresTargetLoS = false;
val3.activationRequiresAimTargetLoS = false;
val3.aimType = (AimType)2;
val3.movementType = (MovementType)0;
val3.moveTargetType = (TargetType)0;
val3.selectionRequiresTargetLoS = false;
}
}
if (customName2 == "Corrupted Paths (Step Brothers)")
{
val3.maxDistance = 0f;
val3.minDistance = 0f;
}
}
AISkillDriver[] components3 = fs3MasterPrefab.GetComponents<AISkillDriver>();
AISkillDriver[] array3 = components3;
foreach (AISkillDriver val4 in array3)
{
string customName3 = val4.customName;
Log.Debug("False Son p3 " + customName3);
if (customName3 == "FissureSlam")
{
val4.maxDistance = 40f;
val4.ignoreNodeGraph = true;
val4.activationRequiresTargetLoS = false;
val4.selectionRequiresTargetLoS = false;
val4.movementType = (MovementType)1;
val4.shouldSprint = true;
}
if (customName3 == "Follow Last Known Target")
{
Log.Debug("maxDistance: " + val4.maxDistance);
Log.Debug("minDistance: " + val4.minDistance);
Log.Debug("movementType: " + ((object)(MovementType)(ref val4.movementType)).ToString());
Log.Debug("aimType: " + ((object)(AimType)(ref val4.aimType)).ToString());
Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val4.moveTargetType)).ToString());
Log.Debug("aimVectorMaxSpeedOverride: " + val4.aimVectorMaxSpeedOverride);
Log.Debug("aimVectorDampTimeOverride: " + val4.aimVectorDampTimeOverride);
val4.moveTargetType = (TargetType)3;
val4.aimType = (AimType)1;
val4.shouldSprint = true;
val4.movementType = (MovementType)1;
val4.ignoreNodeGraph = true;
val4.resetCurrentEnemyOnNextDriverSelection = false;
val4.activationRequiresTargetLoS = false;
}
if (customName3 == "SwatAwayPlayers")
{
if ((Object)(object)val != (Object)null && hardMode)
{
val4.maxDistance = val.maxDistance;
val4.minDistance = val.minDistance;
val4.activationRequiresTargetLoS = val.activationRequiresTargetLoS;
val4.activationRequiresAimTargetLoS = val.activationRequiresAimTargetLoS;
val4.aimType = val.aimType;
val4.movementType = val.movementType;
val4.moveTargetType = val.moveTargetType;
val4.aimVectorMaxSpeedOverride = val.aimVectorMaxSpeedOverride;
val4.aimVectorDampTimeOverride = val.aimVectorDampTimeOverride;
val4.selectionRequiresTargetLoS = false;
}
else
{
val4.maxDistance = 120f;
val4.minDistance = 20f;
val4.activationRequiresTargetLoS = false;
val4.activationRequiresAimTargetLoS = false;
val4.aimType = (AimType)2;
val4.movementType = (MovementType)0;
val4.moveTargetType = (TargetType)0;
val4.selectionRequiresTargetLoS = false;
}
}
}
}
private void CreateBuffs()
{
//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_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
StormboundDevastatorDebuff = Buffs.AddNewBuff("BloonStormboundDevastatorDebuff", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/DLC3/Buffs/texElectrocutedDebuffIcon.png").WaitForCompletion(), Color.yellow, canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: true);
LaserTargetDebuff = Buffs.AddNewBuff("BloonLaserTargetDebuff", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/CritOnUse/texBuffFullCritIcon.tif").WaitForCompletion(), Color.yellow, canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true);
}
private void OnTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo info)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
if ((DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLightning) || DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLunarRuin)) && Object.op_Implicit((Object)(object)self.body))
{
self.body.AddTimedBuff(Buffs.lunarruin, 420f);
}
if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLightning) && Object.op_Implicit((Object)(object)self.body))
{
info.damage = self.fullCombinedHealth * 0.15f;
}
if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaser) && Object.op_Implicit((Object)(object)self.body))
{
self.body.AddTimedBuff(LaserTargetDebuff, 2.5f, 10);
self.body.SetTimedBuffDurationIfPresent(LaserTargetDebuff, 0.5f, true);
self.body.AddTimedBuff(Buffs.lunarruin, 420f);
}
if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaserTargeting) && Object.op_Implicit((Object)(object)self.body))
{
self.body.AddTimedBuff(LaserTargetDebuff, 2.5f, 10);
self.body.SetTimedBuffDurationIfPresent(LaserTargetDebuff, 0.5f, true);
info.damage = 0f;
}
orig.Invoke(self, info);
}
private void GlobalEventManager_onServerDamageDealt(DamageReport report)
{
//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)
//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_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Expected O, but got Unknown
HealthComponent victim = report.victim;
CharacterBody attackerBody = report.attackerBody;
if (report.dotType == devastatorDotIndex && (Object)(object)victim != (Object)null)
{
victim.body.AddTimedBuff(Buffs.lunarruin, 420f);
Util.PlaySound("Play_item_use_BFG_zaps", ((Component)victim).gameObject);
EffectData val = new EffectData
{
origin = report.victimBody.footPosition,
scale = 0.75f,
rootObject = ((Component)report.victim).gameObject
};
EffectManager.SpawnEffect(devastatorEffect, val, true);
}
}
private void Run_onRunStartGlobal(Run obj)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Invalid comparison between Unknown and I4
Log.Debug($"{obj.selectedDifficulty} {(object)(DifficultyIndex)9}");
if ((int)obj.selectedDifficulty >= 9)
{
SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("PrimeDevastator"));
SkillDef skillDef2 = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("LunarGazePlus"));
SkillDef val = SkillCatalog.allSkillDefs.FirstOrDefault((Func<SkillDef, bool>)((SkillDef skill) => skill.skillName == "Laser" && skill.baseRechargeInterval == 35f));
if ((Object)(object)skillDef == (Object)null || (Object)(object)skillDef2 == (Object)null || (Object)(object)val == (Object)null)
{
Log.Error($"One or more SkillDefs could not be found! Check skill names. {skillDef} | {skillDef2} | {val}");
return;
}
skillDef.baseRechargeInterval *= 1.5f;
skillDef2.baseRechargeInterval *= 1.5f;
val.baseRechargeInterval *= 1.5f;
Log.Debug($"Devestator Skill Cooldown: {skillDef.baseRechargeInterval}");
Log.Debug($"Lunar Gaze Plus Skill Cooldown: {skillDef2.baseRechargeInterval}");
Log.Debug($"Lunar Gaze Skill Cooldown: {val.baseRechargeInterval}");
}
}
private void Run_onRunDestroyGlobal(Run obj)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Invalid comparison between Unknown and I4
if ((int)obj.selectedDifficulty >= 9)
{
SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("PrimeDevastator"));
SkillDef skillDef2 = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("LunarGazePlus"));
SkillDef val = SkillCatalog.allSkillDefs.FirstOrDefault((Func<SkillDef, bool>)((SkillDef skill) => skill.skillName == "Laser" && skill.baseRechargeInterval == 52.5f));
if ((Object)(object)skillDef == (Object)null || (Object)(object)skillDef2 == (Object)null || (Object)(object)val == (Object)null)
{
Log.Error($"One or more SkillDefs could not be found! Check skill names. {skillDef} | {skillDef2} | {val}");
return;
}
skillDef.baseRechargeInterval /= 1.5f;
skillDef2.baseRechargeInterval /= 1.5f;
val.baseRechargeInterval /= 1.5f;
Log.Debug($"Devestator Skill Cooldown: {skillDef.baseRechargeInterval}");
Log.Debug($"Lunar Gaze Plus Skill Cooldown: {skillDef2.baseRechargeInterval}");
Log.Debug($"Lunar Gaze Skill Cooldown: {val.baseRechargeInterval}");
}
}
public void OnPhase1Update(orig_FixedUpdate orig, Phase1 self)
{
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Expected O, but got Unknown
orig.Invoke(self);
if (currentPhase != 1 && ((EntityState)self).fixedAge > ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.additionalEntryVFXDelay + ((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter + 4f)
{
currentPhase = 1;
LightningStrikePattern val = new LightningStrikePattern();
val.frequencyOfLightningStrikes = phase1StrikeInterval;
val.delayBeforeExpiringAPreviousStrikePoint = phase1StrikeInterval;
val.lightningWarningDuration = phase1AmbientStrikeSpeed;
LightningStormController.SetStormStrikePattern(val);
LightningStormController.SetStormActive(true);
}
}
public void OnPhase2Enter(orig_OnEnter orig, Phase2 self)
{
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
orig.Invoke(self);
((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter = 0f;
((FSBFPhaseBaseState)self).durationBeforeRingsSpawn = 0.5f;
currentPhase = 2;
LightningStrikePattern val = new LightningStrikePattern();
val.frequencyOfLightningStrikes = phase2StrikeInterval;
val.delayBeforeExpiringAPreviousStrikePoint = phase2StrikeInterval;
val.lightningWarningDuration = phase2AmbientStrikeSpeed;
LightningStormController.SetStormStrikePattern(val);
LightningStormController.SetStormActive(true);
}
public void OnPhase3Enter(orig_OnEnter orig, Phase3 self)
{
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
orig.Invoke(self);
LightningStormController.SetStormStrikePattern(((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern);
LightningStrikePattern val = new LightningStrikePattern();
val.frequencyOfLightningStrikes = phase3StrikeInterval;
val.delayBeforeExpiringAPreviousStrikePoint = phase3StrikeInterval;
val.lightningWarningDuration = phase3AmbientStrikeSpeed;
LightningStormController.SetStormStrikePattern(val);
LightningStormController.SetStormActive(true);
((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter = 0f;
((FSBFPhaseBaseState)self).durationBeforeRingsSpawn = 0.5f;
currentPhase = 3;
}
public void OnPhase3Finish(orig_OnBossGroupDefeated orig, Phase3 self, BossGroup bossGroup)
{
orig.Invoke(self, bossGroup);
if (!NetworkServer.active)
{
return;
}
foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
{
if (!((Object)(object)instance == (Object)null))
{
CharacterBody body = instance.master.GetBody();
if (!((Object)(object)body == (Object)null))
{
Util.CleanseBody(body, true, false, false, true, false, false);
}
}
}
}
public void OnSwatEnter(orig_OnEnter orig, SwatAwayPlayersWindup self)
{
if (currentPhase > 1)
{
self.stateAborted = true;
((EntityState)self).outer.SetNextState(self.GetNextStateAuthority());
}
else
{
orig.Invoke(self);
}
}
private EntityState OnSwatState(orig_GetNextStateAuthority orig, SwatAwayPlayersWindup self)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Expected O, but got Unknown
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
if (currentPhase > 1)
{
if (hardMode)
{
return (EntityState)new CorruptedPathsDash();
}
return (EntityState)new FissureSlamWindup();
}
return orig.Invoke(self);
}
public void IL_FissureSlamEnter(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)2;
ILLabel val7 = default(ILLabel);
if (val2.TryGotoNext(val4, new Func<Instruction, bool>[5]
{
(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val7),
(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(EntityState), "outer"),
(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(EntityStateMachine), "SetNextStateToMain"),
(Instruction x) => ILPatternMatchingExt.MatchRet(x)
}))
{
Instruction next = val.Next;
ILCursor val5 = val;
ILLabel val6 = default(ILLabel);
if (val5.TryGotoPrev(val4, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val6)
}))
{
val.Emit(OpCodes.Br, next);
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public bool OnFissureSlamLoS(orig_HasLoSToPlayer orig, FissureSlam self)
{
return true;
}
public Result OnFissureSlamDetonate(orig_DetonateAuthority orig, FissureSlam self)
{
//IL_0296: Unknown result type (might be due to invalid IL or missing references)
//IL_029b: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: 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_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: 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_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_029f: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_0116: Unknown result type (might be due to invalid IL or missing references)
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
//IL_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
//IL_0263: Unknown result type (might be due to invalid IL or missing references)
//IL_027a: Unknown result type (might be due to invalid IL or missing references)
if (((EntityState)self).isAuthority)
{
Vector3 position = ((Component)((BaseState)self).FindModelChild("ClubExplosionPoint")).transform.position;
float x = position.x;
float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y;
float z = position.z;
Vector3 val = default(Vector3);
((Vector3)(ref val))..ctor(x, y, z);
Vector3 val2 = default(Vector3);
((Vector3)(ref val2))..ctor(((EntityState)self).transform.position.x, y, ((EntityState)self).transform.position.z);
Quaternion val3 = Util.QuaternionSafeLookRotation(((EntityState)self).modelLocator.modelTransform.forward);
float num = val3.y * -135f;
float num2 = Vector3.Angle(val2, val);
int index = Random.Range(0, patternList1.Count);
Vector3[] array = patternList1[index];
float num3 = 1f;
Util.ShuffleArray<Vector3>(array);
for (int i = 0; i < 12; i++)
{
Vector3 val4 = array[i];
Vector3 val5 = Quaternion.AngleAxis(num, Vector3.down) * val4;
Vector3 val6 = val5 + val;
Object.Instantiate<GameObject>(LunarGazeExitLeap.lightningPrefab, val6, val3).GetComponent<LightningStrikeInstance>().Initialize(val6, _blastInfo, num3, true);
num3 += 0.025f;
}
if (currentPhase > 1)
{
int index2 = Random.Range(0, patternList2.Count);
Vector3[] array2 = patternList2[index2];
float num4 = 1.5f;
Util.ShuffleArray<Vector3>(array2);
for (int j = 0; j < 16; j++)
{
Vector3 val7 = array2[j];
Vector3 val8 = Quaternion.AngleAxis(num, Vector3.down) * val7;
Vector3 val9 = val + val8;
Object.Instantiate<GameObject>(LunarGazeExitLeap.lightningPrefab, val9, val3).GetComponent<LightningStrikeInstance>().Initialize(val9, _blastInfo, num4, true);
num4 += 0.02f;
}
}
BaseAI val10 = default(BaseAI);
if (((Component)((EntityState)self).characterBody.master).TryGetComponent<BaseAI>(ref val10) && currentPhase > 2)
{
Target currentEnemy = val10.currentEnemy;
if (currentEnemy != null && (Object)(object)val10.currentEnemy.gameObject != (Object)null)
{
x = currentEnemy.gameObject.transform.position.x;
z = currentEnemy.gameObject.transform.position.z;
Vector3 val11 = default(Vector3);
((Vector3)(ref val11))..ctor(x, y, z);
}
}
}
return orig.Invoke(self);
}
public void OnLunarSpikeExplode(orig_Explode orig, LunarRainDeathState self)
{
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Expected O, but got Unknown
//IL_00d5: 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_0121: Unknown result type (might be due to invalid IL or missing references)
//IL_012c: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Unknown result type (might be due to invalid IL or missing references)
//IL_0141: 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_0152: Unknown result type (might be due to invalid IL or missing references)
//IL_016f: 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_0181: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Expected O, but got Unknown
if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator))
{
if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator.modelBaseTransform))
{
EntityState.Destroy((Object)(object)((Component)((EntityState)self).modelLocator.modelBaseTransform).gameObject);
}
if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator.modelTransform))
{
EntityState.Destroy((Object)(object)((Component)((EntityState)self).modelLocator.modelTransform).gameObject);
}
}
if (Object.op_Implicit((Object)(object)LunarRainDeathState.explosionEffectPrefab))
{
EffectManager.SpawnEffect(LunarRainDeathState.explosionEffectPrefab, new EffectData
{
origin = ((EntityState)self).transform.position,
scale = LunarRainDeathState.vfxScale * 1.6f,
rotation = ((EntityState)self).transform.rotation
}, true);
}
BlastAttack val = new BlastAttack();
val.attacker = ((EntityState)self).gameObject;
val.damageColorIndex = (DamageColorIndex)3;
val.baseDamage = LunarRainDeathState.baseDamage * LunarRainDeathState.explosionDamageCoefficient * Run.instance.teamlessDamageCoefficient * 1.6f;
val.radius = LunarRainDeathState.explosionRadius * 1.4f;
val.falloffModel = (FalloffModel)3;
val.procCoefficient = LunarRainDeathState.explosionProcCoefficient;
val.teamIndex = (TeamIndex)2;
val.damageType = DamageTypeCombo.op_Implicit((DamageType)131072);
val.damageType.damageTypeExtended = (DamageTypeExtended)8192;
val.position = ((EntityState)self).transform.position;
val.baseForce = LunarRainDeathState.explosionForce;
val.canRejectForce = LunarRainDeathState.canRejectForce;
val.attackerFiltering = (AttackerFiltering)2;
DamageAPI.AddModdedDamageType(val, DamageTypes.stormboundLunarRuin);
val.Fire();
EntityState.Destroy((Object)(object)((EntityState)self).gameObject);
}
public void OnLunarSpikeEnter(orig_OnEnter orig, LunarRainDeathState self)
{
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: 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_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Expected O, but got Unknown
if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody))
{
((BaseState)self).attackSpeedStat = ((EntityState)self).characterBody.attackSpeed;
((BaseState)self).damageStat = ((EntityState)self).characterBody.damage;
((BaseState)self).critStat = ((EntityState)self).characterBody.crit;
((BaseState)self).moveSpeedStat = ((EntityState)self).characterBody.moveSpeed;
}
if ((Object)(object)((EntityState)self).teamComponent != (Object)null)
{
((EntityState)self).teamComponent.teamIndex = (TeamIndex)2;
}
if (Object.op_Implicit((Object)(object)LunarRainDeathState.chargePrefab))
{
GameObject val = Object.Instantiate<GameObject>(warningPrefab, ((EntityState)self).transform.position, Util.QuaternionSafeLookRotation(Vector3.up));
val.transform.localScale = Vector3.one * LunarRainDeathState.explosionRadius * 1.4f;
Object.Destroy((Object)(object)val, LunarRainDeathState.chargeDuration);
TeamAreaIndicator component = val.GetComponent<TeamAreaIndicator>();
if ((Object)(object)component != (Object)null)
{
component.teamComponent = ((EntityState)self).teamComponent;
}
EffectData val2 = new EffectData
{
scale = LunarRainDeathState.explosionRadius * 1.4f,
origin = ((EntityState)self).transform.position
};
EffectManager.SpawnEffect(LunarRainDeathState.chargePrefab, val2, false);
}
FlashEmission component2 = ((Component)((EntityState)self).modelLocator.modelTransform).GetComponent<FlashEmission>();
if (Object.op_Implicit((Object)(object)component2))
{
component2.StartFlash();
}
Util.PlaySound(LunarRainDeathState.explosiveIndicatorSoundString, ((EntityState)self).gameObject);
}
public void OnLunarRainEnter(orig_OnEnter orig, LunarRain self)
{
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: 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_0135: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_013f: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self);
BaseAI val = default(BaseAI);
if (!((Component)((EntityState)self).characterBody.master).TryGetComponent<BaseAI>(ref val))
{
return;
}
Target currentEnemy = val.currentEnemy;
if (currentEnemy == null || !((Object)(object)val.currentEnemy.gameObject != (Object)null))
{
return;
}
List<Vector3> list = new List<Vector3>();
if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance.groundNodes))
{
Debug.LogWarning((object)"No ground nodes available");
return;
}
NodeGraph groundNodes = SceneInfo.instance.groundNodes;
float x = currentEnemy.gameObject.transform.position.x;
float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y;
float z = currentEnemy.gameObject.transform.position.z;
float num = 20f;
if (currentPhase == 3)
{
num = 15f;
}
Vector3 val2 = default(Vector3);
((Vector3)(ref val2))..ctor(x, y, z);
Vector3 item = default(Vector3);
for (int i = 0; i < 3; i++)
{
List<NodeIndex> list2 = groundNodes.FindNodesInRange(val2, num * (float)i, num * (float)(i + 1), (HullMask)1);
foreach (NodeIndex item2 in list2)
{
if (groundNodes.GetNodePosition(item2, ref item))
{
list.Add(item);
}
}
Util.ShuffleList<Vector3>(list);
self.totalLunarDropsToFire++;
self.fissureLocs.Add(list[i]);
list.Clear();
}
}
public void OnDashEnter(orig_OnEnter orig, CorruptedPathsDash self)
{
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: 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_0055: Unknown result type (might be due to invalid IL or missing references)
CorruptedPathsDash.dashPrepDuration = 0.6f;
CorruptedPathsDash.smallHopVelocity = 0f;
orig.Invoke(self);
if (currentPhase == 1)
{
CorruptedPathsDash.dashDuration = Vector3.Distance(((Component)((EntityState)self).characterBody.master).GetComponent<BaseAI>().currentEnemy.characterBody.transform.position, ((EntityState)self).transform.position) * 0.13f / CorruptedPathsDash.speedCoefficient - CorruptedPathsDash.gapToEnemy;
}
else
{
CorruptedPathsDash.dashDuration = Vector3.Distance(((Component)((EntityState)self).characterBody.master).GetComponent<BaseAI>().currentEnemy.characterBody.transform.position, ((EntityState)self).transform.position) * 0.1f / CorruptedPathsDash.speedCoefficient - CorruptedPathsDash.gapToEnemy;
}
}
public void OnDashUpdate(orig_FixedUpdate orig, CorruptedPathsDash self)
{
//IL_0089: 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_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
self.overlapAttack.damage = 0f;
orig.Invoke(self);
if (self.stopwatch <= CorruptedPathsDash.dashDuration + CorruptedPathsDash.dashPrepDuration + 0.024f && self.stopwatch >= CorruptedPathsDash.dashPrepDuration)
{
if (self.stopwatch >= dashLightningTimer + 0.008f && ((EntityState)self).isAuthority)
{
dashLightningTimer = self.stopwatch;
float x = ((EntityState)self).gameObject.transform.position.x;
float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y;
float z = ((EntityState)self).gameObject.transform.position.z;
Vector3 val = default(Vector3);
((Vector3)(ref val))..ctor(x, y, z);
Object.Instantiate<GameObject>(LunarGazeExitLeap.lightningPrefab, val, ((EntityState)self).gameObject.transform.rotation).GetComponent<LightningStrikeInstance>().Initialize(val, _blastInfo, 0.4f, true);
}
}
else
{
dashLightningTimer = 0f;
}
}
public void OnDashExit(orig_OnExit orig, CorruptedPathsDash self)
{
orig.Invoke(self);
}
public void OnDevastatorUpdate(orig_FixedUpdate orig, PrimeDevastator self)
{
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime();
if (!self.chargeEffectSpawned && ((EntityState)self).fixedAge > self.duration * 0.3f)
{
self.chargeEffectSpawned = true;
}
if (!self.slamEffectSpawned && ((EntityState)self).fixedAge > PrimeDevastator.slamEffectDelay)
{
self.slamEffectSpawned = true;
self.DetonateAuthority();
self.ChainEffectToPlayers();
}
if (!self.orbsSpawned && ((EntityState)self).isAuthority && ((EntityState)self).fixedAge > PrimeDevastator.playerLightningDelay)
{
self.orbSpawnTimer += Time.deltaTime;
if (self.orbSpawnTimer > 0.35f)
{
self.FireDevastator("MuzzleOrb1");
self.orbNumber++;
self.orbSpawnTimer = 0f;
}
if (self.orbNumber >= 6)
{
self.orbsSpawned = true;
}
}
if (((EntityState)self).fixedAge >= self.duration + 1f && ((EntityState)self).isAuthority)
{
((EntityState)self).outer.SetNextStateToMain();
}
}
public void OnDevastatorFire(orig_FireDevastator orig, PrimeDevastator self, string targetMuzzle)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_011a: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
self.projectileRay = ((BaseState)self).GetAimRay();
if (Object.op_Implicit((Object)(object)self.modelTransform))
{
ChildLocator component = ((Component)self.modelTransform).GetComponent<ChildLocator>();
if (Object.op_Implicit((Object)(object)component))
{
Transform val = component.FindChild(targetMuzzle);
if (Object.op_Implicit((Object)(object)val))
{
((Ray)(ref self.projectileRay)).origin = val.position;
}
}
}
float num = 6f * (float)self.orbNumber;
if (((EntityState)self).isAuthority)
{
FireProjectileInfo val2 = default(FireProjectileInfo);
val2.projectilePrefab = PrimeDevastator.projectilePrefab;
val2.position = ((EntityState)self).gameObject.transform.position + new Vector3(num, 0f, 0f);
val2.rotation = Quaternion.identity;
val2.owner = ((EntityState)self).gameObject;
val2.damage = ((BaseState)self).damageStat * self.damageCoefficient;
val2.force = 0f;
val2.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master);
ProjectileManager.instance.FireProjectile(val2);
}
((EntityState)self).characterBody.AddSpreadBloom(PrimeDevastator.spreadBloomValue);
}
public void OnDevastatorOrb(orig_CreateOrbChain orig, PrimeDevastator self, Vector3 sourceOrigin, HurtBox targetHurtbox)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
StormboundPrimeDevastatorOrb stormboundPrimeDevastatorOrb = new StormboundPrimeDevastatorOrb();
((Orb)stormboundPrimeDevastatorOrb).origin = sourceOrigin;
((Orb)stormboundPrimeDevastatorOrb).target = targetHurtbox;
stormboundPrimeDevastatorOrb.lightningEffectPrefab = PrimeDevastator.lightningEffectPrefab;
stormboundPrimeDevastatorOrb.blastRadius = PrimeDevastator.blastRadius;
((GenericDamageOrb)stormboundPrimeDevastatorOrb).attacker = ((EntityState)self).gameObject;
OrbManager.instance.AddOrb((Orb)(object)stormboundPrimeDevastatorOrb);
}
public void IL_DevastatorUpdate(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: 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_008d: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f)
}))
{
val.Next.Operand = 0.35f;
ILCursor val4 = val;
if (val4.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 4)
}))
{
val.Next.Operand = 6;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void OnLeapEnter(orig_OnEnter orig, LunarGazeLeap self)
{
orig.Invoke(self);
if (((EntityState)self).isAuthority)
{
if (self.isPlus)
{
((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireLeapLightningPlus());
}
else
{
((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireLeapLightning());
}
}
}
private IEnumerator FireLeapLightning()
{
new List<NodeIndex>();
List<Vector3> possibleLightningPositions = new List<Vector3>();
Transform arenaCenter = MeridianEventTriggerInteraction.instance.arenaCenter;
if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance.groundNodes))
{
Debug.LogWarning((object)"No ground nodes available");
yield break;
}
NodeGraph nodeGraph = SceneInfo.instance.groundNodes;
List<NodeIndex> possibleLightningNodes = nodeGraph.FindNodesInRange(arenaCenter.position, 15f, 100f, (HullMask)1);
Vector3 item = default(Vector3);
foreach (NodeIndex nodeIndex in possibleLightningNodes)
{
if (nodeGraph.GetNodePosition(nodeIndex, ref item))
{
possibleLightningPositions.Add(item);
}
item = default(Vector3);
}
for (int i = 0; i < 40; i++)
{
int strikeCount = Random.RandomRangeInt(4, 6);
for (int j = 1; j < strikeCount; j++)
{
int rand = Random.RandomRangeInt(0, possibleLightningPositions.Count);
Vector3 vector = possibleLightningPositions[rand];
possibleLightningPositions.RemoveAt(rand);
Object.Instantiate<GameObject>(LunarGazeExitLeap.lightningPrefab, vector, arenaCenter.rotation).GetComponent<LightningStrikeInstance>().Initialize(vector, _blastInfo, 1.5f, true);
}
yield return (object)new WaitForSeconds(0.06f);
}
}
private IEnumerator FireLeapLightningPlus()
{
new List<NodeIndex>();
List<Vector3> possibleLightningPositions = new List<Vector3>();
Transform arenaCenter = MeridianEventTriggerInteraction.instance.arenaCenter;
if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance.groundNodes))
{
Debug.LogWarning((object)"No ground nodes available");
yield break;
}
NodeGraph nodeGraph = SceneInfo.instance.groundNodes;
List<NodeIndex> possibleLightningNodes = nodeGraph.FindNodesInRange(arenaCenter.position, 15f, 75f, (HullMask)1);
Vector3 item = default(Vector3);
foreach (NodeIndex nodeIndex in possibleLightningNodes)
{
if (nodeGraph.GetNodePosition(nodeIndex, ref item))
{
possibleLightningPositions.Add(item);
}
item = default(Vector3);
}
for (int i = 0; i < 40; i++)
{
int strikeCount = Random.RandomRangeInt(3, 5);
for (int j = 1; j < strikeCount; j++)
{
int rand = Random.RandomRangeInt(0, possibleLightningPositions.Count);
Vector3 vector = possibleLightningPositions[rand];
possibleLightningPositions.RemoveAt(rand);
Object.Instantiate<GameObject>(LunarGazeExitLeap.lightningPrefab, vector, arenaCenter.rotation).GetComponent<LightningStrikeInstance>().Initialize(vector, _blastInfo, 1.5f, true);
}
yield return (object)new WaitForSeconds(0.06f);
}
}
private void OnSetupLightning(orig_SetupDefaultBlastInfo orig, LightningStrikeInstance self, ref BlastAttack info)
{
//IL_000d: 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_0026: 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)
orig.Invoke(self, ref info);
info.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)2), (DamageTypeExtended)8192, (DamageSource)16);
info.falloffModel = (FalloffModel)0;
DamageAPI.AddModdedDamageType(info, DamageTypes.stormboundLightning);
}
public void OnTaintedOfferingEnter(orig_OnEnter orig, TaintedOffering self)
{
orig.Invoke(self);
((EntityState)self).characterBody.SetAimTimer(0.3f);
}
public void OnTaintedOfferingUpdate(orig_FixedUpdate orig, TaintedOffering self)
{
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
((GenericProjectileBaseState)self).stopwatch = ((GenericProjectileBaseState)self).stopwatch + ((EntityState)self).GetDeltaTime();
((EntityState)self).characterDirection.moveVector = ((EntityState)self).inputBank.aimDirection;
if (((GenericProjectileBaseState)self).stopwatch >= ((GenericProjectileBaseState)self).delayBeforeFiringProjectile && !((GenericProjectileBaseState)self).firedProjectile)
{
int num = Random.RandomRangeInt(0, 2);
((GenericProjectileBaseState)self).firedProjectile = true;
for (int num2 = 5; num2 > 0; num2--)
{
switch (num2)
{
case 1:
if (num > 0)
{
self.projectileYawBonus = -10f;
((GenericProjectileBaseState)self).projectilePitchBonus = 0f;
}
else
{
self.projectileYawBonus = -6f;
((GenericProjectileBaseState)self).projectilePitchBonus = 6f;
}
break;
case 2:
if (num > 0)
{
self.projectileYawBonus = 10f;
((GenericProjectileBaseState)self).projectilePitchBonus = 0f;
}
else
{
self.projectileYawBonus = 6f;
((GenericProjectileBaseState)self).projectilePitchBonus = -6f;
}
break;
case 3:
if (num > 0)
{
self.projectileYawBonus = 0f;
((GenericProjectileBaseState)self).projectilePitchBonus = -10f;
}
else
{
self.projectileYawBonus = 6f;
((GenericProjectileBaseState)self).projectilePitchBonus = 6f;
}
break;
case 4:
if (num > 0)
{
self.projectileYawBonus = 0f;
((GenericProjectileBaseState)self).projectilePitchBonus = 10f;
}
else
{
self.projectileYawBonus = -6f;
((GenericProjectileBaseState)self).projectilePitchBonus = -6f;
}
speedoverride = 35f;
break;
case 5:
self.projectileYawBonus = 0f;
((GenericProjectileBaseState)self).projectilePitchBonus = 0f;
chargedStake = true;
speedoverride = 50f;
break;
}
((GenericProjectileBaseState)self).FireProjectile();
}
((GenericProjectileBaseState)self).DoFireEffects();
}
if (((GenericProjectileBaseState)self).stopwatch >= ((GenericProjectileBaseState)self).baseDuration && ((EntityState)self).isAuthority)
{
((EntityState)self).outer.SetNextStateToMain();
}
}
public void OnTaintedOfferingFire(orig_FireProjectile orig, TaintedOffering self)
{
//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)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
if (((EntityState)self).isAuthority)
{
Ray val = ((BaseState)self).GetAimRay();
val = ((GenericProjectileBaseState)self).ModifyProjectileAimRay(val);
((Ray)(ref val)).direction = Util.ApplySpread(((Ray)(ref val)).direction, ((GenericProjectileBaseState)self).minSpread, ((GenericProjectileBaseState)self).maxSpread, 1f, 1f, self.projectileYawBonus, ((GenericProjectileBaseState)self).projectilePitchBonus);
if (chargedStake)
{
ProjectileManager.instance.FireProjectileWithoutDamageType(stakePrefab, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)self).gameObject, ((BaseState)self).damageStat * ((GenericProjectileBaseState)self).damageCoefficient, ((GenericProjectileBaseState)self).force, Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, speedoverride);
chargedStake = false;
}
else
{
ProjectileManager.instance.FireProjectileWithoutDamageType(((GenericProjectileBaseState)self).projectilePrefab, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)self).gameObject, ((BaseState)self).damageStat * ((GenericProjectileBaseState)self).damageCoefficient, ((GenericProjectileBaseState)self).force, Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, speedoverride);
}
}
}
private void OnLaserChargeEnter(orig_OnEnter orig, LunarGazeLaserCharge self)
{
orig.Invoke(self);
}
private void OnLaserTarget(orig_UpdateTargettingLasers orig, LunarGazeLaserFire self)
{
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Invalid comparison between Unknown and I4
//IL_00df: 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_00ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: 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_0158: 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_0183: Unknown result type (might be due to invalid IL or missing references)
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_018d: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Unknown result type (might be due to invalid IL or missing references)
//IL_019c: Unknown result type (might be due to invalid IL or missing references)
//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
//IL_0213: Unknown result type (might be due to invalid IL or missing references)
//IL_0218: Unknown result type (might be due to invalid IL or missing references)
//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0201: Unknown result type (might be due to invalid IL or missing references)
//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
//IL_02d7: 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_022f: Unknown result type (might be due to invalid IL or missing references)
//IL_0234: Unknown result type (might be due to invalid IL or missing references)
//IL_0239: Unknown result type (might be due to invalid IL or missing references)
//IL_0250: Unknown result type (might be due to invalid IL or missing references)
self.lockOnDelayDuration = 1f;
self.fireFrequency = 5f;
self.lunarRuinProcChancePerBullet = 100f;
self.duration = 13f;
if (currentPhase == 3)
{
self.duration = 15f;
self.lockOnDelayDuration = 0.5f;
self.fireFrequency = 6f;
}
bool laserActive = false;
List<LaserTargetInfo> laserTargets = self.laserTargets;
float deltaTime = ((EntityState)self).GetDeltaTime();
Ray val3 = default(Ray);
RaycastHit val4 = default(RaycastHit);
foreach (LaserTargetInfo laserTarget in self.laserTargets)
{
Vector3 val;
if (Object.op_Implicit((Object)(object)laserTarget.body) && (int)laserTarget.body.GetVisibilityLevel(((EntityState)self).characterBody) >= 3)
{
val = ((Component)laserTarget.hurtbox).transform.position;
}
else
{
laserTarget.lastLockedOnPosition = ((Component)laserTarget.laserEffectEnd).transform.position;
laserTarget.isLockOnDelayComplete = false;
laserTarget.lockOnStopwatch = 0f;
val = laserTarget.lastLockedOnPosition;
}
if (!laserTarget.isLockOnDelayComplete)
{
laserTarget.lockOnStopwatch += deltaTime;
float num = laserTarget.lockOnStopwatch / self.lockOnDelayDuration;
float num2 = num * num;
val = Vector3.Lerp(laserTarget.lastLockedOnPosition, val, Mathf.Min(num2, 1f));
laserTarget.isLockOnDelayComplete = num >= 1f;
}
else
{
laserTarget.lastLockedOnPosition = val;
}
Vector3 val2 = val - self.muzzleTransform.position;
((Ray)(ref val3))..ctor(self.muzzleTransform.position, val2);
if (Object.op_Implicit((Object)(object)laserTarget.laserEffect))
{
val = ((!Util.CharacterRaycast(self.meridianStatueHeadObject, val3, ref val4, self.maxDistance, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) ? laserTarget.body.transform.position : ((RaycastHit)(ref val4)).point);
laserTarget.laserEffect.transform.rotation = Util.QuaternionSafeLookRotation(val - self.muzzleTransform.position);
((Component)laserTarget.laserEffectEnd).transform.position = val;
}
if (!(self.fireStopwatch > 1f / self.fireFrequency))
{
continue;
}
string targetMuzzle = "HeadMuzzleLaser";
if (laserTarget.body.HasBuff(LaserTargetDebuff))
{
int num3 = 0;
num3 = laserTarget.body.GetBuffCount(LaserTargetDebuff);
if (num3 >= 10)
{
laserActive = true;
}
}
Transform meridianStatueHeadTransform = self.meridianStatueHeadTransform;
Ray aimRay = val3;
Vector3 val5 = val - ((Ray)(ref val3)).origin;
ModdedFireBullet(self, meridianStatueHeadTransform, aimRay, targetMuzzle, ((Vector3)(ref val5)).magnitude + 0.1f, laserActive);
}
}
private void ModdedFireBullet(LunarGazeLaserFire self, Transform modelTransform, Ray aimRay, string targetMuzzle, float maxDistance, bool laserActive)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: 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_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Expected O, but got Unknown
//IL_0146: 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)
DamageTypeCombo val = default(DamageTypeCombo);
val.damageType = (DamageType)0;
val.damageTypeExtended = (DamageTypeExtended)0;
val.damageSource = (DamageSource)0;
DamageTypeCombo damageType = val;
if (!((EntityState)self).isAuthority)
{
return;
}
BulletAttack val2 = new BulletAttack
{
owner = ((EntityState)self).gameObject,
weapon = ((EntityState)self).gameObject,
origin = ((Ray)(ref aimRay)).origin,
aimVector = ((Ray)(ref aimRay)).direction,
minSpread = self.minSpread,
maxSpread = self.maxSpread,
bulletCount = 1u,
damage = 2.5f * ((BaseState)self).damageStat,
force = self.force,
damageType = damageType,
muzzleName = targetMuzzle,
hitEffectPrefab = self.hitEffectPrefab,
procCoefficient = 1f,
HitEffectNormal = false,
radius = 0.6f,
maxDistance = maxDistance
};
if (laserActive)
{
DamageAPI.AddModdedDamageType(val2, DamageTypes.stormboundLaser);
Log.Message(self.damageCoefficient);
if (Object.op_Implicit((Object)(object)self.effectPrefab))
{
EffectManager.SimpleMuzzleFlash(self.effectPrefab, ((EntityState)self).gameObject, targetMuzzle, false);
}
}
else
{
val2.damage = 0.1f;
DamageAPI.AddModdedDamageType(val2, DamageTypes.stormboundLaserTargeting);
}
val2.Fire();
}
private void OnFrozenStateEnter(orig_OnEnter orig, FrozenState self)
{
if (!(((Object)((EntityState)self).outer).name == "FalseSonBossBody(Clone)") && !(((Object)((EntityState)self).outer).name == "FalseSonBossBodyLunarShard(Clone)") && !(((Object)((EntityState)self).outer).name == "FalseSonBossBodyBrokenLunarShard(Clone)"))
{
orig.Invoke(self);
}
}
private EntityState CorruptedPathsDash_GetNextStateAuthority(orig_GetNextStateAuthority orig, CorruptedPathsDash self)
{
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
if (currentPhase > 1)
{
return (EntityState)(object)new DelayedState(0.25f, (EntityState)new TaintedOffering());
}
((EntityState)self).skillLocator.primary.DeductStock(2);
return (EntityState)(object)new DelayedState(0.25f, (EntityState)new FissureSlamWindup());
}
private void LunarRuinDotFix(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
if (val2.TryGotoNext(new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs).GetField("lunarruin"))
}))
{
ILCursor val3 = val;
if (val3.TryGotoNext(new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Component>(x, "get_gameObject")
}))
{
val.EmitDelegate<Action<CharacterBody>>((Action<CharacterBody>)delegate(CharacterBody body)
{
body.AddTimedBuff(Buffs.lunarruin, 5f);
});
ILLabel val4 = val.DefineLabel();
val.Emit(OpCodes.Br, (object)val4);
val.Emit(OpCodes.Ldloc, 1);
ILCursor val5 = val;
MoveType val6 = (MoveType)2;
if (val5.TryGotoNext(val6, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<DotController>(x, "InflictDot")
}))
{
val.MarkLabel(val4);
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
}
public class DelayedState : EntityState
{
private readonly float delay;
private readonly EntityState state;
public DelayedState(float delayTime, EntityState nextState)
{
state = nextState;
delay = delayTime;
}
public override void Update()
{
((EntityState)this).Update();
if (((EntityState)this).fixedAge >= delay)
{
base.outer.SetNextState(state);
}
}
}
public class FalseSonAIController : MonoBehaviour
{
private Vector3[] teleportPattern = (Vector3[])(object)new Vector3[8]
{
new Vector3(30f, 0f, -30f),
new Vector3(30f, 0f, 0f),
new Vector3(30f, 0f, 30f),
new Vector3(0f, 0f, 30f),
new Vector3(-30f, 0f, 30f),
new Vector3(-30f, 0f, 0f),
new Vector3(-30f, 0f, -30f),
new Vector3(0f, 0f, -30f)
};
public List<CharacterBody> allEnemies = new List<CharacterBody>();
private BaseAI sonAI;
private CharacterBody sonBody;
private CharacterMaster sonMaster;
private GenericSkill[] sonSkills;
private AISkillDriver pillarDriver;
public bool sonLoS = false;
public bool isClockwise = true;
public bool recentlySwapped = true;
private float timeSinceLastSawTarget = 0f;
private static float maxTimeSinceLastSawTarget = 3f;
public bool recentlySawTarget = false;
public void Awake()
{
sonBody = ((Component)this).GetComponent<CharacterBody>();
}
public void Start()
{
if (!((Object)(object)sonBody != (Object)null))
{
return;
}
sonMaster = sonBody.master;
if (!((Object)(object)sonMaster != (Object)null))
{
return;
}
sonAI = ((Component)sonMaster).gameObject.GetComponent<BaseAI>();
AISkillDriver[] skillDrivers = sonAI.skillDrivers;
foreach (AISkillDriver val in skillDrivers)
{
if (val.customName == "moveAroundPillars")
{
pillarDriver = val;
}
}
}
public void FixedUpdate()
{
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_012c: Unknown result type (might be due to invalid IL or missing references)
//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)sonAI != (Object)null && sonAI.currentEnemy != null)
{
if (sonAI.currentEnemy.hasLoS)
{
sonLoS = true;
timeSinceLastSawTarget = 0f;
}
else
{
sonLoS = false;
timeSinceLastSawTarget += Time.fixedDeltaTime;
if ((Object)(object)pillarDriver != (Object)null && (Object)(object)sonAI.currentEnemy.gameObject != (Object)null && (Object)(object)MeridianEventTriggerInteraction.instance != (Object)null)
{
float z = sonAI.currentEnemy.gameObject.transform.position.z;
if ((z < -80f || !recentlySawTarget) && !isClockwise && !recentlySwapped)
{
AISkillDriver[] skillDrivers = sonAI.skillDrivers;
foreach (AISkillDriver val in skillDrivers)
{
if (val.customName == "moveAroundPillars")
{
val.movementType = (MovementType)5;
isClockwise = true;
Log.Message("Swapped movement to clockwise");
timeSinceLastSawTarget = 0f;
}
}
}
else if ((z > -85f || !recentlySawTarget) && isClockwise && !recentlySwapped)
{
AISkillDriver[] skillDrivers2 = sonAI.skillDrivers;
foreach (AISkillDriver val2 in skillDrivers2)
{
if (val2.customName == "moveAroundPillars")
{
val2.movementType = (MovementType)6;
isClockwise = false;
Log.Message("Swapped movement to counterclockwise");
timeSinceLastSawTarget = 0f;
}
}
}
}
}
}
recentlySawTarget = timeSinceLastSawTarget < maxTimeSinceLastSawTarget;
recentlySwapped = timeSinceLastSawTarget < 1.5f;
}
private void ReplaceSkill(CharacterBody body, GenericSkill skill, SkillDef skillDef)
{
if (Object.op_Implicit((Object)(object)skill))
{
skill.SetSkillOverride((object)body, skillDef, (SkillOverridePriority)3);
}
}
}
public class StormboundPrimeDevastatorOrb : GenericDamageOrb
{
public float blastRadius;
public GameObject lightningEffectPrefab;
private const float skillDisableTiming = 3f;
public override void Begin()
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
((Orb)this).duration = ((Orb)this).distanceToTarget / 120f;
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/PrimeDevastatorLightningOrbEffect.prefab").WaitForCompletion();
EffectData val2 = new EffectData
{
origin = ((Orb)this).origin,
genericFloat = ((Orb)this).duration
};
val2.SetHurtBoxReference(((Orb)this).target);
EffectManager.SpawnEffect(val, val2, true);
}
public override void OnArrival()
{
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown re