Decompiled source of Trovian v1.0.1

plugins/Trovian/Trovian.dll

Decompiled 2 weeks ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using EntityStates;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Projectile;
using RoR2.Skills;
using TrovianSkills.EntityStates;
using UnityEngine;
using UnityEngine.AddressableAssets;

[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("Trovian")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+f8a32b284a512104731940f97fbbe6616da43f6a")]
[assembly: AssemblyProduct("Trovian")]
[assembly: AssemblyTitle("Trovian")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace Trovian
{
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
}
namespace TrovianSkills
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.BreezyInterwebs.TrovianGunslinger", "TrovianGunslinger", "1.0.0")]
	public class CustomSkills : BaseUnityPlugin
	{
		private AssetBundleCreateRequest trovianAssets;

		private Sprite chargedIcon;

		private Sprite jumpIcon;

		private Sprite overchargeIcon;

		private Sprite stallIcon;

		private Sprite noneIcon;

		public void Awake()
		{
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Expected O, but got Unknown
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_038c: Expected O, but got Unknown
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cc: 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_04b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04db: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Expected O, but got Unknown
			//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0553: Unknown result type (might be due to invalid IL or missing references)
			//IL_063f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0665: Unknown result type (might be due to invalid IL or missing references)
			//IL_066f: Expected O, but got Unknown
			//IL_0670: Unknown result type (might be due to invalid IL or missing references)
			//IL_0672: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e9: 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_07a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ab: Expected O, but got Unknown
			//IL_07ac: 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)
			trovianAssets = AssetBundle.LoadFromFileAsync(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "AssetBundles", "trovianskills"));
			ref Sprite reference = ref chargedIcon;
			Object asset = trovianAssets.assetBundle.LoadAssetAsync<Sprite>("blast").asset;
			reference = (Sprite)(object)((asset is Sprite) ? asset : null);
			ref Sprite reference2 = ref jumpIcon;
			Object asset2 = trovianAssets.assetBundle.LoadAssetAsync<Sprite>("jump").asset;
			reference2 = (Sprite)(object)((asset2 is Sprite) ? asset2 : null);
			ref Sprite reference3 = ref overchargeIcon;
			Object asset3 = trovianAssets.assetBundle.LoadAssetAsync<Sprite>("overcharge").asset;
			reference3 = (Sprite)(object)((asset3 is Sprite) ? asset3 : null);
			ref Sprite reference4 = ref stallIcon;
			Object asset4 = trovianAssets.assetBundle.LoadAssetAsync<Sprite>("stall").asset;
			reference4 = (Sprite)(object)((asset4 is Sprite) ? asset4 : null);
			ref Sprite reference5 = ref noneIcon;
			Object asset5 = trovianAssets.assetBundle.LoadAssetAsync<Sprite>("none").asset;
			reference5 = (Sprite)(object)((asset5 is Sprite) ? asset5 : null);
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion();
			LanguageAPI.Add("COMMANDO_SECONDARY_CHARGEDSHOT_NAME", "Charged Shot");
			LanguageAPI.Add("COMMANDO_SECONDARY_CHARGEDSHOT_DESCRIPTION", "Fire a single charged shot for <style=cIsDamage>700% damage</style>.");
			SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>();
			val2.activationState = new SerializableEntityStateType(typeof(Blast));
			val2.activationStateMachineName = "Weapon";
			val2.baseMaxStock = 1;
			val2.baseRechargeInterval = 5f;
			val2.beginSkillCooldownOnSkillEnd = true;
			val2.canceledFromSprinting = false;
			val2.cancelSprintingOnActivation = true;
			val2.fullRestockOnAssign = true;
			val2.interruptPriority = (InterruptPriority)1;
			val2.isCombatSkill = true;
			val2.mustKeyPress = true;
			val2.rechargeStock = 1;
			val2.requiredStock = 1;
			val2.stockToConsume = 1;
			val2.icon = chargedIcon;
			val2.skillDescriptionToken = "COMMANDO_SECONDARY_CHARGEDSHOT_DESCRIPTION";
			val2.skillName = "COMMANDO_SECONDARY_CHARGEDSHOT_NAME";
			val2.skillNameToken = "COMMANDO_SECONDARY_CHARGEDSHOT_NAME";
			ContentAddition.AddSkillDef(val2);
			SkillLocator component = val.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.secondary.skillFamily;
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val3 = new Variant
			{
				skillDef = val2,
				unlockableName = ""
			};
			((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, false, (Node)null);
			variants[num] = val3;
			LanguageAPI.Add("COMMANDO_UTILITY_JUMP_NAME", "Blast Jump");
			LanguageAPI.Add("COMMANDO_UTILITY_JUMP_DESCRIPTION", "<style=cIsUtility>Fly</style> into the sky.");
			SkillDef val4 = ScriptableObject.CreateInstance<SkillDef>();
			val4.activationState = new SerializableEntityStateType(typeof(BlastUp));
			val4.activationStateMachineName = "Weapon";
			val4.baseMaxStock = 1;
			val4.baseRechargeInterval = 3f;
			val4.beginSkillCooldownOnSkillEnd = true;
			val4.canceledFromSprinting = false;
			val4.cancelSprintingOnActivation = false;
			val4.fullRestockOnAssign = true;
			val4.interruptPriority = (InterruptPriority)2;
			val4.isCombatSkill = false;
			val4.mustKeyPress = true;
			val4.rechargeStock = 1;
			val4.requiredStock = 1;
			val4.stockToConsume = 1;
			val4.icon = jumpIcon;
			val4.skillDescriptionToken = "COMMANDO_UTILITY_JUMP_DESCRIPTION";
			val4.skillName = "COMMANDO_UTILITY_JUMP_NAME";
			val4.skillNameToken = "COMMANDO_UTILITY_JUMP_NAME";
			ContentAddition.AddSkillDef(val4);
			component = val.GetComponent<SkillLocator>();
			skillFamily = component.utility.skillFamily;
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants2 = skillFamily.variants;
			int num2 = skillFamily.variants.Length - 1;
			val3 = new Variant
			{
				skillDef = val4,
				unlockableName = ""
			};
			((Variant)(ref val3)).viewableNode = new Node(val4.skillNameToken, false, (Node)null);
			variants2[num2] = val3;
			LanguageAPI.Add("COMMANDO_SPECIAL_OVERCHARGED_NAME", "Overcharged");
			LanguageAPI.Add("COMMANDO_SPECIAL_OVERCHARGED_DESCRIPTION", "Blast a 5 second burst of <style=cIsDamage>charged shots</style>.");
			SkillDef val5 = ScriptableObject.CreateInstance<SkillDef>();
			val5.activationState = new SerializableEntityStateType(typeof(Overcharge));
			val5.activationStateMachineName = "Weapon";
			val5.baseMaxStock = 1;
			val5.baseRechargeInterval = 15f;
			val5.beginSkillCooldownOnSkillEnd = false;
			val5.canceledFromSprinting = false;
			val5.cancelSprintingOnActivation = true;
			val5.fullRestockOnAssign = true;
			val5.interruptPriority = (InterruptPriority)1;
			val5.isCombatSkill = true;
			val5.mustKeyPress = false;
			val5.rechargeStock = 1;
			val5.requiredStock = 1;
			val5.stockToConsume = 1;
			val5.icon = overchargeIcon;
			val5.skillDescriptionToken = "COMMANDO_SPECIAL_OVERCHARGED_DESCRIPTION";
			val5.skillName = "COMMANDO_SPECIAL_OVERCHARGED_NAME";
			val5.skillNameToken = "COMMANDO_SPECIAL_OVERCHARGED_NAME";
			ContentAddition.AddSkillDef(val5);
			component = val.GetComponent<SkillLocator>();
			skillFamily = component.special.skillFamily;
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants3 = skillFamily.variants;
			int num3 = skillFamily.variants.Length - 1;
			val3 = new Variant
			{
				skillDef = val5,
				unlockableName = ""
			};
			((Variant)(ref val3)).viewableNode = new Node(val5.skillNameToken, false, (Node)null);
			variants3[num3] = val3;
			LanguageAPI.Add("COMMANDO_PASSIVE_NONE_NAME", "No Passive");
			LanguageAPI.Add("COMMANDO_PASSIVE_NONE_DESCRIPTION", "Allows you to play vanilla Commando.");
			PassiveItemSkillDef val6 = ScriptableObject.CreateInstance<PassiveItemSkillDef>();
			val6.passiveItem = null;
			((SkillDef)val6).baseMaxStock = 1;
			((SkillDef)val6).baseRechargeInterval = 0f;
			((SkillDef)val6).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)val6).canceledFromSprinting = false;
			((SkillDef)val6).cancelSprintingOnActivation = false;
			((SkillDef)val6).fullRestockOnAssign = true;
			((SkillDef)val6).interruptPriority = (InterruptPriority)0;
			((SkillDef)val6).isCombatSkill = false;
			((SkillDef)val6).mustKeyPress = false;
			((SkillDef)val6).rechargeStock = 1;
			((SkillDef)val6).requiredStock = 1;
			((SkillDef)val6).stockToConsume = 1;
			((SkillDef)val6).icon = noneIcon;
			((SkillDef)val6).skillDescriptionToken = "COMMANDO_PASSIVE_NONE_DESCRIPTION";
			((SkillDef)val6).skillName = "COMMANDO_PASSIVE_NONE_NAME";
			((SkillDef)val6).skillNameToken = "COMMANDO_PASSIVE_NONE_NAME";
			ContentAddition.AddSkillDef((SkillDef)(object)val6);
			GenericSkill val7 = val.AddComponent<GenericSkill>();
			val7.skillName = ((Object)val).name + "UniqueSkill";
			SkillFamily val8 = ScriptableObject.CreateInstance<SkillFamily>();
			((Object)val8).name = ((Object)val).name + "UniqueFamily";
			Reflection.SetFieldValue<SkillFamily>((object)val7, "_skillFamily", val8);
			val8.variants = (Variant[])(object)new Variant[0];
			Array.Resize(ref val8.variants, val8.variants.Length + 1);
			Variant[] variants4 = val8.variants;
			int num4 = val8.variants.Length - 1;
			val3 = new Variant
			{
				skillDef = (SkillDef)(object)val6,
				unlockableName = ""
			};
			((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val6).skillNameToken, false, (Node)null);
			variants4[num4] = val3;
			ContentAddition.AddSkillFamily(val8);
			LanguageAPI.Add("COMMANDO_PASSIVE_LEECH_NAME", "Velocity Leecher");
			LanguageAPI.Add("COMMANDO_PASSIVE_LEECH_DESCRIPTION", "<style=cIsUtility>Slow your descent</style> upon damaging an enemy.");
			PassiveItemSkillDef val9 = ScriptableObject.CreateInstance<PassiveItemSkillDef>();
			val9.passiveItem = VelocityItem.myItemDef;
			((SkillDef)val9).baseMaxStock = 1;
			((SkillDef)val9).baseRechargeInterval = 0f;
			((SkillDef)val9).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)val9).canceledFromSprinting = false;
			((SkillDef)val9).cancelSprintingOnActivation = false;
			((SkillDef)val9).fullRestockOnAssign = true;
			((SkillDef)val9).interruptPriority = (InterruptPriority)0;
			((SkillDef)val9).isCombatSkill = false;
			((SkillDef)val9).mustKeyPress = false;
			((SkillDef)val9).rechargeStock = 1;
			((SkillDef)val9).requiredStock = 1;
			((SkillDef)val9).stockToConsume = 1;
			((SkillDef)val9).icon = stallIcon;
			((SkillDef)val9).skillDescriptionToken = "COMMANDO_PASSIVE_LEECH_DESCRIPTION";
			((SkillDef)val9).skillName = "COMMANDO_PASSIVE_LEECH_NAME";
			((SkillDef)val9).skillNameToken = "COMMANDO_PASSIVE_LEECH_NAME";
			ContentAddition.AddSkillDef((SkillDef)(object)val9);
			Array.Resize(ref val8.variants, val8.variants.Length + 1);
			Variant[] variants5 = val8.variants;
			int num5 = val8.variants.Length - 1;
			val3 = new Variant
			{
				skillDef = (SkillDef)(object)val9,
				unlockableName = ""
			};
			((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val9).skillNameToken, false, (Node)null);
			variants5[num5] = val3;
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.BreezyInterwebs.VelocityItem", "VelocityItem", "1.0.0")]
	public class VelocityItem : BaseUnityPlugin
	{
		public static ItemDef myItemDef = ScriptableObject.CreateInstance<ItemDef>();

		public void Awake()
		{
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Expected O, but got Unknown
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Expected O, but got Unknown
			((Object)myItemDef).name = "VelocityLeecher";
			myItemDef.nameToken = "VelocityLeecher";
			myItemDef.pickupToken = "VelocityLeecher";
			myItemDef.descriptionToken = "VelocityLeecher";
			myItemDef.loreToken = "VelocityLeecher";
			myItemDef.deprecatedTier = (ItemTier)5;
			myItemDef.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
			myItemDef.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
			myItemDef.canRemove = false;
			myItemDef.hidden = true;
			myItemDef.tags = (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)9,
				(ItemTag)15
			};
			ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null);
			ItemAPI.Add(new CustomItem(myItemDef, val));
			GlobalEventManager.onServerDamageDealt += GlobalEventManager_OnHitEnemy;
		}

		private void GlobalEventManager_OnHitEnemy(DamageReport report)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)report.attacker) || !Object.op_Implicit((Object)(object)report.attackerBody))
			{
				return;
			}
			CharacterBody attackerBody = report.attackerBody;
			if (Object.op_Implicit((Object)(object)attackerBody.inventory))
			{
				int itemCount = attackerBody.inventory.GetItemCount(myItemDef.itemIndex);
				if (itemCount > 0 && attackerBody.characterMotor.velocity.y < 0f)
				{
					attackerBody.characterMotor.velocity.y = -0.05f;
				}
			}
		}

		private void Update()
		{
		}
	}
}
namespace TrovianSkills.EntityStates
{
	public class Blast : BaseState
	{
		public static GameObject viendbomb = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterBigProjectile.prefab").WaitForCompletion();

		public static GameObject nanobomb = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mage/MageLightningBombProjectile.prefab").WaitForCompletion();

		public static int counter = 0;

		public override void OnEnter()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: 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_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			Ray aimRay = ((BaseState)this).GetAimRay();
			FireProjectileInfo val = default(FireProjectileInfo);
			val.projectilePrefab = viendbomb;
			val.position = ((EntityState)this).characterBody.corePosition;
			val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
			val.owner = ((EntityState)this).gameObject;
			val.damage = 7f * ((EntityState)this).characterBody.damage;
			val.force = 0f;
			val.crit = ((BaseState)this).RollCrit();
			FireProjectileInfo val2 = val;
			val = default(FireProjectileInfo);
			val.projectilePrefab = nanobomb;
			val.position = ((EntityState)this).characterBody.corePosition;
			val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
			val.owner = ((EntityState)this).gameObject;
			val.damage = 7f * ((EntityState)this).characterBody.damage;
			val.force = 0f;
			val.crit = ((BaseState)this).RollCrit();
			FireProjectileInfo val3 = val;
			if (counter >= 100)
			{
				counter = 0;
			}
			if (counter % 2 == 0)
			{
				((EntityState)this).PlayAnimation("Gesture Additive, Right", "FirePistol, Right");
				Util.PlaySound("Play_huntress_R_snipe_shoot", ((EntityState)this).gameObject);
				ProjectileManager.instance.FireProjectile(val2);
			}
			else
			{
				((EntityState)this).PlayAnimation("Gesture Additive, Left", "FirePistol, Left");
				Util.PlaySound("Play_huntress_R_snipe_shoot", ((EntityState)this).gameObject);
				ProjectileManager.instance.FireProjectile(val3);
			}
			counter++;
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= 0.1f && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class BlastUp : BaseState
	{
		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			Util.PlaySound("Play_huntress_R_snipe_shoot", ((EntityState)this).gameObject);
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			if (((EntityState)this).characterMotor.velocity.y > 0f)
			{
				((EntityState)this).characterMotor.velocity.y += 20f;
			}
			else
			{
				((EntityState)this).characterMotor.velocity.y = 30f;
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= 0.3f && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
	public class Overcharge : BaseState
	{
		public static float BaseDuration = 0f;

		public static float BaseDelayDuration = 0f;

		public static float DamageCoefficient = 7f;

		public float fireCountdown;

		public static GameObject viendbomb = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterBigProjectile.prefab").WaitForCompletion();

		public static GameObject nanobomb = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mage/MageLightningBombProjectile.prefab").WaitForCompletion();

		public static int counter = 0;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			Util.PlaySound("Play_loader_shift_activate", ((EntityState)this).gameObject);
		}

		public override void OnExit()
		{
			counter = 0;
			((EntityState)this).OnExit();
		}

		public override void FixedUpdate()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			Ray aimRay = ((BaseState)this).GetAimRay();
			FireProjectileInfo val = default(FireProjectileInfo);
			val.projectilePrefab = viendbomb;
			val.position = ((EntityState)this).characterBody.corePosition;
			val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
			val.owner = ((EntityState)this).gameObject;
			val.damage = 7f * ((EntityState)this).characterBody.damage;
			val.force = 0f;
			val.crit = ((BaseState)this).RollCrit();
			FireProjectileInfo val2 = val;
			val = default(FireProjectileInfo);
			val.projectilePrefab = nanobomb;
			val.position = ((EntityState)this).characterBody.corePosition;
			val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
			val.owner = ((EntityState)this).gameObject;
			val.damage = 7f * ((EntityState)this).characterBody.damage;
			val.force = 0f;
			val.crit = ((BaseState)this).RollCrit();
			FireProjectileInfo val3 = val;
			((EntityState)this).FixedUpdate();
			fireCountdown -= Time.fixedDeltaTime;
			if (fireCountdown <= 0f)
			{
				fireCountdown = 0.4f / base.attackSpeedStat;
				if (counter % 3 == 0)
				{
					((EntityState)this).PlayAnimation("Gesture Additive, Left", "FirePistol, Left");
					ProjectileManager.instance.FireProjectile(val3);
				}
				else
				{
					((EntityState)this).PlayAnimation("Gesture Additive, Right", "FirePistol, Right");
					Util.PlaySound("Play_huntress_R_snipe_shoot", ((EntityState)this).gameObject);
					ProjectileManager.instance.FireProjectile(val2);
				}
				counter++;
			}
			if (((EntityState)this).fixedAge >= 5f && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
}