using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BaseMod.Changes; using BaseMod.Modules; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using EclipseRevamped; using EnemyAbilities.Abilities.Nullifier; using EntityStates; using EntityStates.BrotherMonster; using FathomlessVoidling.VoidlingEntityStates; using FathomlessVoidling.VoidlingEntityStates.Phase3; using GrooveSaladSpikestripContent.Content; using HarmonyLib; using IL.RoR2; using Meltdown; using Meltdown.Utils; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.EntityStates.BrotherMonster; using R2API; using RA2Mod.Survivors.Desolator; using RoR2; using RoR2.ContentManagement; using RoR2.Projectile; using Skillsmas.Skills.Croco; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("AmpMod")] [assembly: IgnoresAccessChecksTo("ArsonistMod")] [assembly: IgnoresAccessChecksTo("BubbetsItems")] [assembly: IgnoresAccessChecksTo("EclipseRevamped")] [assembly: IgnoresAccessChecksTo("EnemyAbilities")] [assembly: IgnoresAccessChecksTo("FathomlessVoidling")] [assembly: IgnoresAccessChecksTo("GrooveSaladSpikestripContent")] [assembly: IgnoresAccessChecksTo("Meltdown")] [assembly: IgnoresAccessChecksTo("Morris")] [assembly: IgnoresAccessChecksTo("RA2Mod")] [assembly: IgnoresAccessChecksTo("SkillsmasPlugin")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BaseMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BaseMod")] [assembly: AssemblyTitle("BaseMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 BaseMod { [BepInPlugin("com.Bloonjitsu7.BloonModpackBaseMod", "BloonModpackBaseMod", "1.8.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.*/)] [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 BaseMain : BaseUnityPlugin { public const string PluginGUID = "Bloonjitsu7.BloonModpackBaseModPlugin"; public const string PluginAuthor = "Bloonjitsu7"; public const string PluginName = "BloonModpackBaseModPlugin"; public const string PluginVersion = "1.8.0"; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); BaseChanges baseChanges = new BaseChanges(); baseChanges.Initialize(); } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } } namespace BaseMod.Modules { public static class DamageTypes { } public static class States { internal static List entityStates = new List(); internal static void RegisterStates() { } } public static class Projectiles { internal static List projectilePrefabs = new List(); internal static void RegisterProjectiles() { } } public static class Buffs { internal static List buffDefs = new List(); internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isCooldown = isCooldown; val.isHidden = isHidden; buffDefs.Add(val); return val; } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.Bloonjitsu7.BloonModpackBaseMod"; public void Initialize() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown States.RegisterStates(); Projectiles.RegisterProjectiles(); ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.buffDefs.Add(Buffs.buffDefs.ToArray()); contentPack.entityStateTypes.Add(States.entityStates.ToArray()); contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } } namespace BaseMod.Changes { public class BaseChanges { internal static bool HasMeltdown => Chainloader.PluginInfos.ContainsKey("com.pittabread.Meltdown"); internal static bool HasRedAlert => Chainloader.PluginInfos.ContainsKey("com.TheTimesweeper.RedAlert"); internal static bool HasSkillsmas => Chainloader.PluginInfos.ContainsKey("com.themysticsword.skillsmas"); internal static bool HasFathomlessVoidling => Chainloader.PluginInfos.ContainsKey("com.Nuxlar.FathomlessVoidling"); internal static bool HasEnemyAbilities => Chainloader.PluginInfos.ContainsKey("Skeletogne.EnemyAbilities"); internal static bool HasEclipseRevamped => Chainloader.PluginInfos.ContainsKey("Nuxlar.EclipseRevamped"); internal static bool HasSpikestrip => Chainloader.PluginInfos.ContainsKey("com.groovesalad.GrooveSaladSpikestripContent"); public void Initialize() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown SurvivorChanges survivorChanges = new SurvivorChanges(); survivorChanges.Initialize(); BossChanges bossChanges = new BossChanges(); bossChanges.Initialize(); Harmony val = new Harmony("com.Bloonjitsu7.BloonModpackBaseMod"); val.PatchAll(); if (!HasEclipseRevamped) { Log.Warning("EclipseRevamped Content Disabled"); } if (!HasSpikestrip) { Log.Warning("Spikestrip Content Disabled"); } if (HasEclipseRevamped) { EclipseRevampedChanges eclipseRevampedChanges = new EclipseRevampedChanges(); eclipseRevampedChanges.Initialize(); } if (HasSpikestrip) { SpikestripChanges spikestripChanges = new SpikestripChanges(); spikestripChanges.Initialize(); } DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += new Manipulator(IL_DotBypassArmor); } public void IL_DotBypassArmor(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: 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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Mathf), "Min"), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DotStack), "damage") })) { val.Emit(OpCodes.Ldloc, 5); val.Emit(OpCodes.Ldc_I4, 2); val.EmitDelegate>((Action)delegate(DotStack dotStack, DamageType type) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) dotStack.damageType = DamageTypeCombo.op_Implicit(type); }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } } public class SpikestripChanges : BaseState { private Hook platedHook; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void Initialize() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(PlatedElite), "OnHitEnemyServer", (Type[])null, (Type[])null); platedHook = new Hook((MethodBase)methodInfo, (Delegate)new Action, PlatedElite, DamageInfo, GameObject>(OnPlatedHit)); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void OnPlatedHit(Action orig, PlatedElite self, DamageInfo damageInfo, GameObject victim) { } } public class EclipseRevampedChanges : BaseState { private float e6creditMult = 0.2f; private Hook e1Hook; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void Initialize() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown if (Main.shouldChangeE1.Value) { MethodInfo methodInfo = AccessTools.Method(typeof(Main), "AddNewE1", (Type[])null, (Type[])null); e1Hook = new Hook((MethodBase)methodInfo, (Delegate)new Action, Main, ILContext>(OnAddNewE1)); ChargingState.OnEnter += new Manipulator(IL_NewE1); } SceneDirector.onPrePopulateSceneServer += AddNewE6; if (!Main.shouldChangeE6.Value) { Log.Message("Removed Vanilla E6"); DeathRewards.OnKilledServer += new Manipulator(IL_RemoveE6); } ChangeDescriptions(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void OnAddNewE1(Action orig, Main self, ILContext il) { Log.Message("Success!"); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void IL_NewE1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; if (val.TryGotoNext(val2, new Func[5] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 600f), (Instruction x) => ILPatternMatchingExt.MatchCall(x, "get_instance"), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(Run), "compensatedDifficultyCoefficient"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Mathf), "Pow") })) { val.Index -= 4; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate { //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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Invalid comparison between Unknown and I4 float result = 1f; if (!Object.op_Implicit((Object)(object)Run.instance)) { Log.Warning("Run Instance Failed"); return result; } DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty; if ((int)selectedDifficulty >= 3) { Log.Message("Eclipse Scaling Added To Teleporter!"); result = 1.5f; } return result; }); val.Emit(OpCodes.Mul); } else { Log.Warning("Hook 1 Failed!"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void AddNewE6(SceneDirector obj) { //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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty; if ((int)selectedDifficulty >= 8) { Log.Message("E6 Success!"); Log.Message(obj.interactableCredit); obj.interactableCredit = (int)((float)obj.interactableCredit * (1f - e6creditMult)); Log.Message(obj.interactableCredit); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void IL_RemoveE6(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.8f) })) { val.Next.Operand = 1f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 Failed"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void ChangeDescriptions() { string text = "Starts at baseline Monsoon difficulty.\n"; string text2 = (Main.shouldChangeE1.Value ? "\n(1) Teleporter Enemies: +50%" : "\n(1) Ally Starting Health: -50%"); string text3 = (Main.shouldChangeE2.Value ? "\n(2) Difficulty Scaling +25%" : "\n(2) Teleporter Radius: -50%"); string text4 = (Main.shouldChangeE3.Value ? "\n(3) Enemy Elites: +20%" : "\n(3) Ally Fall Damage: +100% and lethal"); string text5 = "\n(4) Enemy Speed: +40%"; string text6 = (Main.shouldChangeE5.Value ? "\n(5) Ally Healing: -25%" : "\n(5) Ally Healing: -50%"); string text7 = "\n(6) Interactables Spawned: -20%"; string text8 = "\n(7) Enemy Cooldowns: -50%"; string text9 = "\n(8) Allies recieve permanent damage"; string text10 = "\"You only celebrate in the light... because I allow it.\" \n\n"; LanguageAPI.AddOverlay("ECLIPSE_1_DESCRIPTION", text + text2); LanguageAPI.AddOverlay("ECLIPSE_2_DESCRIPTION", text + text2 + text3); LanguageAPI.AddOverlay("ECLIPSE_3_DESCRIPTION", text + text2 + text3 + text4); LanguageAPI.AddOverlay("ECLIPSE_4_DESCRIPTION", text + text2 + text3 + text4 + text5); LanguageAPI.AddOverlay("ECLIPSE_5_DESCRIPTION", text + text2 + text3 + text4 + text5 + text6); LanguageAPI.AddOverlay("ECLIPSE_6_DESCRIPTION", text + text2 + text3 + text4 + text5 + text6 + text7); LanguageAPI.AddOverlay("ECLIPSE_7_DESCRIPTION", text + text2 + text3 + text4 + text5 + text6 + text7 + text8); LanguageAPI.AddOverlay("ECLIPSE_8_DESCRIPTION", text10 + text + text2 + text3 + text4 + text5 + text6 + text7 + text8 + text9); } } public class SurvivorChanges : BaseState { private Hook desolatorDebuffHook; private ILHook bubbleLoadHook; public void Initialize() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown if (!BaseChanges.HasRedAlert) { Log.Warning("RedAlert Content Disabled"); } if (!BaseChanges.HasSkillsmas) { Log.Warning("Skillsmas Content Disabled"); } if (BaseChanges.HasRedAlert) { DesolatorSurvivor.DotSpecialProcCoefficient = 0.2f; if (BaseChanges.HasMeltdown) { MethodInfo methodInfo = AccessTools.Method(typeof(DesolatorSurvivor), "inflictRadiation", (Type[])null, (Type[])null); desolatorDebuffHook = new Hook((MethodBase)methodInfo, (Delegate)new Action, DesolatorSurvivor, GameObject, GameObject, float, bool>(OnDesolatorDebuff)); } } if (BaseChanges.HasSkillsmas) { MethodInfo methodInfo2 = AccessTools.Method(typeof(PoisonBubble), "OnLoad", (Type[])null, (Type[])null); bubbleLoadHook = new ILHook((MethodBase)methodInfo2, new Manipulator(IL_BubbleLoad)); } } public void OnDesolatorDebuff(Action orig, DesolatorSurvivor self, GameObject victim, GameObject attacker, float proc, bool crit) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) InflictDotInfo val = new InflictDotInfo { victimObject = victim, attackerObject = attacker, dotIndex = Meltdown.irradiated.index, damageMultiplier = (crit ? 0.6f : 0.3f), duration = DesolatorSurvivor.DotDuration, maxStacksFromAttacker = uint.MaxValue }; CharacterBody component = attacker.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.inventory != (Object)null) { IrradiatedUtils.CheckDotForUpgrade(component.inventory, ref val); } DotController.InflictDot(ref val); } public void IL_BubbleLoad(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "RoR2/Base/Croco/CrocoBodyUtilityFamily.asset") })) { val.Next.Operand = "RoR2/Base/Croco/CrocoBodySpecialFamily.asset"; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } } public class BossChanges : EntityState { private Hook crushHook; private Hook transposeHook; private SpawnCard minionSpawnCard = Addressables.LoadAssetAsync((object)"RoR2/Base/LunarWisp/cscLunarWisp.asset").WaitForCompletion(); private SpawnCard constructSpawnCard = Addressables.LoadAssetAsync((object)"RoR2/Base/LunarExploder/cscLunarExploder.asset").WaitForCompletion(); public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown FistSlam.OnEnter += new hook_OnEnter(OnFistSlamEnter); FistSlam.FixedUpdate += new hook_FixedUpdate(OnFistSlamUpdate); SpellChannelExitState.OnExit += new hook_OnExit(OnSpellExit); UltChannelState.FireWave += new hook_FireWave(OnFireWave); if (!BaseChanges.HasFathomlessVoidling) { Log.Warning("FathomlessVoidling Content Disabled"); } if (!BaseChanges.HasEnemyAbilities) { Log.Warning("EnemyAbilities Content Disabled"); } if (BaseChanges.HasFathomlessVoidling) { MethodInfo methodInfo = AccessTools.Method(typeof(Crush), "OnEnter", (Type[])null, (Type[])null); crushHook = new Hook((MethodBase)methodInfo, (Delegate)new Action, Crush>(OnCrushEnter)); if (BaseChanges.HasEnemyAbilities) { MethodInfo methodInfo2 = AccessTools.Method(typeof(Transpose), "OnEnter", (Type[])null, (Type[])null); transposeHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action, Transpose>(OnTransposeEnter)); } } } private void OnCrushEnter(Action orig, Crush self) { Crush.missileSpawnFrequency = 3f; Crush.damageCoefficient = 4f; orig(self); } private void OnTransposeEnter(Action orig, Transpose self) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); for (int i = 0; i < 3; i++) { float num = Random.Range(-50f, 50f); float num2 = Random.Range(-10f, 20f); float num3 = Random.Range(-50f, 50f); ((Vector3)(ref val))..ctor(num, num2, num3); MasterSummon val2 = new MasterSummon { masterPrefab = SummonAnglerEyeModule.anglerEyeMasterPrefab, ignoreTeamMemberLimit = true, position = ((EntityState)self).characterBody.transform.position + val }; val2.rotation = Util.QuaternionSafeLookRotation(((EntityState)self).inputBank.aimDirection); val2.summonerBodyObject = ((EntityState)self).gameObject; val2.inventoryToCopy = ((EntityState)self).characterBody.inventory; val2.useAmbientLevel = null; CharacterMaster val3 = val2.Perform(); CharacterBody body = val3.GetBody(); body.baseMaxHealth = 80f; body.levelMaxHealth = 24f; body.baseDamage = 15f; body.levelDamage = 3f; } orig(self); } public void OnSpellExit(orig_OnExit orig, SpellChannelExitState self) { //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_004c: 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_006b: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); ((EntityState)self).characterBody.attackSpeed = 1f; Vector3[] array = (Vector3[])(object)new Vector3[2] { new Vector3(25f, 50f, 25f), new Vector3(-25f, 50f, -25f) }; for (int i = 0; i < 2; i++) { GameObject spawnedInstance = minionSpawnCard.DoSpawn(((EntityState)self).characterBody.footPosition + array[i % 2] + array[i % 2] * (float)(i / 2) * 0.5f, Quaternion.identity, new DirectorSpawnRequest(minionSpawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)0 }, Run.instance.runRNG) { teamIndexOverride = (TeamIndex)2 }).spawnedInstance; NetworkServer.Spawn(spawnedInstance); CharacterBody body = spawnedInstance.gameObject.GetComponent().GetBody(); body.baseAttackSpeed = 0.8f; } } public void OnFireWave(orig_FireWave orig, UltChannelState self) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b1: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) self.wavesFired++; float num = 360f / (float)UltChannelState.waveProjectileCount; Vector3 val = Vector3.ProjectOnPlane(Random.onUnitSphere, Vector3.up); Vector3 normalized = ((Vector3)(ref val)).normalized; val = Vector3.ProjectOnPlane(Random.onUnitSphere, Vector3.up); Vector3 normalized2 = ((Vector3)(ref val)).normalized; Vector3 footPosition = ((EntityState)self).characterBody.footPosition; GameObject val2 = UltChannelState.waveProjectileLeftPrefab; GameObject val3 = UltChannelState.waveProjectileRightPrefab; if (Random.value <= 0.5f) { val2 = UltChannelState.waveProjectileRightPrefab; val3 = UltChannelState.waveProjectileLeftPrefab; } for (int i = 0; i < UltChannelState.waveProjectileCount; i++) { Vector3 val4 = Quaternion.AngleAxis(num * (float)i, Vector3.up) * normalized; ProjectileManager.instance.FireProjectileWithoutDamageType(val2, footPosition, Util.QuaternionSafeLookRotation(val4), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * UltChannelState.waveProjectileDamageCoefficient, UltChannelState.waveProjectileForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } float num2 = Random.Range(-30f, 30f); for (int j = 0; j < UltChannelState.waveProjectileCount; j++) { Vector3 val5 = Quaternion.AngleAxis(num * (float)j + num2, Vector3.up) * normalized2; ProjectileManager.instance.FireProjectileWithoutDamageType(val3, footPosition, Util.QuaternionSafeLookRotation(val5), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * UltChannelState.waveProjectileDamageCoefficient, UltChannelState.waveProjectileForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } public void OnFistSlamEnter(orig_OnEnter orig, FistSlam self) { FistSlam.baseDuration = 2f; FistSlam.waveProjectileCount = 12; FistSlam.healthCostFraction = 0.02f; FistSlam.damageCoefficient = 10f; FistSlam.waveProjectileDamageCoefficient = 6f; FistSlam.waveProjectileForce = 0.5f; FistSlam.forceMagnitude = 10f; ((EntityState)self).characterBody.attackSpeed = 1f; orig.Invoke(self); } public void OnFistSlamUpdate(orig_FixedUpdate orig, FistSlam self) { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_01b5: 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_01cb: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) bool flag = false; if (Object.op_Implicit((Object)(object)self.modelAnimator) && self.modelAnimator.GetFloat("fist.hitBoxActive") > 0.5f && !self.hasAttacked) { flag = true; } orig.Invoke(self); if (flag) { int waveProjectileCount = ExitSkyLeap.waveProjectileCount; Transform val = ((BaseState)self).FindModelChild(FistSlam.muzzleString); float num = 360f / (float)waveProjectileCount; Vector3 val2 = Vector3.ProjectOnPlane(((EntityState)self).characterDirection.forward, Vector3.up); Vector3 val3 = ((EntityState)self).characterBody.footPosition; if (Object.op_Implicit((Object)(object)val)) { val3 = val.position; } for (int i = 0; i < waveProjectileCount; i++) { Vector3 val4 = Quaternion.AngleAxis(num * (float)i, Vector3.up) * val2; ProjectileManager.instance.FireProjectile(ExitSkyLeap.waveProjectilePrefab, val3, Util.QuaternionSafeLookRotation(val4), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * 2.5f, 0.5f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } Vector3 val5 = default(Vector3); for (int j = 0; j < 1; j++) { float num2 = Random.Range(-50f, 50f); float num3 = Random.Range(-50f, 50f); ((Vector3)(ref val5))..ctor(num2, 0f, num3); GameObject spawnedInstance = constructSpawnCard.DoSpawn(((EntityState)self).characterBody.footPosition + val5, Quaternion.identity, new DirectorSpawnRequest(constructSpawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)0 }, Run.instance.runRNG) { teamIndexOverride = (TeamIndex)2 }).spawnedInstance; NetworkServer.Spawn(spawnedInstance); CharacterBody body = spawnedInstance.gameObject.GetComponent().GetBody(); } } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }