Decompiled source of ShigarakiMod v2.3.2

ShiggyMod.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EmotesAPI;
using EntityStates;
using EntityStates.Bandit2;
using EntityStates.BeetleGuardMonster;
using EntityStates.BeetleMonster;
using EntityStates.Bell.BellWeapon;
using EntityStates.Bison;
using EntityStates.Captain.Weapon;
using EntityStates.ClayBoss;
using EntityStates.ClayBruiser.Weapon;
using EntityStates.ClayGrenadier;
using EntityStates.Commando;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.Croco;
using EntityStates.Engi.EngiWeapon;
using EntityStates.Engi.SpiderMine;
using EntityStates.GolemMonster;
using EntityStates.GrandParent;
using EntityStates.GravekeeperBoss;
using EntityStates.HermitCrab;
using EntityStates.Huntress;
using EntityStates.Huntress.HuntressWeapon;
using EntityStates.ImpMonster;
using EntityStates.JellyfishMonster;
using EntityStates.LemurianBruiserMonster;
using EntityStates.LemurianMonster;
using EntityStates.Loader;
using EntityStates.LunarGolem;
using EntityStates.LunarWisp;
using EntityStates.Mage.Weapon;
using EntityStates.Merc;
using EntityStates.MiniMushroom;
using EntityStates.NullifierMonster;
using EntityStates.RoboBallBoss.Weapon;
using EntityStates.ScavMonster;
using EntityStates.Toolbot;
using EntityStates.Treebot.Weapon;
using EntityStates.VagrantMonster;
using EntityStates.VoidJailer;
using EntityStates.VoidJailer.Weapon;
using EntityStates.VoidMegaCrab.BackWeapon;
using EntityStates.Vulture;
using EntityStates.Vulture.Weapon;
using EntityStates.Wisp1Monster;
using ExtraSkillSlots;
using HG;
using KinematicCharacterController;
using On.RoR2;
using On.RoR2.Orbs;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using ShiggyMod.Modules;
using ShiggyMod.Modules.Achievements;
using ShiggyMod.Modules.Networking;
using ShiggyMod.Modules.Survivors;
using ShiggyMod.SkillStates;
using ShiggyMod.SkillStates.BaseStates;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ShiggyMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ShiggyMod")]
[assembly: AssemblyTitle("ShiggyMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
internal class BodyInfo
{
	internal string bodyName = "";

	internal string bodyNameToken = "";

	internal string subtitleNameToken = "";

	internal string bodyNameToClone = "Commando";

	internal Texture characterPortrait = null;

	internal GameObject crosshair = null;

	internal GameObject podPrefab = null;

	internal float maxHealth = 100f;

	internal float healthGrowth = 2f;

	internal float healthRegen = 0f;

	internal float shield = 0f;

	internal float shieldGrowth = 0f;

	internal float moveSpeed = 7f;

	internal float moveSpeedGrowth = 0f;

	internal float acceleration = 80f;

	internal float jumpPower = 15f;

	internal float jumpPowerGrowth = 0f;

	internal float damage = 12f;

	internal float attackSpeed = 1f;

	internal float attackSpeedGrowth = 0f;

	internal float armor = 0f;

	internal float armorGrowth = 0f;

	internal float crit = 1f;

	internal float critGrowth = 0f;

	internal int jumpCount = 1;

	internal Color bodyColor = Color.grey;

	internal Vector3 aimOriginPosition = new Vector3(0f, 1.8f, 0f);

	internal Vector3 modelBasePosition = new Vector3(0f, -0.92f, 0f);

	internal Vector3 cameraPivotPosition = new Vector3(0f, 1.6f, 0f);
}
internal class CustomRendererInfo
{
	internal string childName;

	internal Material material;

	internal bool ignoreOverlays;
}
internal class SkillDefInfo
{
	public string skillName;

	public string skillNameToken;

	public string skillDescriptionToken;

	public Sprite skillIcon;

	public SerializableEntityStateType activationState;

	public string activationStateMachineName;

	public int baseMaxStock;

	public float baseRechargeInterval;

	public bool beginSkillCooldownOnSkillEnd;

	public bool canceledFromSprinting;

	public bool forceSprintDuringState;

	public bool fullRestockOnAssign;

	public InterruptPriority interruptPriority;

	public bool resetCooldownTimerOnUse;

	public bool isCombatSkill;

	public bool mustKeyPress;

	public bool cancelSprintingOnActivation;

	public int rechargeStock;

	public int requiredStock;

	public int stockToConsume;

	public string[] keywordTokens;
}
namespace ShiggyMod
{
	[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.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.TeaL.ShigarakiMod", "ShigarakiMod", "2.3.2")]
	public class ShiggyPlugin : BaseUnityPlugin
	{
		public static bool scepterInstalled;

		public ShiggyController Shiggycon;

		public ShiggyMasterController Shiggymastercon;

		public const string MODUID = "com.TeaL.ShigarakiMod";

		public const string MODNAME = "ShigarakiMod";

		public const string MODVERSION = "2.3.2";

		public const string developerPrefix = "TEAL";

		internal List<SurvivorBase> Survivors = new List<SurvivorBase>();

		public static ShiggyPlugin instance;

		public static CharacterBody ShiggyCharacterBody;

		private BlastAttack blastAttack;

		private void Awake()
		{
			instance = this;
			ShiggyCharacterBody = null;
			instance = this;
			ShiggyAsset.Initialize();
			Config.ReadConfig();
			Damage.SetupModdedDamage();
			if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"))
			{
				Config.SetupRiskOfOptions();
			}
			States.RegisterStates();
			Buffs.RegisterBuffs();
			Dots.RegisterDots();
			Projectiles.RegisterProjectiles();
			Tokens.AddTokens();
			ItemDisplays.PopulateDisplays();
			new Shiggy().Initialize();
			StaticValues.LoadDictionary();
			NetworkingAPI.RegisterMessageType<EquipmentDropNetworked>();
			NetworkingAPI.RegisterMessageType<HealNetworkRequest>();
			NetworkingAPI.RegisterMessageType<SpawnBodyNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PerformForceNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PeformDirectionalForceNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ItemDropNetworked>();
			NetworkingAPI.RegisterMessageType<SpendHealthNetworkRequest>();
			NetworkingAPI.RegisterMessageType<DisableSlideStateMachine>();
			NetworkingAPI.RegisterMessageType<SetTheWorldFreezeOnBodyRequest>();
			NetworkingAPI.RegisterMessageType<TakeMeleeDamageForceRequest>();
			NetworkingAPI.RegisterMessageType<ForceReversalState>();
			NetworkingAPI.RegisterMessageType<SetShunpoStateMachine>();
			NetworkingAPI.RegisterMessageType<SetMugetsuStateMachine>();
			NetworkingAPI.RegisterMessageType<SetGetsugaStateMachine>();
			NetworkingAPI.RegisterMessageType<ForceGiveQuirkState>();
			NetworkingAPI.RegisterMessageType<OrbDamageRequest>();
			NetworkingAPI.RegisterMessageType<LightAndDarknessPullRequest>();
			NetworkingAPI.RegisterMessageType<BlastingZoneDebuffDamageRequest>();
			NetworkingAPI.RegisterMessageType<ExpungeNetworkRequest>();
			new ContentPacks().Initialize();
			ContentManager.onContentPacksAssigned += LateSetup;
			Hook();
		}

		private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj)
		{
			SurvivorBase.instance.SetItemDisplays();
		}

		private void Hook()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Expected O, but got Unknown
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Expected O, but got Unknown
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Expected O, but got Unknown
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Expected O, but got Unknown
			CharacterBody.OnDeathStart += new hook_OnDeathStart(CharacterBody_OnDeathStart);
			CharacterModel.Awake += new hook_Awake(CharacterModel_Awake);
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			GlobalEventManager.onServerDamageDealt += GlobalEventManager_OnDamageDealt;
			CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays);
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
			GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath);
			LightningOrb.OnArrival += new hook_OnArrival(LightningOrb_OnArrival);
			OverlapAttack.Fire += new hook_Fire(OverlapAttack_Fire);
			BulletAttack.Fire += new hook_Fire(BulletAttack_Fire);
			BlastAttack.Fire += new hook_Fire(BlastAttack_Fire);
			if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI"))
			{
				SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init);
			}
		}

		private Result BlastAttack_Fire(orig_Fire orig, BlastAttack self)
		{
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)self.attacker))
			{
				GameObject attacker = self.attacker;
				if ((Object)(object)attacker.GetComponent<CharacterBody>() != (Object)null)
				{
					if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.acridBuff))
					{
						ref DamageType damageType = ref self.damageType.damageType;
						damageType = (DamageType)((uint)damageType | 0x1000u);
					}
					if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.impbossBuff))
					{
						ref DamageType damageType2 = ref self.damageType.damageType;
						damageType2 = (DamageType)((uint)damageType2 | 0x400u);
					}
					if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionFireBuff))
					{
						ref DamageType damageType3 = ref self.damageType.damageType;
						damageType3 = (DamageType)((uint)damageType3 | 0x80u);
					}
					if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionFreezeBuff))
					{
						ref DamageType damageType4 = ref self.damageType.damageType;
						damageType4 = (DamageType)((uint)damageType4 | 0x100u);
					}
					if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionShockBuff))
					{
						ref DamageType damageType5 = ref self.damageType.damageType;
						damageType5 = (DamageType)((uint)damageType5 | 0x1000000u);
					}
					if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.decayAwakenedBuff))
					{
						DamageAPI.AddModdedDamageType(self, Damage.shiggyDecay);
					}
				}
			}
			return orig.Invoke(self);
		}

		private void BulletAttack_Fire(orig_Fire orig, BulletAttack self)
		{
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self.owner) && (Object)(object)self.owner.GetComponent<CharacterBody>() != (Object)null)
			{
				GameObject owner = self.owner;
				if (owner.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.acridBuff))
				{
					ref DamageType damageType = ref self.damageType.damageType;
					damageType = (DamageType)((uint)damageType | 0x1000u);
				}
				if (owner.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.impbossBuff))
				{
					ref DamageType damageType2 = ref self.damageType.damageType;
					damageType2 = (DamageType)((uint)damageType2 | 0x400u);
				}
				if (owner.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionFireBuff))
				{
					ref DamageType damageType3 = ref self.damageType.damageType;
					damageType3 = (DamageType)((uint)damageType3 | 0x80u);
				}
				if (owner.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionFreezeBuff))
				{
					ref DamageType damageType4 = ref self.damageType.damageType;
					damageType4 = (DamageType)((uint)damageType4 | 0x100u);
				}
				if (owner.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionShockBuff))
				{
					ref DamageType damageType5 = ref self.damageType.damageType;
					damageType5 = (DamageType)((uint)damageType5 | 0x1000000u);
				}
				if (owner.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.decayAwakenedBuff))
				{
					DamageAPI.AddModdedDamageType(self, Damage.shiggyDecay);
				}
			}
		}

		private bool OverlapAttack_Fire(orig_Fire orig, OverlapAttack self, List<HurtBox> hitResults)
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)self.attacker) && (Object)(object)self.attacker.GetComponent<CharacterBody>() != (Object)null)
			{
				GameObject attacker = self.attacker;
				if (attacker.gameObject.GetComponent<CharacterBody>().baseNameToken == "TEAL_SHIGGY_BODY_NAME")
				{
					DamageAPI.AddModdedDamageType(self, Damage.shiggyDecay);
				}
				if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.acridBuff))
				{
					ref DamageType damageType = ref self.damageType.damageType;
					damageType = (DamageType)((uint)damageType | 0x1000u);
				}
				if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.impbossBuff))
				{
					ref DamageType damageType2 = ref self.damageType.damageType;
					damageType2 = (DamageType)((uint)damageType2 | 0x400u);
				}
				if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionFireBuff))
				{
					ref DamageType damageType3 = ref self.damageType.damageType;
					damageType3 = (DamageType)((uint)damageType3 | 0x80u);
				}
				if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionFreezeBuff))
				{
					ref DamageType damageType4 = ref self.damageType.damageType;
					damageType4 = (DamageType)((uint)damageType4 | 0x100u);
				}
				if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.elementalFusionShockBuff))
				{
					ref DamageType damageType5 = ref self.damageType.damageType;
					damageType5 = (DamageType)((uint)damageType5 | 0x1000000u);
				}
				if (attacker.gameObject.GetComponent<CharacterBody>().HasBuff(Buffs.decayAwakenedBuff))
				{
					DamageAPI.AddModdedDamageType(self, Damage.shiggyDecay);
				}
			}
			return orig.Invoke(self, hitResults);
		}

		private void LightningOrb_OnArrival(orig_OnArrival orig, LightningOrb self)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Invalid comparison between Unknown and I4
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Expected O, but got Unknown
			orig.Invoke(self);
			if (self.attacker.gameObject.GetComponent<CharacterBody>().baseNameToken == "TEAL_SHIGGY_BODY_NAME" && (int)self.lightningType == 4)
			{
				NetMessageExtensions.Send((INetMessage)(object)new PerformForceNetworkRequest(self.attacker.gameObject.GetComponent<CharacterBody>().masterObjectId, ((Component)((Orb)self).target).transform.position, Vector3.up, 15f, 0f, self.damageValue, 360f, playEffect: false), (NetworkDestination)1);
				EffectManager.SpawnEffect(ShiggyAsset.voidMegaCrabExplosionEffect, new EffectData
				{
					origin = ((Component)((Orb)self).target).transform.position,
					scale = 15f
				}, true);
			}
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)((sender != null) ? sender.healthComponent : null)) && Object.op_Implicit((Object)(object)sender))
			{
				if (sender.HasBuff(Buffs.roboballminiattackspeedBuff))
				{
					args.baseAttackSpeedAdd += 0.02f * (float)sender.GetBuffCount(Buffs.roboballminiattackspeedBuff);
				}
				if (sender.HasBuff(Buffs.claydunestriderBuff))
				{
					args.baseAttackSpeedAdd += 0.5f;
				}
				if (sender.HasBuff(Buffs.multBuff))
				{
					args.armorAdd += 100f;
					args.attackSpeedMultAdd += 1f;
					args.moveSpeedReductionMultAdd += 0.6f;
				}
				if (sender.HasBuff(Buffs.stonetitanBuff))
				{
					args.armorAdd += 10f;
				}
				if (sender.HasBuff(Buffs.voidbarnaclemortarattackspeedBuff))
				{
					args.baseAttackSpeedAdd += 0.05f * (float)sender.GetBuffCount(Buffs.voidbarnaclemortarattackspeedBuff);
				}
				if (sender.HasBuff(Buffs.hermitcrabmortararmorBuff))
				{
					args.armorAdd += 1f * (float)sender.GetBuffCount(Buffs.hermitcrabmortararmorBuff);
				}
				if (sender.HasBuff(Buffs.verminsprintBuff))
				{
					args.moveSpeedMultAdd += 0.5f;
					sender.sprintingSpeedMultiplier = 2f;
				}
				if (sender.HasBuff(Buffs.airwalkBuff))
				{
					sender.acceleration *= 2f;
				}
				if (sender.HasBuff(Buffs.beetleBuff))
				{
					args.baseDamageAdd += 5f;
				}
				if (sender.HasBuff(Buffs.lesserwispBuff))
				{
					args.baseAttackSpeedAdd += 0.5f;
				}
				if (sender.HasBuff(Buffs.lunarexploderBuff))
				{
					args.baseShieldAdd += sender.maxHealth * 0.25f;
				}
				if (sender.HasBuff(Buffs.omniboostBuff))
				{
					args.damageMultAdd += 0.3f;
					args.attackSpeedMultAdd += 0.3f;
				}
				if (sender.HasBuff(Buffs.omniboostBuffStacks))
				{
					int buffCount = sender.GetBuffCount(Buffs.omniboostBuffStacks);
					args.damageMultAdd += 0.05f * (float)buffCount;
					args.attackSpeedMultAdd += 0.05f * (float)buffCount;
				}
				if (sender.HasBuff(Buffs.ingrainBuff))
				{
					args.baseRegenAdd += StaticValues.ingrainBuffHealthRegen * sender.healthComponent.fullCombinedHealth;
				}
				if (sender.HasBuff(Buffs.OFABuff))
				{
					args.armorAdd += sender.armor * (1f + StaticValues.OFACoefficient);
					args.attackSpeedMultAdd += StaticValues.OFACoefficient;
					args.moveSpeedMultAdd += StaticValues.OFACoefficient;
				}
				if (sender.HasBuff(Buffs.doubleTimeBuffStacks))
				{
					int buffCount2 = sender.GetBuffCount(Buffs.doubleTimeBuffStacks);
					args.damageMultAdd += StaticValues.doubleTimeCoefficient * (float)buffCount2;
					args.attackSpeedMultAdd += StaticValues.doubleTimeCoefficient * (float)buffCount2;
					args.moveSpeedMultAdd += StaticValues.doubleTimeCoefficient * (float)buffCount2;
				}
				if (sender.HasBuff(Buffs.doubleTimeDebuff))
				{
					args.attackSpeedMultAdd -= StaticValues.doubleTimeSlowCoefficient;
					args.moveSpeedMultAdd -= StaticValues.doubleTimeSlowCoefficient;
				}
			}
		}

		private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: 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_00f1: 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_0105: Invalid comparison between Unknown and I4
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Invalid comparison between Unknown and I4
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Expected O, but got Unknown
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0405: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0414: Unknown result type (might be due to invalid IL or missing references)
			//IL_0419: Unknown result type (might be due to invalid IL or missing references)
			//IL_0423: Invalid comparison between Unknown and I4
			//IL_0472: Unknown result type (might be due to invalid IL or missing references)
			//IL_047c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0481: Unknown result type (might be due to invalid IL or missing references)
			//IL_0486: Unknown result type (might be due to invalid IL or missing references)
			//IL_0490: Invalid comparison between Unknown and I4
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f0: Invalid comparison between Unknown and I4
			//IL_0434: Unknown result type (might be due to invalid IL or missing references)
			//IL_043e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0443: Unknown result type (might be due to invalid IL or missing references)
			//IL_0448: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0339: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_035d: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Expected O, but got Unknown
			//IL_083f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0849: Unknown result type (might be due to invalid IL or missing references)
			//IL_084e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0853: Unknown result type (might be due to invalid IL or missing references)
			//IL_085d: Invalid comparison between Unknown and I4
			//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ed: Expected O, but got Unknown
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0506: Unknown result type (might be due to invalid IL or missing references)
			//IL_050d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0512: Unknown result type (might be due to invalid IL or missing references)
			//IL_0517: Unknown result type (might be due to invalid IL or missing references)
			//IL_0519: Unknown result type (might be due to invalid IL or missing references)
			//IL_051e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0530: Unknown result type (might be due to invalid IL or missing references)
			//IL_0532: Unknown result type (might be due to invalid IL or missing references)
			//IL_0539: Unknown result type (might be due to invalid IL or missing references)
			//IL_053e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0543: Unknown result type (might be due to invalid IL or missing references)
			//IL_0545: Unknown result type (might be due to invalid IL or missing references)
			//IL_054a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_0557: Unknown result type (might be due to invalid IL or missing references)
			//IL_055c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0561: Unknown result type (might be due to invalid IL or missing references)
			//IL_0568: Unknown result type (might be due to invalid IL or missing references)
			//IL_056d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0572: Unknown result type (might be due to invalid IL or missing references)
			//IL_057d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0588: Unknown result type (might be due to invalid IL or missing references)
			//IL_058a: Unknown result type (might be due to invalid IL or missing references)
			//IL_058f: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09df: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Invalid comparison between Unknown and I4
			//IL_0cb6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cc0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cc5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cd4: Invalid comparison between Unknown and I4
			//IL_062f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dbc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dcb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dd0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dda: Invalid comparison between Unknown and I4
			//IL_089b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e3c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e46: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e4b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e50: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e5a: Invalid comparison between Unknown and I4
			//IL_0cf0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d13: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d1a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d24: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d37: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d42: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d56: Expected O, but got Unknown
			//IL_0a31: Unknown result type (might be due to invalid IL or missing references)
			//IL_0956: Unknown result type (might be due to invalid IL or missing references)
			//IL_0970: Unknown result type (might be due to invalid IL or missing references)
			//IL_0986: Unknown result type (might be due to invalid IL or missing references)
			//IL_098b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0992: Unknown result type (might be due to invalid IL or missing references)
			//IL_099d: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ae: Expected O, but got Unknown
			//IL_08d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0907: Unknown result type (might be due to invalid IL or missing references)
			//IL_090c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0913: Unknown result type (might be due to invalid IL or missing references)
			//IL_091e: Unknown result type (might be due to invalid IL or missing references)
			//IL_092f: Expected O, but got Unknown
			//IL_0ebc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ec6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ecb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ed0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eda: Invalid comparison between Unknown and I4
			//IL_0e06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b89: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a63: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f33: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f3d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f42: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f47: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f51: Invalid comparison between Unknown and I4
			//IL_0e86: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c10: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c12: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c17: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c29: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c33: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c38: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c3d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c3f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c4f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c60: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c78: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c83: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c85: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c8a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bbc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be5: Expected O, but got Unknown
			//IL_0ac1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0acd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b03: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b12: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b17: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b19: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b1e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b29: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b35: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b3a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b52: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b64: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a96: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0abf: Expected O, but got Unknown
			//IL_0680: Unknown result type (might be due to invalid IL or missing references)
			//IL_0697: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f2: Expected O, but got Unknown
			//IL_0fb6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fd4: Invalid comparison between Unknown and I4
			//IL_0ef4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f00: Unknown result type (might be due to invalid IL or missing references)
			//IL_0714: Unknown result type (might be due to invalid IL or missing references)
			//IL_072b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0742: Unknown result type (might be due to invalid IL or missing references)
			//IL_0758: Unknown result type (might be due to invalid IL or missing references)
			//IL_075d: Unknown result type (might be due to invalid IL or missing references)
			//IL_075f: Unknown result type (might be due to invalid IL or missing references)
			//IL_076a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0775: Unknown result type (might be due to invalid IL or missing references)
			//IL_0776: Unknown result type (might be due to invalid IL or missing references)
			//IL_077b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0786: Expected O, but got Unknown
			//IL_1063: Unknown result type (might be due to invalid IL or missing references)
			//IL_106d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1072: Unknown result type (might be due to invalid IL or missing references)
			//IL_1077: Unknown result type (might be due to invalid IL or missing references)
			//IL_1081: Invalid comparison between Unknown and I4
			//IL_0f7d: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0806: Unknown result type (might be due to invalid IL or missing references)
			//IL_0807: Unknown result type (might be due to invalid IL or missing references)
			//IL_080c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0817: Expected O, but got Unknown
			//IL_0ffb: Unknown result type (might be due to invalid IL or missing references)
			//IL_1001: Unknown result type (might be due to invalid IL or missing references)
			//IL_1006: Unknown result type (might be due to invalid IL or missing references)
			//IL_1091: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageInfo, victim);
			if (!Object.op_Implicit((Object)(object)damageInfo.attacker) || !((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>() != (Object)null))
			{
				return;
			}
			CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
			CharacterBody component2 = victim.GetComponent<CharacterBody>();
			if (component.HasBuff(Buffs.impbossBuff))
			{
				damageInfo.damageType |= DamageTypeCombo.op_Implicit((DamageType)1024);
			}
			if (component.HasBuff(Buffs.acridBuff))
			{
				damageInfo.damageType |= DamageTypeCombo.op_Implicit((DamageType)4096);
			}
			if (component.HasBuff(Buffs.decayAwakenedBuff))
			{
				DamageAPI.AddModdedDamageType(damageInfo, Damage.shiggyDecay);
			}
			if (component.HasBuff(Buffs.finalReleaseBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864)
			{
				int buffCount = component.GetBuffCount(Buffs.finalReleaseBuff);
				NetworkingHelpers.ApplyBuff(component, Buffs.finalReleaseBuff.buffIndex, buffCount + 1, -1f);
			}
			if (component.HasBuff(Buffs.commandoBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				DamageInfo val = new DamageInfo();
				val.damage = damageInfo.damage * 0.1f;
				val.position = component2.corePosition;
				val.force = Vector3.zero;
				val.procCoefficient = 1f;
				val.damageColorIndex = (DamageColorIndex)0;
				val.crit = false;
				val.attacker = ((Component)component).gameObject;
				val.inflictor = ((Component)component2).gameObject;
				val.damageType = new DamageTypeCombo(damageInfo.damageType, (DamageTypeExtended)0, (DamageSource)2);
				val.procChainMask = default(ProcChainMask);
				component2.healthComponent.TakeDamage(val);
			}
			if (component.HasBuff(Buffs.vagrantBuff) && !component2.HasBuff(Buffs.vagrantdisableBuff) && damageInfo.damage / component.damage >= 4f && damageInfo.procCoefficient > 0f)
			{
				NetworkingHelpers.ApplyBuff(component, Buffs.vagrantBuff.buffIndex, 0, -1f);
				NetworkingHelpers.ApplyBuff(component, Buffs.vagrantdisableBuff.buffIndex, 10, -1f);
				component2.AddTimedBuffAuthority(Buffs.vagrantDebuff.buffIndex, 10f);
				Util.PlaySound(JellyNova.novaSoundString, ((Component)this).gameObject);
				if (Object.op_Implicit((Object)(object)JellyNova.novaEffectPrefab))
				{
					EffectManager.SpawnEffect(JellyNova.novaEffectPrefab, new EffectData
					{
						origin = component2.transform.position,
						scale = 12f * component.attackSpeed / 3f
					}, true);
				}
				new BlastAttack
				{
					crit = false,
					attacker = ((Component)component).gameObject,
					teamIndex = TeamComponent.GetObjectTeam(((Component)component).gameObject),
					falloffModel = (FalloffModel)0,
					baseDamage = component.damage * 21f * component.attackSpeed / 3f,
					damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2),
					damageColorIndex = (DamageColorIndex)0,
					baseForce = 0f,
					position = component2.transform.position,
					radius = 12f * component.attackSpeed / 3f,
					procCoefficient = 1f,
					attackerFiltering = (AttackerFiltering)2
				}.Fire();
			}
			if (component.HasBuff(Buffs.claydunestriderBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864)
			{
				damageInfo.damageType |= DamageTypeCombo.op_Implicit((DamageType)512);
			}
			if (component.HasBuff(Buffs.greaterwispBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient != 0f)
			{
				EffectManager.SpawnEffect(ShiggyAsset.chargegreaterwispBall, new EffectData
				{
					origin = component2.transform.position,
					scale = 6f,
					rotation = Util.QuaternionSafeLookRotation(damageInfo.force)
				}, true);
				new BlastAttack
				{
					crit = false,
					attacker = ((Component)component).gameObject,
					teamIndex = TeamComponent.GetObjectTeam(((Component)component).gameObject),
					falloffModel = (FalloffModel)0,
					baseDamage = damageInfo.damage * 0.5f,
					damageType = new DamageTypeCombo(damageInfo.damageType, (DamageTypeExtended)0, (DamageSource)2),
					damageColorIndex = (DamageColorIndex)0,
					baseForce = 0f,
					procChainMask = damageInfo.procChainMask,
					position = component2.transform.position,
					radius = 6f,
					procCoefficient = 0f,
					attackerFiltering = (AttackerFiltering)2
				}.Fire();
			}
			if ((component.HasBuff(Buffs.elementalFusionFireBuff) | component.HasBuff(Buffs.elementalFusionFreezeBuff) | component.HasBuff(Buffs.elementalFusionShockBuff)) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				int buffCount2 = component.GetBuffCount(Buffs.elementalFusionBuffStacks);
				if (buffCount2 < StaticValues.elementalFusionThreshold)
				{
					NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionBuffStacks.buffIndex, buffCount2 + 1, -1f);
				}
				else if (buffCount2 >= StaticValues.elementalFusionThreshold && Object.op_Implicit((Object)(object)component2))
				{
					if (component.HasBuff(Buffs.elementalFusionFireBuff))
					{
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionFireBuff.buffIndex, 0, -1f);
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionFreezeBuff.buffIndex, 1, -1f);
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionBuffStacks.buffIndex, 0, -1f);
						EffectManager.SpawnEffect(ShiggyAsset.artificerFireMuzzleEffect, new EffectData
						{
							origin = component.corePosition,
							scale = 1f,
							rotation = Quaternion.identity
						}, false);
					}
					else if (component.HasBuff(Buffs.elementalFusionFreezeBuff))
					{
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionFreezeBuff.buffIndex, 0, -1f);
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionShockBuff.buffIndex, 1, -1f);
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionBuffStacks.buffIndex, 0, -1f);
						EffectManager.SpawnEffect(ShiggyAsset.artificerIceMuzzleEffect, new EffectData
						{
							origin = component.corePosition,
							scale = 1f,
							rotation = Quaternion.identity
						}, false);
					}
					else if (component.HasBuff(Buffs.elementalFusionShockBuff))
					{
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionShockBuff.buffIndex, 0, -1f);
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionFireBuff.buffIndex, 1, -1f);
						NetworkingHelpers.ApplyBuff(component, Buffs.elementalFusionBuffStacks.buffIndex, 0, -1f);
						EffectManager.SpawnEffect(ShiggyAsset.artificerLightningMuzzleEffect, new EffectData
						{
							origin = component.corePosition,
							scale = 1f,
							rotation = Quaternion.identity
						}, false);
					}
				}
			}
			if (component.HasBuff(Buffs.omniboostBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				int buffCount3 = component2.GetBuffCount(Buffs.omniboostDebuffStacks);
				if (buffCount3 < 3)
				{
					NetworkingHelpers.ApplyBuff(component2, Buffs.omniboostDebuffStacks.buffIndex, buffCount3 + 1, -1f);
					buffCount3++;
					if (buffCount3 >= 3)
					{
						int buffCount4 = component.GetBuffCount(Buffs.omniboostBuffStacks);
						NetworkingHelpers.ApplyBuff(component, Buffs.omniboostBuffStacks.buffIndex, buffCount4 + 1, -1f);
						NetworkingHelpers.ApplyBuff(component2, Buffs.omniboostDebuffStacks.buffIndex, 0, -1f);
						EffectManager.SpawnEffect(FireEmbers.hitEffectPrefab, new EffectData
						{
							origin = component2.transform.position,
							scale = 1f
						}, false);
					}
				}
				else if (buffCount3 >= 3)
				{
					int buffCount5 = component.GetBuffCount(Buffs.omniboostBuffStacks);
					NetworkingHelpers.ApplyBuff(component, Buffs.omniboostBuffStacks.buffIndex, buffCount5 + 1, -1f);
					NetworkingHelpers.ApplyBuff(component2, Buffs.omniboostDebuffStacks.buffIndex, 0, -1f);
					EffectManager.SpawnEffect(FireEmbers.hitEffectPrefab, new EffectData
					{
						origin = component2.transform.position,
						scale = 1f
					}, false);
				}
			}
			if (component.HasBuff(Buffs.bigbangBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				int buffCount6 = component2.GetBuffCount(Buffs.bigbangDebuff);
				if (buffCount6 < 5)
				{
					NetworkingHelpers.ApplyBuff(component2, Buffs.bigbangDebuff.buffIndex, buffCount6 + 1, -1f);
					buffCount6++;
					if (buffCount6 >= 5)
					{
						NetworkingHelpers.ApplyBuff(component2, Buffs.bigbangDebuff.buffIndex, 0, -1f);
						if (Object.op_Implicit((Object)(object)ExplosionAttack.novaEffectPrefab))
						{
							EffectManager.SpawnEffect(ExplosionAttack.novaEffectPrefab, new EffectData
							{
								origin = component2.transform.position,
								scale = 20f * component.attackSpeed / 3f
							}, true);
						}
						new BlastAttack
						{
							crit = false,
							attacker = ((Component)component).gameObject,
							teamIndex = TeamComponent.GetObjectTeam(((Component)component).gameObject),
							falloffModel = (FalloffModel)0,
							baseDamage = damageInfo.damage * 10f,
							damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2),
							damageColorIndex = (DamageColorIndex)0,
							baseForce = 0f,
							position = component2.transform.position,
							radius = 20f * component.attackSpeed / 3f,
							procCoefficient = 0f,
							attackerFiltering = (AttackerFiltering)2
						}.Fire();
					}
				}
				else if (buffCount6 >= 5)
				{
					NetworkingHelpers.ApplyBuff(component2, Buffs.bigbangDebuff.buffIndex, 0, -1f);
					if (Object.op_Implicit((Object)(object)ExplosionAttack.novaEffectPrefab))
					{
						EffectManager.SpawnEffect(ExplosionAttack.novaEffectPrefab, new EffectData
						{
							origin = component2.transform.position,
							scale = 20f * component.attackSpeed / 3f
						}, true);
					}
					new BlastAttack
					{
						crit = false,
						attacker = ((Component)component).gameObject,
						teamIndex = TeamComponent.GetObjectTeam(((Component)component).gameObject),
						falloffModel = (FalloffModel)0,
						baseDamage = damageInfo.damage * 10f,
						damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2),
						damageColorIndex = (DamageColorIndex)0,
						baseForce = 0f,
						position = component2.transform.position,
						radius = 20f * component.attackSpeed / 3f,
						procCoefficient = 0f,
						attackerFiltering = (AttackerFiltering)2
					}.Fire();
				}
			}
			if (component.HasBuff(Buffs.wisperBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				DevilOrb val2 = new DevilOrb
				{
					origin = component.corePosition,
					damageValue = component.damage * 2f,
					teamIndex = component.teamComponent.teamIndex,
					attacker = ((Component)component).gameObject,
					damageColorIndex = (DamageColorIndex)3,
					scale = 1f,
					effectType = (EffectType)1,
					procCoefficient = 0f
				};
				if (Object.op_Implicit((Object)(object)(((Orb)val2).target = component2.mainHurtBox)))
				{
					val2.isCrit = Util.CheckRoll(component.crit, component.master);
					OrbManager.instance.AddOrb((Orb)(object)val2);
				}
			}
			if (component.HasBuff(Buffs.lightFormBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				int buffCount7 = component2.GetBuffCount(Buffs.lightFormDebuff);
				NetworkingHelpers.ApplyBuff(component2, Buffs.lightFormDebuff.buffIndex, buffCount7 + 1, -1f);
			}
			if (component.HasBuff(Buffs.darknessFormBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				int buffCount8 = component2.GetBuffCount(Buffs.darknessFormDebuff);
				NetworkingHelpers.ApplyBuff(component2, Buffs.darknessFormDebuff.buffIndex, buffCount8 + 1, -1f);
			}
			if (component2.HasBuff(Buffs.lightFormDebuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				NetMessageExtensions.Send((INetMessage)(object)new OrbDamageRequest(component2.masterObjectId, damageInfo.damage, component.masterObjectId), (NetworkDestination)1);
			}
			if (component.HasBuff(Buffs.lightAndDarknessFormBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				int buffCount9 = component2.GetBuffCount(Buffs.lightAndDarknessFormDebuff);
				NetworkingHelpers.ApplyBuff(component2, Buffs.lightAndDarknessFormDebuff.buffIndex, buffCount9 + 1, -1f);
			}
			if (component2.HasBuff(Buffs.lightAndDarknessFormDebuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				int buffCount10 = component2.GetBuffCount(Buffs.lightAndDarknessFormDebuff);
				NetMessageExtensions.Send((INetMessage)(object)new LightAndDarknessPullRequest(component.masterObjectId, component2.corePosition, Vector3.up, StaticValues.lightAndDarknessRange + StaticValues.lightAndDarknessRangeAddition * (float)buffCount10, 0f, damageInfo.damage * (StaticValues.lightAndDarknessBonusDamage * (float)buffCount10), 360f, playEffect: true), (NetworkDestination)1);
			}
			if (component.HasBuff(Buffs.limitBreakBuff) && damageInfo.damage > 0f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864)
			{
				NetMessageExtensions.Send((INetMessage)(object)new SpendHealthNetworkRequest(component.masterObjectId, component.healthComponent.fullHealth * StaticValues.limitBreakHealthCostCoefficient), (NetworkDestination)1);
			}
		}

		private void CharacterBody_OnDeathStart(orig_OnDeathStart orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)self))
			{
				return;
			}
			if (self.baseNameToken == "TEAL_SHIGGY_BODY_NAME")
			{
				ShiggyController component = ((Component)self).gameObject.GetComponent<ShiggyController>();
				if (Config.allowVoice.Value)
				{
					AkSoundEngine.PostEvent("ShiggyDeath", ((Component)self).gameObject);
				}
			}
			BuffController component2 = ((Component)self).gameObject.GetComponent<BuffController>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				if (Object.op_Implicit((Object)(object)component2.overloadingWard))
				{
					EntityState.Destroy((Object)(object)component2.overloadingWard);
				}
				if (Object.op_Implicit((Object)(object)component2.mushroomWard))
				{
					EntityState.Destroy((Object)(object)component2.mushroomWard);
				}
				if (Object.op_Implicit((Object)(object)component2.magmawormWard))
				{
					EntityState.Destroy((Object)(object)component2.magmawormWard);
				}
				if (Object.op_Implicit((Object)(object)component2.mortarIndicatorInstance))
				{
					component2.mortarIndicatorInstance.SetActive(false);
					EntityState.Destroy((Object)(object)component2.mortarIndicatorInstance.gameObject);
				}
				if (Object.op_Implicit((Object)(object)component2.voidmortarIndicatorInstance))
				{
					component2.voidmortarIndicatorInstance.SetActive(false);
					EntityState.Destroy((Object)(object)component2.voidmortarIndicatorInstance.gameObject);
				}
				if (Object.op_Implicit((Object)(object)component2.barbedSpikesIndicatorInstance))
				{
					component2.barbedSpikesIndicatorInstance.SetActive(false);
					EntityState.Destroy((Object)(object)component2.barbedSpikesIndicatorInstance.gameObject);
				}
			}
		}

		private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
		{
			//IL_00e6: 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)
			orig.Invoke(self, damageReport);
			if (Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.victimBody))
			{
				if (damageReport.attackerBody?.baseNameToken == "TEAL_SHIGGY_BODY_NAME" && damageReport.damageInfo.damage > 0f && damageReport.attackerBody.hasEffectiveAuthority)
				{
					EnergySystem component = ((Component)damageReport.attackerBody).gameObject.GetComponent<EnergySystem>();
					component.GainplusChaos(component.maxPlusChaos * StaticValues.killPlusChaosGain);
				}
				if (damageReport.attackerBody.HasBuff(Buffs.doubleTimeBuff) && damageReport.damageInfo.damage > 0f)
				{
					int buffCount = damageReport.attackerBody.GetBuffCount(Buffs.doubleTimeBuffStacks);
					NetworkingHelpers.ApplyBuff(damageReport.attackerBody, Buffs.doubleTimeBuffStacks.buffIndex, buffCount + 1, -1f);
				}
				if (damageReport.attackerBody.HasBuff(Buffs.omniboostBuffStacks) && damageReport.damageInfo.damage > 0f)
				{
					int buffCount2 = damageReport.attackerBody.GetBuffCount(Buffs.omniboostBuffStacks);
					NetworkingHelpers.ApplyBuff(damageReport.attackerBody, Buffs.omniboostBuffStacks.buffIndex, Mathf.RoundToInt((float)(buffCount2 / 2)), -1f);
				}
			}
		}

		private void SurvivorCatalog_Init(orig_Init orig)
		{
			orig.Invoke();
			foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs)
			{
				if (((Object)allSurvivorDef.bodyPrefab).name == "ShiggyBody")
				{
					CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, ShiggyAsset.mainAssetBundle.LoadAsset<GameObject>("humanoidShigaraki"), 0, true);
				}
			}
		}

		private void GlobalEventManager_OnDamageDealt(DamageReport report)
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			bool flag = !Object.op_Implicit((Object)(object)report.attacker) || !Object.op_Implicit((Object)(object)report.attackerBody);
			if (!flag && report.attackerBody.HasBuff(Buffs.claydunestriderBuff))
			{
				CharacterBody attackerBody = report.attackerBody;
				attackerBody.healthComponent.Heal(report.damageDealt * 0.1f, default(ProcChainMask), true);
			}
			if (!flag && report.attackerBody.HasBuff(Buffs.OFAFOBuff))
			{
				CharacterBody attackerBody2 = report.attackerBody;
				attackerBody2.healthComponent.Heal(report.damageDealt * StaticValues.OFAFOLifestealCoefficient, default(ProcChainMask), true);
				EnergySystem component = ((Component)attackerBody2).gameObject.GetComponent<EnergySystem>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.GainplusChaos(StaticValues.OFAFOEnergyGainCoefficient * report.damageDealt);
				}
			}
			if (!flag && report.attackerBody.HasBuff(Buffs.loaderBuff))
			{
				CharacterBody attackerBody3 = report.attackerBody;
				attackerBody3.healthComponent.AddBarrierAuthority(report.damageDealt * 0.01f);
			}
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Invalid comparison between Unknown and I4
			//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_00e3: Invalid comparison between Unknown and I4
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Invalid comparison between Unknown and I4
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c2: Invalid comparison between Unknown and I4
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_031d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_033d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Unknown result type (might be due to invalid IL or missing references)
			//IL_0352: Expected O, but got Unknown
			//IL_03cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03de: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0401: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_040d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0419: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0420: Unknown result type (might be due to invalid IL or missing references)
			//IL_0422: Unknown result type (might be due to invalid IL or missing references)
			//IL_0429: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0433: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0446: Unknown result type (might be due to invalid IL or missing references)
			//IL_0447: Unknown result type (might be due to invalid IL or missing references)
			//IL_0449: Unknown result type (might be due to invalid IL or missing references)
			//IL_044e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_045a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0465: Unknown result type (might be due to invalid IL or missing references)
			//IL_0470: Unknown result type (might be due to invalid IL or missing references)
			//IL_0472: Unknown result type (might be due to invalid IL or missing references)
			//IL_0477: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0483: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_048e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0493: Unknown result type (might be due to invalid IL or missing references)
			//IL_0498: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Expected O, but got Unknown
			//IL_059b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_063a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0640: Unknown result type (might be due to invalid IL or missing references)
			//IL_0645: Unknown result type (might be due to invalid IL or missing references)
			//IL_064a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Invalid comparison between Unknown and I4
			//IL_065a: Unknown result type (might be due to invalid IL or missing references)
			//IL_05be: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0588: Unknown result type (might be due to invalid IL or missing references)
			//IL_058d: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0718: Unknown result type (might be due to invalid IL or missing references)
			//IL_071f: Expected O, but got Unknown
			//IL_073f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0744: Unknown result type (might be due to invalid IL or missing references)
			//IL_074b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0750: Unknown result type (might be due to invalid IL or missing references)
			//IL_0758: Unknown result type (might be due to invalid IL or missing references)
			//IL_0775: Unknown result type (might be due to invalid IL or missing references)
			//IL_077c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0781: Unknown result type (might be due to invalid IL or missing references)
			//IL_0799: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cd: Expected O, but got Unknown
			//IL_07db: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0804: Expected O, but got Unknown
			//IL_09d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0847: Unknown result type (might be due to invalid IL or missing references)
			//IL_0853: Unknown result type (might be due to invalid IL or missing references)
			//IL_0865: Unknown result type (might be due to invalid IL or missing references)
			//IL_086a: Unknown result type (might be due to invalid IL or missing references)
			//IL_087c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0890: Unknown result type (might be due to invalid IL or missing references)
			//IL_0897: Expected O, but got Unknown
			//IL_08c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0904: Unknown result type (might be due to invalid IL or missing references)
			//IL_0929: Unknown result type (might be due to invalid IL or missing references)
			//IL_0930: Unknown result type (might be due to invalid IL or missing references)
			//IL_0935: Unknown result type (might be due to invalid IL or missing references)
			//IL_094e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0953: Unknown result type (might be due to invalid IL or missing references)
			//IL_0981: Unknown result type (might be due to invalid IL or missing references)
			//IL_0986: Unknown result type (might be due to invalid IL or missing references)
			//IL_0988: Unknown result type (might be due to invalid IL or missing references)
			//IL_0993: Unknown result type (might be due to invalid IL or missing references)
			//IL_0995: Unknown result type (might be due to invalid IL or missing references)
			//IL_099a: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8a: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09bf: Expected O, but got Unknown
			//IL_0a3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a45: Expected O, but got Unknown
			//IL_0a71: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ade: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0afc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b36: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b3b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b3d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b48: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b63: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d48: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bbd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b6d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b74: Expected O, but got Unknown
			//IL_0be7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d08: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c02: Expected O, but got Unknown
			//IL_0c2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c63: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c6f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c94: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cb9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d21: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d19: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d92: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d97: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d9c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da6: Invalid comparison between Unknown and I4
			//IL_0d26: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d32: Expected O, but got Unknown
			//IL_0eff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e76: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e7b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e7d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e8a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e15: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e1a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dbb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ead: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb4: Expected O, but got Unknown
			//IL_0ecf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f3c: Expected O, but got Unknown
			//IL_0f68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f6d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fbd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fde: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fe3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ff3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ffa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fff: Unknown result type (might be due to invalid IL or missing references)
			//IL_100b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1016: Unknown result type (might be due to invalid IL or missing references)
			//IL_1027: Unknown result type (might be due to invalid IL or missing references)
			//IL_1032: Unknown result type (might be due to invalid IL or missing references)
			//IL_1037: Unknown result type (might be due to invalid IL or missing references)
			//IL_103e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1049: Unknown result type (might be due to invalid IL or missing references)
			//IL_1054: Unknown result type (might be due to invalid IL or missing references)
			//IL_105b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1060: Unknown result type (might be due to invalid IL or missing references)
			//IL_1065: Unknown result type (might be due to invalid IL or missing references)
			//IL_1070: Expected O, but got Unknown
			orig.Invoke(self, damageInfo);
			if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.body) || !Object.op_Implicit((Object)(object)damageInfo.attacker))
			{
				return;
			}
			CharacterBody body = self.body;
			CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
			if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)body))
			{
				return;
			}
			if (body.HasBuff(Buffs.deathAuraDebuff) && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 67108864)
			{
				damageInfo.damage *= 1f + (float)body.GetBuffCount(Buffs.deathAuraDebuff) * StaticValues.deathAuraDebuffCoefficient;
			}
			if (component.HasBuff(Buffs.deathAuraBuff) && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 67108864)
			{
				damageInfo.damage *= 1f + (float)component.GetBuffCount(Buffs.deathAuraBuff) * StaticValues.deathAuraBuffCoefficient;
			}
			if (component.HasBuff(Buffs.multiplierBuff) && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864)
			{
				EnergySystem component2 = damageInfo.attacker.gameObject.GetComponent<EnergySystem>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					float num = 10f - component2.costflatplusChaos;
					if (num < 0f)
					{
						num = 0f;
					}
					float num2 = component2.costmultiplierplusChaos * num;
					if (num2 < 0f)
					{
						num2 = 0f;
					}
					if (component2.currentplusChaos < num2)
					{
						NetworkingHelpers.ApplyBuff(component, Buffs.multiplierBuff.buffIndex, 0, -1f);
						component2.TriggerGlow(0.3f, 0.3f, Color.black);
					}
					else if (component2.currentplusChaos >= num2)
					{
						damageInfo.damage *= 3f;
						component2.SpendplusChaos(num2);
					}
				}
			}
			if (body.HasBuff(Buffs.supernovaBuff.buffIndex))
			{
				int num3 = body.GetBuffCount(Buffs.supernovaBuff.buffIndex) - 1;
				int num4 = Mathf.RoundToInt(damageInfo.damage);
				int num5 = num4 + num3;
				if (num5 < Mathf.RoundToInt(StaticValues.supernovaHealthThreshold * body.healthComponent.fullCombinedHealth))
				{
					NetworkingHelpers.ApplyBuff(body, Buffs.supernovaBuff.buffIndex, num5, -1f);
				}
				else if (num5 >= Mathf.RoundToInt(StaticValues.supernovaHealthThreshold * body.healthComponent.fullCombinedHealth))
				{
					NetworkingHelpers.ApplyBuff(body, Buffs.supernovaBuff.buffIndex, 1, -1f);
					Vector3 position = body.transform.position;
					Util.PlaySound(FireMegaNova.novaSoundString, ((Component)body).gameObject);
					EffectManager.SpawnEffect(FireMegaNova.novaEffectPrefab, new EffectData
					{
						origin = position,
						scale = StaticValues.supernovaRadius,
						rotation = Quaternion.LookRotation(((Component)self).transform.position)
					}, true);
					Transform modelTransform = ((Component)body).gameObject.GetComponent<ModelLocator>().modelTransform;
					if (Object.op_Implicit((Object)(object)modelTransform))
					{
						TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(new GameObject());
						val.duration = 3f;
						val.animateShaderAlpha = true;
						val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
						val.destroyComponentOnEnd = true;
						val.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matVagrantEnergized");
					}
					new BlastAttack
					{
						attacker = ((Component)body).gameObject,
						baseDamage = body.damage * StaticValues.supernovaDamageCoefficient,
						baseForce = FireMegaNova.novaForce,
						bonusForce = Vector3.zero,
						attackerFiltering = (AttackerFiltering)2,
						crit = body.RollCrit(),
						damageColorIndex = (DamageColorIndex)0,
						damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)2),
						falloffModel = (FalloffModel)0,
						inflictor = ((Component)body).gameObject,
						position = position,
						procChainMask = default(ProcChainMask),
						procCoefficient = StaticValues.supernovaProcCoefficient,
						radius = StaticValues.supernovaRadius,
						losType = (LoSType)1,
						teamIndex = body.teamComponent.teamIndex,
						impactEffect = EffectCatalog.FindEffectIndexFromPrefab(FireMegaNova.novaImpactEffectPrefab)
					}.Fire();
				}
			}
			if (body.HasBuff(Buffs.darknessFormDebuff) && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) != 67108864 && damageInfo.procCoefficient > 0f)
			{
				int buffCount = body.GetBuffCount(Buffs.darknessFormDebuff);
				float num6 = damageInfo.damage * StaticValues.darkFormBonusDamage * (float)buffCount;
				damageInfo.damage += num6;
			}
			if (body.HasBuff(Buffs.MercExpose) && component.baseNameToken == "TEAL_SHIGGY_BODY_NAME")
			{
				body.RemoveBuff(Buffs.MercExpose);
				float num7 = component.damage * StaticValues.exposeDamageCoefficient;
				damageInfo.damage += num7;
				SkillLocator skillLocator = component.skillLocator;
				if (Object.op_Implicit((Object)(object)skillLocator))
				{
					skillLocator.DeductCooldownFromAllSkillsServer(1f);
				}
				EffectManager.SimpleImpactEffect(AssetReferences.mercExposeConsumeEffectPrefab, damageInfo.position, Vector3.up, true);
			}
			if (DamageAPI.HasModdedDamageType(damageInfo, Damage.shiggyDecay))
			{
				int buffCount2 = body.GetBuffCount(Buffs.decayDebuff);
				InflictDotInfo val2 = default(InflictDotInfo);
				val2.attackerObject = damageInfo.attacker.gameObject;
				val2.victimObject = ((Component)self).gameObject;
				val2.duration = 10f;
				val2.dotIndex = Dots.decayDot;
				DotController.InflictDot(ref val2);
				DecayEffectController component3 = ((Component)self).gameObject.GetComponent<DecayEffectController>();
				if (!Object.op_Implicit((Object)(object)component3))
				{
					component3 = ((Component)self).gameObject.AddComponent<DecayEffectController>();
					component3.attackerBody = component;
				}
			}
			bool flag = (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)2)) > 0;
			if (body.HasBuff(Buffs.jellyfishHealStacksBuff.buffIndex) && !flag && damageInfo.damage > 0f && (Object)(object)component != (Object)(object)body)
			{
				int num8 = body.GetBuffCount(Buffs.jellyfishHealStacksBuff.buffIndex) - 1;
				int num9 = Mathf.RoundToInt(damageInfo.damage);
				int num10 = num9 / 2 + num8;
				NetworkingHelpers.ApplyBuff(body, Buffs.jellyfishHealStacksBuff.buffIndex, num10, -1f);
			}
			if (body.HasBuff(Buffs.gargoyleProtectionBuff) && !flag && damageInfo.damage > 0f && (Object)(object)component != (Object)(object)body)
			{
				damageInfo.damage -= damageInfo.damage * StaticValues.gargoyleProtectionDamageReductionCoefficient;
				DamageInfo val3 = new DamageInfo();
				val3.damage = damageInfo.damage * StaticValues.gargoyleProtectionDamageReductionCoefficient;
				val3.position = damageInfo.attacker.transform.position;
				val3.force = Vector3.zero;
				val3.damageColorIndex = (DamageColorIndex)5;
				val3.crit = false;
				val3.attacker = ((Component)body).gameObject;
				val3.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)2), (DamageTypeExtended)0, (DamageSource)2);
				val3.procCoefficient = 0f;
				val3.procChainMask = default(ProcChainMask);
				component.healthComponent.TakeDamage(val3);
				EffectData val4 = new EffectData
				{
					origin = damageInfo.position,
					rotation = Quaternion.identity
				};
				EffectManager.SpawnEffect(ShiggyAsset.mushrumSporeImpactPrefab, val4, true);
				EffectData val5 = new EffectData
				{
					origin = damageInfo.attacker.transform.position,
					rotation = Quaternion.identity
				};
				EffectManager.SpawnEffect(ShiggyAsset.mushrumSporeImpactPrefab, val5, true);
			}
			if (body.HasBuff(Buffs.reversalBuffStacks) && !flag && damageInfo.damage > 0f && (Object)(object)component != (Object)(object)body)
			{
				NetMessageExtensions.Send((INetMessage)(object)new ForceReversalState(body.masterObjectId, component.transform.position), (NetworkDestination)2);
				damageInfo.force = Vector3.zero;
				damageInfo.rejected = true;
				if (body.HasBuff(Buffs.blindSensesBuff.buffIndex))
				{
					LightningOrb val6 = new LightningOrb();
					val6.attacker = ((Component)body).gameObject;
					val6.bouncedObjects = null;
					val6.bouncesRemaining = 0;
					val6.damageCoefficientPerBounce = 1f;
					val6.damageColorIndex = (DamageColorIndex)3;
					val6.damageValue = damageInfo.damage * StaticValues.blindSensesDamageCoefficient;
					val6.isCrit = body.RollCrit();
					val6.lightningType = (LightningType)6;
					((Orb)val6).origin = body.corePosition;
					val6.procChainMask = default(ProcChainMask);
					((ProcChainMask)(ref val6.procChainMask)).AddProc((ProcType)15);
					val6.procCoefficient = 1f;
					val6.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2);
					val6.range = 0f;
					val6.teamIndex = body.teamComponent.teamIndex;
					((Orb)val6).target = damageInfo.attacker.gameObject.GetComponent<CharacterBody>().mainHurtBox;
					OrbManager.instance.AddOrb((Orb)(object)val6);
					EffectData val7 = new EffectData
					{
						origin = damageInfo.position,
						rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere)
					};
					EffectManager.SpawnEffect(AssetReferences.bearEffectPrefab, val7, true);
				}
			}
			if (body.HasBuff(Buffs.blindSensesBuff.buffIndex) && !flag && damageInfo.damage > 0f && (Object)(object)component != (Object)(object)body && Util.CheckRoll(StaticValues.blindSensesBlockChance + Util.ConvertAmplificationPercentageIntoReductionPercentage(StaticValues.blindSensesBlockChance * (float)body.inventory.GetItemCount(Items.Bear)), body.master))
			{
				LightningOrb val8 = new LightningOrb();
				val8.attacker = ((Component)body).gameObject;
				val8.bouncedObjects = null;
				val8.bouncesRemaining = 0;
				val8.damageCoefficientPerBounce = 1f;
				val8.damageColorIndex = (DamageColorIndex)3;
				val8.damageValue = damageInfo.damage * StaticValues.blindSensesDamageCoefficient;
				val8.isCrit = body.RollCrit();
				val8.lightningType = (LightningType)6;
				((Orb)val8).origin = body.corePosition;
				val8.procChainMask = default(ProcChainMask);
				((ProcChainMask)(ref val8.procChainMask)).AddProc((ProcType)15);
				val8.procCoefficient = 1f;
				val8.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2);
				val8.range = 0f;
				val8.teamIndex = body.teamComponent.teamIndex;
				((Orb)val8).target = damageInfo.attacker.gameObject.GetComponent<CharacterBody>().mainHurtBox;
				OrbManager.instance.AddOrb((Orb)(object)val8);
				damageInfo.rejected = true;
				EffectData val9 = new EffectData
				{
					origin = damageInfo.position,
					rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere)
				};
				EffectManager.SpawnEffect(AssetReferences.bearEffectPrefab, val9, true);
			}
			if (body.HasBuff(Buffs.stoneFormStillBuff.buffIndex) && !flag && damageInfo.damage > 0f && (Object)(object)component != (Object)(object)body)
			{
				damageInfo.force = Vector3.zero;
				if (Util.CheckRoll(30f, body.master))
				{
					if (body.HasBuff(Buffs.blindSensesBuff.buffIndex))
					{
						LightningOrb val10 = new LightningOrb();
						val10.attacker = ((Component)body).gameObject;
						val10.bouncedObjects = null;
						val10.bouncesRemaining = 0;
						val10.damageCoefficientPerBounce = 1f;
						val10.damageColorIndex = (DamageColorIndex)3;
						val10.damageValue = damageInfo.damage * StaticValues.blindSensesDamageCoefficient;
						val10.isCrit = body.RollCrit();
						val10.lightningType = (LightningType)6;
						((Orb)val10).origin = body.corePosition;
						val10.procChainMask = default(ProcChainMask);
						((ProcChainMask)(ref val10.procChainMask)).AddProc((ProcType)15);
						val10.procCoefficient = 1f;
						val10.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2);
						val10.range = 0f;
						val10.teamIndex = body.teamComponent.teamIndex;
						((Orb)val10).target = damageInfo.attacker.gameObject.GetComponent<CharacterBody>().mainHurtBox;
						OrbManager.instance.AddOrb((Orb)(object)val10);
					}
					damageInfo.rejected = true;
					EffectData val11 = new EffectData
					{
						origin = damageInfo.position,
						rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere)
					};
					EffectManager.SpawnEffect(AssetReferences.bearEffectPrefab, val11, true);
				}
			}
			if (body.HasBuff(Buffs.stonetitanBuff.buffIndex) && !flag && damageInfo.damage > 0f && (Object)(object)component != (Object)(object)body)
			{
				if (self.combinedHealthFraction < 0.5f && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864)
				{
					damageInfo.force = Vector3.zero;
					damageInfo.damage -= body.armor;
					if (damageInfo.damage < 0f)
					{
						self.Heal(Mathf.Abs(damageInfo.damage), default(ProcChainMask), true);
						damageInfo.damage = 0f;
					}
				}
				else
				{
					damageInfo.force = Vector3.zero;
					damageInfo.damage = Mathf.Max(1f, damageInfo.damage - body.armor);
				}
			}
			if (body.HasBuff(Buffs.alphashieldonBuff.buffIndex) && !flag && damageInfo.damage > 0f && (Object)(object)component != (Object)(object)body)
			{
				EffectData val12 = new EffectData
				{
					origin = damageInfo.position,
					rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere)
				};
				EffectManager.SpawnEffect(AssetReferences.bearVoidEffectPrefab, val12, true);
				damageInfo.rejected = true;
				NetworkingHelpers.ApplyBuff(body, Buffs.alphashieldonBuff.buffIndex, 0, -1f);
				NetworkingHelpers.ApplyBuff(body, Buffs.alphashieldoffBuff.buffIndex, 10, -1f);
			}
			if (body.HasBuff(Buffs.gupspikeBuff.buffIndex) && !flag && damageInfo.damage > 0f && (Object)(object)component != (Object)(object)body)
			{
				blastAttack = new BlastAttack();
				blastAttack.radius = 6f;
				blastAttack.procCoefficient = 0.5f;
				blastAttack.position = ((Component)self).transform.position;
				blastAttack.attacker = ((Component)self).gameObject;
				blastAttack.crit = Util.CheckRoll(body.crit, body.master);
				blastAttack.baseDamage = body.damage * 1.5f;
				blastAttack.falloffModel = (FalloffModel)0;
				blastAttack.baseForce = 100f;
				blastAttack.teamIndex = TeamComponent.GetObjectTeam(((Component)body).gameObject);
				blastAttack.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)1024), (DamageTypeExtended)0, (DamageSource)2);
				blastAttack.attackerFiltering = (AttackerFiltering)2;
				DamageAPI.AddModdedDamageType(blastAttack, Damage.shiggyDecay);
				blastAttack.Fire();
				EffectManager.SpawnEffect(ShiggyAsset.GupSpikeEffect, new EffectData
				{
					origin = ((Component)self).transform.position,
					scale = 2f,
					rotation = Quaternion.LookRotation(((Component)self).transform.position)
				}, true);
			}
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Expected O, but got Unknown
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result