Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Voidcrid v1.6.2
Voidcrid.dll
Decompiled 2 years ago
The result has been truncated due to the large size, download it to view full contents!
using System; 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 AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Bandit2; using EntityStates.LemurianBruiserMonster; using EntityStates.VoidRaidCrab.Weapon; using Microsoft.CodeAnalysis; using On.RoR2; using PlasmaCoreSpikestripContent.Content.Skills; using R2API; using RoR2; using RoR2.Achievements; using RoR2.Projectile; using RoR2.Skills; using SkillsPlusPlus; using SkillsPlusPlus.Modifiers; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using Voidcrid.Effects; using Voidcrid.Hooks; using Voidcrid.Language; using Voidcrid.Modules; using Voidcrid.Skills; [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("Voidcrid")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+e25fa9423ddd3e03ef406a76c37562935cbc4b22")] [assembly: AssemblyProduct("Voidcrid")] [assembly: AssemblyTitle("Voidcrid")] [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 Voidcrid { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void LogDebug(object data) { _logSource.LogDebug(data); } internal static void LogError(object data) { _logSource.LogError(data); } internal static void LogFatal(object data) { _logSource.LogFatal(data); } internal static void LogInfo(object data) { _logSource.LogInfo(data); } internal static void LogMessage(object data) { _logSource.LogMessage(data); } internal static void LogWarning(object data) { _logSource.LogWarning(data); } } public class SkillSetup { private static UnlockableDef entropyUnlock; public static GameObject voidFrogProjectile; private static UnlockableDef ethUnlock; public static GameObject voidBreath; private static UnlockableDef VoidcridUnlock; internal static AssetBundle mainAssetBundle; internal static GameObject voidcridBodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/CrocoBody.prefab").WaitForCompletion(); private SkillLocator skillLocator = voidcridBodyPrefab.GetComponent<SkillLocator>(); private const string assetbundleName = "acrid3"; private const string csProjName = "Voidcrid"; public static SkillDef voidScepter = ScriptableObject.CreateInstance<SkillDef>(); public static void SetupSkills(SkillLocator skillLocator) { FlamebreathSetup(skillLocator); NullBeamSetup(skillLocator); VoidEscapeSetup(skillLocator); EntropySetup(skillLocator); VoidcridPassive(skillLocator); } internal static void LoadAssetBundle() { try { mainAssetBundle = AssetBundle.LoadFromFile(Assembly.GetExecutingAssembly().Location.Replace("Voidcrid.dll", "acrid3")); Debug.Log((object)"Loaded assetbundle"); } catch (Exception ex) { Debug.Log((object)("Failed to load assetbundle. Make sure your assetbundle name is setup correctly\n" + ex)); } } private static void FlamebreathSetup(SkillLocator skillLocator) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Voidcridbreath)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = VoidcridDef.FlamebreathOverrideRecharge.Value; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.cancelSprintingOnActivation = true; val.fullRestockOnAssign = true; val.interruptPriority = (InterruptPriority)2; val.isCombatSkill = true; val.mustKeyPress = false; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = mainAssetBundle.LoadAsset<Sprite>("deepflame2.png"); val.skillDescriptionToken = "VOIDCRID_FLAMEBREATH_DESC"; val.skillName = "VOIDCRID_FLAMEBREATH"; val.skillNameToken = "VOIDCRID_FLAMEBREATH"; ContentAddition.AddSkillDef(val); bool flag = default(bool); ContentAddition.AddEntityState(typeof(Voidcridbreath), ref flag); SkillFamily skillFamily = skillLocator.primary.skillFamily; Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val2 = new Variant { skillDef = val }; ((Variant)(ref val2)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[num] = val2; } private static void NullBeamSetup(SkillLocator skillLocator) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(NullBeam)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = VoidcridDef.NullBeamOverrideRecharge.Value; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.cancelSprintingOnActivation = true; val.fullRestockOnAssign = true; val.interruptPriority = (InterruptPriority)2; val.isCombatSkill = true; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = mainAssetBundle.LoadAsset<Sprite>("nullbeam2.png"); val.skillDescriptionToken = "VOIDCRID_NULLBEAM_DESC"; val.skillName = "nullifier"; val.skillNameToken = "VOIDCRID_NULLBEAM"; val.mustKeyPress = true; ContentAddition.AddSkillDef(val); bool flag = default(bool); ContentAddition.AddEntityState(typeof(NullBeam), ref flag); VoidcridUnlock = ScriptableObject.CreateInstance<UnlockableDef>(); VoidcridUnlock.cachedName = "Skills.Croco.Nullbeam"; VoidcridUnlock.nameToken = "ACHIEVEMENT_VOIDCRIDUNLOCK_NAME"; VoidcridUnlock.achievementIcon = mainAssetBundle.LoadAsset<Sprite>("nullbeam2.png"); ContentAddition.AddUnlockableDef(VoidcridUnlock); SkillFamily skillFamily = skillLocator.secondary.skillFamily; Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val2 = new Variant { skillDef = val, unlockableDef = VoidcridUnlock }; ((Variant)(ref val2)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[num] = val2; } private static void VoidEscapeSetup(SkillLocator skillLocator) { //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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) EntityStateMachine val = voidcridBodyPrefab.AddComponent<EntityStateMachine>(); val.customName = "Drift"; val.initialStateType = new SerializableEntityStateType(typeof(Idle)); val.mainStateType = new SerializableEntityStateType(typeof(Idle)); NetworkStateMachine component = voidcridBodyPrefab.GetComponent<NetworkStateMachine>(); component.stateMachines = component.stateMachines.Append(val).ToArray(); SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>(); val2.activationState = new SerializableEntityStateType(typeof(VoidEscape)); val2.activationStateMachineName = "Drift"; val2.baseMaxStock = 1; val2.baseRechargeInterval = VoidcridDef.EtherealDriftOverrideRecharge.Value; val2.beginSkillCooldownOnSkillEnd = true; val2.canceledFromSprinting = false; val2.cancelSprintingOnActivation = true; val2.fullRestockOnAssign = true; val2.interruptPriority = (InterruptPriority)2; val2.isCombatSkill = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.stockToConsume = 1; val2.mustKeyPress = true; val2.icon = mainAssetBundle.LoadAsset<Sprite>("voiddrift.png"); val2.skillDescriptionToken = "VOIDCRID_VOIDRIFT_DESC"; val2.skillName = "VOIDCRID_VOIDDRIFT"; val2.skillNameToken = "VOIDCRID_VOIDDRIFT"; ContentAddition.AddSkillDef(val2); bool flag = default(bool); ContentAddition.AddEntityState(typeof(VoidEscape), ref flag); SkillFamily skillFamily = skillLocator.utility.skillFamily; ethUnlock = ScriptableObject.CreateInstance<UnlockableDef>(); ethUnlock.cachedName = "Skins.Croco.Blackrid"; ethUnlock.nameToken = "ACHIEVEMENT_RIGHTTOJAIL_NAME"; ethUnlock.achievementIcon = mainAssetBundle.LoadAsset<Sprite>("voiddrift.png"); ContentAddition.AddUnlockableDef(ethUnlock); Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val3 = new Variant { skillDef = val2, unlockableDef = ethUnlock }; ((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants[num] = val3; } private static void EntropySetup(SkillLocator skillLocator) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Entropy)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = VoidcridDef.EntropyOverrideRecharge.Value; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = true; val.interruptPriority = (InterruptPriority)2; val.resetCooldownTimerOnUse = false; val.isCombatSkill = true; val.mustKeyPress = false; val.cancelSprintingOnActivation = true; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.mustKeyPress = true; val.icon = mainAssetBundle.LoadAsset<Sprite>("entropy2.png"); val.skillDescriptionToken = "VOIDCRID_ENTROPY_DESC"; val.skillName = "VOIDCRID_ENTROPY"; val.skillNameToken = "VOIDCRID_ENTROPY"; ContentAddition.AddSkillDef(val); bool flag = default(bool); ContentAddition.AddEntityState(typeof(Entropy), ref flag); entropyUnlock = ScriptableObject.CreateInstance<UnlockableDef>(); entropyUnlock.cachedName = "Skins.Croco.Voidcrid"; entropyUnlock.nameToken = "ACHIEVEMENT_GRANDFATHERPARADOX_NAME"; entropyUnlock.achievementIcon = mainAssetBundle.LoadAsset<Sprite>("entropy2.png"); ContentAddition.AddUnlockableDef(entropyUnlock); SkillFamily skillFamily = skillLocator.special.skillFamily; Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val2 = new Variant { skillDef = val, unlockableDef = entropyUnlock }; ((Variant)(ref val2)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[num] = val2; } public static void ScepterSkillSetup() { //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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) voidScepter.activationState = new SerializableEntityStateType(typeof(VoidScepter)); voidScepter.activationStateMachineName = "Weapon"; voidScepter.baseMaxStock = 1; voidScepter.baseRechargeInterval = VoidcridDef.ScepterEntropyOverrideRecharge.Value; voidScepter.beginSkillCooldownOnSkillEnd = true; voidScepter.canceledFromSprinting = false; voidScepter.fullRestockOnAssign = true; voidScepter.interruptPriority = (InterruptPriority)2; voidScepter.resetCooldownTimerOnUse = false; voidScepter.isCombatSkill = true; voidScepter.mustKeyPress = false; voidScepter.cancelSprintingOnActivation = true; voidScepter.rechargeStock = 1; voidScepter.requiredStock = 1; voidScepter.stockToConsume = 1; voidScepter.icon = mainAssetBundle.LoadAsset<Sprite>("deeprotentropy.png"); voidScepter.mustKeyPress = true; voidScepter.skillDescriptionToken = "VOIDCRID__SCEPTER_ENTROPY_DESC"; voidScepter.skillName = "VOIDCRID_SCEPTER_ENTROPY"; voidScepter.skillNameToken = "VOIDCRID_SCEPTER_ENTROPY"; ContentAddition.AddSkillDef(voidScepter); bool flag = default(bool); ContentAddition.AddEntityState(typeof(VoidScepter), ref flag); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void ScepterSetup() { ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(voidScepter, "CrocoBody", (SkillSlot)3, 1); } public static void VoidcridPassive(SkillLocator skillLocator) { Debug.Log((object)"Starting passive setup"); if (VoidcridDef.VoidcridPassiveShow.Value) { SurvivorDef component = voidcridBodyPrefab.GetComponent<SurvivorDef>(); Debug.Log((object)"Get Voidcrid Def"); skillLocator.passiveSkill.enabled = true; skillLocator.passiveSkill.skillNameToken = "VOIDCRID_PASSIVE"; skillLocator.passiveSkill.skillDescriptionToken = "VOIDCRID_PASSIVE_DESC"; skillLocator.passiveSkill.icon = mainAssetBundle.LoadAsset<Sprite>("icon.png"); Debug.Log((object)"Load language"); LanguageAPI.Add("CROCO_OUTRO_FLAVOR", "..and so it left, a shell of its former self."); LanguageAPI.Add("CROCO_MAIN_ENDING_ESCAPE_FAILURE_FLAVOR", "..and so it stayed, forever chained to the Abyss."); Debug.Log((object)"Finished overriding ending"); } else { skillLocator.passiveSkill.enabled = false; } } public static void DeathBehavior() { //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) Debug.Log((object)"Setting up death animation..."); CharacterDeathBehavior component = voidcridBodyPrefab.GetComponent<CharacterDeathBehavior>(); component.deathState = UtilCreateSerializableAndNetRegister<DeathState>(); } private static SerializableEntityStateType UtilCreateSerializableAndNetRegister<T>() where T : EntityState { //IL_0027: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)("Registering EntityState " + typeof(T).FullName + " and returning a new instance of SerializableEntityStateType of that type...")); bool flag = default(bool); ContentAddition.AddEntityState<T>(ref flag); return new SerializableEntityStateType(typeof(T)); } internal static void ManipulateFirebreathColor() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) GameObject flamethrowerEffectPrefab = Flamebreath.flamethrowerEffectPrefab; GameObject val = PrefabAPI.InstantiateClone(flamethrowerEffectPrefab, "voidcridFirePurple"); Material component = val.GetComponent<Material>(); component.SetColor("_COLOR", Color.magenta); voidBreath = val; ContentAddition.AddProjectile(voidBreath); } internal static void CreateFogProjectile() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Creating Fog projectile"); GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/ElementalRingVoidBlackHole"), "fogPain"); FogDamageController val2 = val.AddComponent<FogDamageController>(); BuffDef dangerBuffDef = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/Base/Common/bdVoidFogMild.asset").WaitForCompletion(); val2.healthFractionPerSecond = VoidcridDef.VoidcridFogDamageOverride.Value; val2.dangerBuffDuration = 0.6f; val2.tickPeriodSeconds = 0.5f; val2.healthFractionRampCoefficientPerSecond = 0.015f; val2.dangerBuffDef = dangerBuffDef; SphereZone val3 = val.AddComponent<SphereZone>(); val3.radius = VoidcridDef.EntropyOverrideRadius.Value + 1f; val2.initialSafeZones = (BaseZoneBehavior[])(object)new BaseZoneBehavior[1] { (BaseZoneBehavior)val3 }; val3.isInverted = true; val.AddComponent<DestroyOnTimer>().duration = 5f; voidFrogProjectile = val; ContentAddition.AddProjectile(voidFrogProjectile); Debug.Log((object)"Finished creating voidFog projectile"); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.sixfears7.Voidcrid", "Voidcrid", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class VoidcridDef : BaseUnityPlugin { public static bool ancientScepterInstalled = false; public static bool skillsPlusInstalled = false; internal static GameObject voidcridBodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/CrocoBody.prefab").WaitForCompletion(); private SkillLocator skillLocator = voidcridBodyPrefab.GetComponent<SkillLocator>(); public static ConfigEntry<float> NullBeamOverrideJailChance { get; set; } public static ConfigEntry<float> EntropyOverrideJailChance { get; set; } public static ConfigEntry<float> EtherealDriftOverrideJailChance { get; set; } public static ConfigEntry<float> NullBeamOverrideDamage { get; set; } public static ConfigEntry<float> NullBeamOverrideDuration { get; set; } public static ConfigEntry<float> NullBeamOverrideProc { get; set; } public static ConfigEntry<float> FlamebreathOverrideDuration { get; set; } public static ConfigEntry<float> EntropyOverrideDamage { get; set; } public static ConfigEntry<float> EntropyOverrideFireSpeed { get; set; } public static ConfigEntry<float> EtherealDriftOverrideDamage { get; set; } public static ConfigEntry<float> ScepterEntropyOverrideDamage { get; set; } public static ConfigEntry<float> FlamebreathOverrideDamage { get; set; } public static ConfigEntry<float> ScepterEntropyOverrideFireSpeed { get; set; } public static ConfigEntry<float> ScepterEntropyOverrideVoidJailChance { get; set; } public static ConfigEntry<float> ScepterEntropyOverrideRadius { get; set; } public static ConfigEntry<float> FlamebreathOverrideRecharge { get; set; } public static ConfigEntry<float> FlamebreathOverrideTickFreq { get; set; } public static ConfigEntry<float> NullBeamOverrideRecharge { get; set; } public static ConfigEntry<float> EtherealDriftOverrideRecharge { get; set; } public static ConfigEntry<float> EntropyOverrideRecharge { get; set; } public static ConfigEntry<float> EntropyOverrideRadius { get; set; } public static ConfigEntry<float> EntropySelfDamage { get; set; } public static ConfigEntry<float> EntropySelfHeal { get; set; } public static ConfigEntry<Color> VoidGlow { get; set; } public static ConfigEntry<Color> ScepterGlow { get; set; } public static ConfigEntry<float> ScepterEntropyOverrideRecharge { get; set; } public static ConfigEntry<bool> VoidcridPassiveShow { get; set; } public static ConfigEntry<float> VoidcridFogDamageOverride { get; set; } public static ConfigEntry<bool> VoidcridBombDeath { get; set; } public void Awake() { //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) FlamebreathOverrideRecharge = ((BaseUnityPlugin)this).Config.Bind<float>("Recharge Interval", "Flamebreath Recharge", 0.5f, "Measured in seconds"); NullBeamOverrideRecharge = ((BaseUnityPlugin)this).Config.Bind<float>("Recharge Interval", "Null Beam Recharge", 7f, "Measured in seconds"); EtherealDriftOverrideRecharge = ((BaseUnityPlugin)this).Config.Bind<float>("Recharge Interval", "Ethereal Drift Recharge", 8f, "Measured in seconds"); EntropyOverrideRecharge = ((BaseUnityPlugin)this).Config.Bind<float>("Recharge Interval", "Entropy Recharge", 12f, "Measured in seconds"); ScepterEntropyOverrideRecharge = ((BaseUnityPlugin)this).Config.Bind<float>("Recharge Interval", "Deeprotted Entropy Recharge", 8f, "Measured in seconds"); NullBeamOverrideJailChance = ((BaseUnityPlugin)this).Config.Bind<float>("JailChance", "NullBeamJailChance", 0.4f, "Null Beam jail chance, measured in percentage."); EtherealDriftOverrideJailChance = ((BaseUnityPlugin)this).Config.Bind<float>("JailChance", "EtherealDriftJailChance", 5f, "Ethereal Drift jail chance, measured in percentage."); EntropyOverrideJailChance = ((BaseUnityPlugin)this).Config.Bind<float>("JailChance", "EntropyJailChance", 3f, "Entropy jail chance, measured in percentage"); NullBeamOverrideDamage = ((BaseUnityPlugin)this).Config.Bind<float>("NullBeam", "Damage", 0.3f, "NullBeam damageCoefficientPerSecond damage"); NullBeamOverrideDuration = ((BaseUnityPlugin)this).Config.Bind<float>("NullBeam", "Duration", 2.5f, "NullBeam maximumDuration, measured in seconds"); NullBeamOverrideProc = ((BaseUnityPlugin)this).Config.Bind<float>("NullBeam", "Proc", 0.4f, "NullBeam proc, measured as a percentage"); EntropyOverrideDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Entropy", "Damage", 4f, "Entropy damage multiplier"); EntropyOverrideFireSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Entropy", "Firing Speed", 0.3f, "Entropy successive attack speed, measured in seconds"); FlamebreathOverrideDuration = ((BaseUnityPlugin)this).Config.Bind<float>("Flamebreath", "Duration", 2f, "Flamebreath's duration, measured in seconds. Total duration: (Flamebreath duration + Attack Speed stat)"); FlamebreathOverrideDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Flamebreath", "Damage", 10f, "Flamebreath's totalDamageCoefficient, is divided over Flamebreath duration * tickFrequency: (totalDamageCoef / [Flamebreath duration * tickFrequency])"); EtherealDriftOverrideDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Ethereal Drift", "Damage", 1f, "Blast Attack base damage"); EntropyOverrideRadius = ((BaseUnityPlugin)this).Config.Bind<float>("Entropy", "Radius", 12f, "Blast Attack radius"); EntropySelfDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Entropy", "Self-Damage", 0.15f, "Damage taken to self from Entropy"); EntropySelfHeal = ((BaseUnityPlugin)this).Config.Bind<float>("Entropy", "Heal", 0.25f, "Healing amount from Entropy"); ScepterEntropyOverrideDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Deeprotted Entropy (Scepter)", "Damage", 5f, "Scepter's Entropy Blast Attack base damage"); ScepterEntropyOverrideFireSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Deeprotted Entropy (Scepter)", "Firing Speed", 0.3f, "Scepter's Entropy successive attack speed, measured in seconds"); ScepterEntropyOverrideRadius = ((BaseUnityPlugin)this).Config.Bind<float>("Deeprotted Entropy (Scepter)", "Radius", 12f, "Scepter's Entropy radius"); VoidGlow = ((BaseUnityPlugin)this).Config.Bind<Color>("Voicrid Glow", "Color", Color.magenta, "Voidcrid's Color Glow"); ScepterGlow = ((BaseUnityPlugin)this).Config.Bind<Color>("Voicrid Glow", "Scepter Color", Color.red, "Voidcrid's Scepter Color Glow"); VoidcridFogDamageOverride = ((BaseUnityPlugin)this).Config.Bind<float>("Entropy", "Fog Damage", 0.08f, "Fog health fraction damage per second"); VoidcridPassiveShow = ((BaseUnityPlugin)this).Config.Bind<bool>("Voidcrid", "Display", true, "Shows the Voidcrid fake Passive description"); VoidcridBombDeath = ((BaseUnityPlugin)this).Config.Bind<bool>("Voidcrid", "Death", true, "Emit a devastating bomb on death"); LanguageSetup.SetLanguage(); SkillSetup.LoadAssetBundle(); SkillSetup.CreateFogProjectile(); SkillSetup.SetupSkills(skillLocator); SkillSetup.DeathBehavior(); HookSetup.Hook(); } public static bool HasDeeprot(SkillLocator sk) { bool result = false; if (Chainloader.PluginInfos.ContainsKey("com.plasmacore.PlasmaCoreSpikestripContent") && Object.op_Implicit((Object)(object)sk)) { result = HasDeeprotInternal(sk); } return result; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static bool HasDeeprotInternal(SkillLocator sk) { bool result = false; if ((Object)(object)DeepRot.scriptableObject != (Object)null) { GenericSkill[] allSkills = sk.allSkills; foreach (GenericSkill val in allSkills) { if ((Object)(object)val.skillDef == (Object)(object)DeepRot.scriptableObject.SkillDefinition) { result = true; break; } } } return result; } private void Start() { if (Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter")) { ancientScepterInstalled = true; SkillSetup.ScepterSkillSetup(); SkillSetup.ScepterSetup(); } } } } namespace Voidcrid.Skills { public class Voidcridbreath : Flamebreath { private float maxDistance = 12f; private float baseFlamethrowerDuration = VoidcridDef.FlamebreathOverrideDuration.Value; private float totalDamageCoefficient = VoidcridDef.FlamebreathOverrideDamage.Value; [SerializeField] private GameObject flamethrowerEffectPrefab = Flamebreath.flamethrowerEffectPrefab; [SerializeField] private string startAttackSoundString = Flamebreath.startAttackSoundString; [SerializeField] private string endAttackSoundString = Flamebreath.endAttackSoundString; private const float flamethrowerEffectBaseDistance = 15f; public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_010b: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: 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_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) ((Flamebreath)this).OnEnter(); Material component = flamethrowerEffectPrefab.GetComponent<Material>(); component.SetColor("_COLOR", Color.magenta); base.stopwatch = 0f; base.entryDuration = Flamebreath.baseEntryDuration; base.exitDuration = Flamebreath.baseExitDuration; base.flamethrowerDuration = baseFlamethrowerDuration + ((BaseState)this).attackSpeedStat; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(base.entryDuration + base.flamethrowerDuration + 1f); } if (Object.op_Implicit((Object)(object)modelTransform)) { base.childLocator = ((Component)modelTransform).GetComponent<ChildLocator>(); } float num = base.flamethrowerDuration * Flamebreath.tickFrequency; base.tickDamageCoefficient = totalDamageCoefficient / num; ((EntityState)this).PlayAnimation("Gesture, Mouth", "FireSpit", "FireSpit.playbackRate", base.flamethrowerDuration, 0f); Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)base.muzzleTransform)) { BulletAttack val = new BulletAttack(); val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.minSpread = 0f; val.maxSpread = Flamebreath.maxSpread; val.damage = base.tickDamageCoefficient * ((BaseState)this).damageStat; val.force = Flamebreath.force; val.muzzleName = "MouthMuzzle"; val.hitEffectPrefab = Flamebreath.impactEffectPrefab; val.isCrit = base.isCrit; val.radius = Flamebreath.radius; val.falloffModel = (FalloffModel)0; val.stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask; val.procCoefficient = Flamebreath.procCoefficientPerTick; val.maxDistance = maxDistance; val.tracerEffectPrefab = flamethrowerEffectPrefab; val.smartCollision = true; val.damageType = DamageTypeCombo.op_Implicit((DamageType)(Util.CheckRoll(Flamebreath.ignitePercentChance, ((EntityState)this).characterBody.master) ? 128 : 0)); val.Fire(); base.isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); } } public override void OnExit() { Util.PlaySound(endAttackSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.05f); if (Object.op_Implicit((Object)(object)base.flamethrowerEffectInstance)) { EntityState.Destroy((Object)(object)((Component)base.flamethrowerEffectInstance).gameObject); } } public override void FixedUpdate() { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) ((Flamebreath)this).FixedUpdate(); base.stopwatch += Time.fixedDeltaTime; if (base.stopwatch >= base.entryDuration && base.stopwatch < base.entryDuration + base.flamethrowerDuration && !base.hasBegunFlamethrower) { base.hasBegunFlamethrower = true; Util.PlaySound(startAttackSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)base.childLocator)) { base.muzzleTransform = base.childLocator.FindChild("MouthMuzzle"); base.flamethrowerEffectInstance = Object.Instantiate<GameObject>(flamethrowerEffectPrefab, base.muzzleTransform).transform; ((Component)base.flamethrowerEffectInstance).transform.localPosition = Vector3.zero; ((Component)base.flamethrowerEffectInstance).GetComponent<ScaleParticleSystemDuration>().newDuration = base.flamethrowerDuration; } } if (base.stopwatch >= base.entryDuration + base.flamethrowerDuration && base.hasBegunFlamethrower) { base.hasBegunFlamethrower = false; ((EntityState)this).PlayCrossfade("Gesture, Override", "ExitFlamebreath", "ExitFlamebreath.playbackRate", base.exitDuration, 0.1f); } if (base.hasBegunFlamethrower) { base.flamethrowerStopwatch += Time.deltaTime; if (base.flamethrowerStopwatch > 1f / Flamebreath.tickFrequency) { base.flamethrowerStopwatch -= 1f / Flamebreath.tickFrequency; ((Flamebreath)this).FireFlame("MouthMuzzle"); } UpdateFlamethrowerEffect(); } else if (Object.op_Implicit((Object)(object)base.flamethrowerEffectInstance)) { EntityState.Destroy((Object)(object)((Component)base.flamethrowerEffectInstance).gameObject); } if (base.stopwatch >= base.flamethrowerDuration + base.entryDuration + base.exitDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } private void UpdateFlamethrowerEffect() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (Object.op_Implicit((Object)(object)base.muzzleTransform)) { base.muzzleTransform.forward = direction; } } } public class Entropy : BaseSkillState { public static float baseDuration = 2f; public static float damageCoefficient = 5f; public static float procCoefficient = 1f; public static float attackRecoil = 1.5f; public static float hitHopVelocity = 5.5f; public static string mecanimRotateParameter = "baseRotate"; public int currentAttack; private float earlyExitTime = 0.9f; private float duration; private float switchAttacks = 50f; private float blastAttackRadius = VoidcridDef.EntropyOverrideRadius.Value; private float earlyExitDuration; private ChildLocator childLocator; private bool hasFired1; private bool hasFired2; private bool hasFinishedFiring; [SerializeField] private float blastAttackForce = 1000f; private float hitPauseTimer; [SerializeField] private GameObject aoePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterExplosion.prefab").WaitForCompletion(); private float blastAttackProcCoefficient = 1f; private bool inHitPause; private DamageType voidAttack; private DamageType poisonAttack; private CrocoDamageTypeController crocoDamageTypeController; private GameObject leftFistEffectInstance; private GameObject rightFistEffectInstance; private bool firedBombardment = false; private DamageType entropyDamage; [SerializeField] public GameObject leftfistEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidJailer/VoidJailerDeathBombExplosion.prefab").WaitForCompletion(); public GameObject rightfistEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/CrocoFistEffect.prefab").WaitForCompletion(); private float stopwatch; private Animator animator; private Transform modelBaseTransform; private BlastAttack obj; private Material entropyGlow; private float emissionIntensity = 4f; private float minIntensity = 0.3f; private GameObject instance; private void FireSmash() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_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_009d: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Invalid comparison between Unknown and I4 //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown obj = new BlastAttack { radius = blastAttackRadius, procCoefficient = blastAttackProcCoefficient, position = ((EntityState)this).transform.position, attacker = ((EntityState)this).gameObject, crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), baseDamage = ((BaseState)this).damageStat * VoidcridDef.EntropyOverrideDamage.Value, falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit(entropyDamage), baseForce = blastAttackForce }; obj.bonusForce = Vector3.back * blastAttackForce; obj.teamIndex = TeamComponent.GetObjectTeam(obj.attacker); obj.attackerFiltering = (AttackerFiltering)2; if ((int)entropyDamage == 32768) { DamageAPI.AddModdedDamageType(obj, DamageTypes.entropyJail); } obj.Fire(); if (Object.op_Implicit((Object)(object)leftFistEffectInstance) && Object.op_Implicit((Object)(object)rightFistEffectInstance)) { Vector3 footPosition = ((EntityState)this).characterBody.footPosition; EffectManager.SpawnEffect(aoePrefab, new EffectData { origin = footPosition, scale = blastAttackRadius }, true); } } public override void OnEnter() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); crocoDamageTypeController = ((EntityState)this).GetComponent<CrocoDamageTypeController>(); CharacterModel component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>(); entropyGlow = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>().baseRendererInfos[1].defaultMaterial; voidAttack = (DamageType)(Util.CheckRoll(VoidcridDef.EntropyOverrideJailChance.Value, ((EntityState)this).characterBody.master) ? 32768 : 0); poisonAttack = DamageTypeCombo.op_Implicit(crocoDamageTypeController.GetDamageType()); entropyDamage = (Util.CheckRoll(switchAttacks, ((EntityState)this).characterBody.master) ? voidAttack : poisonAttack); leftFistEffectInstance = Object.Instantiate<GameObject>(leftfistEffectPrefab, ((BaseState)this).FindModelChild("MuzzleHandL")); rightFistEffectInstance = Object.Instantiate<GameObject>(rightfistEffectPrefab, ((BaseState)this).FindModelChild("MuzzleHandR")); duration = baseDuration / ((BaseState)this).attackSpeedStat; earlyExitDuration = duration * earlyExitTime; hasFired1 = false; hasFired2 = false; hasFinishedFiring = false; ((BaseState)this).moveSpeedStat = 0f; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); bool isGrounded = ((EntityState)this).characterMotor.isGrounded; bool @bool = animator.GetBool("isMoving"); string text = "Slash3"; animator.SetBool("attacking", true); float num = Mathf.Max(duration, 0.2f); ((EntityState)this).PlayCrossfade("Gesture, Additive", text, "Slash.playbackRate", num, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Slash.playbackRate", num, 0.05f); float num2 = damageCoefficient; if (NetworkServer.active) { ProcChainMask val = default(ProcChainMask); ((ProcChainMask)(ref val)).AddProc((ProcType)21); if (entropyDamage == poisonAttack) { ((EntityState)this).healthComponent.HealFraction(VoidcridDef.EntropySelfHeal.Value, val); } else { DamageInfo val2 = new DamageInfo(); val2.damage = VoidcridDef.EntropySelfDamage.Value * ((EntityState)this).healthComponent.fullCombinedHealth; val2.position = ((EntityState)this).characterBody.corePosition; val2.force = Vector3.zero; val2.damageColorIndex = (DamageColorIndex)9; val2.crit = false; val2.attacker = null; val2.inflictor = null; val2.damageType = DamageTypeCombo.op_Implicit((DamageType)1); val2.procCoefficient = 0f; val2.procChainMask = val; ((EntityState)this).healthComponent.TakeDamage(val2); } } ManageEntroypGlow(); } private void ManageEntroypGlow() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) float num = minIntensity / VoidcridDef.EntropyOverrideFireSpeed.Value; if (Object.op_Implicit((Object)(object)entropyGlow)) { entropyGlow.EnableKeyword("_EMISSION"); entropyGlow.SetColor("_EmColor", VoidcridDef.VoidGlow.Value * emissionIntensity); emissionIntensity -= num; } if (hasFinishedFiring) { entropyGlow.DisableKeyword("_EMISSION"); entropyGlow.SetColor("_EmColor", Color.black); } } public override void FixedUpdate() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((BaseState)this).moveSpeedStat = 0f; hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { inHitPause = false; } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("Slash3.playbackRate", 3f); } } if (stopwatch >= duration * VoidcridDef.EntropyOverrideFireSpeed.Value && !hasFired1 && !hasFired2 && !hasFinishedFiring) { if (((EntityState)this).isAuthority) { FireSmash(); hasFired1 = true; } ManageEntroypGlow(); } if (stopwatch >= duration * (VoidcridDef.EntropyOverrideFireSpeed.Value * 2f) && hasFired1 && !hasFired2 && !hasFinishedFiring) { if (((EntityState)this).isAuthority) { FireSmash(); hasFired2 = true; } ManageEntroypGlow(); } if (stopwatch >= duration * (VoidcridDef.EntropyOverrideFireSpeed.Value * 3f) && hasFired1 && hasFired2 && !hasFinishedFiring) { if (((EntityState)this).isAuthority) { FireSmash(); hasFinishedFiring = true; } ManageEntroypGlow(); } if (((BaseSkillState)this).IsKeyDownAuthority() && hasFinishedFiring && ((EntityState)this).isAuthority) { Bombardment(); firedBombardment = true; } if (((EntityState)this).isAuthority && (hasFinishedFiring || firedBombardment)) { ((EntityState)this).outer.SetNextStateToMain(); ((BaseState)this).StartAimMode(0.2f, false); } } public override void OnExit() { ((BaseState)this).moveSpeedStat = 0f; animator.SetBool("attacking", false); EntityState.Destroy((Object)(object)leftFistEffectInstance); EntityState.Destroy((Object)(object)rightFistEffectInstance); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } private void Bombardment() { //IL_000e: 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_0044: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) float damage = 1f; ProjectileManager.instance.FireProjectile(new FireProjectileInfo { damage = damage, damageTypeOverride = crocoDamageTypeController.GetDamageType(), crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)9, position = ((EntityState)this).characterBody.footPosition, procChainMask = default(ProcChainMask), force = 6000f, owner = ((EntityState)this).gameObject, projectilePrefab = SkillSetup.voidFrogProjectile, rotation = Quaternion.identity, target = ((EntityState)this).gameObject }); } } public class NullBeam : BaseSkillState { private string muzzle = "MouthMuzzle"; private float baseDuration = 1f; private float maxDistance = 100f; private float minDistance = 1f; private float recoilAmplitude = 1f; private float bulletRadius = 1f; private GameObject hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamImpactCorrupt.prefab").WaitForCompletion(); private GameObject tracerEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidJailer/VoidJailerCaptureTracer.prefab").WaitForCompletion(); private float spreadBloomValue = 0.3f; private float forcePerSecond = 2f; public ItemIndex index; public static float nullBeamDamage = VoidcridDef.NullBeamOverrideDamage.Value; private float minimumDuration; private BuffDef nullifier = Buffs.Nullified; private float maxSpread = 2f; private DamageType deeprotDamage; private DamageType passiveAttack; private float rotAttack = 8f; private CrocoDamageTypeController crocoDamageTypeController; private float switchAttacks = 50f; public static DamageType voidcridLaserAttack; private Material backGlow; private float maxIntensity = 4f; private float duration = VoidcridDef.NullBeamOverrideDuration.Value; public override void OnEnter() { ((BaseState)this).OnEnter(); crocoDamageTypeController = ((EntityState)this).GetComponent<CrocoDamageTypeController>(); minimumDuration = baseDuration / ((BaseState)this).attackSpeedStat; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Slow50); ((EntityState)this).characterBody.AddBuff(Buffs.SmallArmorBoost); } ((EntityState)this).PlayAnimation("Gesture, Mouth", "FireSpit", "FireSpit.playbackRate", duration, 0f); backGlow = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>().baseRendererInfos[1].defaultMaterial; } public override void FixedUpdate() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); FireBullet(); float num = CalcCharge(); Ray aimRay = ((BaseState)this).GetAimRay(); ((EntityState)this).characterBody.SetAimTimer(3f); if (Object.op_Implicit((Object)(object)backGlow)) { backGlow.EnableKeyword("_EMISSION"); backGlow.SetColor("_EmColor", VoidcridDef.VoidGlow.Value * maxIntensity); maxIntensity -= maxIntensity * Time.fixedDeltaTime / (VoidcridDef.NullBeamOverrideDuration.Value - 1f); } Ray aimRay2 = ((BaseState)this).GetAimRay(); Vector3 point = ((Ray)(ref aimRay2)).GetPoint(maxDistance + ((BaseState)this).attackSpeedStat); RaycastHit val = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, ((BaseState)this).GetAimRay(), ref val, maxDistance, ((LayerIndex)(ref LayerIndex.world)).mask, (QueryTriggerInteraction)0)) { point = ((RaycastHit)(ref val)).point; } if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= VoidcridDef.NullBeamOverrideDuration.Value || (((EntityState)this).fixedAge >= baseDuration && !((BaseSkillState)this).IsKeyDownAuthority()))) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50); ((EntityState)this).characterBody.RemoveBuff(Buffs.SmallArmorBoost); } ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)backGlow)) { backGlow.DisableKeyword("_EMISSION"); backGlow.SetColor("_EmColor", Color.black); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / baseDuration); } private void FireBullet() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got I4 //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got I4 //IL_00d9: 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) //IL_00f3: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Invalid comparison between Unknown and I4 //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_007d->IL007d: Incompatible stack types: O vs I4 //IL_006d->IL007d: Incompatible stack types: I4 vs O //IL_006d->IL007d: Incompatible stack types: O vs I4 //IL_00d9->IL00d9: Incompatible stack types: O vs I4 //IL_00d3->IL00d9: Incompatible stack types: I4 vs O //IL_00d3->IL00d9: Incompatible stack types: O vs I4 Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -2f * recoilAmplitude, -0.5f * recoilAmplitude, 0.5f * recoilAmplitude); if (VoidcridDef.HasDeeprot(((EntityState)this).skillLocator)) { object obj = this; int num; if (Util.CheckRoll(rotAttack, ((EntityState)this).characterBody.master)) { obj = DamageTypeCombo.op_Implicit(crocoDamageTypeController.GetDamageType()); num = (int)obj; } else { num = 0; obj = num; num = (int)obj; } ((NullBeam)num).passiveAttack = (DamageType)obj; } else { passiveAttack = (DamageType)0; } voidcridLaserAttack = (DamageType)(Util.CheckRoll(VoidcridDef.NullBeamOverrideJailChance.Value, ((EntityState)this).characterBody.master) ? 32768 : 0); object obj2 = this; int num2; if (Util.CheckRoll(switchAttacks, ((EntityState)this).characterBody.master)) { obj2 = passiveAttack; num2 = (int)obj2; } else { num2 = 0; obj2 = num2; num2 = (int)obj2; } ((NullBeam)num2).deeprotDamage = (DamageType)obj2; if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack(); val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.muzzleName = muzzle; val.maxDistance = Mathf.Lerp(minDistance, maxDistance, Random.value); val.minSpread = 1f; val.maxSpread = maxSpread; val.radius = bulletRadius; val.smartCollision = false; val.falloffModel = (FalloffModel)1; val.hitMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val.damage = nullBeamDamage * ((BaseState)this).damageStat; val.procCoefficient = VoidcridDef.NullBeamOverrideProc.Value; val.force = forcePerSecond; val.isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); val.hitEffectPrefab = hitEffectPrefab; val.tracerEffectPrefab = tracerEffectPrefab; val.damageType = DamageTypeCombo.op_Implicit(Util.CheckRoll(switchAttacks, ((EntityState)this).characterBody.master) ? deeprotDamage : voidcridLaserAttack); if ((int)voidcridLaserAttack == 32768) { DamageAPI.AddModdedDamageType(val, DamageTypes.nullBeamJail); } val.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class SkillsPlusCompat { public static float nullBeamDmg; public static void init() { nullBeamDmg = NullBeam.nullBeamDamage; doLanguage(); Debug.Log((object)"Added lang"); SkillModifierManager.LoadSkillModifiers(); Debug.Log((object)"Added skill modifiers"); } private static void doLanguage() { LanguageAPI.Add("VOIDCRID_NULLBEAM_UPGRADE_DESCRIPTION", "<style=cIsUtility>+5%</style> damage, <style=cIsUtility>+10%</style> bullet thickness, and <style=cIsUtility>+0.1</style> bullet spread"); } } [SkillLevelModifier("nullifier", new Type[] { typeof(NullBeam) })] public class NullbeamModifier : SimpleSkillModifier<NullBeam> { public override void OnSkillLeveledUp(int level, CharacterBody characterBody, SkillDef skillDef) { base.OnSkillLeveledUp(level, characterBody, skillDef); NullBeam.nullBeamDamage = BaseSkillModifier.MultScaling(SkillsPlusCompat.nullBeamDmg, 0.05f, level); } } public class VoidEscape : StealthMode { private TemporaryVisualEffect voidFog; public static DamageReport onCharacterDeathGlobal; public CharacterBody body; [SerializeField] private GameObject smokeBombEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathPreExplosion.prefab").WaitForCompletion(); private string smokeBombMuzzleString = "MuzzleCenter"; [SerializeField] private GameObject explosionPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombExplosion.prefab").WaitForCompletion(); private FireGravityBump FGBSound = new FireGravityBump(); public GameObject voidFogInstance = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VoidFogMildEffect.prefab").WaitForCompletion(); public float voidJailChance = 3f; private CrocoDamageTypeController crocoDamageTypeController; private DamageType baseAttack; public override void OnEnter() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) ((StealthMode)this).OnEnter(); bool flag = VoidcridDef.HasDeeprot(((EntityState)this).skillLocator); crocoDamageTypeController = ((EntityState)this).GetComponent<CrocoDamageTypeController>(); if (flag) { baseAttack = DamageTypeCombo.op_Implicit(crocoDamageTypeController.GetDamageType()); } else { baseAttack = (DamageType)32; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Cloak); ((EntityState)this).characterBody.AddBuff(Buffs.CloakSpeed); ((EntityState)this).characterBody.AddBuff(Buffs.VoidFogStrong); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((EntityState)this).characterBody.onSkillActivatedAuthority += OnSkillActivatedAuthority; } if (((EntityState)this).isAuthority) { FireSmokebomb(); } Util.PlaySound(FGBSound.enterSoundString, ((EntityState)this).gameObject); ((EntityState)this).characterBody.UpdateSingleTemporaryVisualEffect(ref voidFog, "Prefabs/TemporaryVisualEffects/voidFogMildEffect", ((EntityState)this).characterBody.radius, true, ""); } public override void FixedUpdate() { ((StealthMode)this).FixedUpdate(); if (((EntityState)this).fixedAge > StealthMode.duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (!((EntityState)this).outer.destroying && ((EntityState)this).isAuthority) { FireSmokebomb(); } Util.PlaySound(FGBSound.enterSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.CloakSpeed); ((EntityState)this).characterBody.RemoveBuff(Buffs.Cloak); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)this).characterBody.RemoveBuff(Buffs.VoidFogStrong); } ((EntityState)this).characterBody.onSkillActivatedAuthority -= OnSkillActivatedAuthority; } ((EntityState)this).characterBody.UpdateSingleTemporaryVisualEffect(ref voidFog, "Prefabs/TemporaryVisualEffects/voidFogMildEffect", ((EntityState)this).characterBody.radius, false, ""); ((StealthMode)this).OnExit(); } private void OnSkillActivatedAuthority(GenericSkill skill) { if (skill.isCombatSkill) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireSmokebomb() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_015e: Expected O, but got Unknown //IL_009d: 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_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //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_00d2: 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_00e7: Invalid comparison between Unknown and I4 //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack { radius = StealthMode.blastAttackRadius, procCoefficient = StealthMode.blastAttackProcCoefficient, position = ((EntityState)this).transform.position, attacker = ((EntityState)this).gameObject, crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), baseDamage = VoidcridDef.EtherealDriftOverrideDamage.Value, falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)(Util.CheckRoll(VoidcridDef.EtherealDriftOverrideJailChance.Value, ((EntityState)this).characterBody.master) ? 32768 : ((int)baseAttack))), baseForce = StealthMode.blastAttackForce }; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.attackerFiltering = (AttackerFiltering)2; if ((int)DamageTypeCombo.op_Implicit(val.damageType) == 32768) { DamageAPI.AddModdedDamageType(val, DamageTypes.entropyJail); } val.Fire(); } if (Object.op_Implicit((Object)(object)smokeBombEffectPrefab)) { EffectManager.SimpleMuzzleFlash(smokeBombEffectPrefab, ((EntityState)this).gameObject, smokeBombMuzzleString, false); Vector3 footPosition = ((EntityState)this).characterBody.footPosition; EffectManager.SpawnEffect(explosionPrefab, new EffectData { origin = footPosition, scale = StealthMode.blastAttackRadius }, true); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, StealthMode.shortHopVelocity * 1.7f, ((EntityState)this).characterMotor.velocity.z); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class VoidScepter : BaseSkillState { public static float baseDuration = 2f; public static float damageCoefficient = 5f; public int maxBounces; public float bounceRange = 3f; public static float procCoefficient = 1f; public static float attackRecoil = 1.5f; public static float hitHopVelocity = 5.5f; public static string mecanimRotateParameter = "baseRotate"; public int currentAttack; private float earlyExitTime = 0.9f; private float duration; private float switchAttacks = 50f; private float blastAttackRadius = VoidcridDef.ScepterEntropyOverrideRadius.Value; private float earlyExitDuration; private ChildLocator childLocator; private bool hasFired1; private bool hasFired2; private bool hasFinishedFiring; private bool firedBombardment; [SerializeField] private float blastAttackForce = 1000f; private GameObject groundImpact = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabGravityBumpExplosionGround.prefab").WaitForCompletion(); private float hitPauseTimer; [SerializeField] private GameObject aoePrefab; private GameObject aoe2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabTripleBeamExplosion.prefab").WaitForCompletion(); private float blastAttackProcCoefficient = 1f; private bool inHitPause; private DamageType voidAttack; private DamageType poisonAttack; private CrocoDamageTypeController crocoDamageTypeController; private GameObject leftFistEffectInstance; private GameObject rightFistEffectInstance; private Material entropyGlow; private float emissionIntensity = 4f; private float minIntensity = 0.3f; private DamageType entropyDamage; [SerializeField] public GameObject leftfistEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterExplosionCorrupted.prefab").WaitForCompletion(); public GameObject rightfistEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterExplosionCorrupted.prefab").WaitForCompletion(); private GameObject projectilePrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/ElementalRingVoidBlackHole"); private float stopwatch; private Animator animator; private Transform modelBaseTransform; private BlastAttack obj; private void FireSmash() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_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_009d: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Invalid comparison between Unknown and I4 //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown obj = new BlastAttack { radius = blastAttackRadius, procCoefficient = blastAttackProcCoefficient, position = ((EntityState)this).transform.position, attacker = ((EntityState)this).gameObject, crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), baseDamage = ((BaseState)this).damageStat * VoidcridDef.ScepterEntropyOverrideDamage.Value, falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit(entropyDamage), baseForce = blastAttackForce }; obj.bonusForce = Vector3.back * blastAttackForce; obj.teamIndex = TeamComponent.GetObjectTeam(obj.attacker); obj.attackerFiltering = (AttackerFiltering)2; if ((int)entropyDamage == 32768) { DamageAPI.AddModdedDamageType(obj, DamageTypes.entropyJail); } obj.Fire(); if (Object.op_Implicit((Object)(object)leftFistEffectInstance) && Object.op_Implicit((Object)(object)rightFistEffectInstance)) { Vector3 footPosition = ((EntityState)this).characterBody.footPosition; EffectManager.SpawnEffect(aoePrefab, new EffectData { origin = footPosition, scale = blastAttackRadius }, true); EffectManager.SpawnEffect(aoe2, new EffectData { origin = footPosition, scale = blastAttackRadius }, true); } } public override void OnEnter() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_00a8: 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_01f0: 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_0207: 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_023b: Expected O, but got Unknown //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: 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) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); entropyGlow = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>().baseRendererInfos[1].defaultMaterial; crocoDamageTypeController = ((EntityState)this).GetComponent<CrocoDamageTypeController>(); voidAttack = (DamageType)(Util.CheckRoll(VoidcridDef.EntropyOverrideJailChance.Value, ((EntityState)this).characterBody.master) ? 32768 : 0); poisonAttack = DamageTypeCombo.op_Implicit(crocoDamageTypeController.GetDamageType()); aoePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterExplosionCorrupted.prefab").WaitForCompletion(); entropyDamage = (Util.CheckRoll(switchAttacks, ((EntityState)this).characterBody.master) ? voidAttack : poisonAttack); leftFistEffectInstance = Object.Instantiate<GameObject>(leftfistEffectPrefab, ((BaseState)this).FindModelChild("MuzzleHandL")); rightFistEffectInstance = Object.Instantiate<GameObject>(rightfistEffectPrefab, ((BaseState)this).FindModelChild("MuzzleHandR")); duration = baseDuration / ((BaseState)this).attackSpeedStat; earlyExitDuration = duration * earlyExitTime; hasFired1 = false; hasFired2 = false; hasFinishedFiring = false; firedBombardment = false; ((BaseState)this).moveSpeedStat = 0f; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); bool isGrounded = ((EntityState)this).characterMotor.isGrounded; bool @bool = animator.GetBool("isMoving"); string text = "Slash3"; animator.SetBool("attacking", true); float num = Mathf.Max(duration, 0.2f); ((EntityState)this).PlayCrossfade("Gesture, Additive", text, "Slash.playbackRate", num, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Slash.playbackRate", num, 0.05f); float num2 = Entropy.damageCoefficient; if (NetworkServer.active) { ProcChainMask val = default(ProcChainMask); ((ProcChainMask)(ref val)).AddProc((ProcType)21); if (entropyDamage == poisonAttack) { ((EntityState)this).healthComponent.HealFraction(VoidcridDef.EntropySelfHeal.Value, val); } else { DamageInfo val2 = new DamageInfo(); val2.damage = VoidcridDef.EntropySelfDamage.Value * ((EntityState)this).healthComponent.fullCombinedHealth; val2.position = ((EntityState)this).characterBody.corePosition; val2.force = Vector3.zero; val2.damageColorIndex = (DamageColorIndex)9; val2.crit = false; val2.attacker = null; val2.inflictor = null; val2.damageType = DamageTypeCombo.op_Implicit((DamageType)1); val2.procCoefficient = 0f; val2.procChainMask = val; ((EntityState)this).healthComponent.TakeDamage(val2); } } ManageEntroypGlow(); } public override void FixedUpdate() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((BaseState)this).moveSpeedStat = 0f; hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { inHitPause = false; } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("Slash3.playbackRate", 3f); } } if (stopwatch >= duration * VoidcridDef.ScepterEntropyOverrideFireSpeed.Value && !hasFired1 && !hasFired2 && !hasFinishedFiring) { if (((EntityState)this).isAuthority) { FireSmash(); hasFired1 = true; } ManageEntroypGlow(); } if (stopwatch >= duration * (VoidcridDef.EntropyOverrideFireSpeed.Value * 2f) && hasFired1 && !hasFired2 && !hasFinishedFiring) { if (((EntityState)this).isAuthority) { FireSmash(); hasFired2 = true; } ManageEntroypGlow(); } if (stopwatch >= duration * (VoidcridDef.EntropyOverrideFireSpeed.Value * 3f) && hasFired1 && hasFired2 && !hasFinishedFiring) { if (((EntityState)this).isAuthority) { FireSmash(); hasFinishedFiring = true; } ManageEntroypGlow(); } if (((BaseSkillState)this).IsKeyDownAuthority() && hasFinishedFiring && ((EntityState)this).isAuthority) { Bombardment(); firedBombardment = true; } if (((EntityState)this).isAuthority && (hasFinishedFiring || firedBombardment)) { ((EntityState)this).outer.SetNextStateToMain(); ((BaseState)this).StartAimMode(0.2f, false); } } public override void OnExit() { ((BaseState)this).moveSpeedStat = 0f; animator.SetBool("attacking", false); EntityState.Destroy((Object)(object)leftFistEffectInstance); EntityState.Destroy((Object)(object)rightFistEffectInstance); ((EntityState)this).OnExit(); } private void ManageEntroypGlow() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) float num = minIntensity / VoidcridDef.ScepterEntropyOverrideFireSpeed.Value; if (Object.op_Implicit((Object)(object)entropyGlow)) { entropyGlow.EnableKeyword("_EMISSION"); entropyGlow.SetColor("_EmColor", VoidcridDef.ScepterGlow.Value * emissionIntensity); emissionIntensity -= num; } if (hasFinishedFiring) { entropyGlow.DisableKeyword("_EMISSION"); entropyGlow.SetColor("_EmColor", Color.black); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } private void Bombardment() { //IL_000e: 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_0044: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) float damage = 1f; ProjectileManager.instance.FireProjectile(new FireProjectileInfo { damage = damage, damageTypeOverride = crocoDamageTypeController.GetDamageType(), crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)9, position = ((EntityState)this).characterBody.footPosition, procChainMask = default(ProcChainMask), force = 6000f, owner = ((EntityState)this).gameObject, projectilePrefab = SkillSetup.voidFrogProjectile, rotation = Quaternion.identity, target = ((EntityState)this).gameObject }); } } } namespace Voidcrid.Effects { public static class EffectProvider { [CompilerGenerated] private static class <>O { public static hook_Resolve <0>__InterceptHealthCmpAssetReferences; } public static GameObject VoidcridSilentKill { get; private set; } internal static void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__InterceptHealthCmpAssetReferences; if (obj == null) { hook_Resolve val = InterceptHealthCmpAssetReferences; <>O.<0>__InterceptHealthCmpAssetReferences = val; obj = (object)val; } AssetReferences.Resolve += (hook_Resolve)obj; } private static void InterceptHealthCmpAssetReferences(orig_Resolve originalMethod) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown originalMethod.Invoke(); VoidcridSilentKill = PrefabAPI.InstantiateClone(AssetReferences.critGlassesVoidExecuteEffectPrefab, "VoidcridSilentKill"); VoidcridSilentKill.AddComponent<NetworkIdentity>(); EffectComponent componentInChildren = VoidcridSilentKill.GetComponentInChildren<EffectComponent>(); componentInChildren.soundName = null; ContentAddition.AddEffect(VoidcridSilentKill); object obj = <>O.<0>__InterceptHealthCmpAssetReferences; if (obj == null) { hook_Resolve val = InterceptHealthCmpAssetReferences; <>O.<0>__InterceptHealthCmpAssetReferences = val; obj = (object)val; } AssetReferences.Resolve -= (hook_Resolve)obj; } } } namespace Voidcrid.Modules { public class DamageTypes { public static ModdedDamageType nullBeamJail = DamageAPI.ReserveDamageType(); public static ModdedDamageType ethJail = DamageAPI.ReserveDamageType(); public static ModdedDamageType entropyJail = DamageAPI.ReserveDamageType(); public static ModdedDamageType voidcridDeath = DamageAPI.ReserveDamageType(); public static ModdedDamageType voidcridDeath2 = DamageAPI.ReserveDamageType(); public static ModdedDamageType voidcridPoison = DamageAPI.ReserveDamageType(); } public static class VoidcridDeathProjectile { public static GameObject VoidcridDeath { get; private set; } public static GameObject VoidcridDeath2 { get; private set; } public static GameObject VoidcridPoison { get; private set; } internal static void Init() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) VoidcridDeath = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegacrabAntimatterExplosion.prefab").WaitForCompletion(), "VoidcridDeathBomb"); VoidcridDeath2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Nullifier/NullifierDeathBombProjectile.prefab").WaitForCompletion(), "VoidcridDeathBomb2"); VoidcridPoison = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/CrocoLeapAcid.prefab").WaitForCompletion(), "VoidcridPoisonPool"); ModdedDamageTypeHolderComponent val = VoidcridDeath.AddComponent<ModdedDamageTypeHolderComponent>(); val.Add(DamageTypes.voidcridDeath); ModdedDamageTypeHolderComponent val2 = VoidcridDeath.AddComponent<ModdedDamageTypeHolderComponent>(); val2.Add(DamageTypes.voidcridDeath2); ModdedDamageTypeHolderComponent val3 = VoidcridPoison.AddComponent<ModdedDamageTypeHolderComponent>(); val3.Add(DamageTypes.voidcridPoison); ContentAddition.AddProjectile(VoidcridDeath); ContentAddition.AddProjectile(VoidcridDeath2); ContentAddition.AddProjectile(VoidcridPoison); } } public class DeathState : GenericCharacterDeath { private string MuzzleName = "MouthMuzzle"; private Transform muzzleTransform; public override bool shouldAutoDestroy => false; public override void OnEnter() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); Vector3 val = Vector3.up * 3f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; ((Behaviour)((EntityState)this).characterMotor).enabled = false; } if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (Object.op_Implicit((Object)(object)component)) { component.BeginRagdoll(val); } } muzzleTransform = ((BaseState)this).FindModelChild(MuzzleName); if (((EntityState)this).isAuthority) { FireProjectileInfo val2 = default(FireProjectileInfo); if (getVoidItemCount(((EntityState)this).characterBody.inventory) > 3) { val2.projectilePrefab = VoidcridDeathProjectile.VoidcridDeath2; } else { val2.projectilePrefab = VoidcridDeathProjectile.VoidcridDeath; } val2.position = ((EntityState)this).characterBody.corePosition; val2.rotation = Quaternion.LookRotation(((EntityState)this).characterDirection.forward, Vector3.up); val2.owner = ((EntityState)this).gameObject; val2.damage = ((BaseState)this).damageStat; val2.crit = ((EntityState)this).characterBody.RollCrit(); ProjectileManager.instance.FireProjectile(val2); FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = VoidcridDeathProjectile.VoidcridPoison; val3.position = ((EntityState)this).characterBody.corePosition; val3.rotation = Quaternion.LookRotation(((EntityState)this).characterDirection.forward, Vector3.up); val3.owner = ((EntityState)this).gameObject; val3.damage = ((BaseState)this).damageStat; val3.crit = ((EntityState)this).characterBody.RollCrit(); ProjectileManager.instance.FireProjectile(val3); } } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 6f) { ((GenericCharacterDeath)this).DestroyModel(); if (NetworkServer.active) { ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } private int getVoidItemCount(Inventory inventory) { int num = 0; num += inventory.GetItemCount(Items.CritGlassesVoid); num += inventory.GetItemCount(Items.ElementalRingVoid); num += inventory.GetItemCount(Items.ExplodeOnDeathVoid); num += inventory.GetItemCount(Items.EquipmentMagazineVoid); num += inventory.GetItemCount(Items.ChainLightningVoid); num += inventory.GetItemCount(Items.TreasureCacheVoid); num += inventory.GetItemCount(Items.MushroomVoid); num += inventory.GetItemCount(Items.BearVoid); num += inventory.GetItemCount(Items.SlowOnHitVoid); num += inventory.GetItemCount(Items.MissileVoid); num += inventory.GetItemCount(Items.ExtraLifeVoid); num += inventory.GetItemCount(Items.BleedOnHitVoid); num += inventory.GetItemCount(Items.CloverVoid); return num + inventory.GetItemCount(Items.VoidMegaCrabItem); } } } namespace Voidcrid.Language { public class LanguageSetup { public static void SetLanguage() { LanguageAPI.Add("VOIDCRID_PASSIVE", "<style=cArtifact>Void</style>crid"); LanguageAPI.Add("VOIDCRID_PASSIVE_DESC", "All <style=cArtifact>Void</style> attacks have a chance to <style=cArtifact>jail</style> enemies (and apply <style=cWorldEvent>Deeprot</style>, if selected)."); LanguageAPI.Add("ACHIEVEMENT_GRANDFATHERPARADOX_NAME", "Acrid: Grandfather Paradox"); LanguageAPI.Add("ACHIEVEMENT_GRANDFATHERPARADOX_DESCRIPTION", "An unexpected amphibian, an unfortunate end."); LanguageAPI.Add("ACHIEVEMENT_RIGHTTOJAIL_NAME", "Acrid: Right To Jail"); LanguageAPI.Add("ACHIEVEMENT_RIGHTTOJAIL_DESCRIPTION", "As Acrid, jail a Jailer."); LanguageAPI.Add("ACHIEVEMENT_VOIDCRIDUNLOCK_NAME", "...Left alone"); LanguageAPI.Add("ACHIEVEMENT_VOIDCRIDUNLOCK_DESCRIPTION", "As Acrid, corrupt yourself 7 times to break containment."); LanguageAPI.Add("VOIDCRID_PASSIVE", "<style=cArtifact>Void</style>crid"); LanguageAPI.Add("VOIDCRID_PASSIVE_DESC", "All <style=cArtifact>Void</style> attacks have a chance to <style=cArtifact>jail</style> enemies (and apply <style=cWorldEvent>Deeprot</style>, if selected)."); LanguageAPI.Add("ACHIEVEMENT_GRANDFATHERPARADOX_NAME", "Acrid: Grandfather Paradox"); LanguageAPI.Add("ACHIEVEMENT_GRANDFATHERPARADOX_DESCRIPTION", "An unexpected amphibian, an unfortunate end."); LanguageAPI.Add("ACHIEVEMENT_RIGHTTOJAIL_NAME", "Acrid: Right To Jail"); LanguageAPI.Add("ACHIEVEMENT_RIGHTTOJAIL_DESCRIPTION", "As Acrid, jail a Jailer."); LanguageAPI.Add("ACHIEVEMENT_VOIDCRIDUNLOCK_NAME", "...Left alone"); LanguageAPI.Add("ACHIEVEMENT_VOIDCRIDUNLOCK_DESCRIPTION", "As Acrid, corrupt yourself 7 times to break containment."); LanguageAPI.Add("VOIDCRID_FLAMEBREATH", "Flamebreath"); LanguageAPI.Add("VOIDCRID_FLAMEBREATH_DESC", "<style=cDeath>Igniting.</style> <style=cIsDamage>Agile.</style> Release a burst of <style=cIsDamage>flame</style>, <style=cDeath>burning</style> enemies for <style=cIsDamage>250%</style> damage."); LanguageAPI.Add("VOIDCRID_NULLBEAM", "<style=cArtifact>「N?ll Beam』</style>"); LanguageAPI.Add("VOIDCRID_NULLBEAM_DESC", "<style=cArtifact>Void.</style> Draw deep from the <style=cArtifact>Void</style>, battering enemies with a swath of <style=cDeath>tentacles</style> for <style=cIsDamage>900%</style> damage."); LanguageAPI.Add("VOIDCRID_VOIDDRIFT", "<style=cArtifact>「Ethereal Dr?ft』</style>"); LanguageAPI.Add("VOIDCRID_VOIDRIFT_DESC", "<style=cArtifact>Void.</style> <style=cIsDamage>Stunning.</style> Slip into the <style=cArtifact>Void</style> dealing <style=cIsDamage>400% total</style> damage, with a chance to take enemies with you."); LanguageAPI.Add("VOIDCRID_ENTROPY", "<style=cArtifact>「Entr<style=cIsHealing>?</style>py』</style>"); LanguageAPI.Add("VOIDCRID_ENTROPY_DESC", $"<style=cArtifact>Void.</style> <style=cIsDamage>Agile.</style> <style=cIsHealing>Poisonous.</style> <style=cIsDamage>Unstable.</style> Reorganize your cells, <style=cIsHealing>healing</style> for <style=cIsDamage>{VoidcridDef.EntropySelfHeal.Value * 100f}%</style> or <style=cDeath>harming</style> yourself for <style=cIsDamage>{VoidcridDef.EntropySelfDamage.Value * 100f}%</style> health to damage for <style=cIsDamage>{VoidcridDef.EntropyOverrideDamage.Value}00% x 3</style> damage or <style=cIsHealing>poison</style> enemies. If held, creates a temporary <style=cArtifact>black hole</style>, <style=cDeath>choking</style> everyone inside and applies your <style=cIsHealing>Passive</style> on exiting."); LanguageAPI.Add("VOIDCRID_SCEPTER_ENTROPY", "<style=cArtifact>「Umbral Entr<style=cIsHealing>?</style>py』</style>"); LanguageAPI.Add("VOIDCRID__SCEPTER_ENTROPY_DESC", $"<style=cArtifact>Void.</style> <style=cIsDamage>Agile.</style> <style=cIsHealing>Poisonous.</style> <style=cIsDamage>Unstable.</style> Damage is increased to <style=cIsDamage>{VoidcridDef.ScepterEntropyOverrideDamage.Value}00% x 3</style> and if held, <style=cArtifact>ensares</style> enemies for <style=cIsDamage> 10% </style> of your health and applies your Passive.</style>"); } } } namespace Voidcrid.Hooks { public class HookSetup { [CompilerGenerated] private static class <>O { public static hook_TakeDamage <0>__JailJailJail; pu
Voidcrid_Skins.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using MonoMod.RuntimeDetour.HookGen; using RoR2; using RoR2.ContentManagement; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] namespace Voidcrid_Skins; [BepInPlugin("com.sixfears7.Voidcrid_Skins", "Voidcrid_Skins", "1.0.0")] public class Voidcrid_SkinsPlugin : BaseUnityPlugin { private class FieldException : Exception { public FieldException(string message, Exception innerException) : base(message, innerException) { } } private static AssetBundle assetBundle; private static readonly List<Material> materialsWithRoRShader = new List<Material>(); internal static Voidcrid_SkinsPlugin Instance { get; private set; } internal static ManualLogSource InstanceLogger { get { Voidcrid_SkinsPlugin instance = Instance; return (instance != null) ? ((BaseUnityPlugin)instance).Logger : null; } } private void Start() { Instance = this; using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Voidcrid_Skins.sixfears7voidcrid_skins")) { assetBundle = AssetBundle.LoadFromStream(stream); } ((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)BodyCatalogInit); HookEndpointManager.Add((MethodBase)typeof(Language).GetMethod("LoadStrings"), (Delegate)new Action<Action<Language>, Language>(LanguageLoadStrings)); ReplaceShaders(); } private static void ReplaceShaders() { LoadMaterialsWithReplacedShader("RoR2/Base/Shaders/HGStandard.shader", "Assets/Resources/mouthfix.mat", "Assets/Resources/pink.mat", "Assets/Resources/Blackrid.mat", "Assets/Resources/demoneyes.mat", "Assets/Resources/Whitecrid.mat"); } private static void LoadMaterialsWithReplacedShader(string shaderPath, params string[] materialPaths) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) Shader shader = Addressables.LoadAssetAsync<Shader>((object)shaderPath).WaitForCompletion(); foreach (string text in materialPaths) { Material val = assetBundle.LoadAsset<Material>(text); val.shader = shader; materialsWithRoRShader.Add(val); } } private static void LanguageLoadStrings(Action<Language> orig, Language self) { orig(self); self.SetStringByToken("SIXFEARS7_SKIN_VOIDCRID_NAME", "Voidcrid"); self.SetStringByToken("SIXFEARS7_SKIN_BLACKRID_NAME", "Blackrid"); self.SetStringByToken("SIXFEARS7_SKIN_RADIOACRID_NAME", "Abominacrid"); } private static void Nothing(Action<SkinDef> orig, SkinDef self) { } private static void BodyCatalogInit() { MethodInfo method = typeof(SkinDef).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic); HookEndpointManager.Add((MethodBase)method, (Delegate)new Action<Action<SkinDef>, SkinDef>(Nothing)); AddCrocoBodyVoidcridSkin(); AddCrocoBodyBlackridSkin(); AddCrocoBodyRadioacridSkin(); HookEndpointManager.Remove((MethodBase)method, (Delegate)new Action<Action<SkinDef>, SkinDef>(Nothing)); } private static void AddCrocoBodyVoidcridSkin() { //IL_025b: Unknown result type (might be due to invalid IL or missing references) string text = "CrocoBody"; string text2 = "Voidcrid"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); if (!Object.op_Implicit((Object)(object)val)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist")); return; } ModelLocator component = val.GetComponent<ModelLocator>(); if (!Object.op_Implicit((Object)(object)component)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component")); return; } GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController val2 = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null); if (!Object.op_Implicit((Object)(object)val2)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component")); return; } Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef skin = ScriptableObject.CreateInstance<SkinDef>(); TryCatchThrow("Icon", delegate { skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Voidcrid_Skins\\Icons\\VoidcridIcon.png"); }); ((Object)skin).name = text2; skin.nameToken = "SIXFEARS7_SKIN_VOIDCRID_NAME"; skin.rootObject = gameObject; TryCatchThrow("Base Skins", delegate { skin.baseSkins = Array.Empty<SkinDef>(); }); TryCatchThrow("Unlockable Name", delegate { skin.unlockableDef = null; }); TryCatchThrow("Game Object Activations", delegate { skin.gameObjectActivations = Array.Empty<GameObjectActivation>(); }); TryCatchThrow("Renderer Infos", delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0056: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) skin.rendererInfos = (RendererInfo[])(object)new RendererInfo[2] { new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Resources/mouthfix.mat"), defaultShadowCastingMode = (ShadowCastingMode)0, ignoreOverlays = false, renderer = renderers[2] }, new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Resources/pink.mat"), defaultShadowCastingMode = (ShadowCastingMode)0, ignoreOverlays = false, renderer = renderers[3] } }; }); TryCatchThrow("Mesh Replacements", delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) skin.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets/Resources/FINALLFXD.mesh"), renderer = renderers[2] } }; }); TryCatchThrow("Minion Skin Replacements", delegate { skin.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); }); TryCatchThrow("Projectile Ghost Replacements", delegate { skin.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); }); Array.Resize(ref val2.skins, val2.skins.Length + 1); val2.skins[val2.skins.Length - 1] = skin; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = val2.skins; } catch (FieldException ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogWarning((object)("Field causing issue: " + ex.Message)); InstanceLogger.LogError((object)ex.InnerException); } catch (Exception ex2) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex2); } } private static void AddCrocoBodyBlackridSkin() { //IL_025b: Unknown result type (might be due to invalid IL or missing references) string text = "CrocoBody"; string text2 = "Blackrid"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); if (!Object.op_Implicit((Object)(object)val)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist")); return; } ModelLocator component = val.GetComponent<ModelLocator>(); if (!Object.op_Implicit((Object)(object)component)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component")); return; } GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController val2 = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null); if (!Object.op_Implicit((Object)(object)val2)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component")); return; } Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef skin = ScriptableObject.CreateInstance<SkinDef>(); TryCatchThrow("Icon", delegate { skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Voidcrid_Skins\\Icons\\BlackridIcon.png"); }); ((Object)skin).name = text2; skin.nameToken = "SIXFEARS7_SKIN_BLACKRID_NAME"; skin.rootObject = gameObject; TryCatchThrow("Base Skins", delegate { skin.baseSkins = Array.Empty<SkinDef>(); }); TryCatchThrow("Unlockable Name", delegate { skin.unlockableDef = null; }); TryCatchThrow("Game Object Activations", delegate { skin.gameObjectActivations = Array.Empty<GameObjectActivation>(); }); TryCatchThrow("Renderer Infos", delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0056: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) skin.rendererInfos = (RendererInfo[])(object)new RendererInfo[2] { new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Resources/Blackrid.mat"), defaultShadowCastingMode = (ShadowCastingMode)0, ignoreOverlays = false, renderer = renderers[2] }, new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Resources/demoneyes.mat"), defaultShadowCastingMode = (ShadowCastingMode)0, ignoreOverlays = false, renderer = renderers[3] } }; }); TryCatchThrow("Mesh Replacements", delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) skin.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets/Resources/FINALLFXD.mesh"), renderer = renderers[2] } }; }); TryCatchThrow("Minion Skin Replacements", delegate { skin.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); }); TryCatchThrow("Projectile Ghost Replacements", delegate { skin.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); }); Array.Resize(ref val2.skins, val2.skins.Length + 1); val2.skins[val2.skins.Length - 1] = skin; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = val2.skins; } catch (FieldException ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogWarning((object)("Field causing issue: " + ex.Message)); InstanceLogger.LogError((object)ex.InnerException); } catch (Exception ex2) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex2); } } private static void AddCrocoBodyRadioacridSkin() { //IL_025b: Unknown result type (might be due to invalid IL or missing references) string text = "CrocoBody"; string text2 = "Radioacrid"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); if (!Object.op_Implicit((Object)(object)val)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist")); return; } ModelLocator component = val.GetComponent<ModelLocator>(); if (!Object.op_Implicit((Object)(object)component)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component")); return; } GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController val2 = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null); if (!Object.op_Implicit((Object)(object)val2)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component")); return; } Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef skin = ScriptableObject.CreateInstance<SkinDef>(); TryCatchThrow("Icon", delegate { skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\Voidcrid_Skins\\Icons\\RadioacridIcon.png"); }); ((Object)skin).name = text2; skin.nameToken = "SIXFEARS7_SKIN_RADIOACRID_NAME"; skin.rootObject = gameObject; TryCatchThrow("Base Skins", delegate { skin.baseSkins = Array.Empty<SkinDef>(); }); TryCatchThrow("Unlockable Name", delegate { skin.unlockableDef = ((IEnumerable<UnlockableDef>)ContentManager.unlockableDefs).FirstOrDefault((Func<UnlockableDef, bool>)((UnlockableDef def) => def.cachedName == "GrandfatherParadox")); }); TryCatchThrow("Game Object Activations", delegate { skin.gameObjectActivations = Array.Empty<GameObjectActivation>(); }); TryCatchThrow("Renderer Infos", delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0056: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) skin.rendererInfos = (RendererInfo[])(object)new RendererInfo[2] { new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Resources/Whitecrid.mat"), defaultShadowCastingMode = (ShadowCastingMode)0, ignoreOverlays = false, renderer = renderers[2] }, new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/Resources/Whitecrid.mat"), defaultShadowCastingMode = (ShadowCastingMode)0, ignoreOverlays = false, renderer = renderers[3] } }; }); TryCatchThrow("Mesh Replacements", delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) skin.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets/Resources/FINALLFXD.mesh"), renderer = renderers[2] } }; }); TryCatchThrow("Minion Skin Replacements", delegate { skin.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); }); TryCatchThrow("Projectile Ghost Replacements", delegate { skin.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); }); Array.Resize(ref val2.skins, val2.skins.Length + 1); val2.skins[val2.skins.Length - 1] = skin; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = val2.skins; } catch (FieldException ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogWarning((object)("Field causing issue: " + ex.Message)); InstanceLogger.LogError((object)ex.InnerException); } catch (Exception ex2) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex2); } } private static void TryCatchThrow(string message, Action action) { try { action?.Invoke(); } catch (Exception innerException) { throw new FieldException(message, innerException); } } }