using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AmpMod.Modules;
using AmpMod.SkillStates;
using AmpMod.SkillStates.Amp;
using AmpMod.SkillStates.BaseStates;
using AmpMod.SkillStates.Nemesis_Amp;
using ArsonistMod;
using ArsonistMod.Content.Controllers;
using ArsonistMod.Modules;
using ArsonistMod.Modules.Characters;
using ArsonistMod.Modules.Networking;
using ArsonistMod.Modules.Survivors;
using ArsonistMod.SkillStates;
using ArsonistMod.SkillStates.Arsonist.Secondary;
using ArsonistMod.SkillStates.ZeroPointBlast;
using BaseMod.Changes;
using BaseMod.Modules;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using BubbetsItems;
using BubbetsItems.Items.BarrierItems;
using EclipseRevamped;
using EnemyAbilities.Abilities.Nullifier;
using EntityStates;
using EntityStates.BrotherMonster;
using EntityStates.Drone.DroneJunk;
using FathomlessVoidling.VoidlingEntityStates;
using FathomlessVoidling.VoidlingEntityStates.Phase3;
using FlatItemBuff.Items;
using GrooveSaladSpikestripContent.Content;
using HG;
using HarmonyLib;
using IL.RoR2;
using IL.RoR2.Items;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using Morris.Components;
using Morris.Modules.NPC;
using On.EntityStates.BrotherMonster;
using On.RoR2;
using On.RoR2.Items;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using RoR2;
using RoR2.Audio;
using RoR2.ContentManagement;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using SS2;
using SS2.Components;
using SS2.Items;
using SeekingTheVoid;
using SkillStates.Ghoul;
using SkillStates.Morris;
using SkillStates.SharedStates;
using Skillsmas.Skills.Croco;
using TooManyItems.Items.Lunar;
using TooManyItems.Items.Tier1;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("AmpMod")]
[assembly: IgnoresAccessChecksTo("ArsonistMod")]
[assembly: IgnoresAccessChecksTo("BubbetsItems")]
[assembly: IgnoresAccessChecksTo("EclipseRevamped")]
[assembly: IgnoresAccessChecksTo("EnemyAbilities")]
[assembly: IgnoresAccessChecksTo("FathomlessVoidling")]
[assembly: IgnoresAccessChecksTo("FlatItemBuff")]
[assembly: IgnoresAccessChecksTo("GrooveSaladSpikestripContent")]
[assembly: IgnoresAccessChecksTo("Morris")]
[assembly: IgnoresAccessChecksTo("SeekingTheVoid")]
[assembly: IgnoresAccessChecksTo("SkillsmasPlugin")]
[assembly: IgnoresAccessChecksTo("Starstorm2")]
[assembly: IgnoresAccessChecksTo("TooManyItems")]
[assembly: IgnoresAccessChecksTo("VanillaVoid")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BaseMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BaseMod")]
[assembly: AssemblyTitle("BaseMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace BaseMod
{
[BepInPlugin("com.Bloonjitsu7.BloonModpackBaseMod", "BloonModpackBaseMod", "1.6.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class BaseMain : BaseUnityPlugin
{
public const string PluginGUID = "Bloonjitsu7.BloonModpackBaseModPlugin";
public const string PluginAuthor = "Bloonjitsu7";
public const string PluginName = "BloonModpackBaseModPlugin";
public const string PluginVersion = "1.6.0";
public void Awake()
{
Log.Init(((BaseUnityPlugin)this).Logger);
new ContentPacks().Initialize();
BaseChanges baseChanges = new BaseChanges();
baseChanges.Initialize();
}
}
internal static class Log
{
private static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
internal static void Debug(object data)
{
_logSource.LogDebug(data);
}
internal static void Error(object data)
{
_logSource.LogError(data);
}
internal static void Fatal(object data)
{
_logSource.LogFatal(data);
}
internal static void Info(object data)
{
_logSource.LogInfo(data);
}
internal static void Message(object data)
{
_logSource.LogMessage(data);
}
internal static void Warning(object data)
{
_logSource.LogWarning(data);
}
}
}
namespace BaseMod.Modules
{
public static class DamageTypes
{
public static ModdedDamageType arsonistLifesteal = DamageAPI.ReserveDamageType();
}
public static class States
{
internal static List<Type> entityStates = new List<Type>();
internal static void RegisterStates()
{
entityStates.Add(typeof(MasochismFire));
}
}
public static class Projectiles
{
internal static GameObject masoFireBall;
public static GameObject baseFireBall = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_LemurianBruiser.LemurianBigFireball_prefab).WaitForCompletion();
internal static List<GameObject> projectilePrefabs = new List<GameObject>();
internal static bool HasArsonistMod => Chainloader.PluginInfos.ContainsKey("com.PopcornFactory.Arsonist");
internal static void RegisterProjectiles()
{
if (HasArsonistMod)
{
CreateMasochismFireBall();
projectilePrefabs.Add(masoFireBall);
}
else
{
Log.Warning("Arsonist Not Found!");
}
}
private static void CreateMasochismFireBall()
{
//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_00d4: 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_00e0: Unknown result type (might be due to invalid IL or missing references)
masoFireBall = PrefabAPI.InstantiateClone(baseFireBall, "masoFireBall", true);
Rigidbody val = masoFireBall.GetComponent<Rigidbody>();
if (!Object.op_Implicit((Object)(object)val))
{
val = masoFireBall.AddComponent<Rigidbody>();
}
Object.DestroyImmediate((Object)(object)masoFireBall.GetComponent<ProjectileImpactExplosion>());
ProjectileImpactExplosion val2 = masoFireBall.AddComponent<ProjectileImpactExplosion>();
InitializeImpactExplosion(val2);
((ProjectileExplosion)val2).blastRadius = 5f;
((ProjectileExplosion)val2).blastProcCoefficient = 0.8f;
val2.destroyOnEnemy = true;
val2.destroyOnWorld = true;
val2.lifetime = 4f;
val2.impactEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_LemurianBruiser.OmniExplosionVFXLemurianBruiserFireballImpact_prefab).WaitForCompletion();
((ProjectileExplosion)val2).falloffModel = (FalloffModel)3;
((ProjectileExplosion)val2).blastDamageCoefficient = 1f;
val2.timerAfterImpact = false;
val2.lifetimeAfterImpact = 0f;
((Component)val2).GetComponent<ProjectileDamage>().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1);
ProjectileController component = masoFireBall.GetComponent<ProjectileController>();
component.rigidbody = val;
component.rigidbody.useGravity = false;
component.rigidbody.mass = 1f;
component.procCoefficient = 0.8f;
component.ghostPrefab = AssetsArsonist.fireballWeakGhost;
component.startSound = "";
}
private static void InitializeImpactExplosion(ProjectileImpactExplosion projectileImpactExplosion)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_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)
((ProjectileExplosion)projectileImpactExplosion).blastDamageCoefficient = 1f;
((ProjectileExplosion)projectileImpactExplosion).blastProcCoefficient = 1f;
((ProjectileExplosion)projectileImpactExplosion).blastRadius = 1f;
((ProjectileExplosion)projectileImpactExplosion).bonusBlastForce = Vector3.zero;
((ProjectileExplosion)projectileImpactExplosion).childrenCount = 0;
((ProjectileExplosion)projectileImpactExplosion).childrenDamageCoefficient = 0f;
((ProjectileExplosion)projectileImpactExplosion).childrenProjectilePrefab = null;
projectileImpactExplosion.destroyOnEnemy = true;
projectileImpactExplosion.destroyOnWorld = true;
projectileImpactExplosion.detonateOnEnemy = true;
projectileImpactExplosion.impactOnWorld = true;
((ProjectileExplosion)projectileImpactExplosion).falloffModel = (FalloffModel)0;
((ProjectileExplosion)projectileImpactExplosion).fireChildren = false;
projectileImpactExplosion.lifetime = 0f;
projectileImpactExplosion.lifetimeAfterImpact = 0f;
projectileImpactExplosion.lifetimeRandomOffset = 0f;
projectileImpactExplosion.offsetForLifetimeExpiredSound = 0f;
projectileImpactExplosion.timerAfterImpact = false;
((Component)projectileImpactExplosion).GetComponent<ProjectileDamage>().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1);
}
}
public static class Buffs
{
internal static List<BuffDef> buffDefs = new List<BuffDef>();
internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden)
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
((Object)val).name = buffName;
val.buffColor = buffColor;
val.canStack = canStack;
val.isDebuff = isDebuff;
val.eliteDef = null;
val.iconSprite = buffIcon;
val.isCooldown = isCooldown;
val.isHidden = isHidden;
buffDefs.Add(val);
return val;
}
}
internal class ContentPacks : IContentPackProvider
{
internal ContentPack contentPack = new ContentPack();
public string identifier => "com.Bloonjitsu7.BloonModpackBaseMod";
public void Initialize()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
States.RegisterStates();
Projectiles.RegisterProjectiles();
ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
}
private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider)
{
addContentPackProvider.Invoke((IContentPackProvider)(object)this);
}
public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
{
contentPack.identifier = identifier;
contentPack.buffDefs.Add(Buffs.buffDefs.ToArray());
contentPack.entityStateTypes.Add(States.entityStates.ToArray());
contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.ToArray());
args.ReportProgress(1f);
yield break;
}
public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
{
ContentPack.Copy(contentPack, args.output);
args.ReportProgress(1f);
yield break;
}
public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
{
args.ReportProgress(1f);
yield break;
}
}
}
namespace BaseMod.Changes
{
public class BaseChanges
{
private Hook e1Hook;
private Hook platedHook;
internal static bool HasFlatItemBuff => Chainloader.PluginInfos.ContainsKey("com.kking117.FlatItemBuff");
internal static bool HasBubbetsItems => Chainloader.PluginInfos.ContainsKey("bubbet.bubbetsitems");
internal static bool HasStarstorm => Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm");
internal static bool HasSeekingTheVoid => Chainloader.PluginInfos.ContainsKey("acanthi.SeekingTheVoid");
internal static bool HasTooManyItems => Chainloader.PluginInfos.ContainsKey("shirograhm.TooManyItems");
internal static bool HasVanillaVoid => Chainloader.PluginInfos.ContainsKey("com.Zenithrium.vanillaVoid");
internal static bool HasAmpMod => Chainloader.PluginInfos.ContainsKey("com.NeonThink.Amp");
internal static bool HasMorticianMod => Chainloader.PluginInfos.ContainsKey("com.Bog.Morris");
internal static bool HasArsonistMod => Chainloader.PluginInfos.ContainsKey("com.PopcornFactory.Arsonist");
internal static bool HasSkillsmas => Chainloader.PluginInfos.ContainsKey("com.themysticsword.skillsmas");
internal static bool HasFathomlessVoidling => Chainloader.PluginInfos.ContainsKey("com.Nuxlar.FathomlessVoidling");
internal static bool HasEnemyAbilities => Chainloader.PluginInfos.ContainsKey("Skeletogne.EnemyAbilities");
internal static bool HasEclipseRevamped => Chainloader.PluginInfos.ContainsKey("Nuxlar.EclipseRevamped");
internal static bool HasSpikestrip => Chainloader.PluginInfos.ContainsKey("com.groovesalad.GrooveSaladSpikestripContent");
public void Initialize()
{
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Expected O, but got Unknown
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Expected O, but got Unknown
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Expected O, but got Unknown
ItemChanges itemChanges = new ItemChanges();
itemChanges.Initialize();
SurvivorChanges survivorChanges = new SurvivorChanges();
survivorChanges.Initialize();
BossChanges bossChanges = new BossChanges();
bossChanges.Initialize();
Harmony val = new Harmony("com.Bloonjitsu7.BloonModpackBaseMod");
val.PatchAll();
if (!HasEclipseRevamped)
{
Log.Warning("EclipseRevamped Content Disabled");
}
if (HasEclipseRevamped && Main.shouldChangeE1.Value)
{
MethodInfo methodInfo = AccessTools.Method(typeof(Main), "AddNewE1", (Type[])null, (Type[])null);
e1Hook = new Hook((MethodBase)methodInfo, (Delegate)new Action<Action<Main, ILContext>, Main, ILContext>(OnAddNewE1));
ChargingState.OnEnter += new Manipulator(IL_NewE1);
}
if (HasSpikestrip)
{
MethodInfo methodInfo2 = AccessTools.Method(typeof(PlatedElite), "OnHitEnemyServer", (Type[])null, (Type[])null);
platedHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action<Action<PlatedElite, DamageInfo, GameObject>, PlatedElite, DamageInfo, GameObject>(OnPlatedHit));
}
}
private void OnPlatedHit(Action<PlatedElite, DamageInfo, GameObject> orig, PlatedElite self, DamageInfo damageInfo, GameObject victim)
{
}
private void OnAddNewE1(Action<Main, ILContext> orig, Main self, ILContext il)
{
Log.Message("Success!");
}
private void IL_NewE1(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_010e: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)2;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[5]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 600f),
(Instruction x) => ILPatternMatchingExt.MatchCall<Run>(x, "get_instance"),
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(Run), "compensatedDifficultyCoefficient"),
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f),
(Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Mathf), "Pow")
}))
{
val.Index -= 4;
val.Emit(OpCodes.Ldarg_0);
val.EmitDelegate<Func<TeleporterInteraction, float>>((Func<TeleporterInteraction, float>)delegate
{
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Invalid comparison between Unknown and I4
float result = 1f;
if (!Object.op_Implicit((Object)(object)Run.instance))
{
Log.Warning("Run Instance Failed");
return result;
}
DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty;
if ((int)selectedDifficulty >= 3)
{
Log.Message("Eclipse Scaling Added To Teleporter!");
result = 1.5f;
}
return result;
});
val.Emit(OpCodes.Mul);
}
else
{
Log.Warning("Hook 1 Failed!");
}
}
}
public class MeatBuffVFX : MonoBehaviour
{
public TemporaryVisualEffect effect;
}
public class ItemChanges
{
private float coffeeBuffDuration = 5f;
private float boneDuration = 5f;
private float boneDurationStack = 1f;
private float boneProcChance = 6f;
private float boneProcStack = 1.5f;
private float duplicatorDropChance = 8f;
private int duplicatorDuration = 30;
private float bungusTimer = 0.5f;
private float lanternSpeed = 0.08f;
private float lanternSpeedStack = 0f;
private float lanternRegen = 0.8f;
private float lanternRegenStack = 0f;
private int lanternAlly = 4;
private int lanternAllyStack = 2;
private float lanternRadius = 40f;
private float lanternRadiusStack = 4f;
private float jetBootsDamage = 4.5f;
private float jetBootsDamageStack = 1.5f;
private float apRoundsEliteDamage = 0.05f;
private float vultureEliteDamage = 0.5f;
private float vultureDropChance = 5f;
private float vultureHealPercent = 0.2f;
private float milkHealth = 20f;
private float meatHealth = 30f;
private float meatDuration = 3f;
private float meatDurationStack = 1f;
private float meatRegenAmount = 1.5f;
private int meatMax = 2;
private int meatMaxStack = 1;
private static float loafRegenChance = 20f;
private float multikillDuration = 9f;
private float multikillDamage = 0.03f;
private float multikillDamageStack = 0.005f;
private float crucifixBurnPercent = 0.2f;
private float crucifixBurnStack = 0.1f;
private float crucifixResist = 0.95f;
private float crucifixHealReduction = 0.5f;
private int ignitionBurnBonus = 2;
private float ignitionCooldownTime = 8f;
private float ignitionCooldownStack = 0.15f;
private float coreDuration = 2f;
private float coreDurationStack = 0.5f;
private float coreSlowChance = 6f;
private float scytheHeal = 20f;
private float scytheHealStack = 20f;
private float scytheCooldownTime = 2f;
private float raincoatCooldownTime = 15f;
private float raincoatCooldownStack = 0.2f;
private float raincoatBarrier = 0.25f;
private float raincoatDuration = 3f;
private Hook toxicHook;
private Hook coffeeDamageHook;
private Hook coffeeStatHook;
private Hook coffeePickupHook;
private Hook boneKillHook;
private Hook bonePickupHook;
private ILHook lampFireHook;
private ILHook jetBootsHook;
private Hook echoStatHook;
private Hook milkHook;
private Hook loafHook;
private Hook crucifixHook;
public static BuffDef MeatBuff = Buffs.MeatRegenBoost;
public static BuffDef IgnitionCooldown;
public static BuffDef ScytheCooldown;
public static GameObject MeatBuffVFX = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/JunkContent/RegenBoostEffect.prefab").WaitForCompletion();
private Xoroshiro128Plus rng;
public void Initialize()
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Expected O, but got Unknown
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Expected O, but got Unknown
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Expected O, but got Unknown
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Expected O, but got Unknown
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Expected O, but got Unknown
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Expected O, but got Unknown
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Expected O, but got Unknown
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Expected O, but got Unknown
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Expected O, but got Unknown
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_0127: Expected O, but got Unknown
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Expected O, but got Unknown
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
//IL_014b: Expected O, but got Unknown
//IL_0165: Unknown result type (might be due to invalid IL or missing references)
//IL_016f: Expected O, but got Unknown
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
//IL_0181: Expected O, but got Unknown
//IL_0189: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Expected O, but got Unknown
//IL_019b: Unknown result type (might be due to invalid IL or missing references)
//IL_01a5: Expected O, but got Unknown
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Expected O, but got Unknown
//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
//IL_01c9: Expected O, but got Unknown
//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
//IL_01db: Expected O, but got Unknown
//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Expected O, but got Unknown
//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
//IL_02be: Expected O, but got Unknown
//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
//IL_02c3: Expected O, but got Unknown
//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
//IL_02ef: Expected O, but got Unknown
//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
//IL_02f4: Expected O, but got Unknown
//IL_031b: Unknown result type (might be due to invalid IL or missing references)
//IL_0325: Expected O, but got Unknown
//IL_034c: Unknown result type (might be due to invalid IL or missing references)
//IL_0356: Expected O, but got Unknown
//IL_037d: Unknown result type (might be due to invalid IL or missing references)
//IL_0387: Expected O, but got Unknown
//IL_03df: Unknown result type (might be due to invalid IL or missing references)
//IL_03e9: Expected O, but got Unknown
//IL_0410: Unknown result type (might be due to invalid IL or missing references)
//IL_041a: Expected O, but got Unknown
//IL_044e: Unknown result type (might be due to invalid IL or missing references)
//IL_0458: Expected O, but got Unknown
//IL_048c: Unknown result type (might be due to invalid IL or missing references)
//IL_0496: Expected O, but got Unknown
//IL_04ad: Unknown result type (might be due to invalid IL or missing references)
//IL_04b7: Expected O, but got Unknown
//IL_04df: Unknown result type (might be due to invalid IL or missing references)
//IL_04e9: Expected O, but got Unknown
//IL_0545: Unknown result type (might be due to invalid IL or missing references)
//IL_054f: Expected O, but got Unknown
//IL_058a: Unknown result type (might be due to invalid IL or missing references)
//IL_0594: Expected O, but got Unknown
CreateBuffs();
DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += new Manipulator(IL_DotBypassArmor);
TeamManager.GetLongstandingSolitudeItemCostScale += new hook_GetLongstandingSolitudeItemCostScale(OnItemCostScale);
ExperienceManager.AwardExperience += new hook_AwardExperience(OnAwardExperience);
AttackSpeedPerNearbyCollider.UpdateValues += new hook_UpdateValues(OnLanternUpdate);
AttackSpeedPerNearbyCollider.Start += new hook_Start(OnLanternStart);
CharacterBody.RecalculateStats += new Manipulator(IL_Lantern);
SetStateOnHurt.OnTakeDamageServer += new Manipulator(IL_StunDamage);
CharacterBody.GetNotMoving += new Manipulator(IL_NotMoving);
ShrineChanceBehavior.AddShrineStack += new Manipulator(IL_ChanceShrine);
GlobalEventManager.onCharacterDeathGlobal += OnDuplicatorDeath;
ItemDef.AttemptGrant += new Manipulator(IL_GrantTempItem);
DuplicatorBehavior.CalculateNewItemDecayDuration += new Manipulator(IL_Duplicator);
HealthComponent.TakeDamageProcess += new Manipulator(IL_EliteDamage);
GlobalEventManager.OnCharacterDeath += new Manipulator(IL_EliteDeath);
GlobalEventManager.onCharacterDeathGlobal += OnEliteDeath;
CharacterBody.AddIncreasedDamageMultiKillTime += new Manipulator(IL_MultikillTimer);
CharacterBody.RecalculateStats += new Manipulator(IL_MultikillStats);
CharacterBody.UpdateAllTemporaryVisualEffects += new Manipulator(IL_MeatEffect);
GlobalEventManager.onCharacterDeathGlobal += OnMeatDeath;
StrengthenBurnUtils.CheckDotForUpgrade += new Manipulator(IL_StrengthenBurn);
RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnRecalcStats);
GlobalEventManager.ProcessHitEnemy += new Manipulator(IL_ProcessHit);
GlobalEventManager.OnCrit += new Manipulator(IL_OnCrit);
ImmuneToDebuffBehavior.TryApplyOverride += new hook_TryApplyOverride(OnRaincoatOverride);
ImmuneToDebuffBehavior.FixedUpdate += new hook_FixedUpdate(OnRaincoatUpdate);
ImmuneToDebuffBehavior.OverrideDebuff_BuffDef_CharacterBody += new hook_OverrideDebuff_BuffDef_CharacterBody(OnRaincoatDebuff);
ImmuneToDebuffBehavior.OverrideDot += new hook_OverrideDot(OnRaincoatDoT);
UpdateText();
if (!BaseChanges.HasStarstorm)
{
Log.Warning("Starstorm2 Content Disabled");
}
if (!BaseChanges.HasBubbetsItems)
{
Log.Warning("BubbetsItems Content Disabled");
}
if (!BaseChanges.HasFlatItemBuff)
{
Log.Warning("FlatItemBuff Content Disabled");
}
if (!BaseChanges.HasSeekingTheVoid)
{
Log.Warning("SeekingTheVoid Content Disabled");
}
if (!BaseChanges.HasTooManyItems)
{
Log.Warning("TooManyItems Content Disabled");
}
if (!BaseChanges.HasVanillaVoid)
{
Log.Warning("VanillaVoid Content Disabled");
}
if (BaseChanges.HasStarstorm)
{
MethodInfo methodInfo = AccessTools.Method(typeof(JetBoots), "DoJumpAuthority", (Type[])null, (Type[])null);
jetBootsHook = new ILHook((MethodBase)methodInfo, new Manipulator(IL_JetBoots));
MethodInfo methodInfo2 = AccessTools.Method(typeof(LampBehavior), "IncrementFire", (Type[])null, (Type[])null);
lampFireHook = new ILHook((MethodBase)methodInfo2, new Manipulator(IL_LampFire));
MethodInfo methodInfo3 = AccessTools.Method(typeof(CoffeeBag), "CalculateStatsCoffeeBag", (Type[])null, (Type[])null);
coffeeStatHook = new Hook((MethodBase)methodInfo3, (Delegate)new Action<Action<CoffeeBag, CharacterBody, StatHookEventArgs>, CoffeeBag, CharacterBody, StatHookEventArgs>(OnCoffeeStat));
MethodInfo methodInfo4 = AccessTools.Method(typeof(CoffeeBag), "OnServerDamageDealt", (Type[])null, (Type[])null);
coffeeDamageHook = new Hook((MethodBase)methodInfo4, (Delegate)new Action<Action<CoffeeBag, DamageReport>, CoffeeBag, DamageReport>(OnCoffeeDamage));
MethodInfo methodInfo5 = AccessTools.Method(typeof(CoffeeBeanPickup), "OnTriggerStay", (Type[])null, (Type[])null);
coffeePickupHook = new Hook((MethodBase)methodInfo5, (Delegate)new Action<Action<CoffeeBeanPickup, Collider>, CoffeeBeanPickup, Collider>(OnCoffeePickup));
GlobalEventManager.onCharacterDeathGlobal += OnCoffeeDeath;
}
if (BaseChanges.HasBubbetsItems)
{
GlobalEventManager.onServerDamageDealt += OnBoneDamageDealt;
MethodInfo methodInfo6 = AccessTools.Method(typeof(BoneVisor), "OnDeath", (Type[])null, (Type[])null);
boneKillHook = new Hook((MethodBase)methodInfo6, (Delegate)new Action<Action<BoneVisor, DamageReport>, BoneVisor, DamageReport>(OnBoneKill));
MethodInfo methodInfo7 = AccessTools.Method(typeof(BonePickup), "OnTriggerStay", (Type[])null, (Type[])null);
bonePickupHook = new Hook((MethodBase)methodInfo7, (Delegate)new Action<Action<BonePickup, Collider>, BonePickup, Collider>(OnBonePickup));
}
if (BaseChanges.HasFlatItemBuff)
{
MethodInfo methodInfo8 = AccessTools.Method(typeof(WarpedEcho), "GetStatCoefficients", (Type[])null, (Type[])null);
echoStatHook = new Hook((MethodBase)methodInfo8, (Delegate)new Action<Action<WarpedEcho, CharacterBody, StatHookEventArgs, Inventory>, WarpedEcho, CharacterBody, StatHookEventArgs, Inventory>(OnEchoStat));
}
if (BaseChanges.HasSeekingTheVoid)
{
MethodInfo methodInfo9 = AccessTools.Method(typeof(ToxicodendronBrineBehavior), "TriggerPoisonSpread", (Type[])null, (Type[])null);
toxicHook = new Hook((MethodBase)methodInfo9, (Delegate)new Action<Action<ToxicodendronBrineBehavior, CharacterBody, DamageReport>, ToxicodendronBrineBehavior, CharacterBody, DamageReport>(OnToxicKill));
}
if (BaseChanges.HasTooManyItems)
{
RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnMilkStats);
MethodInfo methodInfo10 = AccessTools.Method(typeof(MilkCartonOrb), "OnArrival", (Type[])null, (Type[])null);
milkHook = new Hook((MethodBase)methodInfo10, (Delegate)new Action<Action<MilkCartonOrb>, MilkCartonOrb>(OnMilkArrival));
string pickupToken = "Gain 20 max health. Retaliate damage from elites.";
string descriptionToken = "Increases <style=cIsHealing>max health</style> by <style=cIsHealing>20</style> <style=cStack>(+20 per stack)</style>. Retaliate <style=cIsDamage>200%</style> <style=cStack>(+200% per stack)</style> of the damage taken from <style=cIsDamage>elite enemies</style>.";
MilkCarton.itemDef.pickupToken = pickupToken;
MilkCarton.itemDef.descriptionToken = descriptionToken;
MethodInfo methodInfo11 = AccessTools.Method(typeof(CharacterMasterNotificationQueue), "PushItemTransformNotification", (Type[])null, (Type[])null);
loafHook = new Hook((MethodBase)methodInfo11, (Delegate)new Action<Action<CharacterMaster, ItemIndex, ItemIndex, TransformationType>, CharacterMaster, ItemIndex, ItemIndex, TransformationType>(OnLoafTransform));
string descriptionToken2 = "Gain <style=cIsDamage>1 <style=cStack>(+1 per stack)</style> gold</style> on-kill. After <style=cIsUtility>25 kills</style>, scrap a stack of this item and gain an extra <style=cHumanObjective>25 gold</style>, with a <style=cIsUtility>20% chance</style> to regain a stack of this item. <style=cIsDamage>Gold amount scales over time</style>.";
BreadLoaf.itemDef.descriptionToken = descriptionToken2;
Crucifix.percentDamageReduction = crucifixResist;
Crucifix.percentMaxHealthBurnAmount = crucifixBurnPercent;
Crucifix.percentMaxHealthBurnAmountReduction = crucifixBurnStack;
HealthComponent.Heal += new hook_Heal(OnCrucifixHeal);
string descriptionToken3 = "Reduce damage taken by <style=cIsHealing>95%</style>, but taking damage <style=cDeath>burns you</style> for <style=cIsHealth>20% <style=cStack>(-10% per stack)</style> max health</style>. While burning, <style=cDeath>all healing recieved is reduced by 50%</style> <style=cStack>(+50% per stack)</style>.";
Crucifix.itemDef.descriptionToken = descriptionToken3;
}
if (!BaseChanges.HasVanillaVoid)
{
}
}
private void CreateBuffs()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: 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)
//IL_0064: 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)
MeatBuff = Buffs.AddNewBuff("BloonMeatBuff", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.green, canStack: true, isDebuff: false, isCooldown: false, isHidden: false);
IgnitionCooldown = Buffs.AddNewBuff("BloonIgnitionCooldown", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/DLC1/StrengthenBurn/texBuffStrongerBurnIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false);
ScytheCooldown = Buffs.AddNewBuff("BloonScytheCooldown", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false);
}
private void UpdateText()
{
string text = $"Gain <style=cIsDamage>+5% crit chance</style>. <style=cIsDamage>Critical strikes</style> <style=cIsHealing>heal</style> you for <style=cIsHealing>{scytheHeal}</style> <style=cStack>(+{scytheHealStack} per stack)</style> <style=cIsHealing>health</style>, with a <style=cIsUtility>{scytheCooldownTime}s</style> cooldown between uses.";
LanguageAPI.Add("ITEM_HEALONCRIT_DESC", text);
string stackDesc = GetStackDesc(lanternSpeedStack * 100f, "%");
string stackDesc2 = GetStackDesc(lanternRegenStack, " hp/s");
string stackDesc3 = GetStackDesc(lanternRadiusStack / 2f, "m");
string stackDesc4 = GetStackDesc(lanternAllyStack, "");
string text2 = $"Increases <style=cIsDamage>attack speed</style> by <style=cIsDamage>{lanternSpeed * 100f}%</style>{stackDesc} and <style=cIsHealing>health regeneration</style> by <style=cIsHealing>{lanternRegen} hp/s</style>{stackDesc2} for each enemy and ally within <style=cIsUtility>{lanternRadius / 2f}m</style>{stackDesc3}, up to <style=cIsUtility>{lanternAlly}</style>{stackDesc4} times.";
LanguageAPI.Add("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", text2);
if (lanternRegen > 0f)
{
string text3 = "Increases your attack speed and health regen for every nearby enemy and ally.";
LanguageAPI.Add("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", text3);
}
string text4 = $"After getting inflicted with a <style=cIsDamage>debuff</style>, gain <style=cIsHealing>{raincoatBarrier * 100f}% barrier</style> and <style=cIsUtility>{raincoatDuration}s</style> of <style=cIsUtility>invulnerability</style>. Repeatable once every <style=cIsUtility>{raincoatCooldownTime}s</style> <style=cStack>(-{raincoatCooldownStack * 100f}% per stack)</style>.";
LanguageAPI.Add("ITEM_IMMUNETODEBUFF_DESC", text4);
string text5 = "Whenever you get debuffed, gain temporary barrier and invulnerability.";
LanguageAPI.Add("ITEM_IMMUNETODEBUFF_PICKUP", text5);
}
private string GetStackDesc(float num, string type)
{
if (num > 0f)
{
return $" <style=cStack>(+{num}{type} per stack)</style>";
}
return "";
}
private float GetStackedStats(float baseStat, float stackStat, int itemCount)
{
return baseStat - stackStat + stackStat * (float)itemCount;
}
private int GetStackedStatsInt(int baseStat, int stackStat, int itemCount)
{
return baseStat - stackStat + stackStat * itemCount;
}
private float ConvertReductionIntoStackingDivision(float baseFraction, int itemCount)
{
float num = 1f - baseFraction;
float num2 = (1f + num) / num - 2f;
num2 *= (float)(itemCount - 1);
return num2 + 1f;
}
private void OnRecalcStats(CharacterBody sender, StatHookEventArgs args)
{
if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory))
{
int itemCountEffective = sender.inventory.GetItemCountEffective(Items.FlatHealth);
if (itemCountEffective > 0)
{
float num = (float)itemCountEffective * (meatHealth - 25f);
args.baseHealthAdd += num;
float num2 = sender.GetBuffCount(MeatBuff);
args.baseRegenAdd += num2 * meatRegenAmount;
}
int itemCountEffective2 = sender.inventory.GetItemCountEffective(Items.AttackSpeedPerNearbyAllyOrEnemy);
int buffCount = sender.GetBuffCount(Buffs.AttackSpeedPerNearbyAllyOrEnemyBuff);
if (itemCountEffective2 > 0 && buffCount > 0)
{
float num3 = (float)buffCount * GetStackedStats(lanternRegen, lanternRegenStack, itemCountEffective2);
args.baseRegenAdd += num3;
}
}
}
public void IL_OnCrit(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: 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_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0149: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)2;
if (val2.TryGotoNext(val4, new Func<Instruction, bool>[3]
{
(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterMaster>(x, "get_inventory"),
(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2),
(Instruction x) => ILPatternMatchingExt.MatchLdarga(x, 5)
}))
{
val.Index -= 1;
Instruction next = val.Next;
val.Emit(OpCodes.Ldloc_2);
val.Emit(OpCodes.Ldarg_1);
val.Emit(OpCodes.Ldarg, 5);
val.EmitDelegate<Action<Inventory, CharacterBody, ProcChainMask>>((Action<Inventory, CharacterBody, ProcChainMask>)delegate(Inventory inventory, CharacterBody body, ProcChainMask procChainMask)
{
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
if (!((ProcChainMask)(ref procChainMask)).HasProc((ProcType)8) && !body.HasBuff(ScytheCooldown))
{
((ProcChainMask)(ref procChainMask)).AddProc((ProcType)8);
int itemCountEffective = inventory.GetItemCountEffective(Items.HealOnCrit);
if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)body.healthComponent))
{
Util.PlaySound("Play_item_proc_crit_heal", ((Component)body).gameObject);
float stackedStats = GetStackedStats(scytheHeal, scytheHealStack, itemCountEffective);
if (NetworkServer.active)
{
body.AddTimedBuff(ScytheCooldown, scytheCooldownTime);
body.healthComponent.Heal(stackedStats, procChainMask, true);
}
}
}
});
val.Emit(OpCodes.Br, next);
ILCursor val5 = val;
Func<Instruction, bool>[] array = new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f)
};
if (val5.TryGotoNext(val3, array))
{
val.Next.Operand = 0f;
ILCursor val6 = val;
if (val6.TryGotoNext(val3, array))
{
val.Next.Operand = 0f;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_ProcessHit(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: 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_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)2;
if (val2.TryGotoNext(val4, new Func<Instruction, bool>[3]
{
(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "get_aimOrigin"),
(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 13),
(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 10)
}))
{
val.Index -= 1;
Instruction next = val.Next;
val.Emit(OpCodes.Ldloc_0);
val.Emit(OpCodes.Ldloc_1);
val.Emit(OpCodes.Ldarg_1);
val.Emit(OpCodes.Ldloc, 10);
val.Emit(OpCodes.Ldarg_2);
val.EmitDelegate<Action<CharacterBody, CharacterBody, DamageInfo, Inventory, GameObject>>((Action<CharacterBody, CharacterBody, DamageInfo, Inventory, GameObject>)delegate(CharacterBody characterBody, CharacterBody victimBody, DamageInfo damageInfo, Inventory inventory, GameObject victim)
{
//IL_0004: 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_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_018e: 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_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
bool flag = true;
if (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)128)) != 0 || characterBody.HasBuff(Buffs.AffixRed))
{
flag = false;
}
if (flag)
{
int itemCountEffective = inventory.GetItemCountEffective(Items.StrengthenBurn);
if (itemCountEffective > 0 && !characterBody.HasBuff(IgnitionCooldown))
{
float num = 0.5f;
InflictDotInfo val5 = default(InflictDotInfo);
val5.attackerObject = damageInfo.attacker;
val5.victimObject = victim;
val5.totalDamage = damageInfo.damage * num;
val5.damageMultiplier = 1f;
val5.dotIndex = (DotIndex)1;
val5.maxStacksFromAttacker = uint.MaxValue;
val5.hitHurtBox = damageInfo.inflictedHurtbox;
InflictDotInfo val6 = val5;
if (Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<OilController>()))
{
ProjectileController component = damageInfo.attacker.GetComponent<ProjectileController>();
CharacterMaster component2 = component.owner.GetComponent<CharacterMaster>();
if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2))
{
StrengthenBurnUtils.CheckDotForUpgrade(component2.inventory, ref val6);
}
}
else
{
StrengthenBurnUtils.CheckDotForUpgrade(inventory, ref val6);
}
DotController.InflictDot(ref val6);
float num2 = ignitionCooldownTime / ConvertReductionIntoStackingDivision(ignitionCooldownTime, itemCountEffective);
characterBody.AddTimedBuff(IgnitionCooldown, num2);
}
}
if (BaseChanges.HasVanillaVoid && Object.op_Implicit((Object)(object)victimBody))
{
ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("VV_ITEM_CORE_ITEM"));
if ((Object)(object)itemDef != (Object)null && inventory.GetItemCountEffective(itemDef) > 0 && Object.op_Implicit((Object)(object)characterBody.master) && Util.CheckRoll(coreSlowChance * damageInfo.procCoefficient, characterBody.master))
{
float stackedStats = GetStackedStats(coreDuration, coreDurationStack, inventory.GetItemCountEffective(itemDef));
victimBody.AddTimedBuff(Buffs.ClayGoo, stackedStats);
}
}
});
val.Emit(OpCodes.Br, next);
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public float OnCrucifixHeal(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen = true)
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
if (!Object.op_Implicit((Object)(object)self.body))
{
return orig.Invoke(self, amount, procChainMask, nonRegen);
}
if (self.body.HasBuff(Buffs.OnFire))
{
if (!Object.op_Implicit((Object)(object)self.body.inventory))
{
return orig.Invoke(self, amount, procChainMask, nonRegen);
}
int itemCountEffective = self.body.inventory.GetItemCountEffective(Crucifix.itemDef);
if (itemCountEffective > 0)
{
for (int i = 0; i < itemCountEffective; i++)
{
amount *= crucifixHealReduction;
}
}
}
return orig.Invoke(self, amount, procChainMask, nonRegen);
}
public static void OnLoafTransform(Action<CharacterMaster, ItemIndex, ItemIndex, TransformationType> orig, CharacterMaster characterMaster, ItemIndex oldIndex, ItemIndex newIndex, TransformationType transformationType)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
if (((object)(ItemIndex)(ref oldIndex)).Equals((object?)BreadLoaf.itemDef.itemIndex) && ((object)(ItemIndex)(ref newIndex)).Equals((object?)Items.ScrapWhite.itemIndex) && ((object)(TransformationType)(ref transformationType)).Equals((object)(TransformationType)0) && Util.CheckRoll(loafRegenChance, characterMaster))
{
Util.PlaySound("Play_ui_artifact_delusion_success", ((Component)characterMaster).gameObject);
characterMaster.inventory.GiveItemPermanent(BreadLoaf.itemDef, 1);
}
orig(characterMaster, oldIndex, newIndex, transformationType);
}
private void OnMilkStats(CharacterBody sender, StatHookEventArgs args)
{
if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory))
{
int itemCountEffective = sender.inventory.GetItemCountEffective(MilkCarton.itemDef);
if (itemCountEffective > 0)
{
float num = (float)itemCountEffective * milkHealth;
args.baseHealthAdd += num;
}
}
}
private void OnMilkArrival(Action<MilkCartonOrb> orig, MilkCartonOrb self)
{
MilkCarton.percentEliteDamageRetaliation = 2f;
MilkCarton.percentEliteDamageRetaliationExtraStacks = 2f;
orig(self);
}
public void IL_JetBoots(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: 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_0056: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)2;
if (val2.TryGotoNext(val4, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JetBoots), "baseDamage")
}))
{
val.Emit(OpCodes.Pop);
val.Emit(OpCodes.Ldloc_3);
val.EmitDelegate<Func<int, float>>((Func<int, float>)((int num) => GetStackedStats(jetBootsDamage, jetBootsDamageStack, num)));
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_LampFire(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 2f)
}))
{
val.Next.Operand = 3f;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
private void OnBoneDamageDealt(DamageReport report)
{
//IL_00db: 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_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
BoneVisor val = default(BoneVisor);
if (!NetworkServer.active || !SharedBase.TryGetInstance<BoneVisor>(ref val))
{
return;
}
int num = ((Object.op_Implicit((Object)(object)report.attackerBody) && Object.op_Implicit((Object)(object)report.attackerBody.inventory)) ? report.attackerBody.inventory.GetItemCountEffective(((ItemBase)val).ItemDef) : 0);
if (num <= 0 || !Util.CheckRoll(boneProcChance + Util.ConvertAmplificationPercentageIntoReductionPercentage(boneProcStack * (float)num - 1f) * report.damageInfo.procCoefficient, report.attackerMaster))
{
return;
}
float num2 = Random.Range(-2f, 2f);
float num3 = Random.Range(-2f, 2f);
Vector3 val2 = default(Vector3);
((Vector3)(ref val2))..ctor(num2, 0f, num3);
GameObject val3 = Object.Instantiate<GameObject>(BoneVisor.ShardPrefab, ((Component)report.victim).transform.position + val2, Random.rotation);
if (Object.op_Implicit((Object)(object)val3))
{
TeamFilter component = val3.GetComponent<TeamFilter>();
if (Object.op_Implicit((Object)(object)component))
{
component.teamIndex = report.attackerTeamIndex;
}
NetworkServer.Spawn(val3);
}
}
private void OnBonePickup(Action<BonePickup, Collider> orig, BonePickup self, Collider other)
{
//IL_0016: 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)
BoneVisor val = default(BoneVisor);
if (!NetworkServer.active || !self.alive || TeamComponent.GetObjectTeam(((Component)other).gameObject) != self.teamFilter.teamIndex || !SharedBase.TryGetInstance<BoneVisor>(ref val))
{
return;
}
CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
if (!Object.op_Implicit((Object)(object)component))
{
return;
}
Inventory inventory = component.inventory;
if (Object.op_Implicit((Object)(object)inventory))
{
int num = inventory.GetItemCountEffective(((ItemBase)val).ItemDef);
if (num <= 0)
{
num = 1;
}
self.alive = false;
component.OnPickup((PickupClass)1);
component.healthComponent.AddBarrier(5f);
float stackedStats = GetStackedStats(boneDuration, boneDurationStack, num);
component.AddTimedBuff(BoneVisor.BuffDef, stackedStats, 5);
Object.Destroy((Object)(object)self.baseObject);
}
}
private void OnBoneKill(Action<BoneVisor, DamageReport> orig, BoneVisor self, DamageReport report)
{
}
private void OnCoffeeDeath(DamageReport report)
{
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
CharacterBody attackerBody = report.attackerBody;
if (!Object.op_Implicit((Object)(object)attackerBody))
{
return;
}
Inventory inventory = attackerBody.inventory;
if (!Object.op_Implicit((Object)(object)inventory))
{
return;
}
int itemCountEffective = inventory.GetItemCountEffective(Items.CoffeeBag.itemIndex);
if (itemCountEffective > 0)
{
int num = Random.RandomRangeInt(0, 5);
Vector3[] array = (Vector3[])(object)new Vector3[4]
{
new Vector3(1.5f, 0f, -1.5f),
new Vector3(-1.5f, 0f, 1.5f),
new Vector3(1.5f, 0f, 1.5f),
new Vector3(-1.5f, 0f, -1.5f)
};
Util.ShuffleArray<Vector3>(array);
for (int i = 0; i < num; i++)
{
CoffeeBeanPooler.SpawnBean(report.damageInfo.position + array[i], itemCountEffective, report.attackerTeamIndex);
}
}
}
private void OnCoffeePickup(Action<CoffeeBeanPickup, Collider> orig, CoffeeBeanPickup self, Collider other)
{
//IL_001e: 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_0068: 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)
if (NetworkServer.active && self.initialized && self.alive && TeamComponent.GetObjectTeam(((Component)other).gameObject) == self.teamFilter.teamIndex)
{
CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
if (Object.op_Implicit((Object)(object)component))
{
component.AddTimedBuff(Buffs.BuffCoffeeBag, coffeeBuffDuration);
EffectManager.SimpleEffect(self.pickupEffect, ((Component)self).transform.position, Quaternion.identity, true);
self.alive = false;
component.OnPickup((PickupClass)1);
self.pooler.Cleanup();
}
}
}
private void OnCoffeeDamage(Action<CoffeeBag, DamageReport> orig, CoffeeBag self, DamageReport report)
{
}
private void OnCoffeeStat(Action<CoffeeBag, CharacterBody, StatHookEventArgs> orig, CoffeeBag self, CharacterBody sender, StatHookEventArgs args)
{
int val = (Object.op_Implicit((Object)(object)sender.inventory) ? sender.inventory.GetItemCountEffective(((SS2Item)self).ItemDef) : 0);
val = Math.Max(val, 1);
int buffCount = sender.GetBuffCount(Buffs.BuffCoffeeBag);
if (buffCount > 0)
{
args.attackSpeedMultAdd += 0.075f * (float)buffCount * (float)val;
args.moveSpeedMultAdd += 0.07f * (float)buffCount * (float)val;
}
}
private void OnEchoStat(Action<WarpedEcho, CharacterBody, StatHookEventArgs, Inventory> orig, WarpedEcho self, CharacterBody sender, StatHookEventArgs args, Inventory inventory)
{
if (sender.HasBuff(Buffs.DelayedDamageBuff))
{
int num = 0;
if (Object.op_Implicit((Object)(object)sender.inventory))
{
num = sender.inventory.GetItemCountEffective(Items.DelayedDamage);
}
args.attackSpeedMultAdd += 0.15f * (float)num;
args.moveSpeedMultAdd += 0.15f * (float)num;
args.cooldownMultAdd -= 1f - Mathf.Pow(0.9f, (float)num);
}
}
private void OnToxicKill(Action<ToxicodendronBrineBehavior, CharacterBody, DamageReport> orig, ToxicodendronBrineBehavior self, CharacterBody body, DamageReport report)
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
float num = ((float)report.attackerBody.inventory.GetItemCountEffective(ToxicodendronBrine.ToxicodendronBrineDef.itemIndex) - 1f) * 0.1f;
float num2 = report.attackerBody.skillLocator.GetSkill((SkillSlot)0).rechargeStopwatch * num;
float num3 = report.attackerBody.skillLocator.GetSkill((SkillSlot)1).rechargeStopwatch * num;
float num4 = report.attackerBody.skillLocator.GetSkill((SkillSlot)2).rechargeStopwatch * num;
float num5 = report.attackerBody.skillLocator.GetSkill((SkillSlot)3).rechargeStopwatch * num;
GenericSkill skill = report.attackerBody.skillLocator.GetSkill((SkillSlot)0);
skill.rechargeStopwatch += num2;
GenericSkill skill2 = report.attackerBody.skillLocator.GetSkill((SkillSlot)1);
skill2.rechargeStopwatch += num3;
GenericSkill skill3 = report.attackerBody.skillLocator.GetSkill((SkillSlot)2);
skill3.rechargeStopwatch += num4;
GenericSkill skill4 = report.attackerBody.skillLocator.GetSkill((SkillSlot)3);
skill4.rechargeStopwatch += num5;
orig(self, body, report);
}
public void OnRaincoatUpdate(orig_FixedUpdate orig, ImmuneToDebuffBehavior self)
{
if (NetworkServer.active)
{
self.isProtected = false;
bool flag = ((BaseItemBodyBehavior)self).body.HasBuff(Buffs.ImmuneToDebuffCooldown);
bool flag2 = ((BaseItemBodyBehavior)self).body.HasBuff(Buffs.ImmuneToDebuffReady);
if (!flag && !flag2)
{
((BaseItemBodyBehavior)self).body.AddBuff(Buffs.ImmuneToDebuffReady);
}
if (flag2 && flag)
{
((BaseItemBodyBehavior)self).body.RemoveBuff(Buffs.ImmuneToDebuffReady);
}
}
}
public bool OnRaincoatDebuff(orig_OverrideDebuff_BuffDef_CharacterBody orig, BuffDef buffDef, CharacterBody body)
{
if (buffDef.isCooldown)
{
return false;
}
if (BaseChanges.HasTooManyItems)
{
ItemDef itemDef = Crucifix.itemDef;
if (((object)buffDef).Equals((object?)Buffs.OnFire) && Object.op_Implicit((Object)(object)body.inventory) && body.inventory.GetItemCountEffective(itemDef) > 0)
{
return false;
}
}
return orig.Invoke(buffDef, body);
}
public bool OnRaincoatDoT(orig_OverrideDot orig, InflictDotInfo inflictDotInfo)
{
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
if (BaseChanges.HasTooManyItems)
{
GameObject victimObject = inflictDotInfo.victimObject;
CharacterBody val = (((Object)(object)victimObject != (Object)null) ? victimObject.GetComponent<CharacterBody>() : null);
if ((Object)(object)val != (Object)null)
{
ItemDef itemDef = Crucifix.itemDef;
if (((object)(DotIndex)(ref inflictDotInfo.dotIndex)).Equals((object)(DotIndex)1) && Object.op_Implicit((Object)(object)val.inventory) && val.inventory.GetItemCountEffective(itemDef) > 0)
{
return false;
}
}
}
return orig.Invoke(inflictDotInfo);
}
public bool OnRaincoatOverride(orig_TryApplyOverride orig, CharacterBody body)
{
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
CharacterBody val = UnityObjectExtensions.AsValidOrNull<CharacterBody>(body);
ImmuneToDebuffBehavior val2 = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent<ImmuneToDebuffBehavior>() : null);
if (Object.op_Implicit((Object)(object)val2) && body.HasBuff(Buffs.ImmuneToDebuffReady) && Object.op_Implicit((Object)(object)val2.healthComponent))
{
val2.healthComponent.AddBarrier(raincoatBarrier * val2.healthComponent.fullCombinedHealth);
body.RemoveBuff(Buffs.ImmuneToDebuffReady);
EffectManager.SimpleImpactEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/ImmuneToDebuff/ImmuneToDebuffEffect.prefab").WaitForCompletion(), body.corePosition, Vector3.up, true);
if (!body.HasBuff(Buffs.ImmuneToDebuffReady) && Object.op_Implicit((Object)(object)body.inventory))
{
int itemCountEffective = body.inventory.GetItemCountEffective(Items.ImmuneToDebuff);
float num = raincoatCooldownTime / ConvertReductionIntoStackingDivision(raincoatCooldownStack, itemCountEffective);
body.AddTimedBuff(Buffs.ImmuneToDebuffCooldown, num + raincoatDuration);
body.AddTimedBuff(Buffs.Immune, raincoatDuration);
}
}
return false;
}
public void IL_DotBypassArmor(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)2;
if (val2.TryGotoNext(val4, new Func<Instruction, bool>[3]
{
(Instruction x) => ILPatternMatchingExt.MatchMul(x),
(Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Mathf), "Min"),
(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DotStack), "damage")
}))
{
val.Emit(OpCodes.Ldloc, 5);
val.Emit(OpCodes.Ldc_I4, 2);
val.EmitDelegate<Action<DotStack, DamageType>>((Action<DotStack, DamageType>)delegate(DotStack dotStack, DamageType type)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
dotStack.damageType = DamageTypeCombo.op_Implicit(type);
});
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_TakeDamageArmor(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: 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_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)2;
if (val2.TryGotoNext(val4, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "NetworkSoundEventDefs/nseArmorPlateBlock")
}))
{
ILCursor val5 = val;
Func<Instruction, bool>[] array = new Func<Instruction, bool>[1];
array[0] = (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(EntitySoundManager), "EmitSoundServer");
array[1] = (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0);
if (val5.TryGotoNext(val4, array))
{
Instruction next = val.Next;
ILCursor val6 = val;
ILLabel val8 = default(ILLabel);
if (val6.TryGotoPrev(val4, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val8)
}))
{
val.Emit(OpCodes.Ldloc_0);
val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)((DamageInfo damageInfo) => (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 0) ? true : false));
val.Emit(OpCodes.Brfalse, next);
ILCursor val7 = val;
if (val7.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f)
}))
{
val.Emit(OpCodes.Ldloc_0);
val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)((DamageInfo damageInfo) => (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 0) ? true : false));
val.Emit(OpCodes.Brfalse, next);
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_MultikillStats(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "IncreaseDamageBuff")
}))
{
ILCursor val4 = val;
if (val4.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.01f)
}))
{
val.Next.Operand = multikillDamageStack;
ILCursor val5 = val;
if (val5.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.035f)
}))
{
val.Next.Operand = multikillDamage;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_MultikillTimer(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 7f)
}))
{
val.Next.Operand = multikillDuration;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
private void OnEliteDeath(DamageReport report)
{
//IL_00a7: 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_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0135: 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_0142: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
if (!NetworkServer.active)
{
return;
}
CharacterBody victimBody = report.victimBody;
if (!victimBody.isElite)
{
return;
}
CharacterBody attackerBody = report.attackerBody;
CharacterMaster attackerMaster = report.attackerMaster;
Inventory val = (Object.op_Implicit((Object)(object)attackerMaster) ? attackerMaster.inventory : null);
if (!Object.op_Implicit((Object)(object)val))
{
return;
}
int itemCountEffective = val.GetItemCountEffective(Items.HeadHunter);
if (itemCountEffective <= 0)
{
return;
}
float num = (attackerBody.maxHealth + attackerBody.maxShield) * vultureHealPercent;
attackerBody.healthComponent.Heal(num, report.damageInfo.procChainMask, true);
EquipmentIndex val2 = (EquipmentIndex)(-1);
EquipmentDef val3 = null;
if (!Object.op_Implicit((Object)(object)victimBody.equipmentSlot))
{
return;
}
val2 = victimBody.equipmentSlot.equipmentIndex;
val3 = EquipmentCatalog.GetEquipmentDef(val2);
if (Object.op_Implicit((Object)(object)val3) && !((object)(EquipmentIndex)(ref val2)).Equals((object?)EquipmentCatalog.FindEquipmentIndex("EliteVoidEquipment")))
{
float num2 = (float)itemCountEffective * vultureDropChance;
if (Util.CheckRoll(num2, attackerMaster))
{
PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(val2), report.victimBody.corePosition, Vector3.up * 20f);
}
}
}
public void IL_EliteDeath(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: 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_0059: 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_0074: 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_0109: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)1;
MoveType val5 = (MoveType)2;
if (val2.TryGotoNext(val5, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 77)
}))
{
Instruction next = val.Next;
val.Emit(OpCodes.Ldc_I4, 0);
val.Emit(OpCodes.Stloc, 77);
val.Emit(OpCodes.Br, next);
ILCursor val6 = val;
if (val6.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3f)
}))
{
val.Next.Operand = 0f;
ILCursor val7 = val;
if (val7.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f)
}))
{
val.Next.Operand = 0f;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_EliteDamage(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: 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_00ce: 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_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)2;
ILLabel val4 = default(ILLabel);
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[4]
{
(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterMaster>(x, "get_inventory"),
(Instruction x) => ILPatternMatchingExt.MatchCall<Object>(x, "op_Implicit"),
(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val4),
(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 4)
}))
{
val.Index -= 1;
Instruction next = val.Next;
val.Emit(OpCodes.Ldarg_0);
val.Emit(OpCodes.Ldloc_1);
val.EmitDelegate<Func<HealthComponent, CharacterMaster, float>>((Func<HealthComponent, CharacterMaster, float>)delegate(HealthComponent self, CharacterMaster characterMaster)
{
float num = 1f;
int itemCountEffective = characterMaster.inventory.GetItemCountEffective(Items.BossDamageBonus);
int itemCountEffective2 = characterMaster.inventory.GetItemCountEffective(Items.HeadHunter);
if (self.body.isElite)
{
if (itemCountEffective > 0 && !self.body.isBoss)
{
num *= 1f + apRoundsEliteDamage * (float)itemCountEffective;
}
if (itemCountEffective2 > 0 && (double)self.combinedHealth > (double)self.fullCombinedHealth * 0.5)
{
num *= 1f + vultureEliteDamage * (float)itemCountEffective2;
}
}
return num;
});
val.Emit(OpCodes.Ldloc, 10);
val.Emit(OpCodes.Mul);
val.Emit(OpCodes.Stloc, 10);
val.Emit(OpCodes.Br, next);
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_MeatEffect(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: 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_0079: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)2;
if (val2.TryGotoNext(val4, new Func<Instruction, bool>[2]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "MeatRegenBoost"),
(Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff")
}))
{
val.Emit(OpCodes.Pop);
val.Emit(OpCodes.Ldarg_0);
val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody self) => self.HasBuff(MeatBuff)));
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
private void OnMeatDeath(DamageReport report)
{
if (!NetworkServer.active)
{
return;
}
CharacterBody attackerBody = report.attackerBody;
if (!Object.op_Implicit((Object)(object)attackerBody))
{
return;
}
Inventory inventory = attackerBody.inventory;
if (Object.op_Implicit((Object)(object)inventory))
{
int itemCountEffective = inventory.GetItemCountEffective(Items.FlatHealth);
if (itemCountEffective > 0)
{
float stackedStats = GetStackedStats(meatDuration, meatDurationStack, itemCountEffective);
int stackedStatsInt = GetStackedStatsInt(meatMax, meatMaxStack, itemCountEffective);
attackerBody.AddTimedBuff(MeatBuff, stackedStats, stackedStatsInt);
}
}
}
public void IL_StrengthenBurn(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 3)
}))
{
val.Next.Operand = ignitionBurnBonus;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
private void OnDuplicatorDeath(DamageReport report)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Expected O, but got Unknown
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: 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_0110: Unknown result type (might be due to invalid IL or missing references)
if (!NetworkServer.active)
{
return;
}
rng = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong);
CharacterBody attackerBody = report.attackerBody;
if (!Object.op_Implicit((Object)(object)attackerBody))
{
return;
}
Inventory inventory = attackerBody.inventory;
if (!Object.op_Implicit((Object)(object)inventory))
{
return;
}
int itemCountEffective = inventory.GetItemCountEffective(Items.Duplicator);
if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)report.victimMaster) && Object.op_Implicit((Object)(object)report.victimBody))
{
PickupDropTable dropTable = Surprise.dropTable;
if (Util.CheckRoll(duplicatorDropChance, report.attackerMaster) && Object.op_Implicit((Object)(object)dropTable))
{
PickupIndex pickupIndex = dropTable.GeneratePickup(rng).pickupIndex;
UniquePickup val = default(UniquePickup);
((UniquePickup)(ref val))..ctor(pickupIndex);
val.decayValue = 1f;
PickupDropletController.CreatePickupDroplet(val, report.victimBody.corePosition, Vector3.up * 20f);
}
}
}
public void IL_Duplicator(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 10)
}))
{
val.Next.Operand = duplicatorDuration;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_GrantTempItem(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: 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)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(Inventory), "GiveItemPermanent")
}))
{
ILCursor val4 = val;
Func<Instruction, bool>[] array = new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f)
};
if (val4.TryGotoNext(val3, array))
{
val.Next.Operand = 0f;
ILCursor val5 = val;
if (val5.TryGotoNext(val3, array))
{
val.Next.Operand = 0f;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_ChanceShrine(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Expected O, but got Unknown
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_0199: Unknown result type (might be due to invalid IL or missing references)
//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
//IL_01c7: 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)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
MoveType val4 = (MoveType)2;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 30)
}))
{
val.Next.Operand = 50;
ILCursor val5 = val;
if (val5.TryGotoNext(val4, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 5)
}))
{
val.Emit(OpCodes.Pop);
val.Emit(OpCodes.Ldc_I4, 0);
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
ILCursor val6 = new ILCursor(il);
ILCursor val7 = val6;
ILLabel val9 = default(ILLabel);
if (val7.TryGotoNext(val4, new Func<Instruction, bool>[4]
{
(Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val9),
(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0),
(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(ShrineChanceBehavior), "chanceDollWin")
}))
{
val6.Index -= 2;
val6.Emit(OpCodes.Ldarg_0);
val6.Emit(OpCodes.Ldloc_1);
val6.Emit(OpCodes.Ldloc_2);
val6.EmitDelegate<Action<ShrineChanceBehavior, CharacterBody, Inventory>>((Action<ShrineChanceBehavior, CharacterBody, Inventory>)delegate(ShrineChanceBehavior self, CharacterBody component, Inventory inventory)
{
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: 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)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_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_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Expected O, but got Unknown
if (inventory.GetItemCountEffective(Items.ExtraShrineItem) > 0 && Util.CheckRoll((float)(inventory.GetItemCountEffective(Items.ExtraShrineItem) * 10), component.master))
{
CreatePickupInfo val8 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val8)).pickupIndex = PickupCatalog.FindPickupIndex(Items.ScrapWhite.itemIndex);
PickupDropletController.CreatePickupDroplet(val8, self.dropletOrigin.position, self.dropletOrigin.forward * 20f);
Util.PlaySound("Play_ui_artifact_delusion_success", ((Component)component).gameObject);
EffectManager.SpawnEffect(self.effectPrefabShrineRewardJackpotVFX, new EffectData
{
origin = ((Component)self).transform.position,
rotation = Quaternion.identity,
scale = 1f,
color = Color32.op_Implicit(Color.white)
}, true);
}
});
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
public void IL_NotMoving(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f)
}))
{
val.Next.Operand = bungusTimer;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void OnLanternUpdate(orig_UpdateValues orig, AttackSpeedPerNearbyCollider self, int itemCount, out float diameter)
{
orig.Invoke(self, itemCount, ref diameter);
self.maxCharacterCount = lanternAlly + (itemCount - 1) * lanternAllyStack;
diameter = lanternRadius + ((float)itemCount - 1f) * lanternRadiusStack;
}
public void OnLanternStart(orig_Start orig, AttackSpeedPerNearbyCollider self)
{
self.syncInterval = 0.5f;
orig.Invoke(self);
}
public void IL_Lantern(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)0;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs).GetField("AttackSpeedPerNearbyAllyOrEnemyBuff"))
}))
{
ILCursor val4 = val;
if (val4.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.035f)
}))
{
val.Next.Operand = lanternSpeedStack;
ILCursor val5 = val;
if (val5.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.065f)
}))
{
val.Next.Operand = lanternSpeed - lanternSpeedStack;
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
}
}
else
{
Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
}
}
public void IL_StunDamage(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: 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)
ILCursor val = new ILCursor(il);
ILCursor val2 = val;
MoveType val3 = (MoveType)2;
bool flag;
if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(EffectManager), "SimpleImpactEffect")
}))
{
ILCursor val4 = val;
MoveType val5 = (MoveType)2;
flag = val4.TryGotoNext(val5, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<SetStateOnHurt>(x, "SetStun")
});
}
else
{
flag = false;
}
if (!flag)
{
return;
}
val.Emit(OpCodes.Ldarg, 1);
val.Emit(OpCodes.Ldloc, 3);
val.EmitDelegate<Action<DamageReport, int>>((Action<DamageReport, int>)delegate(DamageReport damageReport, int stunGrenadeCount)
{
//IL_001e: 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_002f: 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_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: 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_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Expected O, but got Unknown
if (NetworkServer.active && Object.op_Implicit((Object)(object)damageReport.attackerBody))
{
DamageInfo val6 = new DamageInfo
{
attacker = damageReport.attacker,
crit = damageReport.damageInfo.crit,
damage = 2f * damageReport.attackerBody.damage,
damageColorIndex = (DamageColorIndex)3,
inflictor = damageReport.attacker,
position = damageReport.damageInfo.position,
procCoefficient = 0f
};
damageReport.victim.TakeDamage(val6);
GlobalEventManager.instance.OnHitEnemy(val6, ((Component)damageReport.victim).gameObject);
GlobalEventManager.instance.OnHitAll(val6, ((Component)damageReport.victim).gameObject);
}
});
}
public void OnAwardExperience(orig_AwardExperience orig, ExperienceManager self, Vector3 origin, CharacterBody body, ulong amount)
{
//IL_001c: 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)
if (body.inventory.GetItemCountEffective(Items.OnLevelUpFreeUnlock) < 1)
{
orig.Invoke(self, origin, body, amount);
return;
}
ulong num = amount;
int num2 = TeamManager.LongstandingSolitudesInParty();
for (int i = 0; i < num2; i++)
{
num = ((i > 2) ? (num - num / 4) : (num - amount / 4));
}
orig.Invoke(self, origin, body, num);
}
public float OnItemCostScale(orig_GetLongstandingSolitudeItemCostScale orig)
{
return 1f + (float)TeamManager.LongstandingSolitudesInParty() * 0.25f;
}
}
public class SurvivorChanges : BaseState
{
private Hook ampEnterHook;
private Hook ampEnterHook2;
private ILHook ampBaseMeleeHook;
private ILHook ampMeleeHook;
private Hook ampSlashHook;
private Hook surgeEnterHook;
private Hook surgeUpdateHook;
private Hook surgeExitHook;
private Hook ferroEnterHook;
private Hook bombardEnterHook;
private ILHook ampSkillsHook;
private ILHook shovelHook;
private Hook launchHook;
private Hook sacrificeHook;
private Hook tombstoneHook;
private Hook minionHook;
private Hook ghoulSpawnHook;
private Hook tombstoneSpawnHook;
private Hook fireSprayHook;
private Hook flamethrowerHook;
private Hook zeroPointHook;
private ILHook zeroPointHookIL;
private Hook flareSalvoHook;
private Hook flareUpdateHook;
private Hook flareUpdateHook2;
private Hook flareEnterHook;
private Hook masochismConHook;
private Hook masochismConHook2;
private Hook spiteConHook;
private Hook spiteStartHook;
private Hook addHeatHook;
private Hook energyHook;
private Hook arsonistHook;
private ILHook bubbleLoadHook;
private static GameObject fireExplosionPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Common.TeamAreaIndicator__GroundOnly_prefab).WaitForCompletion();
public static GameObject lemfireBall = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lemurian/Fireball.prefab").WaitForCompletion();
public static float zeroPointJump = 0f;
public static float zeroPointLongJump = 0f;
public void Initialize()
{
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Expected O, but got Unknown
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Expected O, but got Unknown
//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Expected O, but got Unknown
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Expected O, but got Unknown
//IL_0121: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Expected O, but got Unknown
//IL_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_0130: Expected O, but got Unknown
//IL_0157: Unknown result type (might be due to invalid IL or missing references)
//IL_0161: Expected O, but got Unknown
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Expected O, but got Unknown
//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Expected O, but got Unknown
//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
//IL_01f4: Expected O, but got Unknown
//IL_021b: Unknown result type (might be due to invalid IL or missing references)
//IL_0225: Expected O, but got Unknown
//IL_0257: Unknown result type (might be due to invalid IL or missing references)
//IL_0261: Expected O, but got Unknown
//IL_025c: Unknown result type (might be due to invalid IL or missing references)
//IL_0266: Expected O, but got Unknown
//IL_028d: Unknown result type (might be due to invalid IL or missing references)
//IL_0297: Expected O, but got Unknown
//IL_02be: Unknown result type (might be due to invalid IL or missing references)
//IL_02c8: Expected O, but got Unknown
//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
//IL_02f9: Expected O, but got Unknown
//IL_0320: Unknown result type (might be due to invalid IL or missing references)
//IL_032a: Expected O, but got Unknown
//IL_0351: Unknown result type (might be due to invalid IL or missing references)
//IL_035b: Expected O, but got Unknown
//IL_0382: Unknown result type (might be due to invalid IL or missing references)
//IL_038c: Expected O, but got Unknown
//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
//IL_03db: Expected O, but got Unknown
//IL_0402: Unknown result type (might be due to invalid IL or missing references)
//IL_040c: Expected O, but got Unknown
//IL_0433: Unknown result type (might be due to invalid IL or missing references)
//IL_0