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 RecoveredAndReformedStripped v1.0.2
RecoveredAndReformed.dll
Decompiled 5 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Assassin2; using EntityStates.EngiTurret.EngiTurretWeapon; using EntityStates.MajorConstruct; using EntityStates.MajorConstruct.Stance; using EntityStates.MajorConstruct.Weapon; using HarmonyLib; using IL.EntityStates; using IL.EntityStates.Assassin2; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.EntityStates.Assassin2; using On.EntityStates.MajorConstruct.Stance; using On.EntityStates.MajorConstruct.Weapon; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.ExpansionManagement; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; [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("RecoveredAndReformed")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+50b7255d843bcb82b83017ff05025284df4c8231")] [assembly: AssemblyProduct("RecoveredAndReformed")] [assembly: AssemblyTitle("RecoveredAndReformed")] [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 RecoveredAndReformed { [BepInPlugin("Phreel.RecoveredAndReformedStripped", "RecoveredAndReformedStripped", "1.0.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin { public const string PluginGUID = "Phreel.RecoveredAndReformedStripped"; public const string PluginAuthor = "Phreel"; public const string PluginName = "RecoveredAndReformedStripped"; public const string PluginVersion = "1.0.2"; public static ManualLogSource Log; public static PluginInfo pluginInfo; public static Harmony Harmony; public static ConfigFile Config; public static ConfigEntry<string> MajorConstructSpawn; public static ConfigEntry<string> Assassin2Spawn; public static ConfigEntry<int> MajorConstructMinStage; public static ConfigEntry<int> Assassin2MinStage; public static ConfigEntry<float> MajorConstructHealth; public static ConfigEntry<float> MajorConstructHealthStack; public static ConfigEntry<float> MajorConstructDamage; public static ConfigEntry<float> MajorConstructDamageStack; public static ConfigEntry<float> MajorConstructAttackSpeed; public static ConfigEntry<float> MajorConstructArmor; public static ConfigEntry<int> MajorConstructCost; public static ConfigEntry<float> Assassin2Health; public static ConfigEntry<float> Assassin2HealthStack; public static ConfigEntry<float> Assassin2Damage; public static ConfigEntry<float> Assassin2DamageStack; public static ConfigEntry<float> Assassin2AttackSpeed; public static ConfigEntry<float> Assassin2Speed; public static ConfigEntry<float> Assassin2Armor; public static ConfigEntry<int> Assassin2Cost; public static ConfigEntry<float> MajorConstructDeathTimer; public static ConfigEntry<int> MajorConstructSpawnAmount; public static ConfigEntry<bool> MajorConstructSpawnSigmaInstead; public static ConfigEntry<float> MajorConstructBeamDistance; public static ConfigEntry<float> MajorConstructAimSpeed; public static ConfigEntry<float> Assassin2InvisDuration; public static ConfigEntry<float> Assassin2InvisEndlag; public static ConfigEntry<float> Assassin2DashDuration; public static ConfigEntry<float> Assassin2DashSpeed; public static ConfigEntry<float> Assassin2SlashDuration; public static ConfigEntry<float> Assassin2SlashDamage; public static ConfigEntry<float> Assassin2SlashKnockback; public static ConfigEntry<float> Assassin2SlashReach; public static ConfigEntry<bool> Assassin2Slash1; public static ConfigEntry<bool> Assassin2Slash2; public static ConfigEntry<float> Assassin2SlashExpose; public static ConfigEntry<float> Assassin2SlashSize; public static ConfigEntry<bool> Assassin2SlashMultihit; public static ConfigEntry<float> Assassin2ShurikenSize; public static ConfigEntry<bool> Assassin2Accurate; public static ConfigEntry<bool> Assassin2AccurateLoop; public static ExpansionDef DLC1; public void Awake() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0644: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Expected O, but got Unknown //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_06a5: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Expected O, but got Unknown //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06bc: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Expected O, but got Unknown //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Expected O, but got Unknown pluginInfo = ((BaseUnityPlugin)this).Info; Log = ((BaseUnityPlugin)this).Logger; Harmony = new Harmony("Phreel.RecoveredAndReformedStripped"); Config = new ConfigFile(Path.Combine(Paths.ConfigPath, "Phreel.RecoveredAndReformedStripped.cfg"), true); MajorConstructSpawn = Config.Bind<string>("Spawns", "Iota Construct Spawn Scenes", "skymeadow, itskymeadow, sulfurpools, itgolemplains, golemplains, golemplains2, forgottenhaven, FBLScene", "List of scene names, separated by comma. By default, where Xi Construct spawns."); Assassin2Spawn = Config.Bind<string>("Spawns", "Assassin Spawn Scenes", "blackbeach, blackbeach2, rootjungle, arena, shipgraveyard, wispgraveyard, itancientloft, ancientloft", "List of scene names, separated by comma."); MajorConstructMinStage = Config.Bind<int>("Spawns", "Iota Construct Minimum Stage", 4, "Starting stage."); Assassin2MinStage = Config.Bind<int>("Spawns", "Assassin Minimum Stage", 3, "Starting stage."); MajorConstructHealth = Config.Bind<float>("Basic Stats", "Iota Construct Base Health", 2100f, ""); MajorConstructHealthStack = Config.Bind<float>("Basic Stats", "Iota Construct Health Increase Per Level", 630f, ""); MajorConstructDamage = Config.Bind<float>("Basic Stats", "Iota Construct Base Damage", 25f, ""); MajorConstructDamageStack = Config.Bind<float>("Basic Stats", "Iota Construct Damage Increase Per Level", 5f, ""); MajorConstructAttackSpeed = Config.Bind<float>("Basic Stats", "Iota Construct Attack Speed", 1f, ""); MajorConstructArmor = Config.Bind<float>("Basic Stats", "Iota Construct Armor", 15f, ""); MajorConstructCost = Config.Bind<int>("Basic Stats", "Iota Construct Director Cost", 800, ""); Assassin2Health = Config.Bind<float>("Basic Stats", "Assassin Base Health", 120f, ""); Assassin2HealthStack = Config.Bind<float>("Basic Stats", "Assassin Health Increase Per Level", 36f, ""); Assassin2Damage = Config.Bind<float>("Basic Stats", "Assassin Base Damage", 10f, ""); Assassin2DamageStack = Config.Bind<float>("Basic Stats", "Assassin Damage Increase Per Level", 2f, ""); Assassin2AttackSpeed = Config.Bind<float>("Basic Stats", "Assassin Attack Speed", 1.2f, ""); Assassin2Speed = Config.Bind<float>("Basic Stats", "Assassin Speed", 12f, ""); Assassin2Armor = Config.Bind<float>("Basic Stats", "Assassin Armor", 0f, ""); Assassin2Cost = Config.Bind<int>("Basic Stats", "Assassin Director Cost", 28, "Default: 10."); MajorConstructDeathTimer = Config.Bind<float>("Iota Construct", "Death Timer", 5f, "Amount of seconds to show death animation for"); MajorConstructSpawnAmount = Config.Bind<int>("Iota Construct", "Spawn Amount", 3, "Amount of enemies to spawn in pillar raise phase"); MajorConstructSpawnSigmaInstead = Config.Bind<bool>("Iota Construct", "Spawn Sigma Constructs", true, "Spikestrip Compat"); MajorConstructBeamDistance = Config.Bind<float>("Iota Construct", "Beam Distance", 150f, "Used to be 999"); MajorConstructAimSpeed = Config.Bind<float>("Iota Construct", "Aim Speed", 10f, "Strafe around!"); Assassin2InvisDuration = Config.Bind<float>("Assassin", "Invisible Duration", 2f, "Default: 5"); Assassin2InvisEndlag = Config.Bind<float>("Assassin", "Invisible End Lag", 3f, "Default: 10"); Assassin2DashDuration = Config.Bind<float>("Assassin", "Dash Duration", 2.5f, "Default: 2.5"); Assassin2DashSpeed = Config.Bind<float>("Assassin", "Dash Speed", 3f, "Default: 4"); Assassin2SlashDuration = Config.Bind<float>("Assassin", "Slash Duration", 1.5f, "Default: 1.667"); Assassin2SlashDamage = Config.Bind<float>("Assassin", "Slash Damage", 1f, "Default: 4"); Assassin2SlashKnockback = Config.Bind<float>("Assassin", "Slash Knockback", 16f, "Default: 16"); Assassin2SlashReach = Config.Bind<float>("Assassin", "Slash Reach", 25f, "Default: 20"); Assassin2Slash1 = Config.Bind<bool>("Assassin", "Enable Slash 1", true, "Enable the first slash hit."); Assassin2Slash2 = Config.Bind<bool>("Assassin", "Enable Slash 2", true, "Enable the second slash hit."); Assassin2SlashExpose = Config.Bind<float>("Assassin", "Enable Slash Expose", 4f, "In seconds. Enable the slash hit to `expose` you."); Assassin2SlashSize = Config.Bind<float>("Assassin", "Slash Hitbox Size Multiplier", 2f, "stop whiffing wtf"); Assassin2SlashMultihit = Config.Bind<bool>("Assassin", "Slash Multihit", false, "This is the shuriken 5 hit"); Assassin2ShurikenSize = Config.Bind<float>("Assassin", "Shuriken Hitbox Size Multiplier", 2f, "stop whiffing wtf"); Assassin2Accurate = Config.Bind<bool>("Assassin", "Shuriken Accurate Enemies Compat", true, "oh they mess you up good"); Assassin2AccurateLoop = Config.Bind<bool>("Assassin", "Shuriken Accurate Enemies Compat (loop only)", false, "oh they mess you up good"); Reworks.IotaConstruct(); Reworks.Assassin2(); DLC1 = vanilla<ExpansionDef>("DLC1/Common/DLC1"); ((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)delegate { CharacterBody component = BodyCatalog.FindBodyPrefab("MajorConstructBody").GetComponent<CharacterBody>(); CharacterBody component2 = BodyCatalog.FindBodyPrefab("Assassin2Body").GetComponent<CharacterBody>(); component.baseMaxHealth = MajorConstructHealth.Value; component.levelMaxHealth = MajorConstructHealthStack.Value; component.baseDamage = MajorConstructDamage.Value; component.levelDamage = MajorConstructDamageStack.Value; component.baseAttackSpeed = MajorConstructAttackSpeed.Value; component.baseArmor = MajorConstructArmor.Value; component.isChampion = true; if (!string.IsNullOrWhiteSpace(MajorConstructSpawn.Value)) { ((Component)component).GetComponent<DeathRewards>().bossDropTable = (PickupDropTable)(object)vanilla<ExplicitPickupDropTable>("DLC1/MajorAndMinorConstruct/dtBossMegaConstruct"); ((Component)component).GetComponent<DeathRewards>().logUnlockableDef = LegacyResourcesAPI.Load<UnlockableDef>("UnlockableDefs/Logs.MajorConstructBody"); } component2.baseMaxHealth = Assassin2Health.Value; component2.levelMaxHealth = Assassin2HealthStack.Value; component2.baseDamage = Assassin2Damage.Value; component2.levelDamage = Assassin2DamageStack.Value; component2.baseAttackSpeed = Assassin2AttackSpeed.Value; component2.baseMoveSpeed = Assassin2Speed.Value; component2.baseArmor = Assassin2Armor.Value; if (!string.IsNullOrWhiteSpace(Assassin2Spawn.Value)) { ((Component)component2).gameObject.AddComponent<DeathRewards>().logUnlockableDef = vanilla<UnlockableDef>("DLC1/Assassin2/Logs.Assassin2Body"); } }); CharacterSpawnCard val = vanilla<CharacterSpawnCard>("DLC1/MajorAndMinorConstruct/cscMajorConstruct"); CharacterSpawnCard val2 = vanilla<CharacterSpawnCard>("DLC1/Assassin2/cscAssassin2"); ((SpawnCard)val).directorCreditCost = MajorConstructCost.Value; ((SpawnCard)val2).directorCreditCost = Assassin2Cost.Value; AsyncOperationHandle<DirectorCardCategorySelection> val3 = LegacyResourcesAPI.LoadAsync<DirectorCardCategorySelection>("DirectorCardCategorySelections/dccsMixEnemy"); val3.Completed += delegate(AsyncOperationHandle<DirectorCardCategorySelection> op) { RoR2Content.mixEnemyMonsterCards = op.Result; }; DirectorCard card = new DirectorCard { spawnCard = (SpawnCard)(object)val, selectionWeight = 1, spawnDistance = (MonsterSpawnDistance)0, minimumStageCompletions = MajorConstructMinStage.Value - 1, preventOverhead = true }; DirectorCard card2 = new DirectorCard { spawnCard = (SpawnCard)(object)val2, selectionWeight = 1, spawnDistance = (MonsterSpawnDistance)0, minimumStageCompletions = Assassin2MinStage.Value - 1, preventOverhead = true }; DirectorCardHolder majorConstructDCH = new DirectorCardHolder { Card = card, MonsterCategory = (MonsterCategory)4 }; DirectorCardHolder assassin2DCH = new DirectorCardHolder { Card = card2, MonsterCategory = (MonsterCategory)2 }; string[] iotalist = listify(MajorConstructSpawn.Value).ToArray(); string[] assassinlist = listify(Assassin2Spawn.Value).ToArray(); Dictionary<string, List<DirectorCardHolder>> dictionary = new Dictionary<string, List<DirectorCardHolder>>(); if (!string.IsNullOrWhiteSpace(MajorConstructSpawn.Value)) { Helpers.AddNewMonsterToStagesWhere(majorConstructDCH, false, (Predicate<StageInfo>)((StageInfo info) => iotalist.Contains(info.CustomStageName) || iotalist.Contains(((StageInfo)(ref info)).ToInternalStageName()))); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate { if ((Object)(object)RoR2Content.mixEnemyMonsterCards != (Object)null) { DirectorAPI.AddCard(RoR2Content.mixEnemyMonsterCards, majorConstructDCH); } else { Log.LogWarning((object)"mixEnemyMonsterCards was still null when attempting to add Major Construct!"); } }); } if (string.IsNullOrWhiteSpace(Assassin2Spawn.Value)) { return; } Helpers.AddNewMonsterToStagesWhere(assassin2DCH, false, (Predicate<StageInfo>)((StageInfo info) => assassinlist.Contains(info.CustomStageName) || assassinlist.Contains(((StageInfo)(ref info)).ToInternalStageName()))); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate { if ((Object)(object)RoR2Content.mixEnemyMonsterCards != (Object)null) { DirectorAPI.AddCard(RoR2Content.mixEnemyMonsterCards, assassin2DCH); } else { Log.LogWarning((object)"mixEnemyMonsterCards was still null when attempting to add Assassin!"); } }); } public static DirectorCard GetDirectorCard(CharacterSpawnCard csc) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_001a: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown return new DirectorCard { spawnCard = (SpawnCard)(object)csc, selectionWeight = 1, preventOverhead = false, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)0 }; } public static bool Mods(params string[] arr) { for (int i = 0; i < arr.Length; i++) { if (!Chainloader.PluginInfos.ContainsKey(arr[i])) { return false; } } return true; } public static List<string> listify(string list) { return list.Split(',').ToList().ConvertAll((string x) => x.Trim()); } public static Dictionary<string, string> pairify(string list) { Dictionary<string, string> dictionary = new Dictionary<string, string>(); foreach (string item in list.Split(',').ToList()) { List<string> list2 = item.Split('-').ToList().ConvertAll((string x) => x.Trim()); dictionary.Add(list2[0], list2[1]); } return dictionary; } public static T vanilla<T>(string path) { //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) return Addressables.LoadAssetAsync<T>((object)("RoR2/" + path + ".asset")).WaitForCompletion(); } } public class Reworks { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_FixedUpdate <>9__1_0; public static hook_OnEnter <>9__1_1; public static Action<DamageReport> <>9__1_3; public static Action <>9__2_0; public static Action<DamageReport> <>9__2_1; public static hook_HandleSlash <>9__2_2; public static Func<Instruction, bool> <>9__2_6; public static Func<Instruction, bool> <>9__2_7; public static Action<OverlapAttack> <>9__2_8; public static Func<Instruction, bool> <>9__2_9; public static Manipulator <>9__2_3; public static hook_OnEnter <>9__2_4; public static Func<Instruction, bool> <>9__2_10; public static Func<Ray, GenericProjectileBaseState, Ray> <>9__2_11; public static Manipulator <>9__2_5; internal void <IotaConstruct>b__1_0(orig_FixedUpdate orig, GenericCharacterDeath self) { orig.Invoke(self); if (Main.MajorConstructDeathTimer.Value >= 0f && self is Death && !(((EntityState)self).fixedAge <= Main.MajorConstructDeathTimer.Value) && NetworkServer.active) { self.DestroyBodyAsapServer(); } } internal void <IotaConstruct>b__1_1(orig_OnEnter orig, FireLaser self) { orig.Invoke(self); if (((Object)((EntityState)self).characterBody).name.Contains("MajorConstruct")) { ((FireBeam)self).maxDistance = Main.MajorConstructBeamDistance.Value; self.aimMaxSpeed = Main.MajorConstructAimSpeed.Value; } } internal void <IotaConstruct>b__1_3(DamageReport report) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (spawnedConstructs.ContainsKey(report.victimBody)) { foreach (GameObject item in spawnedConstructs[report.victimBody]) { if (item == null) { continue; } CharacterMaster component = item.GetComponent<CharacterMaster>(); if (component == null) { continue; } GameObject bodyInstanceObject = component.bodyInstanceObject; if (bodyInstanceObject != null) { HealthComponent component2 = bodyInstanceObject.GetComponent<HealthComponent>(); if (component2 != null) { component2.Suicide(((Component)report.attackerBody).gameObject, (GameObject)null, default(DamageTypeCombo)); } } } } spawnedConstructs.Remove(report.victimBody); } internal void <Assassin2>b__2_0() { //IL_00c0: 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) ChargeDash.baseDuration = Main.Assassin2DashDuration.Value - 1f; DashStrike.slashDuration = Main.Assassin2SlashDuration.Value; DashStrike.damageCoefficient = Main.Assassin2SlashDamage.Value; DashStrike.forceMagnitude = Main.Assassin2SlashKnockback.Value; DashStrike.maxSlashDistance = Main.Assassin2SlashReach.Value; Hide.hiddenDuration = Main.Assassin2InvisDuration.Value; Hide.fullDuration = Main.Assassin2InvisDuration.Value + Main.Assassin2InvisEndlag.Value; AISkillDriver[] components = MasterCatalog.FindMasterPrefab("Assassin2Master").GetComponents<AISkillDriver>(); components[1].maxDistance = 30f; components[1].activationRequiresTargetLoS = true; components[1].activationRequiresAimTargetLoS = true; components[1].selectionRequiresAimTarget = true; components[1].activationRequiresAimConfirmation = true; components[2].aimType = (AimType)2; components[2].movementType = (MovementType)2; components[3].shouldSprint = true; } internal void <Assassin2>b__2_1(DamageReport report) { if (!(Main.Assassin2SlashExpose.Value > 0f)) { return; } bool? obj; if (report == null) { obj = null; } else { CharacterBody attackerBody = report.attackerBody; obj = ((attackerBody == null) ? null : ((Object)attackerBody).name?.Contains("Assassin2")); } bool? flag = obj; if (flag.GetValueOrDefault() && report != null) { CharacterBody victimBody = report.victimBody; if (victimBody != null) { victimBody.AddTimedBuff(Buffs.DeathMark, Main.Assassin2SlashExpose.Value); } } } internal void <Assassin2>b__2_2(orig_HandleSlash orig, DashStrike self, int hash, string a, string b) { if ((self.slashCount == 0 && Main.Assassin2Slash1.Value) || (self.slashCount == 1 && Main.Assassin2Slash2.Value)) { orig.Invoke(self, hash, a, b); } else { self.slashCount++; } } internal void <Assassin2>b__2_3(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<OverlapAttack>(x, "Fire") }); val.Emit(OpCodes.Dup); val.EmitDelegate<Action<OverlapAttack>>((Action<OverlapAttack>)delegate(OverlapAttack oa) { //IL_0018: 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) for (int i = 0; i < oa.hitBoxGroup.hitBoxes.Length; i++) { Transform transform = ((Component)oa.hitBoxGroup.hitBoxes[i]).transform; transform.localScale *= Main.Assassin2SlashSize.Value; } }); if (!Main.Assassin2SlashMultihit.Value) { val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchRet(x) }); val.Remove(); } } internal bool <Assassin2>b__2_6(Instruction x) { return ILPatternMatchingExt.MatchLdnull(x); } internal bool <Assassin2>b__2_7(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<OverlapAttack>(x, "Fire"); } internal void <Assassin2>b__2_8(OverlapAttack oa) { //IL_0018: 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) for (int i = 0; i < oa.hitBoxGroup.hitBoxes.Length; i++) { Transform transform = ((Component)oa.hitBoxGroup.hitBoxes[i]).transform; transform.localScale *= Main.Assassin2SlashSize.Value; } } internal bool <Assassin2>b__2_9(Instruction x) { return ILPatternMatchingExt.MatchRet(x); } internal void <Assassin2>b__2_4(orig_OnEnter orig, ThrowShuriken self) { orig.Invoke(self); ((GenericProjectileBaseState)self).projectilePrefab.GetComponent<SphereCollider>().radius = 0.2f * Main.Assassin2ShurikenSize.Value; } internal void <Assassin2>b__2_5(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 0) }); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<Ray, GenericProjectileBaseState, Ray>>((Func<Ray, GenericProjectileBaseState, Ray>)delegate(Ray orig, GenericProjectileBaseState self) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (!(self is ThrowShuriken) || Main.Mods("com.Moffein.AccurateEnemies")) { } return orig; }); } internal bool <Assassin2>b__2_10(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 0); } internal Ray <Assassin2>b__2_11(Ray orig, GenericProjectileBaseState self) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (!(self is ThrowShuriken) || Main.Mods("com.Moffein.AccurateEnemies")) { } return orig; } } public static Dictionary<CharacterBody, List<GameObject>> spawnedConstructs = new Dictionary<CharacterBody, List<GameObject>>(); public static void IotaConstruct() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_006e: 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_0079: Expected O, but got Unknown object obj = <>c.<>9__1_0; if (obj == null) { hook_FixedUpdate val = delegate(orig_FixedUpdate orig, GenericCharacterDeath self) { orig.Invoke(self); if (Main.MajorConstructDeathTimer.Value >= 0f && self is Death && !(((EntityState)self).fixedAge <= Main.MajorConstructDeathTimer.Value) && NetworkServer.active) { self.DestroyBodyAsapServer(); } }; <>c.<>9__1_0 = val; obj = (object)val; } GenericCharacterDeath.FixedUpdate += (hook_FixedUpdate)obj; string constructToSpawn = (Main.MajorConstructSpawnSigmaInstead.Value ? "SigmaConstructBody" : "MinorConstructBody"); CharacterSpawnCard card = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscMinorConstruct"); object obj2 = <>c.<>9__1_1; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, FireLaser self) { orig.Invoke(self); if (((Object)((EntityState)self).characterBody).name.Contains("MajorConstruct")) { ((FireBeam)self).maxDistance = Main.MajorConstructBeamDistance.Value; self.aimMaxSpeed = Main.MajorConstructAimSpeed.Value; } }; <>c.<>9__1_1 = val2; obj2 = (object)val2; } FireLaser.OnEnter += (hook_OnEnter)obj2; LoweredToRaised.OnEnter += (hook_OnEnter)delegate(orig_OnEnter orig, LoweredToRaised self) { //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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0139: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: 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_0174: Expected O, but got Unknown //IL_016f: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Expected O, but got Unknown //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Main.MajorConstructSpawnAmount.Value > 0 && NetworkServer.active) { HurtBox[] hurtBoxes = new SphereSearch { origin = ((EntityState)self).gameObject.transform.position, radius = 37.5f, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }.RefreshCandidates().FilterCandidatesByDistinctHurtBoxEntities().GetHurtBoxes(); foreach (HurtBox val3 in hurtBoxes) { CharacterBody body = val3.healthComponent.body; if (Object.op_Implicit((Object)(object)body) && ((Object)body).name == constructToSpawn) { return; } } Quaternion val4 = Quaternion.AngleAxis(120f, Vector3.up); Vector3 val5 = ((EntityState)self).transform.forward * 16f; if (!spawnedConstructs.ContainsKey(((EntityState)self).characterBody)) { spawnedConstructs.Add(((EntityState)self).characterBody, new List<GameObject>()); } for (int j = 0; j < Main.MajorConstructSpawnAmount.Value; j++) { Vector3 val6 = val5 + ((EntityState)self).transform.position; GameObject spawnedInstance = ((SpawnCard)card).DoSpawn(val6, Quaternion.Euler(((EntityState)self).transform.forward), new DirectorSpawnRequest((SpawnCard)(object)card, new DirectorPlacementRule { position = val6, placementMode = (PlacementMode)0 }, Run.instance.spawnRng) { teamIndexOverride = ((EntityState)self).characterBody.teamComponent.teamIndex }).spawnedInstance; NetworkServer.Spawn(spawnedInstance); spawnedConstructs[((EntityState)self).characterBody].Add(spawnedInstance); val5 = val4 * val5; } } }; GlobalEventManager.onCharacterDeathGlobal += delegate(DamageReport report) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (spawnedConstructs.ContainsKey(report.victimBody)) { foreach (GameObject item in spawnedConstructs[report.victimBody]) { if (item != null) { CharacterMaster component = item.GetComponent<CharacterMaster>(); if (component != null) { GameObject bodyInstanceObject = component.bodyInstanceObject; if (bodyInstanceObject != null) { HealthComponent component2 = bodyInstanceObject.GetComponent<HealthComponent>(); if (component2 != null) { component2.Suicide(((Component)report.attackerBody).gameObject, (GameObject)null, default(DamageTypeCombo)); } } } } } } spawnedConstructs.Remove(report.victimBody); }; LanguageAPI.Add("MAJORCONSTRUCT_BODY_NAME", "Iota Construct"); LanguageAPI.Add("MAJORCONSTRUCT_BODY_SUBTITLE", "Released From The Void"); LanguageAPI.Add("MAJORCONSTRUCT_BODY_LORE", "<style=cMono>Welcome to DataScrapper (v3.2rc1-DEV BUILD)\r\n$ Scraping memory... done. [List#23376190, Length: 3752]\r\n$ Resolving... done.\r\n$ Combining for relevant data... done.\r\nComplete!\r\nOutputting [test.c]...</style>\r\n\r\n/*for(int i = 0; i < N; i++)\r\n{\r\n printf(\"\n\");\r\n for(int j = 0; j < N; j++)\r\n {\r\n printf(\"%d \", arr[i][j]); //range setting and random number generation (rand from stdlib.h)\r\n }\r\n}*/ //toggle parts of code using comments\r\n\r\nreturn 0; //return 0\r\n"); } public static void Assassin2() { //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_0078: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_00b7: 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_00c2: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate { //IL_00c0: 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) ChargeDash.baseDuration = Main.Assassin2DashDuration.Value - 1f; DashStrike.slashDuration = Main.Assassin2SlashDuration.Value; DashStrike.damageCoefficient = Main.Assassin2SlashDamage.Value; DashStrike.forceMagnitude = Main.Assassin2SlashKnockback.Value; DashStrike.maxSlashDistance = Main.Assassin2SlashReach.Value; Hide.hiddenDuration = Main.Assassin2InvisDuration.Value; Hide.fullDuration = Main.Assassin2InvisDuration.Value + Main.Assassin2InvisEndlag.Value; AISkillDriver[] components = MasterCatalog.FindMasterPrefab("Assassin2Master").GetComponents<AISkillDriver>(); components[1].maxDistance = 30f; components[1].activationRequiresTargetLoS = true; components[1].activationRequiresAimTargetLoS = true; components[1].selectionRequiresAimTarget = true; components[1].activationRequiresAimConfirmation = true; components[2].aimType = (AimType)2; components[2].movementType = (MovementType)2; components[3].shouldSprint = true; }); GlobalEventManager.onServerDamageDealt += delegate(DamageReport report) { if (Main.Assassin2SlashExpose.Value > 0f) { bool? obj5; if (report == null) { obj5 = null; } else { CharacterBody attackerBody = report.attackerBody; obj5 = ((attackerBody == null) ? null : ((Object)attackerBody).name?.Contains("Assassin2")); } bool? flag = obj5; if (flag.GetValueOrDefault() && report != null) { CharacterBody victimBody = report.victimBody; if (victimBody != null) { victimBody.AddTimedBuff(Buffs.DeathMark, Main.Assassin2SlashExpose.Value); } } } }; object obj = <>c.<>9__2_2; if (obj == null) { hook_HandleSlash val = delegate(orig_HandleSlash orig, DashStrike self, int hash, string a, string b) { if ((self.slashCount == 0 && Main.Assassin2Slash1.Value) || (self.slashCount == 1 && Main.Assassin2Slash2.Value)) { orig.Invoke(self, hash, a, b); } else { self.slashCount++; } }; <>c.<>9__2_2 = val; obj = (object)val; } DashStrike.HandleSlash += (hook_HandleSlash)obj; object obj2 = <>c.<>9__2_3; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) ILCursor val6 = new ILCursor(il); val6.GotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<OverlapAttack>(x, "Fire") }); val6.Emit(OpCodes.Dup); val6.EmitDelegate<Action<OverlapAttack>>((Action<OverlapAttack>)delegate(OverlapAttack oa) { //IL_0018: 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) for (int i = 0; i < oa.hitBoxGroup.hitBoxes.Length; i++) { Transform transform = ((Component)oa.hitBoxGroup.hitBoxes[i]).transform; transform.localScale *= Main.Assassin2SlashSize.Value; } }); if (!Main.Assassin2SlashMultihit.Value) { val6.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchRet(x) }); val6.Remove(); } }; <>c.<>9__2_3 = val2; obj2 = (object)val2; } DashStrike.HandleSlash += (Manipulator)obj2; object obj3 = <>c.<>9__2_4; if (obj3 == null) { hook_OnEnter val3 = delegate(orig_OnEnter orig, ThrowShuriken self) { orig.Invoke(self); ((GenericProjectileBaseState)self).projectilePrefab.GetComponent<SphereCollider>().radius = 0.2f * Main.Assassin2ShurikenSize.Value; }; <>c.<>9__2_4 = val3; obj3 = (object)val3; } ThrowShuriken.OnEnter += (hook_OnEnter)obj3; object obj4 = <>c.<>9__2_5; if (obj4 == null) { Manipulator val4 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); val5.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 0) }); val5.Emit(OpCodes.Ldarg_0); val5.EmitDelegate<Func<Ray, GenericProjectileBaseState, Ray>>((Func<Ray, GenericProjectileBaseState, Ray>)delegate(Ray orig, GenericProjectileBaseState self) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (!(self is ThrowShuriken) || Main.Mods("com.Moffein.AccurateEnemies")) { } return orig; }); }; <>c.<>9__2_5 = val4; obj4 = (object)val4; } GenericProjectileBaseState.FireProjectile += (Manipulator)obj4; } } }