using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.GrandParentBoss; using EntityStates.Gup; using EntityStates.Halcyonite; using EntityStates.LaserTurbine; using EntityStates.RoboBallMini.Weapon; using EntityStates.VagrantNovaItem; using EntityStates.Vermin.Weapon; using EntityStates.VultureHunter.Weapon; using HG; using HG.GeneralSerializer; using IL.EntityStates; using IL.EntityStates.ClayGrenadier; using IL.EntityStates.GrandParentBoss; using IL.EntityStates.Halcyonite; using IL.EntityStates.LaserTurbine; using IL.EntityStates.VagrantNovaItem; using IL.RoR2; using IL.RoR2.Items; using IL.RoR2.Scripts.GameBehaviors; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.GrandParentBoss; using On.EntityStates.Halcyonite; using On.EntityStates.LaserTurbine; using On.EntityStates.RoboBallMini.Weapon; using On.EntityStates.VultureHunter.Weapon; using On.RoR2; using On.RoR2.Items; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.Items; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Scripts.GameBehaviors; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("SuperCyanTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SuperCyanTweaks")] [assembly: AssemblyTitle("SuperCyanTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace SuperCyanTweaks; public static class EclipseRevampedCompat { private static bool? _enabled; public static bool enabled { get { if (!_enabled.HasValue) { _enabled = Chainloader.PluginInfos.ContainsKey("Nuxlar.EclipseRevamped"); } return _enabled.Value; } } } public static class Configs { public static ConfigEntry disableByDefault { get; private set; } public static ConfigEntry alloyHunterLaserCooldownTweak { get; private set; } public static ConfigEntry awuShieldDuration { get; private set; } public static ConfigEntry awuDelaySuperAttackCooldown { get; private set; } public static ConfigEntry alphaConstructTeleportEnabled { get; private set; } public static ConfigEntry alphaConstructTeleportMinDist { get; private set; } public static ConfigEntry alphaConstructTeleportCooldown { get; private set; } public static ConfigEntry beetleSpawnDuration { get; private set; } public static ConfigEntry beetleHeadbuttDmg { get; private set; } public static ConfigEntry bighornBisonChargeCoeff { get; private set; } public static ConfigEntry clayApothecaryCost { get; private set; } public static ConfigEntry clayApothecaryTarBallRange { get; private set; } public static ConfigEntry clayApothecaryMortarHealthThreshold { get; private set; } public static ConfigEntry clayApothecarySlamSelfDmg { get; private set; } public static ConfigEntry clayApothecaryMortarTargeting { get; private set; } public static ConfigEntry falseSonGolemCountTweak { get; private set; } public static ConfigEntry geepCost { get; private set; } public static ConfigEntry enemyMeleeTweak { get; private set; } public static ConfigEntry grandparentCost { get; private set; } public static ConfigEntry grandparentRockActivationRange { get; private set; } public static ConfigEntry grandparentRockDynamicSpeed { get; private set; } public static ConfigEntry grandparentRockTargeting { get; private set; } public static ConfigEntry grandparentGravOrbForce { get; private set; } public static ConfigEntry grandparentGravOrbDynamicSpeed { get; private set; } public static ConfigEntry grandparentReduceDowntime { get; private set; } public static ConfigEntry greaterWispAttackRange { get; private set; } public static ConfigEntry gupDelayAttackOnSpawn { get; private set; } public static ConfigEntry halcyoniteOnMeridianPreLoop { get; private set; } public static ConfigEntry halcyoniteOnFalseSonLoop { get; private set; } public static ConfigEntry halcyoniteProperCategory { get; private set; } public static ConfigEntry halcyoniteCost { get; private set; } public static ConfigEntry halcyoniteLaserNoPause { get; private set; } public static ConfigEntry halcyoniteWhirlwindBuff { get; private set; } public static ConfigEntry halcyoniteWhirlwindPursuit { get; private set; } public static ConfigEntry impOnHelminthRoost { get; private set; } public static ConfigEntry lemurianFireballRange { get; private set; } public static ConfigEntry lunarExploderCost { get; private set; } public static ConfigEntry lunarWispCostOutsideMoon { get; private set; } public static ConfigEntry lunarWispCostOnMoon { get; private set; } public static ConfigEntry mushrumSprintDist { get; private set; } public static ConfigEntry mushrumSprintCoeff { get; private set; } public static ConfigEntry mushrumOnHabitatFall { get; private set; } public static ConfigEntry mithrixStealInterval { get; private set; } public static ConfigEntry scorchWormBreachDmg { get; private set; } public static ConfigEntry scuRespectNodegraph { get; private set; } public static ConfigEntry scuPrimaryAttackRange { get; private set; } public static ConfigEntry scuProbeHealthThreshold { get; private set; } public static ConfigEntry scuOnSolusWingLoop { get; private set; } public static ConfigEntry distributorCost { get; private set; } public static ConfigEntry probeCost { get; private set; } public static ConfigEntry probeOnShipGraveyard { get; private set; } public static ConfigEntry probeOnRepurposedCrater { get; private set; } public static ConfigEntry probeOnSolusEvent { get; private set; } public static ConfigEntry probeDelayAttackOnSpawn { get; private set; } public static ConfigEntry probeAimSpeed { get; private set; } public static ConfigEntry prospectorSingleHit { get; private set; } public static ConfigEntry prospectorAttackRange { get; private set; } public static ConfigEntry transporterCost { get; private set; } public static ConfigEntry transporterTargetingFix { get; private set; } public static ConfigEntry titanLaserMaxRange { get; private set; } public static ConfigEntry titanLaserMinRange { get; private set; } public static ConfigEntry titanFistEndlag { get; private set; } public static ConfigEntry titanSummonDuration { get; private set; } public static ConfigEntry voidJailerIdleFix { get; private set; } public static ConfigEntry voidReaverCost { get; private set; } public static ConfigEntry eclipseLiteBarrierBase { get; private set; } public static ConfigEntry eclipseLiteBarrierStack { get; private set; } public static ConfigEntry eclipseLiteCountShields { get; private set; } public static ConfigEntry empathyCoresDamageTweak { get; private set; } public static ConfigEntry faradaySpurMaxSpeed { get; private set; } public static ConfigEntry faradaySpurChargeRate { get; private set; } public static ConfigEntry faradaySpurChargeFix { get; private set; } public static ConfigEntry faradaySpurAntiCrater { get; private set; } public static ConfigEntry frostRelicCrit { get; private set; } public static ConfigEntry genesisLoopProcCoeff { get; private set; } public static ConfigEntry genesisLoopLosTweak { get; private set; } public static ConfigEntry growthNectarBuffCount { get; private set; } public static ConfigEntry allyAurelioniteTaunt { get; private set; } public static ConfigEntry allyAurelioniteTauntRange { get; private set; } public static ConfigEntry allyAurelioniteTauntDuration { get; private set; } public static ConfigEntry allyAurelioniteMinLaserRange { get; private set; } public static ConfigEntry happiestMaskProcChance { get; private set; } public static ConfigEntry harpoonDurationBase { get; private set; } public static ConfigEntry harpoonDurationStack { get; private set; } public static ConfigEntry stealthKitThreshold { get; private set; } public static ConfigEntry bestBuddyRamDamage { get; private set; } public static ConfigEntry bestBuddyBehaviorTweak { get; private set; } public static ConfigEntry bestBuddyHitDetection { get; private set; } public static ConfigEntry resonanceDiscTargeting { get; private set; } public static ConfigEntry resonanceDiscAccuracy { get; private set; } public static ConfigEntry sonorousWhispersRework { get; private set; } public static ConfigEntry wakeOfVulturesDurationBase { get; private set; } public static ConfigEntry wakeOfVulturesDurationStack { get; private set; } public static ConfigEntry warBondsInheritable { get; private set; } public static ConfigEntry waxQuailMultiJump { get; private set; } public static ConfigEntry eccentricVaseCooldown { get; private set; } public static ConfigEntry eccentricVaseMaxDist { get; private set; } public static ConfigEntry eccentricVaseAcceleration { get; private set; } public static ConfigEntry eccentricVaseCloak { get; private set; } public static ConfigEntry eccentricVaseIntangible { get; private set; } public static ConfigEntry eccentricVaseNoCrater { get; private set; } public static ConfigEntry foreignFruitCooldown { get; private set; } public static ConfigEntry molotovResidueSize { get; private set; } public static ConfigEntry molotovResidueDuration { get; private set; } public static ConfigEntry molotovResidueTickrate { get; private set; } public static ConfigEntry molotovExplosionDamage { get; private set; } public static ConfigEntry equipDroneAlwaysFire { get; private set; } public static ConfigEntry gunnerTurretRange { get; private set; } public static ConfigEntry accessNodeMultiplyRewards { get; private set; } public static ConfigEntry droneScrapperMaxCount { get; private set; } public static ConfigEntry droneScrapperOnHabitat { get; private set; } public static ConfigEntry droneScrapperFaster { get; private set; } public static ConfigEntry shrineOfOrderOnStage4 { get; private set; } public static ConfigEntry moonCauldronTweak { get; private set; } public static ConfigEntry moonInitialMonsterCredits { get; private set; } public static ConfigEntry moonPillarRadius { get; private set; } public static ConfigEntry moonPillarMassDuration { get; private set; } public static ConfigEntry moonPillarMonsterCredits { get; private set; } public static ConfigEntry conduitCanyonCollectiveCost { get; private set; } public static ConfigEntry conduitCanyonCollectiveDebtFix { get; private set; } public static ConfigEntry conduitCanyonCollectiveRewardFix { get; private set; } public static ConfigEntry conduitCanyonShrineCreditLeader { get; private set; } public static ConfigEntry conduitCanyonShrineCreditSupport { get; private set; } public static ConfigEntry conduitCanyonShrineCreditSupportMult { get; private set; } public static ConfigEntry nestSnowyShrines { get; private set; } public static ConfigEntry fanSpeedBoost { get; private set; } public static ConfigEntry fanBuffDuration { get; private set; } public static ConfigEntry fanBuffStrength { get; private set; } public static ConfigEntry drifterCubeSearchAngle { get; private set; } public static ConfigEntry drifterCubeSearchDistance { get; private set; } public static ConfigEntry drifterCleanupCooldownTweak { get; private set; } public static ConfigEntry eclipseTeamTweak { get; private set; } public static ConfigEntry perfectedCrippleProcCoeff { get; private set; } public static ConfigEntry perfectedHealthMultiplier { get; private set; } public static ConfigEntry strawPairyAITweak { get; private set; } public static ConfigEntry strawPairyIsFood { get; private set; } public static ConfigEntry xenobacteriaRetier { get; private set; } public static void Init(ConfigFile cfg) { disableByDefault = cfg.Bind("!Mod", "Disable New Configs", false, "If set to true, newly generated configs will always be disabled by default."); alloyHunterLaserCooldownTweak = cfg.Bind("Enemies - Alloy Hunter", "Laser Cooldown Tweak", !disableByDefault.Value, "The laser's cooldown now begins when the skill ends. Vanilla is false.\nNotably stops perma-lasering behavior on E8."); awuShieldDuration = cfg.Bind("Enemies - Alloy Worship Unit", "Shield Duration", disableByDefault.Value ? (-1f) : 5f, "Set how long the super attack's shields last. Vanilla is 6. Set to a negative value for no change."); awuDelaySuperAttackCooldown = cfg.Bind("Enemies - Alloy Worship Unit", "Delay Super Attack Cooldown", disableByDefault.Value ? 0f : 5f, "Delay the super attack's cooldown by this many seconds. Set to a negative value (or zero) for no change."); alphaConstructTeleportEnabled = cfg.Bind("Enemies - Alpha Construct", "Teleport To Players", !disableByDefault.Value, "Alpha Constructs that are out of range will periodically teleport near a target. Vanilla is false."); alphaConstructTeleportMinDist = cfg.Bind("Enemies - Alpha Construct", "Minimum Teleport Distance", 75f, "Alpha Constructs will attempt to teleport if their target is past this range. For reference, their attacking range is 75m."); alphaConstructTeleportCooldown = cfg.Bind("Enemies - Alpha Construct", "Teleport Cooldown", 30f, "Set the cooldown of the Alpha Construct's teleport skill."); beetleSpawnDuration = cfg.Bind("Enemies - Beetle", "Spawn Duration", disableByDefault.Value ? (-1f) : 3.5f, "Set the spawn duration to this value. Vanilla is 5. Set to a negative value for no change."); beetleHeadbuttDmg = cfg.Bind("Enemies - Beetle", "Headbutt Damage Coefficient", disableByDefault.Value ? (-1f) : 2.5f, "Set the damage coefficient to this value. Vanilla is 2. Set to a negative value for no change."); bighornBisonChargeCoeff = cfg.Bind("Enemies - Bighorn Bison", "Charge Coefficient", -1f, "Base speed is multiplied by this value while charging. Vanilla is 8. Set to a negative value for no change."); clayApothecaryCost = cfg.Bind("Enemies - Clay Apothecary", "Spawn Cost", disableByDefault.Value ? (-1) : 125, "Set the director credit cost. Vanilla is 150. Set to a negative value for no change."); clayApothecaryTarBallRange = cfg.Bind("Enemies - Clay Apothecary", "Max Tar Ball Range", disableByDefault.Value ? (-1f) : 75f, "Clay Apothecaries will attack from this far away with tar balls. Vanilla is 65. Set to a negative value for no change."); clayApothecaryMortarHealthThreshold = cfg.Bind("Enemies - Clay Apothecary", "Ranged Mortar Health Threshold", disableByDefault.Value ? (-1f) : 1f, "Clay Apothecaries will use their slam/mortar attack at range under this health fraction. Vanilla is 0.5. Set to a negative value for no change."); clayApothecarySlamSelfDmg = cfg.Bind("Enemies - Clay Apothecary", "Slam Self-Damage", disableByDefault.Value ? (-1f) : 0f, "Clay Apothecaries will lose this percentage of their current health when using the slam/mortar attack. Vanilla is 5. Set to a negative value for no change."); clayApothecaryMortarTargeting = cfg.Bind("Enemies - Clay Apothecary", "Mortar Targeting", !disableByDefault.Value, "Mortar targets are sorted by angle only instead of this weird 'angle and distance' algorithm.\nThe attack will more reliably aim itself at the Clay Apothecary's target."); falseSonGolemCountTweak = cfg.Bind("Enemies - False Son", "Golem Count Scales With Stage Count", !disableByDefault.Value, "The maximum number of enemies that can spawn during Phase 2 is directly proportional to the current stage count.\nThus, it will be reduced from 5 to 4 if fought without looping."); geepCost = cfg.Bind("Enemies - Geep", "Spawn Cost", disableByDefault.Value ? (-1) : 50, "Set the director credit cost. Vanilla is 35. Set to a negative value for no change."); enemyMeleeTweak = cfg.Bind("Enemies - General", "Melee Attack Fix", !disableByDefault.Value, "Enemy melee attacks won't immediately trigger if interrupted during the wind-up, either from a stun or outright death.\nThis change affects Blind Vermin, Gup & Halcyonite."); grandparentCost = cfg.Bind("Enemies - Grandparent", "Spawn Cost", disableByDefault.Value ? (-1) : 1000, "Set the director credit cost. Vanilla is 1150. Set to a negative value for no change."); grandparentRockActivationRange = cfg.Bind("Enemies - Grandparent", "Rock Throw Activation Range", disableByDefault.Value ? (-1f) : 1500f, "Activation range of Rock Throw. Vanilla is 300. Set to a negative value for no change."); grandparentRockDynamicSpeed = cfg.Bind("Enemies - Grandparent", "Dynamic Rock Speed", !disableByDefault.Value, "Rock projectile speed scales with target distance. Vanilla is false."); grandparentRockTargeting = cfg.Bind("Enemies - Grandparent", "Improved Rock Targeting", !disableByDefault.Value, "Improves the target-searching logic to let the rock more reliably reach its destination. Vanilla is false."); grandparentGravOrbForce = cfg.Bind("Enemies - Grandparent", "Gravity Orb Force", disableByDefault.Value ? (-1000f) : (-4000f), "The force of the gravity orb's pull. Set to vanilla value (-1000) for no change."); grandparentGravOrbDynamicSpeed = cfg.Bind("Enemies - Grandparent", "Dynamic Orb Speed", !disableByDefault.Value, "Gravity Orb projectile speed scales with target distance. Vanilla is false."); grandparentReduceDowntime = cfg.Bind("Enemies - Grandparent", "Reduce Downtime", !disableByDefault.Value, "Grandparents will spend less time in the 'rotate to target' behaviors. Vanilla is false."); greaterWispAttackRange = cfg.Bind("Enemies - Greater Wisp", "Max Attack Range", disableByDefault.Value ? (-1f) : 75f, "Greater Wisps will attack from this far away. Vanilla is 50. Set to a negative value for no change."); gupDelayAttackOnSpawn = cfg.Bind("Enemies - Gup", "Delay Attack After Spawning", !disableByDefault.Value, "Adds a small delay between spawning and throwing out their first attack."); halcyoniteOnMeridianPreLoop = cfg.Bind("Enemies - Halcyonite", "Spawn on Prime Meridian (Pre-Loop)", !disableByDefault.Value, "Halcyonites appear on Prime Meridian pre-loop, as they do in other Path of the Colossus stages."); halcyoniteOnFalseSonLoop = cfg.Bind("Enemies - Halcyonite", "Spawn During False Son (Loop)", !disableByDefault.Value, "Halcyonites appear during False Son Phase 2 when looping."); halcyoniteProperCategory = cfg.Bind("Enemies - Halcyonite", "Monster Category Fix", !disableByDefault.Value, "Properly categorizes Halcyonite as a Miniboss monster on every stage where it is considered a Champion.\nWhich is pretty much everywhere except Gilded Coast & Prime Meridian."); halcyoniteCost = cfg.Bind("Enemies - Halcyonite", "Spawn Cost", disableByDefault.Value ? (-1) : 125, "Set the director credit cost. Vanilla is 200. Set to a negative value for no change."); halcyoniteLaserNoPause = cfg.Bind("Enemies - Halcyonite", "No Pause While Lasering", !disableByDefault.Value, "Halcyonites will no longer briefly pause upon initiating their laser attack."); halcyoniteWhirlwindBuff = cfg.Bind("Enemies - Halcyonite", "Whirlwind Buff", !disableByDefault.Value, "Whirlwind scales with attack speed. Whirlwind has a proc coefficient (0 -> 0.2)."); halcyoniteWhirlwindPursuit = cfg.Bind("Enemies - Halcyonite", "Whirlwind Pursuit Fix", !disableByDefault.Value, "Whirlwind will steadily track its target instead of calculating the target's position once at the beginning.\nWhirlwind targets are sorted by closest angle instead of closest distance."); impOnHelminthRoost = cfg.Bind("Enemies - Imp", "Spawn on Helminth Hatchery", !disableByDefault.Value, "Imps appear on Helminth Hatchery."); lemurianFireballRange = cfg.Bind("Enemies - Lemurian", "Max Fireball Range", disableByDefault.Value ? (-1f) : 45f, "Lemurians will attack from this far away with fireballs. Strafe range is still capped at 30m. Vanilla is 30. Set to a negative value for no change."); lunarExploderCost = cfg.Bind("Enemies - Lunar Exploder", "Spawn Cost", disableByDefault.Value ? (-1) : 40, "Set the director credit cost. Vanilla is 80. Set to a negative value for no change."); lunarWispCostOutsideMoon = cfg.Bind("Enemies - Lunar Wisp", "Spawn Cost Outside Commencement", disableByDefault.Value ? (-1) : 450, "Set the director credit cost outside of Commencement. Vanilla is 550. Set to a negative value for no change."); lunarWispCostOnMoon = cfg.Bind("Enemies - Lunar Wisp", "Spawn Cost on Commencement", -1, "Set the director credit cost on Commencement. Vanilla is 550. Set to a negative value for no change."); mushrumSprintDist = cfg.Bind("Enemies - Mini Mushrum", "Sprint Distance", disableByDefault.Value ? (-1f) : 60f, "Mini Mushrums start sprinting from this far away. Set to a negative value to disable."); mushrumSprintCoeff = cfg.Bind("Enemies - Mini Mushrum", "Sprint Coefficient", disableByDefault.Value ? (-1f) : 3f, "Set the sprint speed multiplier to this value. Vanilla is 2.5. Set to a negative value for no change."); mushrumOnHabitatFall = cfg.Bind("Enemies - Mini Mushrum", "Spawn on Golden Dieback", !disableByDefault.Value, "Mini Mushrums appear on Golden Dieback."); mithrixStealInterval = cfg.Bind("Enemies - Mithrix", "Item Steal Interval", disableByDefault.Value ? (-1f) : 0.08f, "Set the time interval between stealing items. Vanilla is 0.2. Set to a negative value for no change."); scorchWormBreachDmg = cfg.Bind("Enemies - Scorch Worm", "Breach Damage Coefficient", disableByDefault.Value ? (-1f) : 1.5f, "Set the damage coefficient to this value. Vanilla is 3. Set to a negative value for no change."); scuRespectNodegraph = cfg.Bind("Enemies - Solus Control Unit", "Respect Nodegraph", !disableByDefault.Value, "Solus Control Units will properly follow the nodegraph while chasing. Applies to AWU as well."); scuPrimaryAttackRange = cfg.Bind("Enemies - Solus Control Unit", "Max Primary Attack Range", disableByDefault.Value ? (-1f) : 100f, "Solus Control Units will attack from this far away. Vanilla is 50. Set to a negative value for no change. Applies to AWU as well."); scuProbeHealthThreshold = cfg.Bind("Enemies - Solus Control Unit", "Probe Health Threshold", disableByDefault.Value ? (-1f) : 1f, "Solus Control Units will deploy Solus Probes under this health fraction. Vanilla is 0.9. Set to a negative value for no change. Applies to AWU as well."); scuOnSolusWingLoop = cfg.Bind("Enemies - Solus Control Unit", "Spawn During Solus Wing (Loop)", !disableByDefault.Value, "Solus Control Units appear during the Solus Wing fight when looping."); distributorCost = cfg.Bind("Enemies - Solus Distributor", "Spawn Cost", disableByDefault.Value ? (-1) : 40, "Set the director credit cost. Vanilla is 20. Set to a negative value for no change."); probeCost = cfg.Bind("Enemies - Solus Probe", "Spawn Cost", disableByDefault.Value ? (-1) : 40, "Set the director credit cost. Vanilla is 60. Set to a negative value for no change."); probeOnShipGraveyard = cfg.Bind("Enemies - Solus Probe", "Spawn on Siren’s Call", !disableByDefault.Value, "Solus Probes appear on Siren’s Call."); probeOnRepurposedCrater = cfg.Bind("Enemies - Solus Probe", "Spawn on Repurposed Crater", !disableByDefault.Value, "Solus Probes appear on Repurposed Crater."); probeOnSolusEvent = cfg.Bind("Enemies - Solus Probe", "Add to Solus Family Event", !disableByDefault.Value, "Solus Probes appear during the Solus Family Event."); probeDelayAttackOnSpawn = cfg.Bind("Enemies - Solus Probe", "Delay Attack After Spawning", !disableByDefault.Value, "Adds a small delay between spawning and throwing out their first attack."); probeAimSpeed = cfg.Bind("Enemies - Solus Probe", "Aim Speed", disableByDefault.Value ? (-1f) : 120f, "Set the aiming/turning speed. Vanilla is 60. Set to a negative value for no change."); prospectorSingleHit = cfg.Bind("Enemies - Solus Prospector", "Single Hit", !disableByDefault.Value, "Prevents them from hitting you multiple times per attack."); prospectorAttackRange = cfg.Bind("Enemies - Solus Prospector", "Max Attack Range", -1f, "Solus Prospectors will initiate their attack from this far away. Vanilla is 12 or 15 depending on the situation. Set to a negative value for no change."); transporterCost = cfg.Bind("Enemies - Solus Transporter", "Spawn Cost", disableByDefault.Value ? (-1) : 125, "Set the director credit cost. Vanilla is 200. Set to a negative value for no change."); transporterTargetingFix = cfg.Bind("Enemies - Solus Transporter", "Targeting Fix", !disableByDefault.Value, "Prevents them from targeting neutral bodies, such as pots and the explosive barrels on Rallypoint Delta.\nAlso allows them to periodically re-target, instead of being permanently stuck on the same target until it dies."); titanLaserMaxRange = cfg.Bind("Enemies - Stone Titan", "Max Laser Range", disableByDefault.Value ? (-1f) : 100f, "Stone Titans will fire their laser from this far away. Vanilla is 80. Set to a negative value for no change. Applies to enemy Aurelionite as well."); titanLaserMinRange = cfg.Bind("Enemies - Stone Titan", "Min Laser Range", disableByDefault.Value ? (-1f) : 0f, "Set the minimum distance at which Stone Titans will use their laser. Vanilla is 20. Set to a negative value for no change. Applies to enemy Aurelionite as well."); titanFistEndlag = cfg.Bind("Enemies - Stone Titan", "Fist Endlag", disableByDefault.Value ? (-1f) : 2f, "Set the duration of the fist attack's recovery animation. Vanilla is 3. Set to a negative value for no change. Applies to enemy Aurelionite as well."); titanSummonDuration = cfg.Bind("Enemies - Stone Titan", "Rock Summon Duration", disableByDefault.Value ? (-1f) : 7f, "Set the duration of the rock summon's animation. Vanilla is 9. Set to a negative value for no change. Applies to enemy Aurelionite as well."); voidJailerIdleFix = cfg.Bind("Enemies - Void Jailer", "Fix Idling", !disableByDefault.Value, "Stop Void Jailers from becoming idle upon breaking line of sight with its target."); voidReaverCost = cfg.Bind("Enemies - Void Reaver", "Spawn Cost", disableByDefault.Value ? (-1) : 250, "Set the director credit cost. Vanilla is 300. Set to a negative value for no change."); eclipseLiteBarrierBase = cfg.Bind("Items - Eclipse Lite", "Base Barrier Percentage", -1f, "Set the barrier gain per second of cooldown, in percentage. Vanilla is 1%. Set to a negative value for no change."); eclipseLiteBarrierStack = cfg.Bind("Items - Eclipse Lite", "Stack Barrier Percentage", disableByDefault.Value ? (-1f) : 0.5f, "Set the barrier gain per second of cooldown, in percentage. Vanilla is 0.25%. Set to a negative value for no change."); eclipseLiteCountShields = cfg.Bind("Items - Eclipse Lite", "Count Shields", !disableByDefault.Value, "Barrier gain is calculated using max health + shields instead of just max health."); empathyCoresDamageTweak = cfg.Bind("Items - Empathy Cores", "Empathy Cores Damage Tweak", !disableByDefault.Value, "Empathy Cores damage boost affects skill damage instead of base damage.\nThis nerfs synergies that depend on base damage, notably the chainguns from Spare Drone Parts."); faradaySpurMaxSpeed = cfg.Bind("Items - Faraday Spur", "Maximum Speed Bonus", disableByDefault.Value ? (-1f) : 100f, "Set the max speed bonus percentage. Vanilla is 160. Set to a negative value for no change."); faradaySpurChargeRate = cfg.Bind("Items - Faraday Spur", "Charge Rate Multiplier", disableByDefault.Value ? (-1f) : 1.6f, "Set how much faster this item charges up relative to vanilla. Vanilla is 1. Set to a negative value for no change."); faradaySpurChargeFix = cfg.Bind("Items - Faraday Spur", "Charge Rate Fix", !disableByDefault.Value, "Charge rate is no longer slower at sub-60 FPS. Vanilla is false."); faradaySpurAntiCrater = cfg.Bind("Items - Faraday Spur", "Fall Damage Resistance", !disableByDefault.Value, "Upon triggering a charged jump, gain fall damage resistance equal to what you would've received with that jump height. Vanilla is false."); frostRelicCrit = cfg.Bind("Items - Frost Relic", "Frost Relic Crit", !disableByDefault.Value, "Allow the Frost Relic to crit. Vanilla is false."); genesisLoopProcCoeff = cfg.Bind("Items - Genesis Loop", "Proc Coefficient", disableByDefault.Value ? (-1f) : 3f, "Set the prof coefficient of the blast. Vanilla is 1. Set to a negative value for no change."); genesisLoopLosTweak = cfg.Bind("Items - Genesis Loop", "Line of Sight Tweak", !disableByDefault.Value, "The blast will ignore line of sight if used by a Player team member."); growthNectarBuffCount = cfg.Bind("Items - Growth Nectar", "Buff Count", disableByDefault.Value ? (-1) : 5, "Set the maximum amount of buffs per stack this item can register. Vanilla is 4. Set to a negative value for no change."); allyAurelioniteTaunt = cfg.Bind("Items - Halcyon Seed", "Aurelionite Taunt", !disableByDefault.Value, "Aurelionite will get the attention of nearby enemies upon spawning, as well as any enemy that gets hit."); allyAurelioniteTauntRange = cfg.Bind("Items - Halcyon Seed", "Taunt Range", disableByDefault.Value ? (-1f) : 60f, "Set the radius of the taunt effect."); allyAurelioniteTauntDuration = cfg.Bind("Items - Halcyon Seed", "Taunt Duration", disableByDefault.Value ? (-1f) : 15f, "Set how long the enemy will be distracted for.\nIt'll take the highest value between this and the enemy's natural attention span."); allyAurelioniteMinLaserRange = cfg.Bind("Items - Halcyon Seed", "Minimum Laser Range", disableByDefault.Value ? (-1f) : 0f, "The minimum distance Aurelionite is allowed to use the laser. Vanilla is 10. Set to a negative value for no change."); happiestMaskProcChance = cfg.Bind("Items - Happiest Mask", "Proc Chance", disableByDefault.Value ? (-1f) : 10f, "Set the proc chance of this item, in percentage. Vanilla is 7%. Set to a negative value for no change."); harpoonDurationBase = cfg.Bind("Items - Hunter’s Harpoon", "Base Duration", disableByDefault.Value ? (-1f) : 2f, "Set the duration of the decaying speed boost, in seconds. Vanilla is 1. Set to a negative value for no change."); harpoonDurationStack = cfg.Bind("Items - Hunter’s Harpoon", "Stack Duration", disableByDefault.Value ? (-1f) : 1f, "Set the duration of the decaying speed boost, in seconds. Vanilla is 0.5. Set to a negative value for no change."); stealthKitThreshold = cfg.Bind("Items - Old War Stealthkit", "Activation Threshold", disableByDefault.Value ? (-1f) : 0.5f, "This item will activate under this health fraction. Vanilla is 0.25. Set to a negative value for no change."); bestBuddyRamDamage = cfg.Bind("Items - Orphaned Core", "Ram Damage", disableByDefault.Value ? (-1f) : 6f, "Set the damage coefficient to this value. The value is multiplied by x2.5 against heavy targets. Vanilla is 4. Set to a negative value for no change."); bestBuddyBehaviorTweak = cfg.Bind("Items - Orphaned Core", "Tweak Behavior", !disableByDefault.Value, "Adjusts the AI of Best Buddy to be more competent. Vanilla is false."); bestBuddyHitDetection = cfg.Bind("Items - Orphaned Core", "Improve Hit Detection", !disableByDefault.Value, "Improves the re-hit rate and makes the kinetic aura hitbox roughly match the visuals. Vanilla is false."); resonanceDiscTargeting = cfg.Bind("Items - Resonance Disc", "Targeting Fix", !disableByDefault.Value, "Prevents the disc from targeting neutral bodies, such as pots and the explosive barrels on Rallypoint Delta."); resonanceDiscAccuracy = cfg.Bind("Items - Resonance Disc", "Improved Accuracy", !disableByDefault.Value, "Removes the brief (0.5s) state where the disc locks its aim before launching itself.\nIs combined with a boost to its tracking speed, allowing it to practically never miss."); sonorousWhispersRework = cfg.Bind("Items - Sonorous Whispers", "Sonorous Whispers Rework", !disableByDefault.Value, "Items only drop from bosses proper instead of Champions, and will no longer drop from elites.\nStacking improves item rarity.\nEffect is now team-wide."); wakeOfVulturesDurationBase = cfg.Bind("Items - Wake of Vultures", "Base Duration", disableByDefault.Value ? (-1f) : 12f, "Set the aspect buff duration. Vanilla is 8. Set to a negative value for no change."); wakeOfVulturesDurationStack = cfg.Bind("Items - Wake of Vultures", "Stack Duration", disableByDefault.Value ? (-1f) : 6f, "Set the aspect buff duration. Vanilla is 5. Set to a negative value for no change."); warBondsInheritable = cfg.Bind("Items - War Bonds", "War Bonds is Inheritable", disableByDefault.Value, "Whether this item can be inherited by turrets and such. Vanilla is true."); waxQuailMultiJump = cfg.Bind("Items - Wax Quail", "Wax Quail Multi Jump", !disableByDefault.Value, "Additional non-base jumps will grant a jump boost as well. Vanilla is false."); eccentricVaseCooldown = cfg.Bind("Equipment - Eccentric Vase", "Cooldown", disableByDefault.Value ? (-1f) : 30f, "Adjust this equipment's cooldown. Vanilla is 45. Set to a negative value for no change."); eccentricVaseMaxDist = cfg.Bind("Equipment - Eccentric Vase", "Max Range", disableByDefault.Value ? (-1f) : 2000f, "Adjust the maximum length of the zipline. Vanilla is 1000. Set to a negative value for no change."); eccentricVaseAcceleration = cfg.Bind("Equipment - Eccentric Vase", "Acceleration", disableByDefault.Value ? (-1f) : 50f, "Set the acceleration value. Vanilla is 30. Set to a negative value for no change."); eccentricVaseCloak = cfg.Bind("Equipment - Eccentric Vase", "Cloaked While Traveling", !disableByDefault.Value, "User is cloaked while traveling. Vanilla is false."); eccentricVaseIntangible = cfg.Bind("Equipment - Eccentric Vase", "Intangible While Traveling", !disableByDefault.Value, "User is intangible while traveling. Vanilla is false."); eccentricVaseNoCrater = cfg.Bind("Equipment - Eccentric Vase", "No Cratering", !disableByDefault.Value, "User is briefly immune to fall damage on exit. Vanilla is false."); foreignFruitCooldown = cfg.Bind("Equipment - Foreign Fruit", "Cooldown", disableByDefault.Value ? (-1f) : 30f, "Adjust this equipment's cooldown. Vanilla is 45. Set to a negative value for no change."); molotovResidueSize = cfg.Bind("Equipment - Molotov (6-Pack)", "Fire Residue Size", disableByDefault.Value ? (-1f) : 1.75f, "Multiply the size of the lingering fire pools by this value. Vanilla is 1. Set to a negative value for no change."); molotovResidueDuration = cfg.Bind("Equipment - Molotov (6-Pack)", "Fire Residue Duration", disableByDefault.Value ? (-1f) : 10f, "Adjust the duration of the lingering fire pools. Vanilla is 7. Set to a negative value for no change."); molotovResidueTickrate = cfg.Bind("Equipment - Molotov (6-Pack)", "Fire Residue Tickrate", disableByDefault.Value ? (-1f) : 2f, "Adjust the tickrate of the lingering fire pools, in attacks per second. Vanilla is 1. Set to a negative value for no change."); molotovExplosionDamage = cfg.Bind("Equipment - Molotov (6-Pack)", "Explosion Damage", -1f, "Set the damage coefficient of the fire explosions to this value. Vanilla is 2.5, despite what the description says. Set to a negative value for no change."); equipDroneAlwaysFire = cfg.Bind("Drones - Equipment Drone", "Always Fire Equipment", !disableByDefault.Value, "Equipment Drones will attempt to fire their Equipment as often as possible. Vanilla is false."); gunnerTurretRange = cfg.Bind("Drones - Gunner Turret", "Attack Range", disableByDefault.Value ? (-1f) : 75f, "Gunner Turrets will attack from this far away. Vanilla is 60. Set to a negative value for no change."); accessNodeMultiplyRewards = cfg.Bind("Interactables - Access Node", "Multiply Item Rewards", !disableByDefault.Value, "Instead of adding +1 item per player, it will double the amount.\nSince Access Node is multiplicative with Mountain Shrines, the rewards will be as well."); droneScrapperMaxCount = cfg.Bind("Interactables - Drone Scrapper", "Max Count", (!disableByDefault.Value) ? 1 : (-1), "Set the maximum amount of times it can spawn per stage. Vanilla is -1. Set to negative for no limit."); droneScrapperOnHabitat = cfg.Bind("Interactables - Drone Scrapper", "Spawn on Treeborn Colony", !disableByDefault.Value, "Drone Scrappers appear on Treeborn Colony & Golden Dieback."); droneScrapperFaster = cfg.Bind("Interactables - Drone Scrapper", "Faster Animation", !disableByDefault.Value, "Drone Scrappers are faster."); shrineOfOrderOnStage4 = cfg.Bind("Interactables - Shrine of Order", "Spawn on Stage 4", !disableByDefault.Value, "A Shrine of Order will spawn in a fixed location on every Stage 4."); moonCauldronTweak = cfg.Bind("Stages - Commencement", "Cauldron Tweak", !disableByDefault.Value, "Blacklist items tagged with 'OnStageBeginEffet', which includes things like Rusted Key/Sale Star."); moonInitialMonsterCredits = cfg.Bind("Stages - Commencement", "Initial Monster Credits", disableByDefault.Value ? (-1) : 450, "Set the base amount of initial monster credits for this stage. Vanilla is 900. Set to a negative value for no change."); moonPillarRadius = cfg.Bind("Stages - Commencement", "Pillar Charge Radius", disableByDefault.Value ? (-1f) : 25f, "Set the charge radius of the Pillars. Vanilla is 20. Set to a negative value for no change."); moonPillarMassDuration = cfg.Bind("Stages - Commencement", "Pillar of Mass Charge Time", disableByDefault.Value ? (-1f) : 45f, "Set how long it takes to charge a Pillar of Mass. Vanilla is 60. Set to a negative value for no change."); moonPillarMonsterCredits = cfg.Bind("Stages - Commencement", "Pillar Monster Credits", disableByDefault.Value ? (-1) : 720, "Set the amount of credits each pillar can spend to spawn monsters. Vanilla is 700. Set to a negative value for no change."); conduitCanyonCollectiveCost = cfg.Bind("Stages - Conduit Canyon", "Collective Elite (Weak) Cost Multiplier", disableByDefault.Value ? (-1f) : 4f, "Set the director cost multiplier of weak Collective Elites. Vanilla is 2. Set to a negative value for no change."); conduitCanyonCollectiveDebtFix = cfg.Bind("Stages - Conduit Canyon", "Collective Elite (Weak) Debt Fix", !disableByDefault.Value, "The director will make sure it can afford to upgrade a monster to a weak Collective, instead of ignoring that and going into debt. Vanilla is false.\nIf set to true, I recommend setting the cost multiplier below x6 or whatever multiplier T1 Elites are set to; otherwise, the game will prioritize regular Elite spawns over Collective ones."); conduitCanyonCollectiveRewardFix = cfg.Bind("Stages - Conduit Canyon", "Collective Elite (Weak) Reward Fix", !disableByDefault.Value, "Monsters upgraded to weak Collective will appropriately drop more gold & experience instead of the exact same amount as a regular monster."); conduitCanyonShrineCreditLeader = cfg.Bind("Stages - Conduit Canyon", "Collective Combat Shrine Leader Credits", disableByDefault.Value ? (-1) : 100, "Set the base amount of monster credits used to summon the leader, who is always a weak Collective Elite. Vanilla is 120. Set to a negative value for no change.\nFor reference, regular Combat Shrines hold 100."); conduitCanyonShrineCreditSupport = cfg.Bind("Stages - Conduit Canyon", "Collective Combat Shrine Support Credits", disableByDefault.Value ? (-1) : 0, "Set the base amount of monster credits used to summon the supporting monsters. Vanilla is 70. Set to a negative value for no change.\nUpon spawning the leader, all leftover credits are sent to the supporting monsters. Thus, the shrine can spawn supporting monsters even if the value is set to 0."); conduitCanyonShrineCreditSupportMult = cfg.Bind("Stages - Conduit Canyon", "Collective Combat Shrine Support Credit Multiplier", disableByDefault.Value ? (-1f) : 1f, "The final amount of supporting monster credits are multiplied by this amount. Vanilla is .5. Set to a negative value for no change."); nestSnowyShrines = cfg.Bind("Stages - Pretender’s Precipice", "Snowy Shrines", !disableByDefault.Value, "Shrines will spawn as their snowy variants on this stage."); fanSpeedBoost = cfg.Bind("Stages - Rallypoint Delta", "Enable Fan Speed Boost", !disableByDefault.Value, "Taking the fans temporarily increases movement speed for players."); fanBuffDuration = cfg.Bind("Stages - Rallypoint Delta", "Fan Buff Duration", disableByDefault.Value ? (-1f) : 10f, "Set the duration of the speed boost, in seconds."); fanBuffStrength = cfg.Bind("Stages - Rallypoint Delta", "Fan Buff Strength", disableByDefault.Value ? (-1f) : 50f, "Additively increase movement speed by this percentage while under the effects of the buff."); drifterCubeSearchAngle = cfg.Bind("Survivors - Drifter", "Junk Cube Search Angle", disableByDefault.Value ? (-1f) : 15f, "Set the maximum angle at which Junk Cube will automatically lock on to a target when hit. Vanilla is 8. Set to a negative value for no change."); drifterCubeSearchDistance = cfg.Bind("Survivors - Drifter", "Junk Cube Search Distance", disableByDefault.Value ? (-1f) : 50f, "Set the maximum distance at which Junk Cube will automatically lock on to a target when hit. Vanilla is 40. Set to a negative value for no change."); drifterCleanupCooldownTweak = cfg.Bind("Survivors - Drifter", "Cleanup Doesn’t Reset Cooldown", !disableByDefault.Value, "Using Cleanup no longer resets the skill's cooldown.\nJunk Cube doesn't have that quirk, as a matter of fact."); eclipseTeamTweak = cfg.Bind("Miscellaneous - Eclipse", "E4/E7 Team Tweak", !disableByDefault.Value, "Apply the vanilla Eclipse 4 & 7 modifiers to other non-ally teams, such as Void. Vanilla is false."); perfectedCrippleProcCoeff = cfg.Bind("Miscellaneous - Perfected Elite", "Cripple Proc Coefficient", !disableByDefault.Value, "Cripple duration scales with the hit's proc coefficient."); perfectedHealthMultiplier = cfg.Bind("Miscellaneous - Perfected Elite", "Base Health Multiplier", disableByDefault.Value ? (-1f) : 2.4f, "Set the base health multiplier for Perfected Elites. Vanilla is 2. Set to a negative value for no change.\nKeep in mind that this value will be multiplied by x1.25 due to the Aspect's effect."); strawPairyAITweak = cfg.Bind("Mods - SeekingTheVoid", "Straw’Pair’y AI Tweaks", !disableByDefault.Value, "Stops Gup from idling when locking onto a flying target. Instead, it'll prioritize (but not exclusively target!) grounded enemies.\nIt'll also initiate the attack from a shorter distance to reduce the amount of 'just out of reach' moments."); strawPairyIsFood = cfg.Bind("Mods - SeekingTheVoid", "Straw’Pair’y Is Food", !disableByDefault.Value, "Tags the item as 'FoodRelated', which makes it eligible for the Hearty Stew recipe."); xenobacteriaRetier = cfg.Bind("Mods - Nautilus", "Xenobacteria Retiering", false, "Xenobacteria is re-tiered to a Void Uncommon. Enable if you're playing with GreenAlienHead."); } } public class EquipmentDrone { public static GameObject equipDroneMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/EquipmentDroneMaster.prefab").WaitForCompletion(); public EquipmentDrone() { if (!Configs.equipDroneAlwaysFire.Value) { return; } AISkillDriver[] components = equipDroneMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { val.shouldFireEquipment = true; if (val.driverUpdateTimerOverride > 0.5f) { val.driverUpdateTimerOverride = 0.5f; } } } } public class GunnerTurret { public static GameObject gunnerTurretMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/Turret1Master.prefab").WaitForCompletion(); public GunnerTurret() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 if (!(Configs.gunnerTurretRange.Value >= 0f)) { return; } AISkillDriver[] components = gunnerTurretMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { if ((int)val.skillSlot == 0) { val.maxDistance = Configs.gunnerTurretRange.Value; } } } } public class AlloyHunter { public static SkillDef alloyHunterLaserSkill = Addressables.LoadAssetAsync((object)"RoR2/DLC3/VultureHunter/ChargeSolusLaser.asset").WaitForCompletion(); public AlloyHunter() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if (Configs.alloyHunterLaserCooldownTweak.Value) { alloyHunterLaserSkill.isCooldownBlockedUntilManuallyReset = true; FireSolusLaser.OnExit += new hook_OnExit(FireSolusLaser_OnExit); } } private void FireSolusLaser_OnExit(orig_OnExit orig, FireSolusLaser self) { orig.Invoke(self); CharacterBody characterBody = ((EntityState)self).characterBody; if (Object.op_Implicit((Object)(object)characterBody) && Object.op_Implicit((Object)(object)characterBody.skillLocator) && Object.op_Implicit((Object)(object)characterBody.skillLocator.primary) && (Object)(object)characterBody.skillLocator.primary.skillDef == (Object)(object)alloyHunterLaserSkill) { characterBody.skillLocator.primary.SetBlockedCooldownSkillState(false); } } } public class AlloyWorshipUnit { public static EntityStateConfiguration superDelayKnockup = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/EntityStates.RoboBallBoss.Weapon.FireSuperDelayKnockup.asset").WaitForCompletion(); public static SkillDef superDelayKnockupSkill = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/SuperFireDelayKnockup.asset").WaitForCompletion(); public static GameObject awuBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/SuperRoboBallBossBody.prefab").WaitForCompletion(); public AlloyWorshipUnit() { if (Configs.awuShieldDuration.Value >= 0f) { superDelayKnockup.TryModifyFieldValue("shieldDuration", Configs.awuShieldDuration.Value); } if (Configs.awuDelaySuperAttackCooldown.Value > 0f) { superDelayKnockupSkill.isCooldownBlockedUntilManuallyReset = true; awuBodyPrefab.AddComponent(); } } } public class SuperDelayKnockupCooldownController : MonoBehaviour { public float age = 0f; public float timer; public bool blockCooldown = false; private CharacterBody characterBody; private SkillLocator skillLocator; private void Awake() { timer = Configs.awuDelaySuperAttackCooldown.Value; characterBody = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)characterBody) && Object.op_Implicit((Object)(object)characterBody.skillLocator)) { skillLocator = characterBody.skillLocator; } } private void OnEnable() { if (Object.op_Implicit((Object)(object)characterBody)) { characterBody.onSkillActivatedServer += OnSkillActivatedServer; } } private void FixedUpdate() { if (!blockCooldown) { return; } age += Time.fixedDeltaTime; if (age >= timer) { age -= timer; if (Object.op_Implicit((Object)(object)skillLocator) && Object.op_Implicit((Object)(object)skillLocator.special) && (Object)(object)skillLocator.special.skillDef == (Object)(object)AlloyWorshipUnit.superDelayKnockupSkill) { blockCooldown = false; skillLocator.special.SetBlockedCooldownSkillState(false); } } } private void OnDisable() { if (Object.op_Implicit((Object)(object)characterBody)) { characterBody.onSkillActivatedServer -= OnSkillActivatedServer; } } private void OnSkillActivatedServer(GenericSkill genericSkill) { if ((Object)(object)genericSkill.skillDef == (Object)(object)AlloyWorshipUnit.superDelayKnockupSkill) { blockCooldown = true; age = 0f; } } } public class AlphaConstruct { public static GameObject minorConstructBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MinorConstructBody.prefab").WaitForCompletion(); public static GameObject minorConstructMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MinorConstructMaster.prefab").WaitForCompletion(); public static GameObject minorConstructAllyBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MinorConstructOnKillBody.prefab").WaitForCompletion(); public static GameObject minorConstructAllyMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MinorConstructOnKillMaster.prefab").WaitForCompletion(); public AlphaConstruct() { //IL_0071: 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_008d: 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_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: 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_0274: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) if (Configs.alphaConstructTeleportEnabled.Value) { BaseAI component = minorConstructMasterPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.enemySearch.maxDistanceFilter = float.PositiveInfinity; component.xrayVision = true; } if (!Object.op_Implicit((Object)(object)minorConstructBodyPrefab.GetComponent())) { minorConstructBodyPrefab.AddComponent(); } bool flag = default(bool); ContentAddition.AddEntityState(ref flag); SkillDef val = ScriptableObject.CreateInstance(); val.activationState = new SerializableEntityStateType(typeof(MinorConstructTeleport)); val.activationStateMachineName = "Body"; val.baseMaxStock = 1; val.baseRechargeInterval = Configs.alphaConstructTeleportCooldown.Value; val.beginSkillCooldownOnSkillEnd = false; val.canceledFromSprinting = false; val.cancelSprintingOnActivation = true; val.dontAllowPastMaxStocks = true; val.forceSprintDuringState = false; val.fullRestockOnAssign = false; val.hideCooldown = false; val.hideStockCount = false; val.interruptPriority = (InterruptPriority)1; val.isCombatSkill = false; val.mustKeyPress = false; val.rechargeStock = 1; val.requiredStock = 1; val.resetCooldownTimerOnUse = false; val.skillName = "MINORCONSTRUCT_UTILITY_TELEPORT_NAME"; val.stockToConsume = 1; ContentAddition.AddSkillDef(val); SkillFamily val2 = ScriptableObject.CreateInstance(); ((Object)val2).name = "MinorConstructUtilityFamily"; Array.Resize(ref val2.variants, 1); val2.variants[0].skillDef = val; GenericSkill val3 = minorConstructBodyPrefab.AddComponent(); val3.skillName = "MinorConstructTeleport"; val3._skillFamily = val2; SkillLocator component2 = minorConstructBodyPrefab.GetComponent(); component2.utility = val3; ContentAddition.AddSkillFamily(val2); AISkillDriver val4 = minorConstructMasterPrefab.AddComponent(); val4.activationRequiresAimConfirmation = false; val4.activationRequiresAimTargetLoS = false; val4.activationRequiresTargetLoS = false; val4.aimType = (AimType)1; val4.aimVectorDampTimeOverride = 0.05f; val4.aimVectorMaxSpeedOverride = float.PositiveInfinity; val4.buttonPressType = (ButtonPressType)2; val4.customName = "TeleportToTarget"; val4.driverUpdateTimerOverride = 1f; val4.ignoreNodeGraph = false; val4.maxDistance = float.PositiveInfinity; val4.maxTargetHealthFraction = float.PositiveInfinity; val4.maxTimesSelected = -1; val4.maxUserHealthFraction = float.PositiveInfinity; val4.minDistance = Configs.alphaConstructTeleportMinDist.Value; val4.minTargetHealthFraction = float.NegativeInfinity; val4.minUserHealthFraction = float.NegativeInfinity; val4.moveInputScale = 1f; val4.movementType = (MovementType)0; val4.moveTargetType = (TargetType)0; val4.noRepeat = false; val4.requireEquipmentReady = false; val4.requireSkillReady = true; val4.resetCurrentEnemyOnNextDriverSelection = false; val4.selectionRequiresAimTarget = false; val4.selectionRequiresOnGround = false; val4.selectionRequiresTargetLoS = false; val4.selectionRequiresTargetNonFlier = false; val4.shouldFireEquipment = false; val4.shouldSprint = false; val4.skillSlot = (SkillSlot)2; minorConstructMasterPrefab.ReorderSkillDrivers(val4, 1); if (!Object.op_Implicit((Object)(object)minorConstructBodyPrefab.GetComponent())) { minorConstructBodyPrefab.AddComponent(); } } } } public class RemoveTeleportStocksOnStart : MonoBehaviour { private CharacterBody characterBody; private SkillLocator skillLocator; private void Awake() { characterBody = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)characterBody) && Object.op_Implicit((Object)(object)characterBody.skillLocator)) { skillLocator = characterBody.skillLocator; } } private void Start() { if (Object.op_Implicit((Object)(object)skillLocator) && Object.op_Implicit((Object)(object)skillLocator.utility)) { skillLocator.utility.RemoveAllStocks(); } } } public class MinorConstructTeleport : BaseState { public float duration = 0.2f; public float nodeSearchRadiusMin = 25f; public float nodeSearchRadiusMax = 40f; public float collisionCheckDistance = 5f; public int findSurfaceRaycastCount = 10; public float findSurfaceMaxRaycastLength = 50f; public GameObject teleportEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MajorConstructSpawnMinorConstructEffect.prefab").WaitForCompletion(); public GameObject arrivalEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/MajorConstructMuzzleflashSpawnMinorConstruct.prefab").WaitForCompletion(); public string arrivalSoundString = "Play_majorConstruct_R_pulse"; public HurtBox target; public override void OnEnter() { ((BaseState)this).OnEnter(); target = ((EntityState)this).GetComponent().GetTargetHurtBox(); if (!Object.op_Implicit((Object)(object)target)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)target) && ((EntityState)this).fixedAge > duration) { Teleport(); ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void Teleport() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_0040: 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_004e: Expected O, but got Unknown //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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown if (FindOffsetPosition(((Component)target).transform, out var offsetPosition)) { Vector3 position = ((EntityState)this).transform.position; if (FindNearbySurface(offsetPosition)) { EffectManager.SpawnEffect(teleportEffectPrefab, new EffectData { origin = position }, false); EffectManager.SpawnEffect(arrivalEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position }, false); Util.PlaySound(arrivalSoundString, ((EntityState)this).gameObject); } } } private bool FindNearbySurface(Vector3 targetPos) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0048: 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_0078: 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) RaycastHit val = default(RaycastHit); bool result = false; if (((EntityState)this).isAuthority) { MinionOwnership minionOwnership = ((EntityState)this).characterBody.master.minionOwnership; if (!Object.op_Implicit((Object)(object)((minionOwnership != null) ? minionOwnership.ownerMaster : null))) { for (int i = 0; i < findSurfaceRaycastCount; i++) { if (Physics.Raycast(targetPos, Random.onUnitSphere, ref val, findSurfaceMaxRaycastLength, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { ((EntityState)this).transform.position = ((RaycastHit)(ref val)).point; ((EntityState)this).transform.up = ((RaycastHit)(ref val)).normal; result = true; } } } } return result; } private bool FindOffsetPosition(Transform targetTransform, out Vector3 offsetPosition) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return FindBestTeleportPosition(targetTransform.position, out offsetPosition); } private bool FindBestTeleportPosition(Vector3 nearPosition, out Vector3 teleportPosition) { //IL_003d: 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_00d6: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_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_009d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)DirectorCore.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance)) { teleportPosition = default(Vector3); return false; } NodeGraph nodeGraph = SceneInfo.instance.GetNodeGraph((GraphType)1); List list = nodeGraph.FindNodesInRange(nearPosition, nodeSearchRadiusMin, nodeSearchRadiusMax, (HullMask)1); if (list.Count >= 1) { Vector3 val2 = default(Vector3); for (int i = 0; i < list.Count; i++) { NodeIndex val = list[i]; if (!DirectorCore.instance.CheckNodeOccupied(nodeGraph, val) && nodeGraph.GetNodePosition(val, ref val2) && (!(collisionCheckDistance >= 0f) || CheckTeleportPositionValid(val2))) { teleportPosition = val2; return true; } } } teleportPosition = default(Vector3); return false; } private bool CheckTeleportPositionValid(Vector3 telePosition) { //IL_0001: 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) if (Physics.OverlapSphere(telePosition, collisionCheckDistance, LayerMask.op_Implicit(CommonMasks.allCharacterCollisions), (QueryTriggerInteraction)1).Length != 0) { return false; } return true; } } public class Beetle { public static EntityStateConfiguration beetleSpawn = Addressables.LoadAssetAsync((object)"RoR2/Base/Beetle/EntityStates.BeetleMonster.SpawnState.asset").WaitForCompletion(); public static EntityStateConfiguration beetleHeadbutt = Addressables.LoadAssetAsync((object)"RoR2/Base/Beetle/EntityStates.BeetleMonster.HeadbuttState.asset").WaitForCompletion(); public Beetle() { if (Configs.beetleSpawnDuration.Value >= 0f) { beetleSpawn.TryModifyFieldValue("duration", Configs.beetleSpawnDuration.Value); } if (Configs.beetleHeadbuttDmg.Value >= 0f) { beetleHeadbutt.TryModifyFieldValue("damageCoefficient", Configs.beetleHeadbuttDmg.Value); } } } public class BighornBison { public static EntityStateConfiguration bisonCharge = Addressables.LoadAssetAsync((object)"RoR2/Base/Bison/EntityStates.Bison.Charge.asset").WaitForCompletion(); public BighornBison() { if (Configs.bighornBisonChargeCoeff.Value >= 0f) { bisonCharge.TryModifyFieldValue("chargeMovementSpeedCoefficient", Configs.bighornBisonChargeCoeff.Value); } } } public class ClayApothecary { public static CharacterSpawnCard cscClayGrenadier = Addressables.LoadAssetAsync((object)"RoR2/DLC1/ClayGrenadier/cscClayGrenadier.asset").WaitForCompletion(); public static GameObject clayGrenadierMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/ClayGrenadier/ClayGrenadierMaster.prefab").WaitForCompletion(); public static EntityStateConfiguration clayGrenadierFaceSlam = Addressables.LoadAssetAsync((object)"RoR2/DLC1/ClayGrenadier/EntityStates.ClayGrenadier.FaceSlam.asset").WaitForCompletion(); public ClayApothecary() { //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Expected O, but got Unknown if (Configs.clayApothecaryCost.Value >= 0) { ((SpawnCard)cscClayGrenadier).directorCreditCost = Configs.clayApothecaryCost.Value; } if (Configs.clayApothecaryTarBallRange.Value >= 0f || Configs.clayApothecaryMortarHealthThreshold.Value >= 0f) { AISkillDriver[] components = clayGrenadierMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { if (val.customName == "ThrowBarrel" && Configs.clayApothecaryTarBallRange.Value >= 0f) { val.maxDistance = Configs.clayApothecaryTarBallRange.Value; } else if (val.customName == "LongDistanceMortar" && Configs.clayApothecaryMortarHealthThreshold.Value >= 0f) { if (Configs.clayApothecaryMortarHealthThreshold.Value >= 1f) { val.maxUserHealthFraction = float.PositiveInfinity; } else { val.maxUserHealthFraction = Configs.clayApothecaryMortarHealthThreshold.Value; } } } } if (Configs.clayApothecarySlamSelfDmg.Value >= 0f) { clayGrenadierFaceSlam.TryModifyFieldValue("healthCostFraction", Configs.clayApothecarySlamSelfDmg.Value / 100f); } if (!Configs.clayApothecaryMortarTargeting.Value) { return; } bool hookFailed = true; FaceSlam.FixedUpdate += (Manipulator)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_0053: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "sortMode") })) { int index = val2.Index; val2.Index = index - 1; val2.Next.OpCode = OpCodes.Ldc_I4_2; hookFailed = false; } if (hookFailed) { Log.Error("Clay Apothecary mortar targeting hook failed!"); } }; } } public class FalseSon { public FalseSon() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown if (Configs.falseSonGolemCountTweak.Value) { MeridianEventTriggerInteraction.Start += new hook_Start(MeridianEventTriggerInteraction_Start); } } private void MeridianEventTriggerInteraction_Start(orig_Start orig, MeridianEventTriggerInteraction self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.phase2CombatDirector)) { CombatDirector component = self.phase2CombatDirector.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.maxSquadCount = (uint)Mathf.Min(Run.instance.stageClearCount + 1, 40); } } } } public class Geep { public static CharacterSpawnCard cscGeep = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/cscGeepBody.asset").WaitForCompletion(); public Geep() { if (Configs.geepCost.Value >= 0) { ((SpawnCard)cscGeep).directorCreditCost = Configs.geepCost.Value; } } } public class GeneralEnemies : MonoBehaviour { public static SkillDef gupSpikesSkill = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/GupSpikes.asset").WaitForCompletion(); public static SteppedSkillDef verminLashSkill = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Vermin/TongueLash.asset").WaitForCompletion(); public static SkillDef halcyoniteSlashSkill = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/HalcyoniteMonsterGoldenSlash.asset").WaitForCompletion(); public static SkillDef halcyoniteSwipeSkill = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/HalcyoniteMonsterGoldenSwipe.asset").WaitForCompletion(); public static EntityStateConfiguration gupSpikesEsc = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/EntityStates.Gup.GupSpikesState.asset").WaitForCompletion(); public static EntityStateConfiguration verminLashEsc = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Vermin/EntityStates.Vermin.Weapon.TongueLash.asset").WaitForCompletion(); public static EntityStateConfiguration halcyoniteSlashEsc = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/EntityStates.HalcyoniteMonster.GoldenSlash.asset").WaitForCompletion(); public static EntityStateConfiguration halcyoniteSwipeEsc = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/EntityStates.HalcyoniteMonster.GoldenSwipe.asset").WaitForCompletion(); public GeneralEnemies() { if (Configs.enemyMeleeTweak.Value) { AdjustAttack(gupSpikesEsc, gupSpikesSkill, typeof(GupSpikesStateModified)); AdjustAttack(verminLashEsc, (SkillDef)(object)verminLashSkill, typeof(TongueLashModified)); AdjustAttack(halcyoniteSlashEsc, halcyoniteSlashSkill, typeof(GoldenSlashModified)); AdjustAttack(halcyoniteSwipeEsc, halcyoniteSwipeSkill, typeof(GoldenSwipeModified)); } } private void AdjustAttack(EntityStateConfiguration esc, SkillDef skillDef, Type type) { //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_0025: 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_0032: Unknown result type (might be due to invalid IL or missing references) EntityStateConfiguration val = Object.Instantiate(esc); val.targetType = (SerializableSystemType)type; val.SetNameFromTargetType(); ContentAddition.AddEntityStateConfiguration(val); bool flag = default(bool); SerializableEntityStateType activationState = ContentAddition.AddEntityState(type, ref flag); if (flag) { skillDef.activationState = activationState; } } } public class GupSpikesStateModified : GupSpikesState { public override bool allowExitFire => false; } public class TongueLashModified : TongueLash { public override bool allowExitFire => false; } public class GoldenSlashModified : GoldenSlash { public override bool allowExitFire => false; } public class GoldenSwipeModified : GoldenSwipe { public override bool allowExitFire => false; } public class Grandparent { public static CharacterSpawnCard cscGrandparent = Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/cscGrandparent.asset").WaitForCompletion(); public static GameObject grandparentMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/GrandparentMaster.prefab").WaitForCompletion(); public static GameObject gravOrb = Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/GrandparentGravSphere.prefab").WaitForCompletion(); public static EntityStateConfiguration groundSwipe = Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/EntityStates.GrandParentBoss.GroundSwipe.asset").WaitForCompletion(); public Grandparent() { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Invalid comparison between Unknown and I4 if (Configs.grandparentCost.Value >= 0) { ((SpawnCard)cscGrandparent).directorCreditCost = Configs.grandparentCost.Value; } if (Configs.grandparentRockActivationRange.Value >= 0f) { AISkillDriver[] components = grandparentMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { if (val.customName == "GroundSwipe") { val.maxDistance = Configs.grandparentRockActivationRange.Value; } } } if (Configs.grandparentRockDynamicSpeed.Value) { GroundSwipe.FixedUpdate += new hook_FixedUpdate(RockDynamicSpeed); } if (Configs.grandparentRockTargeting.Value) { bool hookFailed = true; GroundSwipe.FixedUpdate += (Manipulator)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_0222: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); if (val3.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "searchOrigin") }) && val3.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "EntityStates.EntityState", "get_characterBody") })) { val3.RemoveRange(2); val3.EmitDelegate>((Func)delegate(BaseState state) { //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_0012: Unknown result type (might be due to invalid IL or missing references) Ray aimRay2 = state.GetAimRay(); return ((Ray)(ref aimRay2)).origin; }); if (val3.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "searchDirection") }) && val3.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "EntityStates.EntityState", "get_characterBody") })) { val3.RemoveRange(2); val3.EmitDelegate>((Func)delegate(BaseState state) { //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_0012: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = state.GetAimRay(); return ((Ray)(ref aimRay)).direction; }); if (val3.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "teamMaskFilter") }) && val3.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetTeam") })) { val3.RemoveRange(2); val3.EmitDelegate>((Func)delegate(BaseState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_002c: 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_002f: Unknown result type (might be due to invalid IL or missing references) TeamMask allButNeutral = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)((EntityState)state).teamComponent)) { ((TeamMask)(ref allButNeutral)).RemoveTeam(((EntityState)state).teamComponent.teamIndex); } return allButNeutral; }); if (val3.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "sortMode") })) { int index = val3.Index; val3.Index = index - 1; val3.Next.OpCode = OpCodes.Ldc_I4_2; groundSwipe.TryModifyFieldValue("maxBullseyeAngle", 90f); hookFailed = false; } } } } if (hookFailed) { Log.Error("Granparent rock targeting hook failed!"); } }; } if (Configs.grandparentGravOrbDynamicSpeed.Value) { FireSecondaryProjectile.Fire += new hook_Fire(FireGravOrb); } if (Configs.grandparentGravOrbForce.Value != -1000f) { RadialForce component = gravOrb.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.forceMagnitude = Configs.grandparentGravOrbForce.Value; } } if (!Configs.grandparentReduceDowntime.Value) { return; } AISkillDriver[] components2 = grandparentMasterPrefab.GetComponents(); AISkillDriver[] array2 = components2; foreach (AISkillDriver val2 in array2) { if ((int)val2.skillSlot == -1 && val2.driverUpdateTimerOverride > 2f) { val2.driverUpdateTimerOverride = 2f; } } } private void RockDynamicSpeed(orig_FixedUpdate orig, GroundSwipe self) { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = 1f; if (((EntityState)self).isAuthority && !self.hasFired && ((EntityState)self).fixedAge >= self.fireProjectileDelay - 0.05f) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((Component)((EntityState)self).characterBody).gameObject) && Object.op_Implicit((Object)(object)((EntityState)self).characterBody.master)) { BaseAI component = ((Component)((EntityState)self).characterBody.master).GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.currentEnemy != null && Object.op_Implicit((Object)(object)component.currentEnemy.characterBody) && Object.op_Implicit((Object)(object)((Component)component.currentEnemy.characterBody).gameObject)) { Vector3 val = ((Component)((EntityState)self).characterBody).gameObject.transform.position - ((Component)component.currentEnemy.characterBody).gameObject.transform.position; num = ((Vector3)(ref val)).magnitude; } } num2 = Mathf.Clamp(num / 150f, 1f, 3.75f); } self.projectileHorizontalSpeed *= num2; orig.Invoke(self); self.projectileHorizontalSpeed /= num2; } private void FireGravOrb(orig_Fire orig, FireSecondaryProjectile self) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: 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) float num = 0f; if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((Component)((EntityState)self).characterBody).gameObject) && Object.op_Implicit((Object)(object)((EntityState)self).characterBody.master)) { BaseAI component = ((Component)((EntityState)self).characterBody.master).GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.currentEnemy != null && Object.op_Implicit((Object)(object)component.currentEnemy.characterBody) && Object.op_Implicit((Object)(object)((Component)component.currentEnemy.characterBody).gameObject)) { Vector3 val = ((Component)((EntityState)self).characterBody).gameObject.transform.position - ((Component)component.currentEnemy.characterBody).gameObject.transform.position; num = ((Vector3)(ref val)).magnitude; } } float num2 = Mathf.Clamp(num / 90f, 1f, 15f); ProjectileSimple component2 = self.projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.desiredForwardSpeed *= num2; } orig.Invoke(self); if (Object.op_Implicit((Object)(object)component2)) { component2.desiredForwardSpeed /= num2; } } } public class GreaterWisp { public static GameObject greaterWispMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/GreaterWisp/GreaterWispMaster.prefab").WaitForCompletion(); public GreaterWisp() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Invalid comparison between Unknown and I4 //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 if (!(Configs.greaterWispAttackRange.Value >= 0f)) { return; } AISkillDriver[] components = greaterWispMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { if ((int)val.skillSlot != 0) { continue; } if ((int)val.movementType == 3) { if (Configs.greaterWispAttackRange.Value < val.maxDistance) { val.maxDistance = Configs.greaterWispAttackRange.Value; } } else { val.maxDistance = Configs.greaterWispAttackRange.Value; } } } } public class Gup { public static GameObject gupMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/GupMaster.prefab").WaitForCompletion(); public Gup() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_010f: Unknown result type (might be due to invalid IL or missing references) if (Configs.gupDelayAttackOnSpawn.Value) { AISkillDriver val = gupMasterPrefab.AddComponent(); val.activationRequiresAimConfirmation = false; val.activationRequiresAimTargetLoS = false; val.activationRequiresTargetLoS = false; val.aimType = (AimType)1; val.buttonPressType = (ButtonPressType)1; val.customName = "SpawnAttackDelay"; val.driverUpdateTimerOverride = 1f; val.ignoreNodeGraph = false; val.maxDistance = float.PositiveInfinity; val.maxTargetHealthFraction = float.PositiveInfinity; val.maxTimesSelected = 1; val.maxUserHealthFraction = float.PositiveInfinity; val.minDistance = 0f; val.minTargetHealthFraction = float.NegativeInfinity; val.minUserHealthFraction = float.NegativeInfinity; val.moveInputScale = 1f; val.movementType = (MovementType)1; val.moveTargetType = (TargetType)0; val.noRepeat = true; val.requireEquipmentReady = false; val.requireSkillReady = false; val.resetCurrentEnemyOnNextDriverSelection = false; val.selectionRequiresAimTarget = false; val.selectionRequiresOnGround = false; val.selectionRequiresTargetLoS = false; val.selectionRequiresTargetNonFlier = false; val.shouldFireEquipment = false; val.shouldSprint = false; val.skillSlot = (SkillSlot)(-1); gupMasterPrefab.ReorderSkillDrivers(val, 0); } } } public class Halcyonite { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__7_4; public static Func <>9__7_5; public static Manipulator <>9__7_0; public static Func <>9__7_7; public static Func <>9__7_6; public static Manipulator <>9__7_1; public static Func <>9__7_8; public static Manipulator <>9__7_2; public static Func <>9__7_10; public static Func <>9__7_9; public static Manipulator <>9__7_3; internal void <.ctor>b__7_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; float num = default(float); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "procCoefficient") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { val.Remove(); val.Emit(OpCodes.Ldc_R4, 0.2f); flag = false; } if (flag) { Log.Error("Halcyonite Whirlwind proc coefficient hook failed!"); } } internal bool <.ctor>b__7_4(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "procCoefficient"); } internal bool <.ctor>b__7_5(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal void <.ctor>b__7_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(WhirlWindPersuitCycle), "attackInterval") })) { val.Remove(); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((WhirlWindPersuitCycle self) => escWhirlwind.TryGetFieldValueString("attackInterval", out var value) ? (value / ((EntityState)self).characterBody.attackSpeed) : 0.25f)); flag = false; } if (flag) { Log.Error("Halcyonite Whirlwind attack speed scaling hook failed!"); } } internal bool <.ctor>b__7_7(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(WhirlWindPersuitCycle), "attackInterval"); } internal float <.ctor>b__7_6(WhirlWindPersuitCycle self) { if (escWhirlwind.TryGetFieldValueString("attackInterval", out var value)) { return value / ((EntityState)self).characterBody.attackSpeed; } return 0.25f; } internal void <.ctor>b__7_2(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "sortMode") })) { int index = val.Index; val.Index = index - 1; val.Next.OpCode = OpCodes.Ldc_I4_2; flag = false; } if (flag) { Log.Error("Halcyonite Whirlwind targeting hook failed!"); } } internal bool <.ctor>b__7_8(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "sortMode"); } internal void <.ctor>b__7_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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "searchOrigin") })) { val.Emit(OpCodes.Ldloc_0); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(BaseState state) { //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_0012: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = state.GetAimRay(); return ((Ray)(ref aimRay)).direction; }); val.Emit(OpCodes.Stfld, "searchDirection"); flag = false; } if (flag) { Log.Error("Halcyonite Whirlwind targeting (part 2) hook failed!"); } } internal bool <.ctor>b__7_10(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "searchOrigin"); } internal Vector3 <.ctor>b__7_9(BaseState state) { //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_0012: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = state.GetAimRay(); return ((Ray)(ref aimRay)).direction; } } public static GameObject halcyoniteBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/HalcyoniteBody.prefab").WaitForCompletion(); public static GameObject halcyoniteMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/HalcyoniteMaster.prefab").WaitForCompletion(); public static CharacterSpawnCard cscHalcyonite = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/cscHalcyonite.asset").WaitForCompletion(); public static DirectorCardCategorySelection dccsFalseSonPhase2 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/meridian/dccsFalseSonBossPhase2.asset").WaitForCompletion(); public static EntityStateConfiguration escWhirlwind = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Halcyonite/EntityStates.HalcyoniteMonster.WhirlwindPersuitCycle.asset").WaitForCompletion(); public static DirectorCardCategorySelection[] dccsWithHalcyoniteChampion = (DirectorCardCategorySelection[])(object)new DirectorCardCategorySelection[12] { Addressables.LoadAssetAsync((object)"RoR2/DLC2/dccsBlackBeachMonstersDLC2.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/dccsGolemplainsMonstersDLC2Only.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/dccsSnowyForestMonstersDLC2.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakes/dccsLakesMonstersDLC2.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/lakesnight/dccsLakesnightMonsters.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/dccsGooLakeMonstersDLC2Only.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/dccsFoggySwampMonstersDLC2Only.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/lemuriantemple/dccsLemurianTempleMonsters.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/habitat/dccsHabitatMonsters.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/habitatfall/dccsHabitatfallMonsters.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/dccsDampCaveMonstersDLC2Only.asset").WaitForCompletion(), Addressables.LoadAssetAsync((object)"RoR2/DLC2/dccsRootJungleMonstersDLC2.asset").WaitForCompletion() }; public static Stage[] stagesWithHalcyoniteChampion; public Halcyonite() { //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_0037: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00b6: 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_00cd: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_0123: 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) //IL_0133: Invalid comparison between Unknown and I8 //IL_02ad: 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_02b8: Expected O, but got Unknown //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Invalid comparison between Unknown and I4 //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Invalid comparison between Unknown and I8 //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Expected O, but got Unknown //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Expected O, but got Unknown //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Invalid comparison between Unknown and I8 //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Expected O, but got Unknown //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Invalid comparison between Unknown and I8 //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Invalid comparison between Unknown and I8 //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown //IL_01bb: 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_01c4: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) if (Configs.halcyoniteOnMeridianPreLoop.Value) { DirectorCardHolder val = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 0, preventOverhead = false, selectionWeight = 1, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscHalcyonite }, MonsterCategory = (MonsterCategory)3 }; Helpers.RemoveExistingMonsterFromStage("Halcyonite", (Stage)2199023255552L, ""); Helpers.AddNewMonsterToStage(val, false, (Stage)2199023255552L, ""); } if (Configs.halcyoniteOnFalseSonLoop.Value) { DirectorCardHolder val2 = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 5, preventOverhead = false, selectionWeight = 25, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscHalcyonite }, MonsterCategory = (MonsterCategory)3 }; DirectorAPI.AddCard(dccsFalseSonPhase2, val2); } if (Configs.halcyoniteProperCategory.Value) { for (int i = 0; i < dccsWithHalcyoniteChampion.Length; i++) { DirectorCardCategorySelection dccs = dccsWithHalcyoniteChampion[i]; if (CheckForHalcyonite(dccs)) { Stage val3 = stagesWithHalcyoniteChampion[i]; int minimumStageCompletions = 4; int selectionWeight = 1; if ((long)val3 == 2147483648u || (long)val3 == 137438953472L || (long)val3 == 274877906944L || (long)val3 == 549755813888L) { minimumStageCompletions = 0; } if ((long)val3 == 137438953472L) { selectionWeight = 2; } DirectorCardHolder val4 = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = minimumStageCompletions, preventOverhead = false, selectionWeight = selectionWeight, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscHalcyonite }, MonsterCategory = (MonsterCategory)3 }; Helpers.RemoveExistingMonsterFromStage("Halcyonite", val3, ""); Helpers.AddNewMonsterToStage(val4, false, val3, ""); } } } if (Configs.halcyoniteCost.Value >= 0) { ((SpawnCard)cscHalcyonite).directorCreditCost = Configs.halcyoniteCost.Value; } if (Configs.halcyoniteLaserNoPause.Value) { AISkillDriver[] components = halcyoniteMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val5 in array) { if ((int)val5.skillSlot == 1) { val5.movementType = (MovementType)1; } } } if (Configs.halcyoniteWhirlwindBuff.Value) { object obj = <>c.<>9__7_0; if (obj == null) { Manipulator val6 = 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_007a: Unknown result type (might be due to invalid IL or missing references) ILCursor val13 = new ILCursor(il); bool flag4 = true; float num = default(float); if (val13.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "procCoefficient") }) && val13.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { val13.Remove(); val13.Emit(OpCodes.Ldc_R4, 0.2f); flag4 = false; } if (flag4) { Log.Error("Halcyonite Whirlwind proc coefficient hook failed!"); } }; <>c.<>9__7_0 = val6; obj = (object)val6; } WhirlWindPersuitCycle.UpdateAttack += (Manipulator)obj; object obj2 = <>c.<>9__7_1; if (obj2 == null) { Manipulator val7 = 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_0046: Unknown result type (might be due to invalid IL or missing references) ILCursor val12 = new ILCursor(il); bool flag3 = true; if (val12.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(WhirlWindPersuitCycle), "attackInterval") })) { val12.Remove(); val12.Emit(OpCodes.Ldarg_0); val12.EmitDelegate>((Func)((WhirlWindPersuitCycle self) => escWhirlwind.TryGetFieldValueString("attackInterval", out var value) ? (value / ((EntityState)self).characterBody.attackSpeed) : 0.25f)); flag3 = false; } if (flag3) { Log.Error("Halcyonite Whirlwind attack speed scaling hook failed!"); } }; <>c.<>9__7_1 = val7; obj2 = (object)val7; } WhirlWindPersuitCycle.UpdateAttack += (Manipulator)obj2; } if (!Configs.halcyoniteWhirlwindPursuit.Value) { return; } object obj3 = <>c.<>9__7_2; if (obj3 == null) { Manipulator val8 = 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_0055: Unknown result type (might be due to invalid IL or missing references) ILCursor val11 = new ILCursor(il); bool flag2 = true; if (val11.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "sortMode") })) { int index = val11.Index; val11.Index = index - 1; val11.Next.OpCode = OpCodes.Ldc_I4_2; flag2 = false; } if (flag2) { Log.Error("Halcyonite Whirlwind targeting hook failed!"); } }; <>c.<>9__7_2 = val8; obj3 = (object)val8; } WhirlWindPersuitCycle.UpdateFindTarget += (Manipulator)obj3; object obj4 = <>c.<>9__7_3; if (obj4 == null) { Manipulator val9 = 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) ILCursor val10 = new ILCursor(il); bool flag = true; if (val10.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "searchOrigin") })) { val10.Emit(OpCodes.Ldloc_0); val10.Emit(OpCodes.Ldarg_0); val10.EmitDelegate>((Func)delegate(BaseState state) { //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_0012: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = state.GetAimRay(); return ((Ray)(ref aimRay)).direction; }); val10.Emit(OpCodes.Stfld, "searchDirection"); flag = false; } if (flag) { Log.Error("Halcyonite Whirlwind targeting (part 2) hook failed!"); } }; <>c.<>9__7_3 = val9; obj4 = (object)val9; } WhirlWindPersuitCycle.UpdateFindTarget += (Manipulator)obj4; escWhirlwind.TryModifyFieldValue("maxSearchDist", float.PositiveInfinity); WhirlWindPersuitCycle.FixedUpdate += new hook_FixedUpdate(WhirlWindPersuitCycle_FixedUpdate); } private bool CheckForHalcyonite(DirectorCardCategorySelection dccs) { //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_0019: Unknown result type (might be due to invalid IL or missing references) bool result = false; Category[] categories = dccs.categories; foreach (Category val in categories) { DirectorCard[] cards = val.cards; foreach (DirectorCard val2 in cards) { if ((Object)(object)val2.GetSpawnCard() == (Object)(object)cscHalcyonite) { result = true; break; } } } return result; } private void WhirlWindPersuitCycle_FixedUpdate(orig_FixedUpdate orig, WhirlWindPersuitCycle self) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 //IL_0031: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (NetworkServer.active && (int)self.state == 2) { self.targetBody = null; self.UpdateFindTarget(); Vector3 val = self.targetPos - ((EntityState)self).transform.position; self.targetMoveDirt = ((Vector3)(ref val)).normalized; ((EntityState)self).characterDirection.moveVector = self.targetMoveDirt; } } static Halcyonite() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0061: 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_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_0096: 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_00ab: 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_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_00d5: 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_00ea: 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) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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) //IL_012e: 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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) Stage[] array = new Stage[12]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); stagesWithHalcyoniteChampion = (Stage[])(object)array; } } public class Imp { public static CharacterSpawnCard cscImp = Addressables.LoadAssetAsync((object)"RoR2/Base/Imp/cscImp.asset").WaitForCompletion(); public Imp() { //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_0037: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown if (Configs.impOnHelminthRoost.Value) { DirectorCardHolder val = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 0, preventOverhead = false, selectionWeight = 2, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscImp }, MonsterCategory = (MonsterCategory)2 }; Helpers.AddNewMonsterToStage(val, false, (Stage)1099511627776L, ""); } } } public class Lemurian { public static GameObject lemurianMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Lemurian/LemurianMaster.prefab").WaitForCompletion(); public Lemurian() { //IL_005f: 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_00e3: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Invalid comparison between Unknown and I4 if (!(Configs.lemurianFireballRange.Value >= 0f)) { return; } if (Configs.lemurianFireballRange.Value > 30f) { AISkillDriver val = lemurianMasterPrefab.AddComponent(); val.activationRequiresAimConfirmation = false; val.activationRequiresAimTargetLoS = false; val.activationRequiresTargetLoS = true; val.aimType = (AimType)1; val.buttonPressType = (ButtonPressType)0; val.customName = "ChasePrimary"; val.driverUpdateTimerOverride = -1f; val.ignoreNodeGraph = false; val.maxDistance = Configs.lemurianFireballRange.Value; val.maxTargetHealthFraction = float.PositiveInfinity; val.maxTimesSelected = -1; val.maxUserHealthFraction = float.PositiveInfinity; val.minDistance = 15f; val.minTargetHealthFraction = float.NegativeInfinity; val.minUserHealthFraction = float.NegativeInfinity; val.moveInputScale = 1f; val.movementType = (MovementType)1; val.moveTargetType = (TargetType)0; val.noRepeat = false; val.requireEquipmentReady = false; val.requireSkillReady = false; val.resetCurrentEnemyOnNextDriverSelection = false; val.selectionRequiresAimTarget = false; val.selectionRequiresOnGround = false; val.selectionRequiresTargetLoS = true; val.selectionRequiresTargetNonFlier = false; val.shouldFireEquipment = false; val.shouldSprint = false; val.skillSlot = (SkillSlot)0; lemurianMasterPrefab.ReorderSkillDrivers(val, 4); return; } AISkillDriver[] components = lemurianMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val2 in array) { if ((int)val2.skillSlot == 0) { val2.maxDistance = Configs.lemurianFireballRange.Value; } } } } public class LunarExploder { public static CharacterSpawnCard cscLunarExploder = Addressables.LoadAssetAsync((object)"RoR2/Base/LunarExploder/cscLunarExploder.asset").WaitForCompletion(); public LunarExploder() { if (Configs.lunarExploderCost.Value >= 0) { ((SpawnCard)cscLunarExploder).directorCreditCost = Configs.lunarExploderCost.Value; } } } public class LunarWisp { public static CharacterSpawnCard cscLunarWisp = Addressables.LoadAssetAsync((object)"RoR2/Base/LunarWisp/cscLunarWisp.asset").WaitForCompletion(); public static int lunarWispBaseCost = ((SpawnCard)cscLunarWisp).directorCreditCost; public LunarWisp() { if (Configs.lunarWispCostOutsideMoon.Value < 0 && Configs.lunarWispCostOnMoon.Value < 0) { return; } if (Configs.lunarWispCostOutsideMoon.Value == Configs.lunarWispCostOnMoon.Value) { ((SpawnCard)cscLunarWisp).directorCreditCost = Configs.lunarWispCostOutsideMoon.Value; return; } Stage.onStageStartGlobal += OnStageStartGlobal; RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate { lunarWispBaseCost = ((SpawnCard)cscLunarWisp).directorCreditCost; }); } private void OnStageStartGlobal(Stage stage) { if ((Object)(object)SceneInfo.instance.sceneDef == (Object)(object)SceneCatalog.FindSceneDef("moon2") || (Object)(object)SceneInfo.instance.sceneDef == (Object)(object)SceneCatalog.FindSceneDef("moon")) { ((SpawnCard)cscLunarWisp).directorCreditCost = ((Configs.lunarWispCostOnMoon.Value >= 0) ? Configs.lunarWispCostOnMoon.Value : lunarWispBaseCost); } else { ((SpawnCard)cscLunarWisp).directorCreditCost = ((Configs.lunarWispCostOutsideMoon.Value >= 0) ? Configs.lunarWispCostOutsideMoon.Value : lunarWispBaseCost); } } } public class MiniMushrum { public static GameObject mushrumMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/MiniMushroom/MiniMushroomMaster.prefab").WaitForCompletion(); public static GameObject mushrumBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/MiniMushroom/MiniMushroomBody.prefab").WaitForCompletion(); public static CharacterSpawnCard cscMiniMushroom = Addressables.LoadAssetAsync((object)"RoR2/Base/MiniMushroom/cscMiniMushroom.asset").WaitForCompletion(); public MiniMushrum() { //IL_0046: 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_00ca: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown if (Configs.mushrumSprintDist.Value >= 0f) { AISkillDriver val = mushrumMasterPrefab.AddComponent(); val.activationRequiresAimConfirmation = false; val.activationRequiresAimTargetLoS = false; val.activationRequiresTargetLoS = false; val.aimType = (AimType)1; val.buttonPressType = (ButtonPressType)0; val.customName = "PathSprint"; val.driverUpdateTimerOverride = -1f; val.ignoreNodeGraph = false; val.maxDistance = float.PositiveInfinity; val.maxTargetHealthFraction = float.PositiveInfinity; val.maxTimesSelected = -1; val.maxUserHealthFraction = float.PositiveInfinity; val.minDistance = Configs.mushrumSprintDist.Value; val.minTargetHealthFraction = float.NegativeInfinity; val.minUserHealthFraction = float.NegativeInfinity; val.moveInputScale = 1f; val.movementType = (MovementType)1; val.moveTargetType = (TargetType)0; val.noRepeat = false; val.requireEquipmentReady = false; val.requireSkillReady = false; val.resetCurrentEnemyOnNextDriverSelection = false; val.selectionRequiresAimTarget = false; val.selectionRequiresOnGround = false; val.selectionRequiresTargetLoS = false; val.selectionRequiresTargetNonFlier = false; val.shouldFireEquipment = false; val.shouldSprint = true; val.skillSlot = (SkillSlot)(-1); mushrumMasterPrefab.ReorderSkillDrivers(val, 3); } if (Configs.mushrumSprintCoeff.Value >= 0f) { CharacterBody component = mushrumBodyPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.sprintingSpeedMultiplier = Configs.mushrumSprintCoeff.Value; } } if (Configs.mushrumOnHabitatFall.Value) { DirectorCardHolder val2 = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 0, preventOverhead = false, selectionWeight = 1, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscMiniMushroom }, MonsterCategory = (MonsterCategory)2 }; Helpers.AddNewMonsterToStage(val2, false, (Stage)549755813888L, ""); } } } public class Mithrix { public static EntityStateConfiguration brotherSpellChannel = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/EntityStates.BrotherMonster.SpellChannelState.asset").WaitForCompletion(); public Mithrix() { if (Configs.mithrixStealInterval.Value >= 0f) { brotherSpellChannel.TryModifyFieldValue("stealInterval", Configs.mithrixStealInterval.Value); } } } public class ScorchWorm { public static EntityStateConfiguration scorchlingBreach = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Scorchling/EntityStates.Scorchling.Breach.asset").WaitForCompletion(); public ScorchWorm() { if (Configs.scorchWormBreachDmg.Value >= 0f) { scorchlingBreach.TryModifyFieldValue("blastDamageCoefficient", Configs.scorchWormBreachDmg.Value); } } } public class SolusControlUnit { public static GameObject scuMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/RoboBallBossMaster.prefab").WaitForCompletion(); public static GameObject awuMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/SuperRoboBallBossMaster.prefab").WaitForCompletion(); public static CharacterSpawnCard cscScu = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/cscRoboBallBoss.asset").WaitForCompletion(); public SolusControlUnit() { //IL_00b3: 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_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_00c5: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00eb: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown if (Configs.scuRespectNodegraph.Value || Configs.scuPrimaryAttackRange.Value >= 0f || Configs.scuProbeHealthThreshold.Value >= 0f) { AISkillDriver[] components = scuMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver skillDriver in array) { AdjustSkillDrivers(skillDriver); } components = awuMasterPrefab.GetComponents(); AISkillDriver[] array2 = components; foreach (AISkillDriver skillDriver2 in array2) { AdjustSkillDrivers(skillDriver2); } } if (Configs.scuOnSolusWingLoop.Value) { DirectorCardHolder val = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 5, preventOverhead = false, selectionWeight = 20, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscScu }, MonsterCategory = (MonsterCategory)4, MonsterCategorySelectionWeight = 33f }; Helpers.AddNewMonsterToStage(val, false, (Stage)562949953421312L, ""); } } private void AdjustSkillDrivers(AISkillDriver skillDriver) { switch (skillDriver.customName) { case "FireAndChase": if (Configs.scuRespectNodegraph.Value) { skillDriver.ignoreNodeGraph = false; } break; case "FireAndStop": if (Configs.scuPrimaryAttackRange.Value >= 0f) { skillDriver.maxDistance = Configs.scuPrimaryAttackRange.Value; } break; case "FireAndFlee": if (Configs.scuPrimaryAttackRange.Value >= 0f && Configs.scuPrimaryAttackRange.Value < skillDriver.maxDistance) { skillDriver.maxDistance = Configs.scuPrimaryAttackRange.Value; } break; case "DeployMinion": if (Configs.scuProbeHealthThreshold.Value >= 0f) { if (Configs.scuProbeHealthThreshold.Value >= 1f) { skillDriver.maxUserHealthFraction = float.PositiveInfinity; } else { skillDriver.maxUserHealthFraction = Configs.scuProbeHealthThreshold.Value; } } break; } } } public class SolusDistributor { public static CharacterSpawnCard cscMinePod = Addressables.LoadAssetAsync((object)"RoR2/DLC3/MinePod/cscMinePod.asset").WaitForCompletion(); public SolusDistributor() { if (Configs.distributorCost.Value >= 0) { ((SpawnCard)cscMinePod).directorCreditCost = Configs.distributorCost.Value; } } } public class SolusProbe { public static CharacterSpawnCard cscProbe = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/cscRoboBallMini.asset").WaitForCompletion(); public static GameObject probeMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBoss/RoboBallMiniMaster.prefab").WaitForCompletion(); public static GameObject probeRedBuddyMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBuddy/RoboBallRedBuddyMaster.prefab").WaitForCompletion(); public static GameObject probeGreenBuddyMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBuddy/RoboBallGreenBuddyMaster.prefab").WaitForCompletion(); public static FamilyDirectorCardCategorySelection solusFamily = Addressables.LoadAssetAsync((object)"RoR2/DLC3/dccsSuperRoboBallpitFamily.asset").WaitForCompletion(); public SolusProbe() { //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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //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_0080: Expected O, but got Unknown //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_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_00b5: 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_00c3: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0143: 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_014c: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) if (Configs.probeCost.Value >= 0) { ((SpawnCard)cscProbe).directorCreditCost = Configs.probeCost.Value; } if (Configs.probeOnShipGraveyard.Value) { DirectorCardHolder val = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 0, preventOverhead = false, selectionWeight = 5, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscProbe }, MonsterCategory = (MonsterCategory)2 }; Helpers.AddNewMonsterToStage(val, false, (Stage)256, ""); } if (Configs.probeOnRepurposedCrater.Value) { DirectorCardHolder val2 = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 0, preventOverhead = false, selectionWeight = 5, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscProbe }, MonsterCategory = (MonsterCategory)2 }; Helpers.AddNewMonsterToStage(val2, false, (Stage)140737488355328L, ""); } if (Configs.probeOnSolusEvent.Value) { DirectorCardHolder val3 = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 0, preventOverhead = false, selectionWeight = 1, spawnDistance = (MonsterSpawnDistance)0, spawnCard = (SpawnCard)(object)cscProbe }, MonsterCategory = (MonsterCategory)2 }; DirectorAPI.AddCard((DirectorCardCategorySelection)(object)solusFamily, val3); } if (Configs.probeDelayAttackOnSpawn.Value) { AISkillDriver val4 = probeMasterPrefab.AddComponent(); val4.activationRequiresAimConfirmation = false; val4.activationRequiresAimTargetLoS = false; val4.activationRequiresTargetLoS = false; val4.aimType = (AimType)1; val4.buttonPressType = (ButtonPressType)1; val4.customName = "SpawnAttackDelay"; val4.driverUpdateTimerOverride = 1.5f; val4.ignoreNodeGraph = false; val4.maxDistance = float.PositiveInfinity; val4.maxTargetHealthFraction = float.PositiveInfinity; val4.maxTimesSelected = 1; val4.maxUserHealthFraction = float.PositiveInfinity; val4.minDistance = 0f; val4.minTargetHealthFraction = float.NegativeInfinity; val4.minUserHealthFraction = float.NegativeInfinity; val4.moveInputScale = 1f; val4.movementType = (MovementType)2; val4.moveTargetType = (TargetType)0; val4.noRepeat = true; val4.requireEquipmentReady = false; val4.requireSkillReady = false; val4.resetCurrentEnemyOnNextDriverSelection = false; val4.selectionRequiresAimTarget = false; val4.selectionRequiresOnGround = false; val4.selectionRequiresTargetLoS = false; val4.selectionRequiresTargetNonFlier = false; val4.shouldFireEquipment = false; val4.shouldSprint = false; val4.skillSlot = (SkillSlot)(-1); probeMasterPrefab.ReorderSkillDrivers(val4, 0); } if (Configs.probeAimSpeed.Value >= 0f) { probeMasterPrefab.GetComponent().aimVectorMaxSpeed = Configs.probeAimSpeed.Value; probeRedBuddyMasterPrefab.GetComponent().aimVectorMaxSpeed = Configs.probeAimSpeed.Value; probeGreenBuddyMasterPrefab.GetComponent().aimVectorMaxSpeed = Configs.probeAimSpeed.Value; } } } public class SolusProspector { public static EntityStateConfiguration drillDash = Addressables.LoadAssetAsync((object)"RoR2/DLC3/WorkerUnit/EntityStates.WorkerUnit.FireDrillDash.asset").WaitForCompletion(); public static GameObject prospectorMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC3/WorkerUnit/WorkerUnitMaster.prefab").WaitForCompletion(); public SolusProspector() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Invalid comparison between Unknown and I4 if (Configs.prospectorSingleHit.Value) { drillDash.TryModifyFieldValue("baseAttackInterval", float.PositiveInfinity); } if (!(Configs.prospectorAttackRange.Value >= 0f)) { return; } AISkillDriver[] components = prospectorMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { if ((int)val.skillSlot == 0) { val.maxDistance = Configs.prospectorAttackRange.Value; } } } } public class SolusTransporter { public static CharacterSpawnCard cscIronHauler = Addressables.LoadAssetAsync((object)"RoR2/DLC3/IronHauler/cscIronHauler.asset").WaitForCompletion(); public static GameObject ironHaulerBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC3/IronHauler/IronHaulerBody.prefab").WaitForCompletion(); public SolusTransporter() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown if (Configs.transporterCost.Value >= 0) { ((SpawnCard)cscIronHauler).directorCreditCost = Configs.transporterCost.Value; } if (!Configs.transporterTargetingFix.Value) { return; } bool hookFailed = true; IronHaulerController.FixedUpdate += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetEnemyTeams") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "ai") })) { val.RemoveRange(4); val.EmitDelegate>((Func)delegate(IronHaulerController controller) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_0049: Unknown result type (might be due to invalid IL or missing references) TeamMask allButNeutral = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)controller.ai) && Object.op_Implicit((Object)(object)controller.ai.master)) { ((TeamMask)(ref allButNeutral)).RemoveTeam(controller.ai.master.teamIndex); } return allButNeutral; }); hookFailed = false; } if (hookFailed) { Log.Error("Solus Transporter targeting hook failed!"); } }; ironHaulerBodyPrefab.AddComponent(); } } public class IronHaulerRetargetComponent : MonoBehaviour { private CharacterBody body; private BaseAI ai; private float retargetInterval = 30f; public float age = 0f; private void Start() { body = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.masterObject)) { ai = ((Component)body.master).GetComponent(); } } private void FixedUpdate() { age += Time.fixedDeltaTime; if (age >= retargetInterval) { age -= retargetInterval; if ((Object)(object)ai.customTarget.gameObject != (Object)null) { ai.customTarget.gameObject = null; } } } } public class StoneTitan { public static GameObject titanMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/TitanMaster.prefab").WaitForCompletion(); public static GameObject titanGoldMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/TitanGoldMaster.prefab").WaitForCompletion(); public static EntityStateConfiguration titanFist = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/EntityStates.TitanMonster.FireFist.asset").WaitForCompletion(); public static EntityStateConfiguration titanSummonRock = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/EntityStates.TitanMonster.RechargeRocks.asset").WaitForCompletion(); public StoneTitan() { if (Configs.titanLaserMaxRange.Value >= 0f || Configs.titanLaserMinRange.Value >= 0f) { AISkillDriver[] components = titanMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver skillDriver in array) { AdjustSkillDrivers(skillDriver); } components = titanGoldMasterPrefab.GetComponents(); AISkillDriver[] array2 = components; foreach (AISkillDriver skillDriver2 in array2) { AdjustSkillDrivers(skillDriver2); } } if (Configs.titanFistEndlag.Value >= 0f) { titanFist.TryModifyFieldValue("exitDuration", Configs.titanFistEndlag.Value); } if (Configs.titanSummonDuration.Value >= 0f) { titanSummonRock.TryModifyFieldValue("baseDuration", Configs.titanSummonDuration.Value); } } private void AdjustSkillDrivers(AISkillDriver skillDriver) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)skillDriver.skillSlot == 3) { skillDriver.maxDistance = ((Configs.titanLaserMaxRange.Value >= 0f) ? Configs.titanLaserMaxRange.Value : skillDriver.maxDistance); skillDriver.minDistance = ((Configs.titanLaserMinRange.Value >= 0f) ? Configs.titanLaserMinRange.Value : skillDriver.minDistance); } } } public class VoidJailer { public static GameObject jailerMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidJailer/VoidJailerMaster.prefab").WaitForCompletion(); public static GameObject jailerAllyMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidJailer/VoidJailerAllyMaster.prefab").WaitForCompletion(); public VoidJailer() { if (!Configs.voidJailerIdleFix.Value) { return; } AISkillDriver[] components = jailerMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { if (val.customName == "PathFromAfar") { val.selectionRequiresTargetLoS = false; } } components = jailerAllyMasterPrefab.GetComponents(); AISkillDriver[] array2 = components; foreach (AISkillDriver val2 in array2) { if (val2.customName == "PathFromAfar") { val2.selectionRequiresTargetLoS = false; } } } } public class VoidReaver { public static CharacterSpawnCard cscNullifier = Addressables.LoadAssetAsync((object)"RoR2/Base/Nullifier/cscNullifier.asset").WaitForCompletion(); public VoidReaver() { if (Configs.voidReaverCost.Value >= 0) { ((SpawnCard)cscNullifier).directorCreditCost = Configs.voidReaverCost.Value; } } } public class EccentricVase { public static BuffDef cloakBuff = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/bdCloak.asset").WaitForCompletion(); public static BuffDef intangibleBuff = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/bdIntangible.asset").WaitForCompletion(); public static BuffDef fallImmuneBuff = Addressables.LoadAssetAsync((object)"RoR2/Junk/Common/bdIgnoreFallDamage.asset").WaitForCompletion(); public static GameObject ziplineVehicle = Addressables.LoadAssetAsync((object)"RoR2/Base/Gateway/ZiplineVehicle.prefab").WaitForCompletion(); public static EquipmentDef gateway = Addressables.LoadAssetAsync((object)"RoR2/Base/Gateway/Gateway.asset").WaitForCompletion(); public EccentricVase() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown if (Configs.eccentricVaseCooldown.Value >= 0f) { gateway.cooldown = Configs.eccentricVaseCooldown.Value; } if (Configs.eccentricVaseMaxDist.Value >= 0f) { bool hookFailed = true; EquipmentSlot.FireGateway += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); float num = default(float); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetComponent") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { val.Next.Operand = Configs.eccentricVaseMaxDist.Value; hookFailed = false; } if (hookFailed) { Log.Error("Eccentric Vase length hook failed!"); } }; if (!hookFailed) { UpdateDescription(Configs.eccentricVaseMaxDist.Value); } } if (Configs.eccentricVaseAcceleration.Value >= 0f) { ziplineVehicle.GetComponent().acceleration = Configs.eccentricVaseAcceleration.Value; } if (Configs.eccentricVaseCloak.Value || Configs.eccentricVaseIntangible.Value || Configs.eccentricVaseNoCrater.Value) { ZiplineVehicle.OnPassengerEnter += new hook_OnPassengerEnter(OnPassengerEnter); ZiplineVehicle.OnPassengerExit += new hook_OnPassengerExit(OnPassengerExit); } } private void OnPassengerEnter(orig_OnPassengerEnter orig, ZiplineVehicle self, GameObject passenger) { CharacterBody component = passenger.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (Configs.eccentricVaseCloak.Value) { component.AddBuff(cloakBuff); } if (Configs.eccentricVaseIntangible.Value) { component.AddBuff(intangibleBuff); } } orig.Invoke(self, passenger); } private void OnPassengerExit(orig_OnPassengerExit orig, ZiplineVehicle self, GameObject passenger) { orig.Invoke(self, passenger); CharacterBody component = passenger.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (Configs.eccentricVaseCloak.Value) { component.RemoveBuff(cloakBuff); } if (Configs.eccentricVaseIntangible.Value) { component.RemoveBuff(intangibleBuff); } if (Configs.eccentricVaseNoCrater.Value) { component.AddTimedBuff(fallImmuneBuff, 0.5f); } } } private void UpdateDescription(float distance) { string text = distance.ToString().Replace(",", "."); LanguageAPI.Add("EQUIPMENT_GATEWAY_DESC", "Create a quantum tunnel of up to " + text + "m in length. Lasts 30 seconds.", "en"); LanguageAPI.Add("EQUIPMENT_GATEWAY_DESC", "生成一条最长为" + text + "米的量子隧道。持续30秒。", "zh-CN"); LanguageAPI.Add("EQUIPMENT_GATEWAY_DESC", $"Crée un tunnel quantique d'une longueur maximale de {distance} m. " + "Dure 30 secondes.", "fr"); } } public class ForeignFruit { public static EquipmentDef fruit = Addressables.LoadAssetAsync((object)"RoR2/Base/Fruit/Fruit.asset").WaitForCompletion(); public ForeignFruit() { if (Configs.foreignFruitCooldown.Value >= 0f) { fruit.cooldown = Configs.foreignFruitCooldown.Value; } } } public class Molotov6Pack { public static GameObject molotovDotZone = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Molotov/MolotovProjectileDotZone.prefab").WaitForCompletion(); public static GameObject molotovClusterProjectile = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Molotov/MolotovClusterProjectile.prefab").WaitForCompletion(); public static GameObject molotovSingleProjectile = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Molotov/MolotovSingleProjectile.prefab").WaitForCompletion(); public Molotov6Pack() { //IL_0042: 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) float num = 1f; float num2 = 2.5f; if (Configs.molotovResidueSize.Value >= 0f) { Transform transform = ((Component)molotovDotZone.GetComponent()).gameObject.transform; transform.localScale *= Configs.molotovResidueSize.Value; } if (Configs.molotovResidueDuration.Value >= 0f) { molotovDotZone.GetComponent().lifetime = Configs.molotovResidueDuration.Value; } if (Configs.molotovResidueTickrate.Value > 0f) { molotovDotZone.GetComponent().fireFrequency = Configs.molotovResidueTickrate.Value; num = Configs.molotovResidueTickrate.Value; } else if (Configs.molotovResidueTickrate.Value == 0f) { ((Behaviour)molotovDotZone.GetComponent()).enabled = false; num = 0f; } if (Configs.molotovExplosionDamage.Value >= 0f) { ((ProjectileExplosion)molotovClusterProjectile.GetComponent()).blastDamageCoefficient = Configs.molotovExplosionDamage.Value; ((ProjectileExplosion)molotovSingleProjectile.GetComponent()).blastDamageCoefficient = Configs.molotovExplosionDamage.Value; num2 = Configs.molotovExplosionDamage.Value; } if (num != 2f || num2 != 5f) { UpdateDescription(num * 100f, num2 * 100f); } } private void UpdateDescription(float tickRate, float explosionDamage) { string text = tickRate.ToString().Replace(",", "."); string text2 = explosionDamage.ToString().Replace(",", "."); LanguageAPI.Add("EQUIPMENT_MOLOTOV_DESC", "Throw 6 molotov cocktails that ignites enemies for " + text2 + "% base damage. Each molotov leaves a burning area for " + text + "% damage per second.", "en"); LanguageAPI.Add("EQUIPMENT_MOLOTOV_DESC", "投掷6枚燃烧瓶,对敌人造成" + text2 + "%基础伤害并使其点燃。每枚燃烧瓶会留下一片燃烧区域,每秒造成" + text + "%伤害。", "zh-CN"); LanguageAPI.Add("EQUIPMENT_MOLOTOV_DESC", $"Lance 6 cocktails molotov qui enflamment les ennemis, leur infligeant {explosionDamage} % des dégâts de base. " + $"Chaque cocktail molotov laisse une zone de flammes infligeant {tickRate} % de dégâts par seconde.", "fr"); } } public class AccessNode { public AccessNode() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown if (Configs.accessNodeMultiplyRewards.Value) { TeleporterInteraction.ActivateAccessCodes += new hook_ActivateAccessCodes(TeleporterInteraction_ActivateAccessCodes); TeleporterInteraction.onTeleporterBeginChargingGlobal += OnTeleporterBeginChargingGlobal; } } private void TeleporterInteraction_ActivateAccessCodes(orig_ActivateAccessCodes orig, TeleporterInteraction self) { BossGroup bossGroup = self.bossGroup; int? num = null; if (Object.op_Implicit((Object)(object)bossGroup)) { num = self.bossGroup.bonusRewardCount; } orig.Invoke(self); if (Object.op_Implicit((Object)(object)bossGroup) && num.HasValue) { self.bossGroup.bonusRewardCount = num.Value; } } private void OnTeleporterBeginChargingGlobal(TeleporterInteraction teleporterInteraction) { if (NetworkServer.active) { BossGroup bossGroup = teleporterInteraction.bossGroup; if (teleporterInteraction.isAccessingCodes && Object.op_Implicit((Object)(object)bossGroup)) { int bonusRewardCount = bossGroup.bonusRewardCount * 2 + 1; bossGroup.bonusRewardCount = bonusRewardCount; } } } } public class DroneScrapper { public static InteractableSpawnCard iscDroneScrapper = Addressables.LoadAssetAsync((object)"RoR2/DLC3/DroneScrapper/iscDroneScrapper.asset").WaitForCompletion(); public static EntityStateConfiguration waitToBeginScrapping = Addressables.LoadAssetAsync((object)"RoR2/DLC3/DroneScrapper/EntityStates.Scrapper.WaitToBeginScrappingDrone.asset").WaitForCompletion(); public static EntityStateConfiguration scrappingDrone = Addressables.LoadAssetAsync((object)"RoR2/DLC3/DroneScrapper/EntityStates.Scrapper.ScrappingDrone.asset").WaitForCompletion(); public static EntityStateConfiguration scrappingDroneToIdle = Addressables.LoadAssetAsync((object)"RoR2/DLC3/DroneScrapper/EntityStates.Scrapper.ScrappingDroneToIdle.asset").WaitForCompletion(); public static GameObject scrappingVFX = Addressables.LoadAssetAsync((object)"RoR2/DLC3/DroneScrapper/DroneScrapperScrappingVFX.prefab").WaitForCompletion(); public DroneScrapper() { //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_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_003d: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005b: 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_0063: Expected O, but got Unknown iscDroneScrapper.maxSpawnsPerStage = Configs.droneScrapperMaxCount.Value; if (Configs.droneScrapperOnHabitat.Value) { DirectorCardHolder val = new DirectorCardHolder { Card = new DirectorCard { minimumStageCompletions = 0, preventOverhead = false, selectionWeight = 6, spawnCard = (SpawnCard)(object)iscDroneScrapper }, InteractableCategory = (InteractableCategory)8 }; Helpers.AddNewInteractableToStage(val, (Stage)274877906944L, ""); Helpers.AddNewInteractableToStage(val, (Stage)549755813888L, ""); } if (Configs.droneScrapperFaster.Value) { waitToBeginScrapping.TryModifyFieldValue("duration", 1.33f); scrappingDrone.TryModifyFieldValue("duration", 1.67f); scrappingDroneToIdle.TryModifyFieldValue("duration", 0.4f); scrappingVFX.GetComponent().duration = 2.17f; } } } public class ShrineOfOrder : MonoBehaviour { public static GameObject shrineRestackPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineRestack/ShrineRestack.prefab").WaitForCompletion(); public static GameObject shrineRestackSandyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineRestack/ShrineRestackSandy Variant.prefab").WaitForCompletion(); public ShrineOfOrder() { if (Configs.shrineOfOrderOnStage4.Value) { Stage.onStageStartGlobal += OnStageStartGlobal; } } private void OnStageStartGlobal(Stage stage) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) GameObject val = null; Vector3 zero = Vector3.zero; Vector3 zero2 = Vector3.zero; switch (stage.sceneDef.cachedName) { case "dampcavesimple": val = shrineRestackPrefab; ((Vector3)(ref zero))..ctor(79f, -87.5f, -184.2f); ((Vector3)(ref zero2))..ctor(5f, 275f, 0f); break; case "shipgraveyard": val = shrineRestackPrefab; ((Vector3)(ref zero))..ctor(-92f, 11.81f, -29f); ((Vector3)(ref zero2))..ctor(355f, 38f, 0f); break; case "rootjungle": val = shrineRestackPrefab; ((Vector3)(ref zero))..ctor(-110f, 77f, -275f); ((Vector3)(ref zero2))..ctor(10f, 355f, 0f); break; case "repurposedcrater": val = shrineRestackSandyPrefab; ((Vector3)(ref zero))..ctor(-104.5f, -1.8f, -171f); ((Vector3)(ref zero2))..ctor(5f, 210f, 0f); break; case "snowtime_sandtrap": val = shrineRestackSandyPrefab; ((Vector3)(ref zero))..ctor(-22f, -73f, 177f); ((Vector3)(ref zero2))..ctor(0f, 90f, 0f); break; case "snowtime_gmbigcity": val = shrineRestackPrefab; ((Vector3)(ref zero))..ctor(21.2f, -7.15f, 447.6f); ((Vector3)(ref zero2))..ctor(0f, 45f, 0f); break; case "tropics_wormsworms": val = shrineRestackSandyPrefab; ((Vector3)(ref zero))..ctor(-137.3f, 1.35f, 88f); ((Vector3)(ref zero2))..ctor(355f, 180f, 0f); break; case "tropicsnight_wormsworms": val = shrineRestackSandyPrefab; ((Vector3)(ref zero))..ctor(-137.3f, 1.35f, 88f); ((Vector3)(ref zero2))..ctor(355f, 180f, 0f); break; case "sunkentombs_wormsworms": val = shrineRestackPrefab; ((Vector3)(ref zero))..ctor(-137.5f, 84.2f, -213f); ((Vector3)(ref zero2))..ctor(5f, 330f, 0f); break; } if (Object.op_Implicit((Object)(object)val) && zero != Vector3.zero && zero2 != Vector3.zero) { GameObject val2 = Object.Instantiate(val, zero, Quaternion.Euler(zero2)); val2.transform.eulerAngles = zero2; NetworkServer.Spawn(val2); } } } public class EclipseLite { public EclipseLite() { //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown bool updated = false; float baseBarrier = 1f; float stackBarrier = 0.25f; if (Configs.eclipseLiteBarrierBase.Value >= 0f || Configs.eclipseLiteBarrierStack.Value >= 0f) { if (Configs.eclipseLiteBarrierBase.Value >= 0f) { baseBarrier = Configs.eclipseLiteBarrierBase.Value; } if (Configs.eclipseLiteBarrierStack.Value >= 0f) { stackBarrier = Configs.eclipseLiteBarrierStack.Value; } bool hookFailed = true; CharacterBody.OnSkillCooldown += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BarrierOnCooldown") }) && val2.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.01f) })) { if (Configs.eclipseLiteBarrierBase.Value >= 0f) { val2.Next.Operand = Configs.eclipseLiteBarrierBase.Value / 100f; } int index = val2.Index; val2.Index = index + 1; if (Configs.eclipseLiteBarrierStack.Value >= 0f) { val2.Next.Operand = Configs.eclipseLiteBarrierStack.Value / 100f; } hookFailed = false; updated = true; } if (hookFailed) { Log.Error("Eclipse Lite barrier gain hook failed!"); } }; } if (Configs.eclipseLiteCountShields.Value) { bool hook2Failed = true; CharacterBody.OnSkillCooldown += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_maxHealth") })) { val.Remove(); val.EmitDelegate>((Func)((CharacterBody body) => Object.op_Implicit((Object)(object)body.healthComponent) ? body.healthComponent.fullCombinedHealth : body.maxHealth)); hook2Failed = false; } if (hook2Failed) { Log.Error("Eclipse Lite shield hook failed!"); } }; } if (updated) { UpdateDescription(baseBarrier, stackBarrier); } } private void UpdateDescription(float baseBarrier, float stackBarrier) { string text = baseBarrier.ToString().Replace(",", "."); string text2 = stackBarrier.ToString().Replace(",", "."); LanguageAPI.Add("ITEM_BARRIERONCOOLDOWN_DESC", "When a skill comes off cooldown, gain a temporary barrier for " + text + "% (+" + text2 + "% per stack) of your maximum health per second of the skill's base cooldown.", "en"); LanguageAPI.Add("ITEM_BARRIERONCOOLDOWN_DESC", $"Lorsque le temps de rechargement d'une compétence se termine, octroie une barrière temporaire à hauteur de {baseBarrier} % (+{stackBarrier} % par cumul) de vos PV max par seconde du temps de rechargement basique de la compétence.", "fr"); LanguageAPI.Add("ITEM_BARRIERONCOOLDOWN_DESC", "当技能冷却结束时,基于该技能基础冷却时间的每秒,获得相当于最大生命值" + text + "%(+" + text2 + "% 每层堆叠)的临时护盾 。", "zh-CN"); } } public class EmpathyCores { public static GameObject roboBallBuddyRedPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBuddy/RoboBallRedBuddyBody.prefab").WaitForCompletion(); public static GameObject roboBallBuddyGreenPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/RoboBallBuddy/RoboBallGreenBuddyBody.prefab").WaitForCompletion(); public static ItemDef teamSizeDamageBonus = Addressables.LoadAssetAsync((object)"RoR2/Base/TeamSizeDamageBonus/TeamSizeDamageBonus.asset").WaitForCompletion(); public EmpathyCores() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown if (!Configs.empathyCoresDamageTweak.Value) { return; } bool hookFailed = true; CharacterBody.RecalculateStats += (Manipulator)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_0044: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "TeamSizeDamageBonus") })) { val.Remove(); val.Emit
(OpCodes.Ldsfld, "emptyItemDef"); hookFailed = false; } if (hookFailed) { Log.Error("Empathy Cores damage tweak hook failed!"); } }; if (!hookFailed) { RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(GetStatCoefficients); FireEyeBeam.ModifyBullet += new hook_ModifyBullet(FireEyeBeam); } } private void GetStatCoefficients(CharacterBody body, StatHookEventArgs args) { //IL_000a: 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_0076: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body) || (!((Object)(object)BodyCatalog.GetBodyPrefab(body.bodyIndex) == (Object)(object)roboBallBuddyRedPrefab) && !((Object)(object)BodyCatalog.GetBodyPrefab(body.bodyIndex) == (Object)(object)roboBallBuddyGreenPrefab)) || !Object.op_Implicit((Object)(object)body.inventory)) { return; } int itemCountEffective = body.inventory.GetItemCountEffective(teamSizeDamageBonus); if (itemCountEffective > 0) { int num = Math.Max(TeamComponent.GetTeamMembers(body.teamComponent.teamIndex).Count - 1, 0); float multiplier = 1f + (float)(num * itemCountEffective); ProbeLaserDmgMultiplier component = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.multiplier = multiplier; return; } component = ((Component)body).gameObject.AddComponent(); component.multiplier = multiplier; } } private void FireEyeBeam(orig_ModifyBullet orig, FireEyeBeam self, BulletAttack bulletAttack) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ProbeLaserDmgMultiplier component = ((Component)((EntityState)self).characterBody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { bulletAttack.damage *= component.multiplier; } } orig.Invoke(self, bulletAttack); } } public class ProbeLaserDmgMultiplier : MonoBehaviour { public float multiplier = 1f; } public class FaradaySpur { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__0_3; public static Func <>9__0_4; public static Func <>9__0_5; public static Manipulator <>9__0_1; public static Func <>9__0_7; public static Func <>9__0_6; public static Manipulator <>9__0_2; internal bool <.ctor>b__0_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(JumpDamageStrikeBodyBehavior), "MoveSpeedVelocityPerCharge"); } internal void <.ctor>b__0_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003f: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JumpDamageStrikeBodyBehavior), "minDistancePerCharge") })) { val.Emit(OpCodes.Ldc_R4, Configs.faradaySpurChargeRate.Value); val.Emit(OpCodes.Div); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JumpDamageStrikeBodyBehavior), "maxDistancePerCharge") })) { val.Emit(OpCodes.Ldc_R4, Configs.faradaySpurChargeRate.Value); val.Emit(OpCodes.Div); flag = false; } } if (flag) { Log.Error("Faraday Spur charge rate multiplier hook failed!"); } } internal bool <.ctor>b__0_4(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(JumpDamageStrikeBodyBehavior), "minDistancePerCharge"); } internal bool <.ctor>b__0_5(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(JumpDamageStrikeBodyBehavior), "maxDistancePerCharge"); } internal void <.ctor>b__0_2(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); bool flag = true; if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Time", "get_deltaTime") })) { val.Remove(); val.EmitDelegate>((Func)(() => Time.fixedDeltaTime)); flag = false; } if (flag) { Log.Error("Faraday Spur charge rate fix hook failed!"); } } internal bool <.ctor>b__0_7(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Time", "get_deltaTime"); } internal float <.ctor>b__0_6() { return Time.fixedDeltaTime; } } public FaradaySpur() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0061: 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_006c: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_0096: 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_00a1: Expected O, but got Unknown if (Configs.faradaySpurMaxSpeed.Value >= 0f) { CharacterBody.RecalculateStats += (Manipulator)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_0046: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); bool flag3 = true; if (val5.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JumpDamageStrikeBodyBehavior), "MoveSpeedVelocityPerCharge") })) { val5.Remove(); val5.Emit(OpCodes.Ldc_R4, Configs.faradaySpurMaxSpeed.Value / 10000f); flag3 = false; } if (flag3) { Log.Error("Faraday Spur speed hook failed!"); } else { UpdateDescription(Configs.faradaySpurMaxSpeed.Value); } }; } if (Configs.faradaySpurChargeRate.Value >= 0f) { object obj = <>c.<>9__0_1; if (obj == null) { Manipulator val = 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_003f: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); bool flag2 = true; if (val4.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JumpDamageStrikeBodyBehavior), "minDistancePerCharge") })) { val4.Emit(OpCodes.Ldc_R4, Configs.faradaySpurChargeRate.Value); val4.Emit(OpCodes.Div); if (val4.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JumpDamageStrikeBodyBehavior), "maxDistancePerCharge") })) { val4.Emit(OpCodes.Ldc_R4, Configs.faradaySpurChargeRate.Value); val4.Emit(OpCodes.Div); flag2 = false; } } if (flag2) { Log.Error("Faraday Spur charge rate multiplier hook failed!"); } }; <>c.<>9__0_1 = val; obj = (object)val; } JumpDamageStrikeBodyBehavior.UpdateCharge += (Manipulator)obj; } if (Configs.faradaySpurChargeFix.Value) { object obj2 = <>c.<>9__0_2; 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 ILCursor val3 = new ILCursor(il); bool flag = true; if (val3.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Time", "get_deltaTime") })) { val3.Remove(); val3.EmitDelegate>((Func)(() => Time.fixedDeltaTime)); flag = false; } if (flag) { Log.Error("Faraday Spur charge rate fix hook failed!"); } }; <>c.<>9__0_2 = val2; obj2 = (object)val2; } JumpDamageStrikeBodyBehavior.UpdateCharge += (Manipulator)obj2; } if (Configs.faradaySpurAntiCrater.Value) { JumpDamageStrikeBodyBehavior.DischargeEffects += new hook_DischargeEffects(TriggerChargeJump); GlobalEventManager.OnCharacterHitGroundServer += new hook_OnCharacterHitGroundServer(RegisterFallDmg); } } private void RegisterFallDmg(orig_OnCharacterHitGroundServer orig, GlobalEventManager self, CharacterBody characterBody, HitGroundInfo hitGroundInfo) { //IL_0053: 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_0027: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)characterBody)) { FaradaySpurFallDmgResistance component = ((Component)characterBody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { hitGroundInfo.velocity.y = Mathf.Min(hitGroundInfo.velocity.y + (component.fallDmgResistance - characterBody.jumpPower), 0f); } } orig.Invoke(self, characterBody, hitGroundInfo); } private void TriggerChargeJump(orig_DischargeEffects orig, JumpDamageStrikeBodyBehavior self) { int buffCount = ((BaseItemBodyBehavior)self).body.GetBuffCount(Buffs.JumpDamageStrikeCharge); if (buffCount >= 25) { FaradaySpurFallDmgResistance faradaySpurFallDmgResistance = ((Component)((BaseItemBodyBehavior)self).body).gameObject.AddComponent(); faradaySpurFallDmgResistance.body = ((BaseItemBodyBehavior)self).body; faradaySpurFallDmgResistance.fallDmgResistance = ((BaseItemBodyBehavior)self).body.jumpPower; } orig.Invoke(self); } private void UpdateDescription(float maxSpeed) { string text = maxSpeed.ToString().Replace(",", "."); LanguageAPI.Add("ITEM_JUMPDAMAGESTRIKE_DESC", "Moving around builds up charge, granting up to +" + text + "% movement speed and +200% jump height at 100%. At 25% charge or higher, jumping triggers an explosive discharge for 400% (+280% per stack) damage in a 5m to 32.3m (+7.5m per stack) area.", "en"); LanguageAPI.Add("ITEM_JUMPDAMAGESTRIKE_DESC", $"Se déplacer accumule de la charge qui octroie jusqu'à +{maxSpeed} % de vitesse de déplacement et +200 % de hauteur de saut à 100 %. " + "Si vous avez au moins 25% de charge, sauter déclenche une décharge explosive qui inflige 400 % de dégâts (+280 % de dégâts par cumul) dans une zone de 5 à 32,3 m (+7,5 m par cumul).", "fr"); } } public class FaradaySpurFallDmgResistance : MonoBehaviour { public CharacterBody body; public float fallDmgResistance; private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)body)) { Object.Destroy((Object)(object)this); } if (!Object.op_Implicit((Object)(object)body.characterMotor)) { Object.Destroy((Object)(object)this); } if (body.characterMotor.isGrounded) { Object.Destroy((Object)(object)this); } } } public class FrostRelic { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__0_2; public static Func <>9__0_3; public static Func <>9__0_1; public static Manipulator <>9__0_0; internal void <.ctor>b__0_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; int num = default(int); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "crit") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num) })) { val.Remove(); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((IcicleAuraController self) => self.cachedOwnerInfo.characterBody.RollCrit())); flag = false; } if (flag) { Log.Error("Frost Relic Crit hook failed!"); } } internal bool <.ctor>b__0_2(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "crit"); } internal bool <.ctor>b__0_3(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool <.ctor>b__0_1(IcicleAuraController self) { return self.cachedOwnerInfo.characterBody.RollCrit(); } } public FrostRelic() { //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_0036: Expected O, but got Unknown if (!Configs.frostRelicCrit.Value) { return; } object obj = <>c.<>9__0_0; if (obj == null) { Manipulator val = 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_007a: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); bool flag = true; int num = default(int); if (val2.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "crit") }) && val2.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num) })) { val2.Remove(); val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)((IcicleAuraController self) => self.cachedOwnerInfo.characterBody.RollCrit())); flag = false; } if (flag) { Log.Error("Frost Relic Crit hook failed!"); } }; <>c.<>9__0_0 = val; obj = (object)val; } IcicleAuraController.FixedUpdate += (Manipulator)obj; } } public class GenesisLoop { public static EntityStateConfiguration detonateState = Addressables.LoadAssetAsync((object)"RoR2/Base/NovaOnLowHealth/EntityStates.VagrantNovaItem.DetonateState.asset").WaitForCompletion(); public GenesisLoop() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown if (Configs.genesisLoopProcCoeff.Value >= 0f) { detonateState.TryModifyFieldValue("blastProcCoefficient", Configs.genesisLoopProcCoeff.Value); } if (!Configs.genesisLoopLosTweak.Value) { return; } bool hookFailed = true; DetonateState.OnEnter += (Manipulator)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_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "losType") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(BlastAttack blast, DetonateState state) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)state).attachedBody) && Object.op_Implicit((Object)(object)((BaseBodyAttachmentState)state).attachedBody.teamComponent) && (int)((BaseBodyAttachmentState)state).attachedBody.teamComponent.teamIndex == 1) { blast.losType = (LoSType)0; } return blast; }); hookFailed = false; } if (hookFailed) { Log.Error("Genesis Loop line of sight hook failed!"); } }; } } public class GrowthNectar { public GrowthNectar() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown if (Configs.growthNectarBuffCount.Value < 0) { return; } bool hookFailed = true; CharacterBody.RecalculateStats += (Manipulator)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_0078: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int num = default(int); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(CharacterBody), "maxGrowthNectarBuffCount") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num) })) { val.Remove(); val.Emit(OpCodes.Ldc_I4, Configs.growthNectarBuffCount.Value); hookFailed = false; } if (hookFailed) { Log.Error("Growth Nectar buff count hook failed!"); } }; if (!hookFailed) { UpdateDescription(Configs.growthNectarBuffCount.Value); } } private void UpdateDescription(int buffCount) { string text = buffCount.ToString(); LanguageAPI.Add("ITEM_BOOSTALLSTATS_DESC", "Grants 4% increase to ALL stats for each buff, up to a maximum of " + text + " (+" + text + " per stack).", "en"); LanguageAPI.Add("ITEM_BOOSTALLSTATS_DESC", "每层增益使所有属性提升4%,最多叠加至" + text + "层(每层叠加+" + text + ")。", "zh-CN"); LanguageAPI.Add("ITEM_BOOSTALLSTATS_DESC", "Augmente TOUTES les statistiques de 4 % pour chaque bonus, jusqu'à " + text + " maximum (+" + text + " par cumul).", "fr"); } } public class HalcyonSeed { public static GameObject titanGoldBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/TitanGoldBody.prefab").WaitForCompletion(); public static GameObject titanGoldAllyMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Titan/TitanGoldAllyMaster.prefab").WaitForCompletion(); public HalcyonSeed() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Invalid comparison between Unknown and I4 if (Configs.allyAurelioniteTaunt.Value && !Object.op_Implicit((Object)(object)titanGoldBodyPrefab.GetComponent())) { titanGoldBodyPrefab.AddComponent(); } if (!(Configs.allyAurelioniteMinLaserRange.Value >= 0f)) { return; } AISkillDriver[] components = titanGoldAllyMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { if ((int)val.skillSlot == 3) { val.minDistance = Configs.allyAurelioniteMinLaserRange.Value; } } } } public class TitanGoldAllyTauntComponent : MonoBehaviour { public CharacterBody body; private float distractDelay = 1f; public float age = 0f; private void Awake() { body = ((Component)this).GetComponent(); } private void OnEnable() { //IL_001e: 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 (Object.op_Implicit((Object)(object)body.master) && body.master.masterIndex != MasterCatalog.FindMasterIndex(HalcyonSeed.titanGoldAllyMasterPrefab)) { Object.Destroy((Object)(object)this); } GlobalEventManager.onServerDamageDealt += OnServerDamageDealt; } private void OnDisable() { GlobalEventManager.onServerDamageDealt -= OnServerDamageDealt; } private void FixedUpdate() { if (age < distractDelay) { age += Time.fixedDeltaTime; if (age >= distractDelay) { TauntRadius(); } } } private void TauntRadius() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: 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_0023: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref val.teamMaskFilter)).RemoveTeam(body.teamComponent.teamIndex); val.filterByLoS = false; val.searchOrigin = body.corePosition; val.sortMode = (SortMode)0; val.maxDistanceFilter = Configs.allyAurelioniteTauntRange.Value; val.maxAngleFilter = 360f; val.searchDirection = Vector3.up; val.RefreshCandidates(); List list = val.GetResults().ToList(); foreach (HurtBox item in list) { if (!Object.op_Implicit((Object)(object)item.healthComponent) || !Object.op_Implicit((Object)(object)item.healthComponent.body)) { continue; } CharacterBody val2 = item.healthComponent.body; if (Object.op_Implicit((Object)(object)val2.master)) { BaseAI component = ((Component)val2.master).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Distract(component); } } } } private void OnServerDamageDealt(DamageReport report) { if (!(report.damageDealt <= 0f) && !((Object)(object)report.attackerBody != (Object)(object)body) && Object.op_Implicit((Object)(object)report.victimBody) && Object.op_Implicit((Object)(object)report.victimMaster)) { BaseAI component = ((Component)report.victimMaster).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Distract(component); } } } private void Distract(BaseAI ai) { if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)((Component)body).gameObject)) { ai.currentEnemy.gameObject = ((Component)body).gameObject; ai.enemyAttention = Math.Max(Configs.allyAurelioniteTauntDuration.Value, ai.enemyAttentionDuration); } } } public class HappiestMask { public HappiestMask() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown if (!(Configs.happiestMaskProcChance.Value >= 0f)) { return; } bool hookFailed = true; GlobalEventManager.OnCharacterDeath += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "GhostOnKill") }) && val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 7f) })) { val.Next.Operand = Configs.happiestMaskProcChance.Value; hookFailed = false; } if (hookFailed) { Log.Error("Happiest Mask Proc Chance hook failed!"); } }; if (!hookFailed) { UpdateDescription(Configs.happiestMaskProcChance.Value); } } private void UpdateDescription(float procChance) { string text = procChance.ToString().Replace(",", "."); LanguageAPI.Add("ITEM_GHOSTONKILL_DESC", "Killing enemies has a " + text + "% chance to spawn a ghost of the killed enemy with 1500% damage. Lasts 30s (+30s per stack).", "en"); LanguageAPI.Add("ITEM_GHOSTONKILL_DESC", $"En cas d'ennemi tué, vous avez {procChance} % de chance de faire apparaître un fantôme de votre victime qui inflige 1500 % de dégâts. " + "Dure 30 s (+30 s par cumul).", "fr"); LanguageAPI.Add("ITEM_GHOSTONKILL_DESC", "击杀敌人时有" + text + "%的几率生成该敌人的幽灵,幽灵拥有1500%伤害。持续30秒 (每层堆叠+30秒)。", "zh-CN"); } } public class HuntersHarpoon { public HuntersHarpoon() { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown bool updated = false; float baseDuration = 1f; float stackDuration = 0.5f; if (Configs.harpoonDurationBase.Value >= 0f || Configs.harpoonDurationStack.Value >= 0f) { if (Configs.harpoonDurationBase.Value >= 0f) { baseDuration = Configs.harpoonDurationBase.Value; } if (Configs.harpoonDurationStack.Value >= 0f) { stackDuration = Configs.harpoonDurationStack.Value; } bool hookFailed = true; GlobalEventManager.OnCharacterDeath += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "KillMoveSpeed") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f) })) { if (Configs.harpoonDurationBase.Value >= 0f) { val.Next.Operand = Configs.harpoonDurationBase.Value; } val.Index += 3; if (Configs.harpoonDurationStack.Value >= 0f) { val.Next.Operand = Configs.harpoonDurationStack.Value; } hookFailed = false; updated = true; } if (hookFailed) { Log.Error("Hunter's Harpoon duration hook failed!"); } }; } if (updated) { UpdateDescription(baseDuration, stackDuration); } } private void UpdateDescription(float baseDuration, float stackDuration) { string text = baseDuration.ToString().Replace(",", "."); string text2 = stackDuration.ToString().Replace(",", "."); LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", "Killing an enemy increases movement speed by 125%, fading over " + text + " (+" + text2 + " per stack) seconds.", "en"); LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", (baseDuration == 1f) ? $"Tuer un ennemi améliore la vitesse de déplacement de 125 %. L'effet disparaît au bout d'{baseDuration} seconde (+{stackDuration} par cumul)." : $"Tuer un ennemi améliore la vitesse de déplacement de 125 %. L'effet disparaît au bout de {baseDuration} secondes (+{stackDuration} par cumul).", "fr"); } } public class OldWarStealthkit { public static ItemDef stealthkit = Addressables.LoadAssetAsync((object)"RoR2/Base/Phasing/Phasing.asset").WaitForCompletion(); public OldWarStealthkit() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown bool updated = false; if (Configs.stealthKitThreshold.Value >= 0f) { bool hookFailed = true; PhasingBodyBehavior.FixedUpdate += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.HealthComponent", "get_isHealthLow") })) { val.Remove(); val.EmitDelegate>((Func)((HealthComponent health) => health.IsHealthBelowThreshold(Configs.stealthKitThreshold.Value))); hookFailed = false; updated = true; } if (hookFailed) { Log.Error("Old War Stealthkit threshold hook failed!"); } }; } if (updated) { if (Configs.stealthKitThreshold.Value != 0.25f) { stealthkit.tags = stealthkit.tags.RemoveFromArray((ItemTag)16); } UpdateDescription(Configs.stealthKitThreshold.Value * 100f); } } private void UpdateDescription(float threshold) { string text = threshold.ToString().Replace(",", "."); LanguageAPI.Add("ITEM_PHASING_DESC", "Falling below " + text + "% health causes you to gain 40% movement speed and invisibility for 5s. Recharges every 30 seconds (-50% per stack).", "en"); LanguageAPI.Add("ITEM_PHASING_DESC", $"Tomber en dessous de {threshold} % de vos PV vous fait gagner 40 % de vitesse de déplacement et vous rend invisible pendant 5 s. " + "Se recharge toutes les 30 secondes (-50 % par cumul).", "fr"); LanguageAPI.Add("ITEM_PHASING_DESC", "生命值低于" + text + "%时,获得40%移动速度和隐身,持续5秒。冷却时间30秒 (每层堆叠-50%)。", "zh-CN"); } } public class OrphanedCore { public static EntityStateConfiguration bestBuddyRam = Addressables.LoadAssetAsync((object)"RoR2/DLC3/FriendUnit/EntityStates.FriendUnit.KineticAura.asset").WaitForCompletion(); public static GameObject friendUnitMasterPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC3/FriendUnit/FriendUnitMaster.prefab").WaitForCompletion(); public static GameObject friendUnitBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC3/FriendUnit/FriendUnitBody.prefab").WaitForCompletion(); public OrphanedCore() { //IL_0158: 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) if (Configs.bestBuddyRamDamage.Value >= 0f) { bestBuddyRam.TryModifyFieldValue("chargeDamageCoefficient", Configs.bestBuddyRamDamage.Value); bestBuddyRam.TryModifyFieldValue("knockbackDamageCoefficient", Configs.bestBuddyRamDamage.Value * 2.5f); UpdateDescription(Configs.bestBuddyRamDamage.Value * 100f); } if (Configs.bestBuddyHitDetection.Value) { if (bestBuddyRam.TryGetFieldValueString("refreshTime", out var value) && value > 1f) { bestBuddyRam.TryModifyFieldValue("refreshTime", 1f); } CharacterBody component = friendUnitBodyPrefab.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } ModelLocator component2 = ((Component)component).GetComponent(); if (!Object.op_Implicit((Object)(object)component2)) { return; } Transform modelTransform = component2.modelTransform; if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } HitBoxGroup component3 = ((Component)modelTransform).GetComponent(); if (!Object.op_Implicit((Object)(object)component3)) { return; } HitBox[] hitBoxes = component3.hitBoxes; HitBox[] array = hitBoxes; foreach (HitBox val in array) { Transform transform = ((Component)val).transform; transform.localScale *= 2.5f; } } if (!Configs.bestBuddyBehaviorTweak.Value) { return; } if (bestBuddyRam.TryGetFieldValueString("initialHopVelocity", out var value2) && value2 < 1.2f) { bestBuddyRam.TryModifyFieldValue("initialHopVelocity", 1.2f); } if (bestBuddyRam.TryGetFieldValueString("lockonDistance", out var value3) && value3 < 40f) { bestBuddyRam.TryModifyFieldValue("lockonDistance", 50f); } if (bestBuddyRam.TryGetFieldValueString("lockonAngle", out var value4) && value4 < 360f) { bestBuddyRam.TryModifyFieldValue("lockonAngle", 360f); } if (bestBuddyRam.TryGetFieldValueString("recoilAmplitude", out var value5) && value5 < 2f) { bestBuddyRam.TryModifyFieldValue("recoilAmplitude", 2f); } BaseAI component4 = friendUnitMasterPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { component4.fullVision = true; component4.xrayVision = true; component4.copyLeaderTarget = true; } AISkillDriver[] components = friendUnitMasterPrefab.GetComponents(); AISkillDriver[] array2 = components; foreach (AISkillDriver val2 in array2) { switch (val2.customName) { case "KineticAura": if (val2.maxDistance < 50f) { val2.maxDistance = 50f; } val2.requireSkillReady = true; val2.shouldSprint = true; val2.resetCurrentEnemyOnNextDriverSelection = true; val2.activationRequiresTargetLoS = true; val2.selectionRequiresTargetLoS = true; break; case "StrafeAroundEnemy": if (val2.minDistance > 0f) { val2.minDistance = 0f; } if (val2.maxDistance < 20f) { val2.maxDistance = 20f; } break; case "NavigateToEnemy": if (val2.maxDistance < 60f) { val2.maxDistance = 60f; } val2.selectionRequiresAimTarget = false; val2.selectionRequiresTargetLoS = false; break; } } } private void UpdateDescription(float ramDamage) { string text = ramDamage.ToString().Replace(",", "."); LanguageAPI.Add("ITEM_PHYSICSPROJECTILE_DESC", "Gain a friendly Solus unit that launches itself at enemies for " + text + "% (+" + text + "% per stack) damage. The unit inherits your movement speed items and deals more damage the faster it moves. The unit can be pet to cleanse negative effects. Recharges after 15 seconds.", "en"); LanguageAPI.Add("ITEM_PHYSICSPROJECTILE_DESC", $"Octroie une unité Solus alliée qui se jette sur les ennemis pour infliger {ramDamage} % de dégâts (+{ramDamage} % par cumul). " + "L'unité nénéficie de vos objets de vitesse de déplacement et inflige davantage de dégâts proportionnellement à sa vitesse. L'unité peut être caressée pour annuler les effets négatifs. Se recharge après 15 s.", "fr"); LanguageAPI.Add("ITEM_PHYSICSPROJECTILE_DESC", "获得友善的独一单位,它会冲向敌人造成" + text + "% (+" + text + "%每层堆叠) 伤害。该单位继承你移动速度物品的效果,且移动速度越快,伤害越高。互动抚摸该单位可净化负面效果。冷却时间15秒。", "zh-CN"); } } public class ResonanceDisc { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_3; public static Func <>9__1_4; public static Func <>9__1_2; public static Manipulator <>9__1_0; public static hook_OnEnter <>9__1_1; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); bool flag = true; if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetEnemyTeams") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "EntityStates.LaserTurbine.LaserTurbineBaseState", "get_ownerBody") })) { val.RemoveRange(4); val.EmitDelegate>((Func)delegate(LaserTurbineBaseState baseState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_0049: Unknown result type (might be due to invalid IL or missing references) TeamMask allButNeutral = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)baseState.ownerBody) && Object.op_Implicit((Object)(object)baseState.ownerBody.teamComponent)) { ((TeamMask)(ref allButNeutral)).RemoveTeam(baseState.ownerBody.teamComponent.teamIndex); } return allButNeutral; }); flag = false; } if (flag) { Log.Error("Resonance Disc targeting hook failed!"); } } internal bool <.ctor>b__1_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetEnemyTeams"); } internal bool <.ctor>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "EntityStates.LaserTurbine.LaserTurbineBaseState", "get_ownerBody"); } internal TeamMask <.ctor>b__1_2(LaserTurbineBaseState baseState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_0049: Unknown result type (might be due to invalid IL or missing references) TeamMask allButNeutral = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)baseState.ownerBody) && Object.op_Implicit((Object)(object)baseState.ownerBody.teamComponent)) { ((TeamMask)(ref allButNeutral)).RemoveTeam(baseState.ownerBody.teamComponent.teamIndex); } return allButNeutral; } internal void <.ctor>b__1_1(orig_OnEnter orig, LaserTurbineBaseState self) { orig.Invoke(self); SimpleRotateToDirection component = ((EntityState)self).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.maxRotationSpeed = float.PositiveInfinity; component.smoothTime = 0.001f; } } } public static EntityStateConfiguration chargeBeamState = Addressables.LoadAssetAsync((object)"RoR2/Base/LaserTurbine/EntityStates.LaserTurbine.ChargeMainBeamState.asset").WaitForCompletion(); public ResonanceDisc() { //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_0036: Expected O, but got Unknown //IL_0075: 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_0080: Expected O, but got Unknown if (Configs.resonanceDiscTargeting.Value) { object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val3 = new ILCursor(il); bool flag = true; if (val3.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetEnemyTeams") }) && val3.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "EntityStates.LaserTurbine.LaserTurbineBaseState", "get_ownerBody") })) { val3.RemoveRange(4); val3.EmitDelegate>((Func)delegate(LaserTurbineBaseState baseState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_0049: Unknown result type (might be due to invalid IL or missing references) TeamMask allButNeutral = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)baseState.ownerBody) && Object.op_Implicit((Object)(object)baseState.ownerBody.teamComponent)) { ((TeamMask)(ref allButNeutral)).RemoveTeam(baseState.ownerBody.teamComponent.teamIndex); } return allButNeutral; }); flag = false; } if (flag) { Log.Error("Resonance Disc targeting hook failed!"); } }; <>c.<>9__1_0 = val; obj = (object)val; } AimState.OnEnter += (Manipulator)obj; } if (!Configs.resonanceDiscAccuracy.Value) { return; } chargeBeamState.TryModifyFieldValue("baseDuration", 0f); object obj2 = <>c.<>9__1_1; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, LaserTurbineBaseState self) { orig.Invoke(self); SimpleRotateToDirection component = ((EntityState)self).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.maxRotationSpeed = float.PositiveInfinity; component.smoothTime = 0.001f; } }; <>c.<>9__1_1 = val2; obj2 = (object)val2; } LaserTurbineBaseState.OnEnter += (hook_OnEnter)obj2; } } public class SonorousWhispers { public static ItemDef whispers = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/ItemDropChanceOnKill/ItemDropChanceOnKill.asset").WaitForCompletion(); public static GameObject solusWingBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC3/SolusWing/SolusWingBody.prefab").WaitForCompletion(); public static GameObject solusWingWeakPointBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC3/SolusWing/ExhaustPortWeakpointBody.prefab").WaitForCompletion(); public static GameObject solusHeartDownedBodyPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC3/SolusHeart/SolusHeartBody_Offering.prefab").WaitForCompletion(); public static WeightedSelection selector = new WeightedSelection(8); public static float tier1Weight = 0.6f; public static float tier2Weight = 0.38f; public static float tier3Weight = 0.02f; public SonorousWhispers() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!Configs.sonorousWhispersRework.Value) { return; } bool hookFailed = true; GlobalEventManager.OnCharacterDeath += (Manipulator)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_0044: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "ItemDropChanceOnKill") })) { val.Remove(); val.Emit
(OpCodes.Ldsfld, "emptyItemDef"); hookFailed = false; } if (hookFailed) { Log.Error("Sonorous Whispers Rework hook failed!"); } }; if (!hookFailed) { whispers.tags = whispers.tags.AddToArray((ItemTag)13); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; UpdateDescription(); } } private void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_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_0093: 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_009c: 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_00dd: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00e2: 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_014d: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: 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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0220: 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) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || damageReport == null) { return; } CharacterBody victimBody = damageReport.victimBody; CharacterMaster attackerMaster = damageReport.attackerMaster; TeamIndex attackerTeamIndex = damageReport.attackerTeamIndex; if (!Object.op_Implicit((Object)(object)victimBody) || !Object.op_Implicit((Object)(object)attackerMaster)) { return; } GameObject val = null; if (Object.op_Implicit((Object)(object)damageReport.victim)) { val = ((Component)damageReport.victim).gameObject; } Vector3 val2 = Vector3.zero; Quaternion val3 = Quaternion.identity; Transform transform = val.transform; if (Object.op_Implicit((Object)(object)transform)) { val2 = transform.position; val3 = transform.rotation; } InputBankTest val4 = null; if (Object.op_Implicit((Object)(object)victimBody)) { val4 = victimBody.inputBank; } Ray val5 = (Ray)(Object.op_Implicit((Object)(object)val4) ? val4.GetAimRay() : new Ray(val2, val3 * Vector3.forward)); int num = 0; ReadOnlyCollection readOnlyInstancesList = CharacterMaster.readOnlyInstancesList; for (int i = 0; i < readOnlyInstancesList.Count; i++) { CharacterMaster val6 = readOnlyInstancesList[i]; if (val6.teamIndex == attackerTeamIndex) { num += val6.inventory.GetItemCountEffective(Items.ItemDropChanceOnKill); } } if (num > 0 && (victimBody.isBoss || victimBody.bodyIndex == BodyCatalog.FindBodyIndex(solusHeartDownedBodyPrefab))) { Vector3 val7 = ((victimBody.bodyIndex == BodyCatalog.FindBodyIndex(solusWingBodyPrefab)) ? (Vector3.up * 40f + ((Ray)(ref val5)).direction * 20f) : ((victimBody.bodyIndex != BodyCatalog.FindBodyIndex(solusWingWeakPointBodyPrefab)) ? (Vector3.up * 20f + ((Ray)(ref val5)).direction * 2f) : (Vector3.up * 30f + ((Ray)(ref val5)).direction * 15f))); PickupDropletController.CreatePickupDroplet(GenerateDrop(num), val2 + Vector3.up * 1.5f, val7, false, false); } } private UniquePickup GenerateDrop(int num) { //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_0075: Unknown result type (might be due to invalid IL or missing references) selector.Clear(); Add(Run.instance.availableTier1DropList, tier1Weight); Add(Run.instance.availableTier2DropList, tier2Weight * (float)num); Add(Run.instance.availableTier3DropList, tier3Weight * Mathf.Pow((float)num, 2f)); return PickupDropTable.GeneratePickupFromWeightedSelection(Run.instance.runRNG, selector); } private void Add(List sourceDropList, float listWeight) { //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) //IL_003e: 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) if (listWeight <= 0f || sourceDropList.Count == 0) { return; } float num = listWeight / (float)sourceDropList.Count; foreach (PickupIndex sourceDrop in sourceDropList) { selector.AddChoice(new UniquePickup(sourceDrop), num); } } private void UpdateDescription() { string text = (tier1Weight * 100f).ToString().Replace(",", "."); string text2 = (tier2Weight * 100f).ToString().Replace(",", "."); string text3 = (tier3Weight * 100f).ToString().Replace(",", "."); LanguageAPI.Add("ITEM_ITEMDROPCHANCEONKILL_PICKUP", "Bosses drop an item on kill.", "en"); LanguageAPI.Add("ITEM_ITEMDROPCHANCEONKILL_DESC", "Bosses drop an item (" + text + "%/" + text2 + "%/" + text3 + "%) on kill. (Increases rarity chances of the items per stack).", "en"); LanguageAPI.Add("ITEM_ITEMDROPCHANCEONKILL_PICKUP", "Obtenez un objet lorsqu'un boss est éliminé.", "fr"); LanguageAPI.Add("ITEM_ITEMDROPCHANCEONKILL_DESC", $"Les boss vaincus font apparaître un objet ({tier1Weight * 100f} %/{tier2Weight * 100f} %/{tier3Weight * 100f} %). " + "(La rareté de l'objet augmente à chaque cumul).", "fr"); LanguageAPI.Add("ITEM_ITEMDROPCHANCEONKILL_PICKUP", "击杀首领时会额外掉落一件物品。", "zh-CN"); LanguageAPI.Add("ITEM_ITEMDROPCHANCEONKILL_DESC", "击杀首领时掉落一件物品(" + text + "%/" + text2 + "%/" + text3 + "%)。每层堆叠提高道具稀有度概率。", "zh-CN"); } } public class WakeOfVultures { public WakeOfVultures() { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown bool updated = false; float baseDuration = 8f; float stackDuration = 5f; if (Configs.wakeOfVulturesDurationBase.Value >= 0f || Configs.wakeOfVulturesDurationStack.Value >= 0f) { if (Configs.wakeOfVulturesDurationBase.Value >= 0f) { baseDuration = Configs.wakeOfVulturesDurationBase.Value; } if (Configs.wakeOfVulturesDurationStack.Value >= 0f) { stackDuration = Configs.wakeOfVulturesDurationStack.Value; } bool hookFailed = true; GlobalEventManager.OnCharacterDeath += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "HeadHunter") }) && val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3f) })) { if (Configs.wakeOfVulturesDurationBase.Value >= 0f) { val.Next.Operand = baseDuration - stackDuration; } int index = val.Index; val.Index = index + 1; if (Configs.wakeOfVulturesDurationStack.Value >= 0f) { val.Next.Operand = stackDuration; } hookFailed = false; updated = true; } if (hookFailed) { Log.Error("Wake of Vultures hook failed!"); } }; } if (updated) { UpdateDescription(baseDuration, stackDuration); } } private void UpdateDescription(float baseDuration, float stackDuration) { string text = baseDuration.ToString().Replace(",", "."); string text2 = stackDuration.ToString().Replace(",", "."); LanguageAPI.Add("ITEM_HEADHUNTER_DESC", "Gain the power of any killed elite monster for " + text + "s (+" + text2 + "s per stack).", "en"); LanguageAPI.Add("ITEM_HEADHUNTER_DESC", $"Offre la puissance de n'importe quel monstre d'élite tué pendant {baseDuration} s (+{stackDuration} s par cumul).", "fr"); LanguageAPI.Add("ITEM_HEADHUNTER_DESC", "获得所击杀精英怪物的力量,持续" + text + "秒 (每层堆叠+" + text2 + "秒)。", "zh-CN"); } } public class WarBonds { public static ItemDef warBonds = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/BarrageOnBoss/BarrageOnBoss.asset").WaitForCompletion(); public WarBonds() { if (!Configs.warBondsInheritable.Value) { warBonds.tags = warBonds.tags.AddToArray((ItemTag)13); } } } public class WaxQuail { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__0_1; public static Func <>9__0_2; public static Manipulator <>9__0_0; internal void <.ctor>b__0_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); bool flag = true; ILLabel val2 = default(ILLabel); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "get_isSprinting") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val2) })) { val.Remove(); flag = false; } if (flag) { Log.Error("Wax Quail Multi Jump hook failed!"); } } internal bool <.ctor>b__0_1(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "get_isSprinting"); } internal bool <.ctor>b__0_2(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBr(x, ref val); } } public WaxQuail() { //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_0036: Expected O, but got Unknown if (!Configs.waxQuailMultiJump.Value) { return; } object obj = <>c.<>9__0_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); bool flag = true; ILLabel val3 = default(ILLabel); if (val2.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "get_isSprinting") }) && val2.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val3) })) { val2.Remove(); flag = false; } if (flag) { Log.Error("Wax Quail Multi Jump hook failed!"); } }; <>c.<>9__0_0 = val; obj = (object)val; } GenericCharacterMain.ProcessJump_bool += (Manipulator)obj; } } 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); } } [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.*/)] [BepInPlugin("Samuel17.SuperCyanTweaks", "SuperCyanTweaks", "1.1.0")] public class Main : BaseUnityPlugin { public static ItemDef emptyItemDef; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); Configs.Init(((BaseUnityPlugin)this).Config); new AlloyHunter(); new AlloyWorshipUnit(); new AlphaConstruct(); new Beetle(); new BighornBison(); new ClayApothecary(); new FalseSon(); new Geep(); new GeneralEnemies(); new Grandparent(); new GreaterWisp(); new Gup(); new Halcyonite(); new Imp(); new Lemurian(); new LunarExploder(); new LunarWisp(); new MiniMushrum(); new Mithrix(); new ScorchWorm(); new SolusControlUnit(); new SolusDistributor(); new SolusProbe(); new SolusProspector(); new SolusTransporter(); new StoneTitan(); new VoidJailer(); new VoidReaver(); new EclipseLite(); new EmpathyCores(); new FaradaySpur(); new FrostRelic(); new GenesisLoop(); new GrowthNectar(); new HalcyonSeed(); new HappiestMask(); new HuntersHarpoon(); new OldWarStealthkit(); new OrphanedCore(); new ResonanceDisc(); new SonorousWhispers(); new WakeOfVultures(); new WarBonds(); new WaxQuail(); new EccentricVase(); new ForeignFruit(); new Molotov6Pack(); new EquipmentDrone(); new GunnerTurret(); new AccessNode(); new DroneScrapper(); new ShrineOfOrder(); new Commencement(); new ConduitCanyon(); new PretendersPrecipice(); new RallypointDelta(); new Drifter(); new Eclipse(); new PerfectedElite(); new StrawPairy(); new Xenobacteria(); } } internal class Eclipse { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__0_2; public static Func <>9__0_3; public static Func <>9__0_4; public static Func <>9__0_5; public static Manipulator <>9__0_0; public static Func <>9__0_6; public static Func <>9__0_7; public static Func <>9__0_8; public static Func <>9__0_9; public static Manipulator <>9__0_1; internal void <.ctor>b__0_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; int num = default(int); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElusiveAntlersBuff") }) && val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Run", "get_selectedDifficulty") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.TeamComponent", "get_teamIndex") }) && val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num) })) { val.Next.OpCode = OpCodes.Ldc_I4_1; int index = val.Index; val.Index = index + 1; val.Next.OpCode = OpCodes.Beq; flag = false; } if (flag) { Log.Error("Eclipse 4 hook failed!"); } } internal bool <.ctor>b__0_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElusiveAntlersBuff"); } internal bool <.ctor>b__0_3(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Run", "get_selectedDifficulty"); } internal bool <.ctor>b__0_4(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RoR2.TeamComponent", "get_teamIndex"); } internal bool <.ctor>b__0_5(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal void <.ctor>b__0_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; int num = default(int); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(DroneWeaponsBoostBehavior), "attackSpeedPerStack") }) && val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Run", "get_selectedDifficulty") }) && val.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.TeamComponent", "get_teamIndex") }) && val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num) })) { val.Next.OpCode = OpCodes.Ldc_I4_1; int index = val.Index; val.Index = index + 1; val.Next.OpCode = OpCodes.Beq; flag = false; } if (flag) { Log.Error("Eclipse 7 hook failed!"); } } internal bool <.ctor>b__0_6(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(DroneWeaponsBoostBehavior), "attackSpeedPerStack"); } internal bool <.ctor>b__0_7(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Run", "get_selectedDifficulty"); } internal bool <.ctor>b__0_8(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RoR2.TeamComponent", "get_teamIndex"); } internal bool <.ctor>b__0_9(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } } public Eclipse() { //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_0036: Expected O, but got Unknown //IL_0050: 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_005b: Expected O, but got Unknown if (!Configs.eclipseTeamTweak.Value) { return; } object obj = <>c.<>9__0_0; if (obj == null) { Manipulator val = 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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); bool flag2 = true; int num2 = default(int); if (val4.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElusiveAntlersBuff") }) && val4.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Run", "get_selectedDifficulty") }) && val4.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.TeamComponent", "get_teamIndex") }) && val4.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2) })) { val4.Next.OpCode = OpCodes.Ldc_I4_1; int index2 = val4.Index; val4.Index = index2 + 1; val4.Next.OpCode = OpCodes.Beq; flag2 = false; } if (flag2) { Log.Error("Eclipse 4 hook failed!"); } }; <>c.<>9__0_0 = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; object obj2 = <>c.<>9__0_1; 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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); bool flag = true; int num = default(int); if (val3.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(DroneWeaponsBoostBehavior), "attackSpeedPerStack") }) && val3.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Run", "get_selectedDifficulty") }) && val3.TryGotoPrev((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.TeamComponent", "get_teamIndex") }) && val3.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num) })) { val3.Next.OpCode = OpCodes.Ldc_I4_1; int index = val3.Index; val3.Index = index + 1; val3.Next.OpCode = OpCodes.Beq; flag = false; } if (flag) { Log.Error("Eclipse 7 hook failed!"); } }; <>c.<>9__0_1 = val2; obj2 = (object)val2; } CharacterBody.RecalculateStats += (Manipulator)obj2; } } public class PerfectedElite { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__1_2; public static Func <>9__1_3; public static Func <>9__1_1; public static Manipulator <>9__1_0; internal void <.ctor>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = true; float num = default(float); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Cripple") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)((float duration, DamageInfo damageInfo) => duration * damageInfo.procCoefficient)); flag = false; } if (flag) { Log.Error("Cripple duration hook failed!"); } } internal bool <.ctor>b__1_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Cripple"); } internal bool <.ctor>b__1_3(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal float <.ctor>b__1_1(float duration, DamageInfo damageInfo) { return duration * damageInfo.procCoefficient; } } public static EliteDef edLunar = Addressables.LoadAssetAsync((object)"RoR2/Base/EliteLunar/edLunar.asset").WaitForCompletion(); public PerfectedElite() { //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_0036: Expected O, but got Unknown if (Configs.perfectedCrippleProcCoeff.Value) { object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = 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_0073: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); bool flag = true; float num = default(float); if (val2.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Cripple") }) && val2.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { val2.Emit(OpCodes.Ldarg_1); val2.EmitDelegate>((Func)((float duration, DamageInfo damageInfo) => duration * damageInfo.procCoefficient)); flag = false; } if (flag) { Log.Error("Cripple duration hook failed!"); } }; <>c.<>9__1_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; } if (Configs.perfectedHealthMultiplier.Value >= 0f) { edLunar.healthBoostCoefficient = Configs.perfectedHealthMultiplier.Value; } } } public class StrawPairy { public static float sqrAttackDistance = 441f; public StrawPairy() { if (Configs.strawPairyAITweak.Value) { RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate { RegisterModifiedGup(); }); } if (!Configs.strawPairyIsFood.Value) { return; } ((ResourceAvailability)(ref ItemCatalog.availability)).CallWhenAvailable((Action)delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("SEEKINTHEVOID_STRAWPAIRY_NAME")); if (Object.op_Implicit((Object)(object)itemDef)) { itemDef.tags = itemDef.tags.AddToArray((ItemTag)28); } }); } private void RegisterModifiedGup() { GameObject val = MasterCatalog.FindMasterPrefab("modifiedGupMaster"); GameObject modifiedGupBodyPrefab = BodyCatalog.FindBodyPrefab("modifiedGupBody"); if (Object.op_Implicit((Object)(object)val)) { AdjustSkillDrivers(val); } else { if (!Object.op_Implicit((Object)(object)modifiedGupBodyPrefab)) { return; } CharacterMaster.onCharacterMasterDiscovered += delegate(CharacterMaster master) { if ((Object)(object)master.bodyPrefab == (Object)(object)modifiedGupBodyPrefab) { AdjustSkillDrivers(((Component)master).gameObject); } }; } } private void AdjustSkillDrivers(GameObject masterObject) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)masterObject)) { return; } masterObject.AddComponent(); AISkillDriver[] components = masterObject.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { val.selectionRequiresTargetNonFlier = false; string customName = val.customName; string text = customName; if (!(text == "FollowNodeGraphToTarget")) { if (text == "Spike") { val.moveTargetType = (TargetType)3; val.maxDistance *= 0.7f; sqrAttackDistance = Mathf.Pow(val.maxDistance, 2f); } } else { val.moveTargetType = (TargetType)3; } } } } public class ModifiedGupController : MonoBehaviour { public static float updateInterval = 1f; public static float timer = 0f; private BaseAI ai; private BullseyeSearch enemySearch; private void Awake() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown if (NetworkServer.active) { enemySearch = new BullseyeSearch(); } } private void Start() { ai = ((Component)this).gameObject.GetComponent(); } private void FixedUpdate() { //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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_00e5: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0221: 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_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0253: 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_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ai) && ai.customTarget != null) { if ((Object)(object)ai.customTarget.gameObject != (Object)null) { HurtBox bestHurtBox = ai.GetBestHurtBox(ai.customTarget.gameObject); if (Object.op_Implicit((Object)(object)bestHurtBox)) { ai.customTarget.lastKnownBullseyePosition = ((Component)ai.GetBestHurtBox(ai.customTarget.gameObject)).transform.position; ai.customTarget.lastKnownBullseyePositionTime = FixedTimeStamp.now; } else { ai.customTarget.lastKnownBullseyePosition = null; ai.customTarget.lastKnownBullseyePositionTime = FixedTimeStamp.negativeInfinity; } } else { ai.customTarget.lastKnownBullseyePosition = null; ai.customTarget.lastKnownBullseyePositionTime = FixedTimeStamp.negativeInfinity; } } timer += Time.fixedDeltaTime; if (timer < updateInterval) { return; } timer -= updateInterval; for (int i = 0; i < 2; i++) { if (!Object.op_Implicit((Object)(object)ai)) { break; } if (!Object.op_Implicit((Object)(object)ai.body)) { break; } if (!Object.op_Implicit((Object)(object)ai.bodyInputBank)) { break; } if (ai.customTarget == null) { break; } if (i == 1 && (Object)(object)ai.customTarget.gameObject != (Object)null) { break; } Ray aimRay = ai.bodyInputBank.GetAimRay(); enemySearch.viewer = ai.body; enemySearch.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref enemySearch.teamMaskFilter)).RemoveTeam(ai.master.teamIndex); enemySearch.sortMode = (SortMode)1; enemySearch.minDistanceFilter = 0f; enemySearch.maxDistanceFilter = float.PositiveInfinity; enemySearch.searchOrigin = ai.bodyInputBank.aimOrigin; enemySearch.searchDirection = ai.bodyInputBank.aimDirection; enemySearch.maxAngleFilter = 360f; enemySearch.filterByLoS = false; enemySearch.RefreshCandidates(); IEnumerable source = ((i != 0) ? enemySearch.GetResults() : enemySearch.GetResults().Where(TargetPassesFilters)); HurtBox val = source.FirstOrDefault(); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.healthComponent)) { ai.customTarget._gameObject = ((Component)val.healthComponent).gameObject; ai.customTarget.bestHurtBox = val; ai.customTarget.unset = false; } else { ai.customTarget._gameObject = null; ai.customTarget.bestHurtBox = null; ai.customTarget.unset = true; } } } private bool TargetPassesFilters(HurtBox arg) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)arg.healthComponent) && Object.op_Implicit((Object)(object)arg.healthComponent.body)) { int result; if (arg.healthComponent.body.isFlying) { Vector3 val = ((Component)arg).transform.position - enemySearch.searchOrigin; result = ((((Vector3)(ref val)).sqrMagnitude <= StrawPairy.sqrAttackDistance) ? 1 : 0); } else { result = 1; } return (byte)result != 0; } return false; } } public class Xenobacteria { public Xenobacteria() { if (!Configs.xenobacteriaRetier.Value) { return; } ((ResourceAvailability)(ref ItemCatalog.availability)).CallWhenAvailable((Action)delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("Xenobacteria")); if (Object.op_Implicit((Object)(object)itemDef)) { itemDef.tier = (ItemTier)7; } }); } } public class Commencement { public static GameObject designPulsePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/moon2/MoonBatteryDesignPulse.prefab").WaitForCompletion(); public Commencement() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown if (Configs.moonCauldronTweak.Value) { Stage.onStageStartGlobal += OnStageStartGlobal; } if (Configs.moonInitialMonsterCredits.Value >= 0) { Helpers.AddSceneMonsterCredits(Configs.moonInitialMonsterCredits.Value - 900, (Stage)65536, ""); } if (Configs.moonPillarRadius.Value >= 0f || Configs.moonPillarMassDuration.Value >= 0f || Configs.moonPillarMonsterCredits.Value >= 0) { HoldoutZoneController.Awake += new hook_Awake(HoldoutZoneController_Awake); if (Configs.moonPillarRadius.Value >= 0f) { designPulsePrefab.GetComponent().finalRadius = Mathf.Max(Configs.moonPillarRadius.Value, 20f); } } } private void OnStageStartGlobal(Stage stage) { //IL_00a5: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || ((Object)(object)SceneInfo.instance.sceneDef != (Object)(object)SceneCatalog.FindSceneDef("moon2") && (Object)(object)SceneInfo.instance.sceneDef != (Object)(object)SceneCatalog.FindSceneDef("moon"))) { return; } List instancesList = InstanceTracker.GetInstancesList(); foreach (PurchaseInteraction item in instancesList) { if (!(item.displayNameToken == "BAZAAR_CAULDRON_NAME")) { continue; } ShopTerminalBehavior component = ((Component)item).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { continue; } _ = component.pickup; if (true) { component.bannedItemTag = (ItemTag)(component.bannedItemTag | 0x14); ItemDef itemDef = ItemCatalog.GetItemDef(((PickupIndex)(ref component.pickup.pickupIndex)).pickupDef.itemIndex); if (Object.op_Implicit((Object)(object)itemDef) && itemDef.ContainsTag((ItemTag)20)) { component.GenerateNewPickupServer(); } } } } private void HoldoutZoneController_Awake(orig_Awake orig, HoldoutZoneController self) { switch (self.inBoundsObjectiveToken) { case "OBJECTIVE_MOON_BATTERY_MASS": AdjustChargeRadius(self); AdjustMonsterCredits(self); if (Configs.moonPillarMassDuration.Value >= 0f) { self.baseChargeDuration = Configs.moonPillarMassDuration.Value; } break; case "OBJECTIVE_MOON_BATTERY_DESIGN": AdjustChargeRadius(self); AdjustMonsterCredits(self); break; case "OBJECTIVE_MOON_BATTERY_BLOOD": AdjustChargeRadius(self); AdjustMonsterCredits(self); break; case "OBJECTIVE_MOON_BATTERY_SOUL": AdjustChargeRadius(self); AdjustMonsterCredits(self); break; } orig.Invoke(self); } private void AdjustChargeRadius(HoldoutZoneController holdout) { if (Configs.moonPillarRadius.Value >= 0f) { holdout.chargeRadiusDelta *= Configs.moonPillarRadius.Value / holdout.baseRadius; holdout.baseRadius = Configs.moonPillarRadius.Value; } } private void AdjustMonsterCredits(HoldoutZoneController holdout) { if (Configs.moonPillarMonsterCredits.Value >= 0) { CombatDirector component = ((Component)holdout).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetMonsterCredit((float)Configs.moonPillarMonsterCredits.Value); } } } } public class ConduitCanyon { public ConduitCanyon() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown if (Configs.conduitCanyonCollectiveCost.Value >= 0f || Configs.conduitCanyonShrineCreditLeader.Value >= 0 || Configs.conduitCanyonShrineCreditSupport.Value >= 0 || EclipseRevampedCompat.enabled) { SceneDirector.onPrePopulateMonstersSceneServer += OnPrePopulateMonsters; } if (Configs.conduitCanyonCollectiveDebtFix.Value) { PromoteSpawnedEnemyToElite.OnEnemySpawn += new hook_OnEnemySpawn(DebtFix); } if (Configs.conduitCanyonShrineCreditSupportMult.Value >= 0f) { bool hookFailed = true; ShrineCombatTroopBehavior.Init += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); float num = default(float); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.ShrineCombatTroopBehavior", "get_totalSupportMonsterCredit") }) && val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { val.Next.Operand = 1f / Configs.conduitCanyonShrineCreditSupportMult.Value; hookFailed = false; } if (hookFailed) { Log.Error("Collective Combat Shrine support hook failed!"); } }; } if (Configs.conduitCanyonCollectiveRewardFix.Value) { PromoteSpawnedEnemyToElite.PromoteThisBody += new hook_PromoteThisBody(RewardFix); } } private void OnPrePopulateMonsters(SceneDirector sceneDirector) { //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Invalid comparison between Unknown and I4 //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || (Object)(object)SceneInfo.instance.sceneDef != (Object)(object)SceneCatalog.FindSceneDef("conduitcanyon")) { return; } if (Configs.conduitCanyonCollectiveCost.Value >= 0f || EclipseRevampedCompat.enabled) { GameObject val = GameObject.Find("/Director/"); if (Object.op_Implicit((Object)(object)val)) { PromoteSpawnedEnemyToElite component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { float num = ((Configs.conduitCanyonCollectiveCost.Value >= 0f) ? Configs.conduitCanyonCollectiveCost.Value : component.customEliteCostMultiplier); if (EclipseRevampedCompat.enabled && Object.op_Implicit((Object)(object)Run.instance) && (int)Run.instance.selectedDifficulty >= 5) { num *= 0.8f; } component.customEliteCostMultiplier = num; } } } List instancesList = InstanceTracker.GetInstancesList(); foreach (PurchaseInteraction item in instancesList) { if (!(item.displayNameToken == "COLLECTIVE_SHRINE_NAME")) { continue; } ShrineCombatTroopBehavior component2 = ((Component)item).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component2)) { continue; } if (Configs.conduitCanyonCollectiveCost.Value >= 0f || EclipseRevampedCompat.enabled) { float num2 = ((Configs.conduitCanyonCollectiveCost.Value >= 0f) ? Configs.conduitCanyonCollectiveCost.Value : component2.leaderEliteCostCoeff); if (EclipseRevampedCompat.enabled && Object.op_Implicit((Object)(object)Run.instance) && (int)Run.instance.selectedDifficulty >= 5) { num2 *= 0.8f; } component2.leaderEliteCostCoeff = num2; } if (Configs.conduitCanyonShrineCreditLeader.Value >= 0) { component2.baseLeaderMonsterCredit = Configs.conduitCanyonShrineCreditLeader.Value; } if (Configs.conduitCanyonShrineCreditSupport.Value >= 0) { component2.baseSupportMonsterCredit = Configs.conduitCanyonShrineCreditSupport.Value; } } } private void DebtFix(orig_OnEnemySpawn orig, PromoteSpawnedEnemyToElite self, GameObject spawn, CombatDirector combatDir) { CharacterBody val = default(CharacterBody); if (self.TryResolveCharacterBodyFromSpawn(spawn, ref val) && Object.op_Implicit((Object)(object)combatDir) && Object.op_Implicit((Object)(object)combatDir.lastAttemptedMonsterCard.spawnCard)) { float num = Mathf.Max((float)combatDir.lastAttemptedMonsterCard.spawnCard.directorCreditCost * self.customEliteCostMultiplier - val.cost, 0f); if (num > combatDir.monsterCredit) { return; } } orig.Invoke(self, spawn, combatDir); } private void RewardFix(orig_PromoteThisBody orig, PromoteSpawnedEnemyToElite self, CharacterBody spawnedBody) { orig.Invoke(self, spawnedBody); GameObject gameObject = ((Component)spawnedBody).gameObject; DeathRewards component = gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.expReward = (uint)Mathf.Max(1f, (float)component.expReward * self.customEliteCostMultiplier); component.goldReward = (uint)Mathf.Max(1f, (float)component.goldReward * self.customEliteCostMultiplier); } } } public class PretendersPrecipice { public static InteractableSpawnCard iscShrineChance = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineChance/iscShrineChance.asset").WaitForCompletion(); public static InteractableSpawnCard iscShrineBlood = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineBlood/iscShrineBlood.asset").WaitForCompletion(); public static InteractableSpawnCard iscShrineBoss = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineBoss/iscShrineBoss.asset").WaitForCompletion(); public static InteractableSpawnCard iscShrineChanceSnowy = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineChance/iscShrineChanceSnowy.asset").WaitForCompletion(); public static InteractableSpawnCard iscShrineBloodSnowy = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineBlood/iscShrineBloodSnowy.asset").WaitForCompletion(); public static InteractableSpawnCard iscShrineBossSnowy = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineBoss/iscShrineBossSnowy.asset").WaitForCompletion(); public static DirectorCardCategorySelection dccsNestInteractables = Addressables.LoadAssetAsync((object)"RoR2/DLC3/nest/dccsNestInteractables.asset").WaitForCompletion(); public PretendersPrecipice() { //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_0037: Unknown result type (might be due to invalid IL or missing references) if (!Configs.nestSnowyShrines.Value) { return; } Category[] categories = dccsNestInteractables.categories; foreach (Category val in categories) { DirectorCard[] cards = val.cards; foreach (DirectorCard val2 in cards) { SpawnCard spawnCard = val2.GetSpawnCard(); if ((Object)(object)spawnCard == (Object)(object)iscShrineChance) { val2.spawnCard = (SpawnCard)(object)iscShrineChanceSnowy; } else if ((Object)(object)spawnCard == (Object)(object)iscShrineBlood) { val2.spawnCard = (SpawnCard)(object)iscShrineBloodSnowy; } else if ((Object)(object)spawnCard == (Object)(object)iscShrineBoss) { val2.spawnCard = (SpawnCard)(object)iscShrineBossSnowy; } } } } } public class RallypointDelta { public static Sprite fanSpeedBuffSprite = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/texMovespeedBuffIcon.tif").WaitForCompletion(); public static BuffDef fanSpeedBuffDef; public RallypointDelta() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00e5: Expected O, but got Unknown if (Configs.fanSpeedBoost.Value) { fanSpeedBuffDef = ScriptableObject.CreateInstance(); fanSpeedBuffDef.buffColor = new Color(0.1254902f, 0.5019608f, 0.8745098f, 1f); fanSpeedBuffDef.canStack = false; fanSpeedBuffDef.eliteDef = null; fanSpeedBuffDef.iconSprite = fanSpeedBuffSprite; fanSpeedBuffDef.ignoreGrowthNectar = false; fanSpeedBuffDef.isCooldown = false; fanSpeedBuffDef.isDebuff = false; fanSpeedBuffDef.isDOT = false; fanSpeedBuffDef.isHidden = false; fanSpeedBuffDef.stackingDisplayMethod = (StackingDisplayMethod)0; fanSpeedBuffDef.startSfx = null; ((Object)fanSpeedBuffDef).name = "SuperCyanTweaks_FanSpeedBuff"; ContentAddition.AddBuffDef(fanSpeedBuffDef); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(GetStatCoefficients); Stage.onStageStartGlobal += OnStageStartGlobal; } } private void GetStatCoefficients(CharacterBody body, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)body) && body.HasBuff(fanSpeedBuffDef)) { args.moveSpeedMultAdd += Configs.fanBuffStrength.Value / 100f; } } private void OnStageStartGlobal(Stage stage) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || (Object)(object)SceneInfo.instance.sceneDef != (Object)(object)SceneCatalog.FindSceneDef("frozenwall")) { return; } GameObject val = GameObject.Find("/PERMUTATION: Human Fan/"); if (!Object.op_Implicit((Object)(object)val)) { return; } foreach (Transform item in val.transform) { Transform val2 = item; AdjustFan(((Component)val2).gameObject); } } private void AdjustFan(GameObject fan) { Transform val = fan.transform.Find("mdlHumanFan"); if (val != null) { Transform val2 = ((Component)val).transform.Find("JumpVolume"); if (val2 != null) { ((Component)val2).gameObject.AddComponent(); } } } } public class OnUseFan : MonoBehaviour { public JumpVolume jumpVolume; public void Awake() { jumpVolume = ((Component)this).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)jumpVolume)) { jumpVolume.onJump.AddListener((UnityAction)OnJump); } } public void OnJump(CharacterBody body) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.teamComponent) && (int)body.teamComponent.teamIndex == 1) { body.AddTimedBuff(RallypointDelta.fanSpeedBuffDef, Configs.fanBuffDuration.Value); } } } public class Drifter { public static EntityStateConfiguration cubeLaunched = Addressables.LoadAssetAsync((object)"RoR2/DLC3/Drifter/EntityStates.JunkCube.Launched.asset").WaitForCompletion(); public static DrifterSkillDef cleanupSkill = Addressables.LoadAssetAsync((object)"RoR2/DLC3/Drifter/Cleanup.asset").WaitForCompletion(); public Drifter() { if (Configs.drifterCubeSearchAngle.Value >= 0f) { cubeLaunched.TryModifyFieldValue("searchAngle", Configs.drifterCubeSearchAngle.Value); } if (Configs.drifterCubeSearchDistance.Value >= 0f) { cubeLaunched.TryModifyFieldValue("searchDistance", Configs.drifterCubeSearchDistance.Value); } if (Configs.drifterCleanupCooldownTweak.Value) { ((SkillDef)cleanupSkill).resetCooldownTimerOnUse = false; } } } public static class Utils { public static void ReorderSkillDrivers(this GameObject master, int targetIdx) { AISkillDriver[] components = master.GetComponents(); master.ReorderSkillDrivers(components, components.Length - 1, targetIdx); } public static void ReorderSkillDrivers(this GameObject master, AISkillDriver targetSkill, int targetIdx) { AISkillDriver[] components = master.GetComponents(); master.ReorderSkillDrivers(components, Array.IndexOf(components, targetSkill), targetIdx); } public static void ReorderSkillDrivers(this GameObject master, AISkillDriver[] skills, int currentIdx, int targetIdx) { if (currentIdx < 0 || currentIdx >= skills.Length) { Log.Error($"{currentIdx} index not found or out of range. Must be less than {skills.Length}"); return; } string targetName = skills[currentIdx].customName; if (targetIdx < 0 || targetIdx >= skills.Length) { Log.Error($"Unable to reorder skilldriver {targetName} into position {targetIdx}. target must be less than {skills.Length}"); return; } if (targetIdx == currentIdx) { Log.Warning($"Skilldriver {targetName} already has the target index of {targetIdx}"); return; } Dictionary dictionary = skills.Where((AISkillDriver s) => (Object)(object)s.nextHighPriorityOverride != (Object)null).ToDictionary((AISkillDriver s) => s.customName, (AISkillDriver s) => s.nextHighPriorityOverride.customName); if (targetIdx > currentIdx) { master.AddComponentCopy(skills[currentIdx]); Object.DestroyImmediate((Object)(object)skills[currentIdx]); } for (int i = targetIdx; i < skills.Length; i++) { if (i != currentIdx) { master.AddComponentCopy(skills[i]); Object.DestroyImmediate((Object)(object)skills[i]); } } skills = master.GetComponents(); AISkillDriver val = ((IEnumerable)skills).FirstOrDefault((Func)((AISkillDriver s) => s.customName == targetName)); if ((Object)(object)val != (Object)null && Array.IndexOf(skills, val) == targetIdx) { Log.Debug($"Successfully set {targetName} to {targetIdx}"); } else { Log.Error($"Done fucked it up on {targetName} with {targetIdx}"); } if (!dictionary.Any()) { return; } foreach (AISkillDriver val2 in skills) { if (Object.op_Implicit((Object)(object)val2) && dictionary.TryGetValue(val2.customName, out var target)) { AISkillDriver val3 = ((IEnumerable)skills).FirstOrDefault((Func)((AISkillDriver s) => s.customName == target)); if ((Object)(object)val3 == (Object)null) { Log.Error("Unable to reset skill override for " + val2.customName + " targeting " + target); continue; } val2.nextHighPriorityOverride = val3; Log.Debug("successfully reset override for " + val2.customName + " targeting " + target); } } } public static void RemoveComponent(this GameObject go) where T : Component { T val = default(T); if (go.TryGetComponent(ref val)) { Object.Destroy((Object)(object)val); } } public static void RemoveComponents(this GameObject go) where T : Component { T[] components = go.GetComponents(); for (int i = 0; i < components.Length; i++) { Object.Destroy((Object)(object)components[i]); } } public static T GetCopyOf(this Component comp, T other) where T : Component { Type type = ((object)comp).GetType(); if (type != ((object)other).GetType()) { return default(T); } BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; PropertyInfo[] properties = type.GetProperties(bindingAttr); PropertyInfo[] array = properties; foreach (PropertyInfo propertyInfo in array) { if (propertyInfo.CanWrite) { try { propertyInfo.SetValue(comp, propertyInfo.GetValue(other, null), null); } catch { } } } FieldInfo[] fields = type.GetFields(bindingAttr); FieldInfo[] array2 = fields; foreach (FieldInfo fieldInfo in array2) { fieldInfo.SetValue(comp, fieldInfo.GetValue(other)); } return (T)(object)((comp is T) ? comp : null); } public static T GetCopyOf(this ScriptableObject comp, T other) where T : ScriptableObject { Type type = ((object)comp).GetType(); if (type != ((object)other).GetType()) { return default(T); } BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; PropertyInfo[] properties = type.GetProperties(bindingAttr); PropertyInfo[] array = properties; foreach (PropertyInfo propertyInfo in array) { if (propertyInfo.CanWrite) { try { propertyInfo.SetValue(comp, propertyInfo.GetValue(other, null), null); } catch { } } } FieldInfo[] fields = type.GetFields(bindingAttr); FieldInfo[] array2 = fields; foreach (FieldInfo fieldInfo in array2) { fieldInfo.SetValue(comp, fieldInfo.GetValue(other)); } return (T)(object)((comp is T) ? comp : null); } public static T AddComponentCopy(this GameObject go, T toAdd) where T : Component { return ((Component)(object)go.AddComponent()).GetCopyOf(toAdd); } public static bool TryModifyFieldValue(this EntityStateConfiguration entityStateConfiguration, string fieldName, T value) { ref SerializedField orCreateField = ref ((SerializedFieldCollection)(ref entityStateConfiguration.serializedFieldsCollection)).GetOrCreateField(fieldName); if (Object.op_Implicit(orCreateField.fieldValue.objectValue) && typeof(Object).IsAssignableFrom(typeof(T))) { ref Object objectValue = ref orCreateField.fieldValue.objectValue; object obj = value; objectValue = (Object)((obj is Object) ? obj : null); return true; } if (orCreateField.fieldValue.stringValue != null && StringSerializer.CanSerializeType(typeof(T))) { orCreateField.fieldValue.stringValue = StringSerializer.Serialize(typeof(T), (object)value); return true; } Debug.LogError((object)("Failed to modify field " + fieldName)); return false; } public static bool TryGetFieldValue(this EntityStateConfiguration entityStateConfiguration, string fieldName, out T value) where T : Object { ref SerializedField orCreateField = ref ((SerializedFieldCollection)(ref entityStateConfiguration.serializedFieldsCollection)).GetOrCreateField(fieldName); if (Object.op_Implicit(orCreateField.fieldValue.objectValue) && typeof(Object).IsAssignableFrom(typeof(T))) { value = (T)(object)orCreateField.fieldValue.objectValue; return true; } if (!string.IsNullOrEmpty(orCreateField.fieldValue.stringValue)) { Debug.LogError((object)("Failed to return " + fieldName + " as an Object, try getting the string value instead.")); } else { Debug.LogError((object)("Field is null " + fieldName)); } value = default(T); return false; } public static bool TryGetFieldValueString(this EntityStateConfiguration entityStateConfiguration, string fieldName, out T value) where T : IEquatable { ref SerializedField orCreateField = ref ((SerializedFieldCollection)(ref entityStateConfiguration.serializedFieldsCollection)).GetOrCreateField(fieldName); if (orCreateField.fieldValue.stringValue != null && StringSerializer.CanSerializeType(typeof(T))) { value = (T)StringSerializer.Deserialize(typeof(T), orCreateField.fieldValue.stringValue); return true; } if (Object.op_Implicit(orCreateField.fieldValue.objectValue)) { Debug.LogError((object)("Failed to return " + fieldName + " as a string, try getting the Object value instead.")); } else { Debug.LogError((object)("Field is null " + fieldName)); } value = default(T); return false; } public static T[] AddToArray(this T[] array, params T[] items) { return (array ?? Enumerable.Empty()).Concat(items).ToArray(); } public static T[] RemoveFromArray(this T[] array, params T[] items) { return (array ?? Enumerable.Empty()).Except(items).ToArray(); } }