Decompiled source of Starstorm2 v0.6.15

plugins/Starstorm2.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using AncientScepter;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.AI.Walker;
using EntityStates.AffixEmpyrean;
using EntityStates.AffixStorm;
using EntityStates.Bandit2;
using EntityStates.Bandit2.Weapon;
using EntityStates.Barrel;
using EntityStates.Captain.Weapon;
using EntityStates.Chirr;
using EntityStates.Chirr.Claws;
using EntityStates.Chirr.Wings;
using EntityStates.Commando;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.CrystalPickup;
using EntityStates.Drone;
using EntityStates.DroneTable;
using EntityStates.Engi.EngiMissilePainter;
using EntityStates.Events;
using EntityStates.GameplayEvents;
using EntityStates.Generic;
using EntityStates.GolemMonster;
using EntityStates.GravekeeperBoss;
using EntityStates.Huntress;
using EntityStates.ImpBossMonster;
using EntityStates.Knight;
using EntityStates.LemurianMonster;
using EntityStates.LunarGolem;
using EntityStates.LunarTable;
using EntityStates.LunarWisp;
using EntityStates.Merc;
using EntityStates.MiniMushroom;
using EntityStates.NemMerc;
using EntityStates.NullifierMonster;
using EntityStates.Toolbot;
using EntityStates.Trader.Bag;
using EntityStates.VoidSurvivor.CorruptMode;
using Grumpy;
using HG;
using HG.BlendableTypes;
using HG.Reflection;
using IL.EntityStates;
using IL.RoR2;
using JetBrains.Annotations;
using KinematicCharacterController;
using MSU;
using MSU.Config;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using On.EntityStates;
using On.EntityStates.Drone;
using On.EntityStates.Toolbot;
using On.EntityStates.VoidSurvivor.CorruptMode;
using On.RoR2;
using On.RoR2.CharacterAI;
using On.RoR2.Orbs;
using On.RoR2.Projectile;
using On.RoR2.UI;
using On.RoR2.UI.MainMenu;
using R2API;
using R2API.AddressReferencedAssets;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.ScriptableObjects;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RoR2;
using RoR2.Achievements;
using RoR2.Achievements.Artifacts;
using RoR2.Artifacts;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Hologram;
using RoR2.HudOverlay;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Networking;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2.UI.MainMenu;
using SS2;
using SS2.Components;
using SS2.Equipments;
using SS2.Interactables;
using SS2.Items;
using SS2.Orbs;
using SS2.Survivors;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.SceneManagement;
using UnityEngine.Serialization;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Starstorm 2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Starstorm 2")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: OptIn]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
public class ActivateTriggerAfterXSeconds : StateMachineBehaviour
{
	public string triggerParameterName;

	public float desiredTriggerTime;

	private float timer;

	public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
	{
		timer = 0f;
	}

	public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
	{
		timer += Time.deltaTime;
		if (timer >= desiredTriggerTime)
		{
			animator.SetTrigger(triggerParameterName);
			timer = 0f;
		}
	}

	public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
	{
		timer = 0f;
	}
}
public class CrosshairPositionNormalize : MonoBehaviour
{
	private RectTransform rectTransform;

	private void Awake()
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		rectTransform = ((Component)this).GetComponent<RectTransform>();
		((Transform)rectTransform).localPosition = Vector3.zero;
	}

	private void FixedUpdate()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		((Transform)rectTransform).localPosition = Vector3.zero;
	}
}
public class CrosshairScaleNormalize : MonoBehaviour
{
	private RectTransform rectTransform;

	private void Awake()
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		rectTransform = ((Component)this).GetComponent<RectTransform>();
		((Transform)rectTransform).localScale = new Vector3(1.2f, 1f, 0f);
	}

	private void FixedUpdate()
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		((Transform)rectTransform).localScale = new Vector3(1.2f, 1f, 0f);
	}
}
public class VFXListComponent : MonoBehaviour
{
	public List<GameObject> VFXParticles = new List<GameObject>();

	private void Start()
	{
	}

	private void FixedUpdate()
	{
	}

	public void TurnOffVFX()
	{
		foreach (GameObject vFXParticle in VFXParticles)
		{
			vFXParticle.SetActive(false);
		}
	}

	public void TurnOnVFX()
	{
		foreach (GameObject vFXParticle in VFXParticles)
		{
			vFXParticle.SetActive(true);
		}
	}
}
public class RulebookEnabler : MonoBehaviour
{
	public static RuleCategoryDef ruleCategoryDef;

	public static RuleDef playerDamageRule;

	public static int playerDamageRuleIndex;

	public static float playerDamageModifier;

	public static RuleDef playerArmorRule;

	public static int playerArmorRuleIndex;

	public static float playerArmorModifier;

	public static RuleDef stormsEnabledRule;

	public static int stormsEnabledRuleIndex;

	public static bool stormsEnabled;

	public static RuleDef eventsEnabledRule;

	public static int eventsEnabledRuleIndex;

	public static bool eventsEnabled;

	public static RuleDef starstormElitesEnabledRule;

	public static int starstormElitesEnabledRuleIndex;

	public static bool starstormElitesEnabled;

	public static Color color = new Color(0.52f, 0.74f, 0.87f, 1f);

	private static int ruleCategoryIndex;

	public static bool categoryEnabled = false;

	internal static IEnumerator Init()
	{
		RuleCategoryController.SetData += new hook_SetData(OnRoR2UIRuleCategoryControllerSetData);
		SceneDirector.Start += new hook_Start(SceneDirector_Start);
		HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
		ruleCategoryDef = new RuleCategoryDef();
		ruleCategoryDef.displayToken = "SS2_RULEBOOK_NAME";
		ruleCategoryDef.subtitleToken = "SS2_RULEBOOK_DESC";
		ruleCategoryDef.color = color;
		ruleCategoryDef.emptyTipToken = "SS2_RULEBOOK_EMPTY";
		ruleCategoryDef.editToken = "SS2_RULEBOOK_EDIT";
		ruleCategoryDef.ruleCategoryType = (RuleCategoryType)1;
		ruleCategoryDef.position = 250;
		ruleCategoryIndex = RuleCatalogExtras.AddCategory(ruleCategoryDef);
		playerDamageRule = new RuleDef("ss2PlayerDamageMod", "SS2_PLAYER_DAMAGE_RULE_NAME");
		playerDamageRule.category = ruleCategoryDef;
		ExtendedRuleChoiceDef obj = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRuleDefault", (object)"DamageDefault", false);
		((RuleChoiceDef)obj).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageDefault", SS2Bundle.Base);
		((RuleChoiceDef)obj).tooltipNameToken = "SS2_PLAYER_DAMAGE_DEFAULT_NAME_TOKEN";
		((RuleChoiceDef)obj).tooltipNameColor = color;
		((RuleChoiceDef)obj).tooltipBodyToken = "SS2_PLAYER_DAMAGE_DEFAULT_BODY_TOKEN";
		((RuleChoiceDef)obj).excludeByDefault = false;
		playerDamageRule.MakeNewestChoiceDefault();
		ExtendedRuleChoiceDef obj2 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule25Increase", (object)"25DamageIncrease", false);
		((RuleChoiceDef)obj2).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageIncrease25", SS2Bundle.Base);
		((RuleChoiceDef)obj2).tooltipNameToken = "SS2_PLAYER_DAMAGE_25_INCREASE_NAME_TOKEN";
		((RuleChoiceDef)obj2).tooltipNameColor = color;
		((RuleChoiceDef)obj2).tooltipBodyToken = "SS2_PLAYER_DAMAGE_25_INCREASE_BODY_TOKEN";
		((RuleChoiceDef)obj2).excludeByDefault = false;
		ExtendedRuleChoiceDef obj3 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule50Increase", (object)"50DamageIncrease", false);
		((RuleChoiceDef)obj3).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageIncrease50", SS2Bundle.Base);
		((RuleChoiceDef)obj3).tooltipNameToken = "SS2_PLAYER_DAMAGE_50_INCREASE_NAME_TOKEN";
		((RuleChoiceDef)obj3).tooltipNameColor = color;
		((RuleChoiceDef)obj3).tooltipBodyToken = "SS2_PLAYER_DAMAGE_50_INCREASE_BODY_TOKEN";
		((RuleChoiceDef)obj3).excludeByDefault = false;
		ExtendedRuleChoiceDef obj4 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule75Increase", (object)"75DamageIncrease", false);
		((RuleChoiceDef)obj4).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageIncrease75", SS2Bundle.Base);
		((RuleChoiceDef)obj4).tooltipNameToken = "SS2_PLAYER_DAMAGE_75_INCREASE_NAME_TOKEN";
		((RuleChoiceDef)obj4).tooltipNameColor = color;
		((RuleChoiceDef)obj4).tooltipBodyToken = "SS2_PLAYER_DAMAGE_75_INCREASE_BODY_TOKEN";
		((RuleChoiceDef)obj4).excludeByDefault = false;
		ExtendedRuleChoiceDef obj5 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule100Increase", (object)"100DamageIncrease", false);
		((RuleChoiceDef)obj5).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageIncrease100", SS2Bundle.Base);
		((RuleChoiceDef)obj5).tooltipNameToken = "SS2_PLAYER_DAMAGE_100_INCREASE_NAME_TOKEN";
		((RuleChoiceDef)obj5).tooltipNameColor = color;
		((RuleChoiceDef)obj5).tooltipBodyToken = "SS2_PLAYER_DAMAGE_100_INCREASE_BODY_TOKEN";
		((RuleChoiceDef)obj5).excludeByDefault = false;
		ExtendedRuleChoiceDef obj6 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule25Decrease", (object)"25DamageDecrease", false);
		((RuleChoiceDef)obj6).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageDecrease25", SS2Bundle.Base);
		((RuleChoiceDef)obj6).tooltipNameToken = "SS2_PLAYER_DAMAGE_25_DECREASE_NAME_TOKEN";
		((RuleChoiceDef)obj6).tooltipNameColor = color;
		((RuleChoiceDef)obj6).tooltipBodyToken = "SS2_PLAYER_DAMAGE_25_DECREASE_BODY_TOKEN";
		((RuleChoiceDef)obj6).excludeByDefault = false;
		ExtendedRuleChoiceDef obj7 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule50Decrease", (object)"50DamageDecrease", false);
		((RuleChoiceDef)obj7).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageDecrease50", SS2Bundle.Base);
		((RuleChoiceDef)obj7).tooltipNameToken = "SS2_PLAYER_DAMAGE_50_DECREASE_NAME_TOKEN";
		((RuleChoiceDef)obj7).tooltipNameColor = color;
		((RuleChoiceDef)obj7).tooltipBodyToken = "SS2_PLAYER_DAMAGE_50_DECREASE_BODY_TOKEN";
		((RuleChoiceDef)obj7).excludeByDefault = false;
		ExtendedRuleChoiceDef obj8 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule75Decrease", (object)"75DamageDecrease", false);
		((RuleChoiceDef)obj8).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageDecrease75", SS2Bundle.Base);
		((RuleChoiceDef)obj8).tooltipNameToken = "SS2_PLAYER_DAMAGE_75_DECREASE_NAME_TOKEN";
		((RuleChoiceDef)obj8).tooltipNameColor = color;
		((RuleChoiceDef)obj8).tooltipBodyToken = "SS2_PLAYER_DAMAGE_75_DECREASE_BODY_TOKEN";
		((RuleChoiceDef)obj8).excludeByDefault = false;
		ExtendedRuleChoiceDef obj9 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule90Decrease", (object)"90DamageDecrease", false);
		((RuleChoiceDef)obj9).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleDamageDecrease90", SS2Bundle.Base);
		((RuleChoiceDef)obj9).tooltipNameToken = "SS2_PLAYER_DAMAGE_90_DECREASE_NAME_TOKEN";
		((RuleChoiceDef)obj9).tooltipNameColor = color;
		((RuleChoiceDef)obj9).tooltipBodyToken = "SS2_PLAYER_DAMAGE_90_DECREASE_BODY_TOKEN";
		((RuleChoiceDef)obj9).excludeByDefault = false;
		RuleCatalogExtras.AddRuleToCatalog(playerDamageRule, ruleCategoryIndex);
		playerDamageRuleIndex = playerDamageRule.globalIndex;
		playerArmorRule = new RuleDef("ss2PlayerArmorMod", "SS2_PLAYER_ARMOR_RULE_NAME");
		playerArmorRule.category = ruleCategoryDef;
		ExtendedRuleChoiceDef obj10 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRuleDefault", (object)"Default", false);
		((RuleChoiceDef)obj10).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorDefault", SS2Bundle.Base);
		((RuleChoiceDef)obj10).tooltipNameToken = "SS2_PLAYER_ARMOR_DEFAULT_NAME_TOKEN";
		((RuleChoiceDef)obj10).tooltipNameColor = color;
		((RuleChoiceDef)obj10).tooltipBodyToken = "SS2_PLAYER_ARMOR_DEFAULT_BODY_TOKEN";
		((RuleChoiceDef)obj10).excludeByDefault = false;
		playerArmorRule.MakeNewestChoiceDefault();
		ExtendedRuleChoiceDef obj11 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule25Increase", (object)"25ArmorIncrease", false);
		((RuleChoiceDef)obj11).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorIncrease25", SS2Bundle.Base);
		((RuleChoiceDef)obj11).tooltipNameToken = "SS2_PLAYER_ARMOR_25_INCREASE_NAME_TOKEN";
		((RuleChoiceDef)obj11).tooltipNameColor = color;
		((RuleChoiceDef)obj11).tooltipBodyToken = "SS2_PLAYER_ARMOR_25_INCREASE_BODY_TOKEN";
		((RuleChoiceDef)obj11).excludeByDefault = false;
		ExtendedRuleChoiceDef obj12 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule50Increase", (object)"50ArmorIncrease", false);
		((RuleChoiceDef)obj12).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorIncrease50", SS2Bundle.Base);
		((RuleChoiceDef)obj12).tooltipNameToken = "SS2_PLAYER_ARMOR_50_INCREASE_NAME_TOKEN";
		((RuleChoiceDef)obj12).tooltipNameColor = color;
		((RuleChoiceDef)obj12).tooltipBodyToken = "SS2_PLAYER_ARMOR_50_INCREASE_BODY_TOKEN";
		((RuleChoiceDef)obj12).excludeByDefault = false;
		ExtendedRuleChoiceDef obj13 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule75Increase", (object)"75ArmorIncrease", false);
		((RuleChoiceDef)obj13).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorIncrease75", SS2Bundle.Base);
		((RuleChoiceDef)obj13).tooltipNameToken = "SS2_PLAYER_ARMOR_75_INCREASE_NAME_TOKEN";
		((RuleChoiceDef)obj13).tooltipNameColor = color;
		((RuleChoiceDef)obj13).tooltipBodyToken = "SS2_PLAYER_ARMOR_75_INCREASE_BODY_TOKEN";
		((RuleChoiceDef)obj13).excludeByDefault = false;
		ExtendedRuleChoiceDef obj14 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule100Increase", (object)"100ArmorIncrease", false);
		((RuleChoiceDef)obj14).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorIncrease100", SS2Bundle.Base);
		((RuleChoiceDef)obj14).tooltipNameToken = "SS2_PLAYER_ARMOR_100_INCREASE_NAME_TOKEN";
		((RuleChoiceDef)obj14).tooltipNameColor = color;
		((RuleChoiceDef)obj14).tooltipBodyToken = "SS2_PLAYER_ARMOR_100_INCREASE_BODY_TOKEN";
		((RuleChoiceDef)obj14).excludeByDefault = false;
		ExtendedRuleChoiceDef obj15 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule25Decrease", (object)"25ArmorDecrease", false);
		((RuleChoiceDef)obj15).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorDecrease25", SS2Bundle.Base);
		((RuleChoiceDef)obj15).tooltipNameToken = "SS2_PLAYER_ARMOR_25_DECREASE_NAME_TOKEN";
		((RuleChoiceDef)obj15).tooltipNameColor = color;
		((RuleChoiceDef)obj15).tooltipBodyToken = "SS2_PLAYER_ARMOR_25_DECREASE_BODY_TOKEN";
		((RuleChoiceDef)obj15).excludeByDefault = false;
		ExtendedRuleChoiceDef obj16 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule50Decrease", (object)"50ArmorDecrease", false);
		((RuleChoiceDef)obj16).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorDecrease50", SS2Bundle.Base);
		((RuleChoiceDef)obj16).tooltipNameToken = "SS2_PLAYER_ARMOR_50_DECREASE_NAME_TOKEN";
		((RuleChoiceDef)obj16).tooltipNameColor = color;
		((RuleChoiceDef)obj16).tooltipBodyToken = "SS2_PLAYER_ARMOR_50_DECREASE_BODY_TOKEN";
		((RuleChoiceDef)obj16).excludeByDefault = false;
		ExtendedRuleChoiceDef obj17 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule75Decrease", (object)"75ArmorDecrease", false);
		((RuleChoiceDef)obj17).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorDecrease75", SS2Bundle.Base);
		((RuleChoiceDef)obj17).tooltipNameToken = "SS2_PLAYER_ARMOR_75_DECREASE_NAME_TOKEN";
		((RuleChoiceDef)obj17).tooltipNameColor = color;
		((RuleChoiceDef)obj17).tooltipBodyToken = "SS2_PLAYER_ARMOR_75_DECREASE_BODY_TOKEN";
		((RuleChoiceDef)obj17).excludeByDefault = false;
		ExtendedRuleChoiceDef obj18 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule90Decrease", (object)"90ArmorDecrease", false);
		((RuleChoiceDef)obj18).sprite = SS2Assets.LoadAsset<Sprite>("texIconRuleArmorDecrease90", SS2Bundle.Base);
		((RuleChoiceDef)obj18).tooltipNameToken = "SS2_PLAYER_ARMOR_90_DECREASE_NAME_TOKEN";
		((RuleChoiceDef)obj18).tooltipNameColor = color;
		((RuleChoiceDef)obj18).tooltipBodyToken = "SS2_PLAYER_ARMOR_90_DECREASE_BODY_TOKEN";
		((RuleChoiceDef)obj18).excludeByDefault = false;
		RuleCatalogExtras.AddRuleToCatalog(playerArmorRule, ruleCategoryIndex);
		playerArmorRuleIndex = playerArmorRule.globalIndex;
		stormsEnabledRule = new RuleDef("ss2StormsEnabled", "SS2_STORMS_ENABLED_RULE_NAME");
		stormsEnabledRule.category = ruleCategoryDef;
		ExtendedRuleChoiceDef obj19 = RulesExtensions.AddExtendedRuleChoiceDef(stormsEnabledRule, "ss2StormsEnabled", (object)"StormsEnabled", false);
		((RuleChoiceDef)obj19).sprite = null;
		((RuleChoiceDef)obj19).tooltipNameToken = "SS2_STORMS_ENABLED_NAME_TOKEN";
		((RuleChoiceDef)obj19).tooltipNameColor = color;
		((RuleChoiceDef)obj19).tooltipBodyToken = "SS2_STORMS_ENABLED_BODY_TOKEN";
		((RuleChoiceDef)obj19).excludeByDefault = false;
		stormsEnabledRule.MakeNewestChoiceDefault();
		ExtendedRuleChoiceDef obj20 = RulesExtensions.AddExtendedRuleChoiceDef(stormsEnabledRule, "ss2StormsDisabled", (object)"StormsDisabled", false);
		((RuleChoiceDef)obj20).sprite = null;
		((RuleChoiceDef)obj20).tooltipNameToken = "SS2_STORMS_DISABLED_NAME_TOKEN";
		((RuleChoiceDef)obj20).tooltipNameColor = color;
		((RuleChoiceDef)obj20).tooltipBodyToken = "SS2_STORMS_DISABLED_BODY_TOKEN";
		((RuleChoiceDef)obj20).excludeByDefault = false;
		RuleCatalogExtras.AddRuleToCatalog(stormsEnabledRule, ruleCategoryIndex);
		stormsEnabledRuleIndex = stormsEnabledRule.globalIndex;
		eventsEnabledRule = new RuleDef("ss2EventsEnabled", "SS2_EVENTS_ENABLED_RULE_NAME");
		eventsEnabledRule.category = ruleCategoryDef;
		ExtendedRuleChoiceDef obj21 = RulesExtensions.AddExtendedRuleChoiceDef(eventsEnabledRule, "ss2EventsEnabled", (object)"EventsEnabled", false);
		((RuleChoiceDef)obj21).sprite = null;
		((RuleChoiceDef)obj21).tooltipNameToken = "SS2_EVENTS_ENABLED_NAME_TOKEN";
		((RuleChoiceDef)obj21).tooltipNameColor = color;
		((RuleChoiceDef)obj21).tooltipBodyToken = "SS2_EVENTS_ENABLED_BODY_TOKEN";
		((RuleChoiceDef)obj21).excludeByDefault = false;
		eventsEnabledRule.MakeNewestChoiceDefault();
		ExtendedRuleChoiceDef obj22 = RulesExtensions.AddExtendedRuleChoiceDef(eventsEnabledRule, "ss2EventsDisabled", (object)"EventsDisabled", false);
		((RuleChoiceDef)obj22).sprite = null;
		((RuleChoiceDef)obj22).tooltipNameToken = "SS2_EVENTS_DISABLED_NAME_TOKEN";
		((RuleChoiceDef)obj22).tooltipNameColor = color;
		((RuleChoiceDef)obj22).tooltipBodyToken = "SS2_EVENTS_DISABLED_BODY_TOKEN";
		((RuleChoiceDef)obj22).excludeByDefault = false;
		RuleCatalogExtras.AddRuleToCatalog(eventsEnabledRule, ruleCategoryIndex);
		eventsEnabledRuleIndex = eventsEnabledRule.globalIndex;
		starstormElitesEnabledRule = new RuleDef("ss2StarstormElitesEnabled", "SS2_STARSTORM_ELITES_ENABLED_RULE_NAME");
		starstormElitesEnabledRule.category = ruleCategoryDef;
		ExtendedRuleChoiceDef obj23 = RulesExtensions.AddExtendedRuleChoiceDef(starstormElitesEnabledRule, "ss2StarstormElitesEnabled", (object)"StarstormElitesEnabled", false);
		((RuleChoiceDef)obj23).sprite = null;
		((RuleChoiceDef)obj23).tooltipNameToken = "SS2_STARSTORM_ELITES_ENABLED_NAME_TOKEN";
		((RuleChoiceDef)obj23).tooltipNameColor = color;
		((RuleChoiceDef)obj23).tooltipBodyToken = "SS2_STARSTORM_ELITES_ENABLED_BODY_TOKEN";
		((RuleChoiceDef)obj23).excludeByDefault = false;
		starstormElitesEnabledRule.MakeNewestChoiceDefault();
		ExtendedRuleChoiceDef obj24 = RulesExtensions.AddExtendedRuleChoiceDef(starstormElitesEnabledRule, "ss2StarstormElitesDisabled", (object)"StarstormElitesDisabled", false);
		((RuleChoiceDef)obj24).sprite = null;
		((RuleChoiceDef)obj24).tooltipNameToken = "SS2_STARSTORM_ELITES_DISABLED_NAME_TOKEN";
		((RuleChoiceDef)obj24).tooltipNameColor = color;
		((RuleChoiceDef)obj24).tooltipBodyToken = "SS2_STARSTORM_ELITES_DISABLED_BODY_TOKEN";
		((RuleChoiceDef)obj24).excludeByDefault = false;
		RuleCatalogExtras.AddRuleToCatalog(starstormElitesEnabledRule, ruleCategoryIndex);
		starstormElitesEnabledRuleIndex = starstormElitesEnabledRule.globalIndex;
		yield return null;
	}

	public static void OnRoR2UIRuleCategoryControllerSetData(orig_SetData orig, RuleCategoryController self, RuleCategoryDef categoryDef, RuleChoiceMask availability, RuleBook rulebook)
	{
		orig.Invoke(self, categoryDef, availability, rulebook);
		if (categoryDef == ruleCategoryDef)
		{
			for (int i = 0; i < self.rulesToDisplay.Count; i++)
			{
				self.popoutButtonIconAllocator.elements[i].canVote = true;
			}
		}
	}

	private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
	{
		if ((Object)(object)damageInfo.attacker != (Object)null)
		{
			CharacterBody componentInChildren = ((Component)damageInfo.attacker.transform).GetComponentInChildren<CharacterBody>();
			if ((Object)(object)componentInChildren != (Object)null && componentInChildren.isPlayerControlled)
			{
				damageInfo.damage *= playerDamageModifier;
			}
		}
		if ((Object)(object)self.body != (Object)null && self.body.isPlayerControlled)
		{
			damageInfo.damage *= playerArmorModifier;
		}
		orig.Invoke(self, damageInfo);
	}

	public static void SceneDirector_Start(orig_Start orig, SceneDirector self)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self);
		ChoicesEnumerable choices = Run.instance.ruleBook.choices;
		Enumerator enumerator = ((ChoicesEnumerable)(ref choices)).GetEnumerator();
		try
		{
			while (((Enumerator)(ref enumerator)).MoveNext())
			{
				RuleChoiceDef current = ((Enumerator)(ref enumerator)).Current;
				if (current.ruleDef == playerDamageRule)
				{
					switch (current.tooltipNameToken)
					{
					case "SS2_PLAYER_DAMAGE_25_INCREASE_NAME_TOKEN":
						playerDamageModifier = 1.25f;
						break;
					case "SS2_PLAYER_DAMAGE_50_INCREASE_NAME_TOKEN":
						playerDamageModifier = 1.5f;
						break;
					case "SS2_PLAYER_DAMAGE_75_INCREASE_NAME_TOKEN":
						playerDamageModifier = 1.75f;
						break;
					case "SS2_PLAYER_DAMAGE_100_INCREASE_NAME_TOKEN":
						playerDamageModifier = 2f;
						break;
					case "SS2_PLAYER_DAMAGE_25_DECREASE_NAME_TOKEN":
						playerDamageModifier = 0.75f;
						break;
					case "SS2_PLAYER_DAMAGE_50_DECREASE_NAME_TOKEN":
						playerDamageModifier = 0.5f;
						break;
					case "SS2_PLAYER_DAMAGE_75_DECREASE_NAME_TOKEN":
						playerDamageModifier = 0.25f;
						break;
					case "SS2_PLAYER_DAMAGE_90_DECREASE_NAME_TOKEN":
						playerDamageModifier = 0.1f;
						break;
					case "SS2_PLAYER_DAMAGE_DEFAULT_NAME_TOKEN":
						playerDamageModifier = 1f;
						break;
					default:
						playerDamageModifier = 1f;
						break;
					}
				}
				if (current.ruleDef == playerArmorRule)
				{
					switch (current.tooltipNameToken)
					{
					case "SS2_PLAYER_ARMOR_25_INCREASE_NAME_TOKEN":
						playerArmorModifier = 1.25f;
						break;
					case "SS2_PLAYER_ARMOR_50_INCREASE_NAME_TOKEN":
						playerArmorModifier = 1.5f;
						break;
					case "SS2_PLAYER_ARMOR_75_INCREASE_NAME_TOKEN":
						playerArmorModifier = 1.75f;
						break;
					case "SS2_PLAYER_ARMOR_100_INCREASE_NAME_TOKEN":
						playerArmorModifier = 2f;
						break;
					case "SS2_PLAYER_ARMOR_25_DECREASE_NAME_TOKEN":
						playerArmorModifier = 0.75f;
						break;
					case "SS2_PLAYER_ARMOR_50_DECREASE_NAME_TOKEN":
						playerArmorModifier = 0.5f;
						break;
					case "SS2_PLAYER_ARMOR_75_DECREASE_NAME_TOKEN":
						playerArmorModifier = 0.25f;
						break;
					case "SS2_PLAYER_ARMOR_90_DECREASE_NAME_TOKEN":
						playerArmorModifier = 0.1f;
						break;
					case "SS2_PLAYER_ARMOR_DEFAULT_NAME_TOKEN":
						playerArmorModifier = 1f;
						break;
					default:
						playerArmorModifier = 1f;
						break;
					}
				}
				if (current.ruleDef == stormsEnabledRule)
				{
					if (current.tooltipNameToken == "SS2_STORMS_DISABLED_NAME")
					{
						stormsEnabled = false;
					}
					else
					{
						stormsEnabled = true;
					}
				}
				if (current.ruleDef == eventsEnabledRule)
				{
					if (current.tooltipNameToken == "SS2_EVENTS_DISABLED_NAME")
					{
						eventsEnabled = false;
					}
					else
					{
						eventsEnabled = true;
					}
				}
				if (current.ruleDef == starstormElitesEnabledRule)
				{
					if (current.tooltipNameToken == "SS2_STARSTORM_ELITES_DISABLED_NAME")
					{
						starstormElitesEnabled = false;
					}
					else
					{
						starstormElitesEnabled = true;
					}
				}
			}
		}
		finally
		{
			((IDisposable)(Enumerator)(ref enumerator)).Dispose();
		}
	}
}
namespace Starstorm2.Cores.States.Wayfarer
{
	internal class CloakState : BaseSkillState
	{
		public static float baseDuration = 3f;

		private Animator animator;

		private float duration;

		private bool hasCloaked;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((EntityState)this).PlayCrossfade("FullBody, Override", "Cloak", "Cloak.playbackRate", duration, 0.2f);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!hasCloaked && (double)animator.GetFloat("Cloak.active") > 0.5)
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.Cloak, 10f);
				hasCloaked = true;
			}
			if (((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
}
namespace Assets.Starstorm2.Modules.Pickups.Items.Tier2
{
	public class Balloon : SS2Item
	{
		public class BalloonBehavior : BaseItemBodyBehavior
		{
			[ItemDefAssociation(useOnServer = true, useOnClient = true)]
			public static ItemDef GetItemDef()
			{
				return SS2Content.Items.Balloon;
			}

			private void FixedUpdate()
			{
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.characterMotor) && Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body) && !((BaseItemBodyBehavior)this).body.characterMotor.isGrounded && ((BaseItemBodyBehavior)this).body.inputBank.jump.down)
				{
					((BaseItemBodyBehavior)this).body.characterMotor.velocity.y -= Time.fixedDeltaTime * Physics.gravity.y * reducedGravity + stackingEffect * (float)base.stack;
				}
			}
		}

		private const string TOKEN = "SS2_ITEM_BALLOON_DESC";

		public static float reducedGravity = 0.5f;

		public static float stackingEffect = 0.05f;

		public override SS2AssetRequest AssetRequest => SS2Assets.LoadAssetAsync<ItemAssetCollection>("acBalloon", SS2Bundle.Indev);

		public override void Initialize()
		{
		}

		public override bool IsAvailable(ContentPack contentPack)
		{
			return false;
		}
	}
}
namespace Assets.Starstorm2.Modules.EntityStates.Knight
{
	public class InvigoratePassive : BaseSkillState
	{
		public static float duration = 5f;

		public static float baseDuration = 5f;

		public static GameObject buffWard;

		private GameObject wardInstance;

		private bool hasBuffed;

		public static string mecanimParameter;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			hasBuffed = false;
		}

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

		public override void OnExit()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			if (!hasBuffed && ((EntityState)this).isAuthority)
			{
				hasBuffed = true;
				wardInstance = Object.Instantiate<GameObject>(buffWard);
				wardInstance.GetComponent<TeamFilter>().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex;
				wardInstance.GetComponent<NetworkedBodyAttachment>().AttachToGameObjectAndSpawn(((EntityState)this).gameObject, (string)null);
			}
			((EntityState)this).OnExit();
		}
	}
}
namespace Assets.Starstorm2.Modules.EntityStates.Knight.BuffedSkills
{
	public class BannerSlam : BaseState
	{
		public static int duration;

		public static int swingTimeCoefficient;

		public static SkillDef originalSkillRef;

		public static SkillDef buffedSkillRef;

		public static GameObject knightBannerWard;

		public static GameObject slowBuffWard;

		private GameObject slowBuffWardInstance;

		public override void OnEnter()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: 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_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: 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_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: 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_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			if (NetworkServer.active)
			{
				Vector3 val = ((EntityState)this).inputBank.aimOrigin - ((EntityState)this).inputBank.aimDirection;
				GameObject val2 = Object.Instantiate<GameObject>(knightBannerWard, val, Quaternion.identity);
				val2.GetComponent<TeamFilter>().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex;
				NetworkServer.Spawn(val2);
				slowBuffWardInstance = Object.Instantiate<GameObject>(slowBuffWard, val, Quaternion.identity);
				slowBuffWardInstance.GetComponent<TeamFilter>().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex;
				slowBuffWardInstance.GetComponent<NetworkedBodyAttachment>().AttachToGameObjectAndSpawn(val2, (string)null);
			}
			if (((EntityState)this).isAuthority)
			{
				new BlastAttack
				{
					attacker = ((EntityState)this).gameObject,
					baseDamage = base.damageStat,
					baseForce = 20f,
					bonusForce = Vector3.up,
					crit = false,
					damageType = DamageTypeCombo.op_Implicit((DamageType)0),
					falloffModel = (FalloffModel)1,
					procCoefficient = 0.1f,
					radius = 8f,
					position = ((EntityState)this).characterBody.footPosition,
					attackerFiltering = (AttackerFiltering)2,
					impactEffect = EffectCatalog.FindEffectIndexFromPrefab(SS2.Survivors.Knight.KnightImpactEffect),
					teamIndex = ((EntityState)this).teamComponent.teamIndex
				}.Fire();
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			((EntityState)this).outer.SetNextStateToMain();
		}

		public override void OnExit()
		{
			if (((EntityState)this).isAuthority)
			{
				GenericSkill primary = ((EntityState)this).skillLocator.primary;
				GenericSkill utility = ((EntityState)this).skillLocator.utility;
				GenericSkill special = ((EntityState)this).skillLocator.special;
				primary.UnsetSkillOverride((object)((EntityState)this).gameObject, SwingSword.buffedSkillRef, (SkillOverridePriority)4);
				utility.UnsetSkillOverride((object)((EntityState)this).gameObject, SpinUtility.buffedSkillRef, (SkillOverridePriority)4);
				special.UnsetSkillOverride((object)((EntityState)this).gameObject, BannerSpecial.buffedSkillRef, (SkillOverridePriority)4);
				special.DeductStock(1);
			}
			((EntityState)this).outer.SetNextStateToMain();
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	internal class StunSlash : BasicMeleeAttack
	{
		public static float swingTimeCoefficient = 1.42f;

		[FormatToken(/*Could not decode attribute arguments.*/)]
		public static GameObject beamProjectile;

		public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new SwingSword()).damageCoefficient;

		public override void OnEnter()
		{
			((BasicMeleeAttack)this).OnEnter();
			base.animator = ((EntityState)this).GetModelAnimator();
		}

		public override void FixedUpdate()
		{
			((BasicMeleeAttack)this).FixedUpdate();
		}

		public override void OnExit()
		{
			if (((EntityState)this).isAuthority)
			{
				GenericSkill primary = ((EntityState)this).skillLocator.primary;
				GenericSkill utility = ((EntityState)this).skillLocator.utility;
				GenericSkill special = ((EntityState)this).skillLocator.special;
				primary.UnsetSkillOverride((object)((EntityState)this).gameObject, SwingSword.buffedSkillRef, (SkillOverridePriority)4);
				utility.UnsetSkillOverride((object)((EntityState)this).gameObject, SpinUtility.buffedSkillRef, (SkillOverridePriority)4);
				special.UnsetSkillOverride((object)((EntityState)this).gameObject, BannerSpecial.buffedSkillRef, (SkillOverridePriority)4);
			}
			((EntityState)this).outer.SetNextStateToMain();
			((BasicMeleeAttack)this).OnExit();
		}

		public override void PlayAnimation()
		{
			string text = "SwingSword3";
			base.swingEffectMuzzleString = "SwingCenter";
			((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.05f);
		}

		public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack);
			DamageAPI.AddModdedDamageType(overlapAttack, SS2.Survivors.Knight.ExtendedStunDamageType);
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class TornadoSpin : BaseKnightMeleeAttack
	{
		public static float swingTimeCoefficient = 1f;

		public static GameObject beamProjectile;

		public static SkillDef originalSkillRef;

		private int _origLayer;

		public float hopVelocity = new SpinUtility().hopVelocity;

		public float airControl = 1f;

		public float upwardVelocity = 1f;

		public float forwardVelocity = 1f;

		public float minimumY = 1f;

		public float aimVelocity = 1f;

		[FormatToken(/*Could not decode attribute arguments.*/)]
		public static float TokenModifier_dmgCoefficient => new SpinUtility().damageCoefficient;

		public override void OnEnter()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1);
			animator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				_origLayer = ((Component)((EntityState)this).characterMotor.capsuleCollider).gameObject.layer;
				((Component)((EntityState)this).characterMotor.capsuleCollider).gameObject.layer = LayerIndex.fakeActor.intVal;
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			}
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 direction = ((Ray)(ref aimRay)).direction;
				((EntityState)this).characterBody.isSprinting = false;
				direction.y = Mathf.Max(direction.y, minimumY);
				Vector3 val = ((Vector3)(ref direction)).normalized * aimVelocity * ((BaseState)this).moveSpeedStat;
				Vector3 val2 = Vector3.up * upwardVelocity;
				Vector3 val3 = new Vector3(direction.x, 0f, direction.z);
				Vector3 normalized = ((Vector3)(ref val3)).normalized;
				Vector3 val4 = ((Vector3)(ref normalized)).normalized * forwardVelocity;
				((EntityState)this).characterMotor.velocity = val + val2 + val4;
			}
			if (!((BaseState)this).isGrounded)
			{
				((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity);
			}
			hitboxGroupName = "BigHitbox";
			damageType = (DamageType)32;
			damageCoefficient = 12f;
			procCoefficient = 1f;
			pushForce = 400f;
			bonusForce = Vector3.zero;
			baseDuration = 1f;
			attackStartPercentTime = 0.1f;
			attackEndPercentTime = 0.7f;
			earlyExitPercentTime = 0.5f;
			hitStopDuration = 0.014f;
			attackRecoil = 0.5f;
			hitHopVelocity = 9f;
			swingSoundString = "NemmandoSwing";
			hitSoundString = "";
			muzzleString = "SwingCenter";
			playbackRateParam = "Util.Hitbox";
			swingEffectPrefab = SS2.Survivors.Knight.KnightSpinEffect;
			hitEffectPrefab = SS2.Survivors.Knight.KnightHitEffect;
			base.OnEnter();
		}

		public override void FixedUpdate()
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				((EntityState)this).cameraTargetParams.fovOverride = Mathf.Lerp(SS2.Survivors.Knight.dodgeFOV, 60f, ((EntityState)this).fixedAge / duration);
			}
			((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector;
		}

		public override void OnExit()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((Component)((EntityState)this).characterMotor.capsuleCollider).gameObject.layer = _origLayer;
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			}
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2);
			base.OnExit();
		}

		public override void PlayAttackAnimation()
		{
			((EntityState)this).PlayCrossfade("FullBody, Override", "Utility", "Utility.playbackRate", duration * swingTimeCoefficient, 0.15f);
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
}
namespace Assets.Starstorm2.Modules.EntityStates.Executioner2.Templar
{
	public class Consecration : BaseSkillState
	{
		public float baseDuration = 0.5f;

		public static BuffDef holyBuff;

		private float duration;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			((EntityState)this).characterBody.AddTimedBuff(holyBuff, 10f);
		}

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

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class HolyWeapon : BaseSkillState
	{
		[FormatToken(/*Could not decode attribute arguments.*/)]
		public static float damageCoefficient;

		public static float procCoefficient;

		public static float baseDuration;

		public static float recoil;

		public static float spreadBloom;

		public static float force;

		[HideInInspector]
		public static GameObject muzzleEffectPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/muzzleflashes/Muzzleflash1");

		[HideInInspector]
		public static GameObject tracerPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/tracers/tracercommandodefault");

		[HideInInspector]
		public static GameObject hitPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/HitsparkCommando");

		private float duration;

		private float fireDuration;

		private string muzzleString;

		private bool hasFired;

		private Animator animator;

		public static float range = 55f;

		public static float minSpread = 6f;

		public static float maxSpread = 10f;

		public static uint bulletCount = 3u;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireDuration = 0.1f * duration;
			((EntityState)this).characterBody.SetAimTimer(2f);
			muzzleString = "Muzzle";
			hasFired = false;
			((EntityState)this).PlayCrossfade("Gesture, Override", "Primary", "Primary.playbackRate", duration * 2.5f, 0.05f);
			Shoot();
		}

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

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void Shoot()
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: 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_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: 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)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: 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)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: 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_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: 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)
			if (!hasFired)
			{
				hasFired = true;
				bool num = ((BaseState)this).RollCrit();
				string text = "ExecutionerPrimary";
				if (num)
				{
					text += "Crit";
				}
				Util.PlaySound(text, ((EntityState)this).gameObject);
				((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil);
				if (Object.op_Implicit((Object)(object)muzzleEffectPrefab))
				{
					EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false);
				}
				if (((EntityState)this).isAuthority)
				{
					float damage = damageCoefficient * ((BaseState)this).damageStat;
					Ray aimRay = ((BaseState)this).GetAimRay();
					BulletAttack val = new BulletAttack
					{
						aimVector = ((Ray)(ref aimRay)).direction,
						origin = ((Ray)(ref aimRay)).origin,
						damage = damage,
						damageColorIndex = (DamageColorIndex)0,
						damageType = DamageTypeCombo.op_Implicit((DamageType)512),
						falloffModel = (FalloffModel)2,
						maxDistance = 55f,
						force = force,
						hitMask = CommonMasks.bullet,
						isCrit = ((BaseState)this).RollCrit(),
						owner = ((EntityState)this).gameObject,
						muzzleName = muzzleString,
						smartCollision = false,
						procChainMask = default(ProcChainMask),
						procCoefficient = procCoefficient,
						radius = 2f,
						sniper = false,
						stopperMask = CommonMasks.bullet,
						weapon = null,
						spreadPitchScale = 0.7f,
						spreadYawScale = 0.7f,
						queryTriggerInteraction = (QueryTriggerInteraction)0,
						tracerEffectPrefab = tracerPrefab,
						hitEffectPrefab = hitPrefab,
						minSpread = minSpread,
						maxSpread = maxSpread,
						bulletCount = 1u
					};
					val.Fire();
					uint num2 = (uint)(Mathf.CeilToInt((float)bulletCount / 2f) - 1);
					val.minSpread = minSpread;
					val.maxSpread = maxSpread * 1.45f;
					val.bulletCount = num2;
					val.Fire();
					val.minSpread = minSpread * 1.45f;
					val.maxSpread = maxSpread * 2f;
					val.bulletCount = (uint)Mathf.FloorToInt((float)bulletCount / 2f);
					val.Fire();
					val.minSpread = minSpread * 2f;
					val.maxSpread = maxSpread * 4f;
					val.bulletCount = (uint)Mathf.FloorToInt((float)bulletCount / 2f);
					val.Fire();
				}
				((EntityState)this).characterBody.AddSpreadBloom(spreadBloom);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
}
namespace Assets.Starstorm2.Modules.EntityStates.Engineer
{
	internal class RemoteDetonation
	{
	}
}
namespace Assets.Starstorm2.Modules.EntityStates.Artificer
{
	public class AutoAimIcicle : BaseSkillState
	{
		public float baseDuration = 0.5f;

		private float duration;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
		}

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

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
}
namespace EntityStates
{
	public class GrabbedState : BaseState
	{
		public float duration = float.PositiveInfinity;

		public GrabController inflictor;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.GetLayerIndex("Body");
				((Behaviour)modelAnimator).enabled = false;
				modelAnimator.CrossFadeInFixedTime((Random.Range(0, 2) == 0) ? "Hurt1" : "Hurt2", 0.1f);
				modelAnimator.Update(0f);
			}
		}

		public override void OnExit()
		{
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				((Behaviour)modelAnimator).enabled = true;
			}
			((EntityState)this).OnExit();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
				if (Object.op_Implicit((Object)(object)inflictor))
				{
					inflictor.AttemptGrab(null);
					SS2Log.Warning("GrabbedState: " + ((EntityState)this).characterBody.GetDisplayName() + " duration expired!", 44, "FixedUpdate");
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)6;
		}
	}
}
namespace EntityStates.Wayfarer
{
	internal class CreateBuffWard : BaseSkillState
	{
		public static float baseDuration = 3.5f;

		public static float radius = 30f;

		private Animator animator;

		private GameObject buffPrefab;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			((EntityState)this).PlayCrossfade("FullBody, Override", "Ward", "Ward.playbackRate", baseDuration / ((BaseState)this).attackSpeedStat, 0.2f);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!Object.op_Implicit((Object)(object)buffPrefab))
			{
				_ = (double)animator.GetFloat("Ward.active");
				_ = 0.5;
			}
			if (((EntityState)this).fixedAge >= baseDuration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)buffPrefab))
			{
				Object.Destroy((Object)(object)buffPrefab);
			}
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	internal class FireChains : BaseSkillState
	{
		public static float baseDuration = 2.5f;

		public static float damageCoefficient = 4f;

		public static float force = 10f;

		public static float radius = 15f;

		public static GameObject explosionPrefab = Resources.Load<GameObject>("prefabs/effects/omnieffect/OmniExplosionVFX");

		private Animator animator;

		private float duration;

		private EffectData effectData;

		private BlastAttack attack;

		private ChildLocator locator;

		private bool hasAttackedL;

		private bool hasAttackedR;

		private GameObject chainPrefab;

		public override void OnEnter()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			effectData = new EffectData();
			effectData.scale = radius;
			((EntityState)this).PlayCrossfade("FullBody, Override", "Melee", "Melee.playbackRate", duration, 0.2f);
			locator = ((Component)((EntityState)this).GetModelTransform()).GetComponent<ChildLocator>();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)animator))
			{
				if (!hasAttackedL && (double)animator.GetFloat("MeleeL.active") > 0.5)
				{
					hasAttackedL = true;
					DoAttack("LanternL");
				}
				else if (!hasAttackedR && (double)animator.GetFloat("MeleeR.active") > 0.5)
				{
					hasAttackedR = true;
					DoAttack("LanternR");
				}
			}
			if (((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void DoAttack(string childName)
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			Util.PlayAttackSpeedSound(FireHook.soundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager instance = ProjectileManager.instance;
				GameObject obj = chainPrefab;
				Vector3 position = locator.FindChild(childName).position;
				Ray aimRay = ((BaseState)this).GetAimRay();
				instance.FireProjectile(obj, position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, force, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	internal class MeleeSlam : BaseSkillState
	{
		public static float baseDuration = 2f;

		public static float damageCoefficient = 4f;

		public static float force = 10f;

		public static float radius = 15f;

		public static GameObject explosionPrefab = Resources.Load<GameObject>("prefabs/effects/omnieffect/OmniExplosionVFX");

		private Animator animator;

		private float duration;

		private EffectData effectData;

		private BlastAttack attack;

		private ChildLocator locator;

		private bool hasAttackedL;

		private bool hasAttackedR;

		public override void OnEnter()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Expected O, but got Unknown
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			effectData = new EffectData();
			effectData.scale = radius;
			((EntityState)this).PlayCrossfade("FullBody, Override", "Melee", "Melee.playbackRate", duration, 0.2f);
			attack = new BlastAttack();
			attack.attacker = ((EntityState)this).gameObject;
			attack.inflictor = ((EntityState)this).gameObject;
			attack.baseDamage = ((BaseState)this).damageStat * damageCoefficient;
			attack.baseForce = force;
			attack.radius = radius;
			attack.teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject);
			locator = ((Component)((EntityState)this).GetModelTransform()).GetComponent<ChildLocator>();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)animator))
			{
				if (!hasAttackedL && (double)animator.GetFloat("MeleeL.active") > 0.5)
				{
					hasAttackedL = true;
					DoAttack("LanternL");
				}
				else if (!hasAttackedR && (double)animator.GetFloat("MeleeR.active") > 0.5)
				{
					hasAttackedR = true;
					DoAttack("LanternR");
				}
			}
			if (((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void DoAttack(string childName)
		{
			//IL_000c: 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_0018: 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_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			Vector3 position = locator.FindChild(childName).position;
			effectData.origin = position;
			EffectManager.SpawnEffect(explosionPrefab, effectData, true);
			if (((EntityState)this).isAuthority)
			{
				Debug.Log((object)position);
				attack.position = position;
				attack.Fire();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
}
namespace EntityStates.VoidFiend
{
	public class CorruptSwipe : BasicMeleeAttack
	{
		public float baseDuration = 0.5f;

		private float duration;

		public override void OnEnter()
		{
			((BasicMeleeAttack)this).OnEnter();
		}

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

		public override void FixedUpdate()
		{
			((BasicMeleeAttack)this).FixedUpdate();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class NadeArm : BaseSkillState
	{
		public GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamMuzzleflash.prefab").WaitForCompletion();

		[SerializeField]
		public GameObject projectilePrefab;

		[SerializeField]
		public float baseDuration = 2f;

		[SerializeField]
		public float damageCoefficient = 0.7f;

		[SerializeField]
		public float force = 20f;

		[SerializeField]
		public string attackString;

		[SerializeField]
		public float recoilAmplitude;

		[SerializeField]
		public float bloom;

		private float duration;

		public override void OnEnter()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			Ray aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((BaseState)this).StartAimMode(duration + 2f, false);
			((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude);
			((EntityState)this).characterBody.AddSpreadBloom(bloom);
			string text = "MuzzleBlaster";
			if (Object.op_Implicit((Object)(object)effectPrefab))
			{
				EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false);
			}
			if (((EntityState)this).isAuthority)
			{
				FireProjectileInfo val = default(FireProjectileInfo);
				val.projectilePrefab = SS2.Survivors.Acrid.corrodingSpitProjectilePrefab;
				val.position = ((Ray)(ref aimRay)).origin;
				val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction);
				val.owner = ((EntityState)this).gameObject;
				val.damage = ((BaseState)this).damageStat * damageCoefficient;
				val.force = force;
				val.crit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master);
				ProjectileManager.instance.FireProjectile(val);
			}
		}

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

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class StickyNadeArm : BaseSkillState
	{
		public float baseDuration = 0.5f;

		private float duration;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
		}

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

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class UncorruptSwipe : BasicMeleeAttack
	{
		public float baseDuration = 2f;

		private float duration;

		[SerializeField]
		public float recoilAmplitude;

		[SerializeField]
		public float bloom;

		[SerializeField]
		public string animationLayerName;

		[SerializeField]
		public string animationStateName;

		[SerializeField]
		public string animationPlaybackRateParameter;

		public override void OnEnter()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			duration = baseDuration;
			((BasicMeleeAttack)this).OnEnter();
			base.swingEffectPrefab = null;
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
		}

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

		public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack)
		{
			((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack);
		}

		public override void PlayAnimation()
		{
			((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParameter, duration, 0f);
		}

		public override void OnMeleeHitAuthority()
		{
			((BasicMeleeAttack)this).OnMeleeHitAuthority();
			((EntityState)this).characterBody.AddSpreadBloom(bloom);
		}

		public override void BeginMeleeAttackEffect()
		{
			((BaseState)this).AddRecoil(-0.1f * recoilAmplitude, 0.1f * recoilAmplitude, -1f * recoilAmplitude, 1f * recoilAmplitude);
			((BasicMeleeAttack)this).BeginMeleeAttackEffect();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
}
namespace EntityStates.Trader.Bag
{
	public class BagBaseState : BaseState
	{
		protected PickupPickerController pickupPickerController;

		protected TraderController traderController;

		protected virtual bool enableInteraction => true;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			pickupPickerController = ((EntityState)this).GetComponent<PickupPickerController>();
			traderController = ((EntityState)this).GetComponent<TraderController>();
			pickupPickerController.SetAvailable(enableInteraction);
		}
	}
	public class Idle : BagBaseState
	{
		protected override bool enableInteraction
		{
			get
			{
				Debug.Log((object)"returning true");
				return true;
			}
		}
	}
	public class TradeToIdle : BagBaseState
	{
		public static string enterSoundString;

		public static string exitSoundString;

		public static float duration;

		public static float dropUpVelocityStrength;

		public static float dropForwardVelocityStrength;

		public static GameObject muzzleFlashEffectPrefab;

		public static string muzzleString;

		public static float lowTrade = -0.1f;

		public static float highTrade = 0.4f;

		public static float rareThreshold = 0.72f;

		public static float uncommonThreshold = 0.32f;

		public static float commonThreshold = 0.01f;

		private bool foundValidItem;

		protected override bool enableInteraction => false;

		public override void OnEnter()
		{
			//IL_0026: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Invalid comparison between Unknown and I4
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: 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)
			//IL_01c8: 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_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: 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_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			Util.PlaySound(enterSoundString, ((EntityState)this).gameObject);
			if (!NetworkServer.active)
			{
				return;
			}
			foundValidItem = false;
			PickupIndex val = PickupIndex.none;
			ItemDef itemDef = ItemCatalog.GetItemDef(traderController.lastTradedItemIndex);
			if (!((Object)(object)itemDef != (Object)null))
			{
				return;
			}
			float num = traderController.GetValue(itemDef);
			Debug.Log((object)("initial player item value: " + num));
			if ((int)itemDef.tier == 0 || (int)itemDef.tier == 6)
			{
				num -= 0.05f;
			}
			num += Util.Remap(Random.value, 0f, 1f, lowTrade, highTrade);
			Debug.Log((object)("slightly randomized: " + num));
			if (num >= rareThreshold)
			{
				ItemIndex[] array = ItemCatalog.tier3ItemList.ToArray();
				val = PickupCatalog.FindPickupIndex(array[Random.Range(0, array.Length)]);
			}
			else if (num >= uncommonThreshold)
			{
				ItemIndex[] array2 = ItemCatalog.tier2ItemList.ToArray();
				val = PickupCatalog.FindPickupIndex(array2[Random.Range(0, array2.Length)]);
			}
			else if (num >= commonThreshold)
			{
				ItemIndex[] array3 = ItemCatalog.tier1ItemList.ToArray();
				val = PickupCatalog.FindPickupIndex(array3[Random.Range(0, array3.Length)]);
			}
			if (num < commonThreshold)
			{
				val = PickupCatalog.FindPickupIndex(Items.ScrapWhite.itemIndex);
			}
			else
			{
				if (val == PickupCatalog.FindPickupIndex(Items.ScrapWhite.itemIndex))
				{
					val = PickupCatalog.FindPickupIndex(Items.Syringe.itemIndex);
				}
				if (val == PickupCatalog.FindPickupIndex(Items.ScrapGreen.itemIndex))
				{
					val = PickupCatalog.FindPickupIndex(Items.Feather.itemIndex);
				}
				if (val == PickupCatalog.FindPickupIndex(Items.ScrapRed.itemIndex))
				{
					val = PickupCatalog.FindPickupIndex(Items.ExtraLife.itemIndex);
				}
			}
			if (!Run.instance.IsItemAvailable(((PickupIndex)(ref val)).itemIndex))
			{
				val = PickupCatalog.FindPickupIndex((ItemIndex)(((PickupIndex)(ref val)).itemIndex + 1));
			}
			if (itemDef.itemIndex == SS2Content.Items.VoidRock.itemIndex)
			{
				val = PickupCatalog.FindPickupIndex(SS2Content.Items.GildedAmulet.itemIndex);
			}
			traderController.ReduceValue();
			Debug.Log((object)("zan giving: " + ((PickupIndex)(ref val)).GetPickupNameToken()));
			if (val != PickupIndex.none)
			{
				foundValidItem = true;
				Transform val2 = ((BaseState)this).FindModelChild(muzzleString);
				PickupDropletController.CreatePickupDroplet(val, val2.position, Vector3.up * dropUpVelocityStrength + val2.forward * dropForwardVelocityStrength);
			}
		}

		public override void OnExit()
		{
			Util.PlaySound(exitSoundString, ((EntityState)this).gameObject);
			((EntityState)this).OnExit();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (foundValidItem && ((EntityState)this).fixedAge > duration)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Idle());
			}
		}
	}
	public class Trading : BagBaseState
	{
		public static float duration;

		public static string enterSoundString;

		public static string exitSoundString;

		protected override bool enableInteraction => false;

		public override void OnEnter()
		{
			base.OnEnter();
			Util.PlaySound(enterSoundString, ((EntityState)this).gameObject);
		}

		public override void OnExit()
		{
			Util.PlaySound(exitSoundString, ((EntityState)this).gameObject);
			((EntityState)this).OnExit();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge > duration)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new TradeToIdle());
			}
		}
	}
	public class WaitToBeginTrade : BagBaseState
	{
		public static float duration;

		protected override bool enableInteraction => false;

		public override void OnEnter()
		{
			base.OnEnter();
			((EntityState)this).PlayCrossfade("Body", "Scavenge", "Scavenge.playbackRate", duration + Trading.duration + TradeToIdle.duration, 0.05f);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge > duration)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Trading());
			}
		}
	}
}
namespace EntityStates.Seraph
{
	public class SeraphPrimary : BaseSkillState
	{
		[FormatToken(/*Could not decode attribute arguments.*/)]
		public static float damageCoefficient;

		public static float procCoefficient;

		public static float baseDuration;

		public static float recoil;

		public static float spreadBloom;

		public static float force;

		[HideInInspector]
		public static GameObject muzzleEffectPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/muzzleflashes/Muzzleflash1");

		[HideInInspector]
		public static GameObject tracerPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/tracers/tracercommandodefault");

		[HideInInspector]
		public static GameObject hitPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/HitsparkCommando");

		private float duration;

		private float fireDuration;

		private string muzzleString;

		private bool hasFired;

		private Animator animator;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireDuration = 0.1f * duration;
			((EntityState)this).characterBody.SetAimTimer(2f);
			muzzleString = "Muzzle";
			hasFired = false;
			((EntityState)this).PlayCrossfade("Gesture, Override", "Primary", "Primary.playbackRate", duration * 2.5f, 0.05f);
			Shoot();
		}

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

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void Shoot()
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: 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_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: 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_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			if (!hasFired)
			{
				hasFired = true;
				bool isCrit = ((BaseState)this).RollCrit();
				((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil);
				if (Object.op_Implicit((Object)(object)muzzleEffectPrefab))
				{
					EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false);
				}
				if (((EntityState)this).isAuthority)
				{
					_ = damageCoefficient;
					_ = ((BaseState)this).damageStat;
					Ray aimRay = ((BaseState)this).GetAimRay();
					new BulletAttack
					{
						aimVector = ((Ray)(ref aimRay)).direction,
						origin = ((Ray)(ref aimRay)).origin,
						damage = damageCoefficient * ((BaseState)this).damageStat,
						damageType = DamageTypeCombo.op_Implicit((DamageType)0),
						damageColorIndex = (DamageColorIndex)0,
						minSpread = 0f,
						maxSpread = ((EntityState)this).characterBody.spreadBloomAngle,
						falloffModel = (FalloffModel)0,
						force = force,
						isCrit = isCrit,
						owner = ((EntityState)this).gameObject,
						muzzleName = muzzleString,
						smartCollision = true,
						procChainMask = default(ProcChainMask),
						procCoefficient = procCoefficient,
						radius = 0.35f,
						weapon = ((EntityState)this).gameObject,
						tracerEffectPrefab = tracerPrefab,
						hitEffectPrefab = hitPrefab
					}.Fire();
				}
				((EntityState)this).characterBody.AddSpreadBloom(spreadBloom);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
}
namespace EntityStates.Runshroom
{
	public class PlaceSpores : BaseSkillState
	{
		private GameObject projectilePrefab;

		private bool hasFired;

		private bool hasWaited;

		public static float baseDuration;

		public static float damageCoefficient = 1f;

		public static float projectileVelocity = 40f;

		public static GameObject chargeEffectPrefab;

		private float duration;

		private Animator animator;

		private ChildLocator childLocator;

		private float originalMoveSpeed;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			projectilePrefab = SporeGrenade.projectilePrefab;
			originalMoveSpeed = ((EntityState)this).characterBody.moveSpeed;
			((EntityState)this).characterBody.moveSpeed = 0f;
			((EntityState)this).PlayCrossfade("Body", "ToIdle", 0.05f);
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			childLocator = ((EntityState)this).GetModelChildLocator();
			hasFired = false;
			hasWaited = false;
			animator = ((EntityState)this).GetModelAnimator();
		}

		public override void FixedUpdate()
		{
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			((EntityState)this).characterBody.moveSpeed = 0f;
			if (((EntityState)this).fixedAge >= duration * 0.2f && !hasWaited)
			{
				hasWaited = true;
				GameObject obj = Object.Instantiate<GameObject>(chargeEffectPrefab);
				obj.transform.SetParent(childLocator.FindChild("TippyTop"));
				obj.transform.position = childLocator.FindChild("TippyTop").position;
				((EntityState)this).PlayCrossfade("Body", "Attack", "Primary.playbackRate", duration, 0.1f);
			}
			if (animator.GetFloat("Attack") > 0.5f && !hasFired)
			{
				hasFired = true;
				if (((EntityState)this).isAuthority)
				{
					FireProjectile();
				}
			}
			if (((EntityState)this).fixedAge >= duration * 1.2f && hasFired)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public void FireProjectile()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: 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_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			float num = damageCoefficient * ((BaseState)this).damageStat;
			Ray aimRay = ((BaseState)this).GetAimRay();
			DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)0);
			value.damageSource = (DamageSource)1;
			ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(Vector3.down), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileVelocity, (DamageTypeCombo?)value);
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).characterBody.moveSpeed = originalMoveSpeed;
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)3;
		}
	}
	public class RushroomDeath : GenericCharacterDeath
	{
		public override void OnEnter()
		{
			((GenericCharacterDeath)this).OnEnter();
			VFXListComponent component = ((Component)((EntityState)this).characterBody).GetComponent<VFXListComponent>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.TurnOffVFX();
			}
		}

		public override void FixedUpdate()
		{
			((GenericCharacterDeath)this).FixedUpdate();
		}

		public override void OnExit()
		{
			((GenericCharacterDeath)this).OnExit();
		}
	}
}
namespace EntityStates.Railgunner
{
	public class AssaultRifle : BaseSkillState
	{
		[SerializeField]
		public static float damageCoeff = 1.25f;

		[SerializeField]
		public static float procCoeff = 0.7f;

		public float baseDuration = 0.5f;

		private float duration;

		public GameObject hitEffectPrefab;

		public GameObject tracerEffectPrefab;

		public override void OnEnter()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//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_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: 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_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			Ray aimRay = ((BaseState)this).GetAimRay();
			((BaseState)this).StartAimMode(aimRay, 2f, false);
			((BaseState)this).AddRecoil(-0.6f, 0.6f, -0.6f, 0.6f);
			bool isCrit = ((BaseState)this).RollCrit();
			if (((EntityState)this).isAuthority)
			{
				new BulletAttack
				{
					owner = ((EntityState)this).gameObject,
					weapon = ((EntityState)this).gameObject,
					origin = ((Ray)(ref aimRay)).origin,
					aimVector = ((Ray)(ref aimRay)).direction,
					minSpread = 1f,
					maxSpread = ((EntityState)this).characterBody.spreadBloomAngle,
					bulletCount = 1u,
					procCoefficient = procCoeff,
					damage = ((EntityState)this).characterBody.damage * damageCoeff,
					force = 3f,
					falloffModel = (FalloffModel)1,
					tracerEffectPrefab = tracerEffectPrefab,
					hitEffectPrefab = hitEffectPrefab,
					isCrit = isCrit,
					HitEffectNormal = false,
					smartCollision = true,
					maxDistance = 300f
				}.Fire();
			}
		}

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

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class PierceRifle : BaseSkillState
	{
		[SerializeField]
		public static float damageCoeff = 1f;

		[SerializeField]
		public static float procCoeff = 0.7f;

		public float baseDuration = 0.5f;

		private float duration;

		public GameObject hitEffectPrefab;

		public GameObject tracerEffectPrefab;

		public override void OnEnter()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//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_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			Ray aimRay = ((BaseState)this).GetAimRay();
			((BaseState)this).StartAimMode(aimRay, 2f, false);
			((BaseState)this).AddRecoil(-0.6f, 0.6f, -0.6f, 0.6f);
			bool isCrit = ((BaseState)this).RollCrit();
			if (((EntityState)this).isAuthority)
			{
				new BulletAttack
				{
					owner = ((EntityState)this).gameObject,
					weapon = ((EntityState)this).gameObject,
					origin = ((Ray)(ref aimRay)).origin,
					aimVector = ((Ray)(ref aimRay)).direction,
					minSpread = 0f,
					maxSpread = ((EntityState)this).characterBody.spreadBloomAngle,
					bulletCount = 1u,
					procCoefficient = procCoeff,
					damage = ((EntityState)this).characterBody.damage * damageCoeff,
					force = 3f,
					falloffModel = (FalloffModel)0,
					tracerEffectPrefab = tracerEffectPrefab,
					muzzleName = "MuzzleRight",
					hitEffectPrefab = hitEffectPrefab,
					isCrit = isCrit,
					HitEffectNormal = false,
					stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask,
					smartCollision = true,
					maxDistance = 600f
				}.Fire();
			}
		}

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

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
}
namespace EntityStates.Pyro
{
	public class FireFlamethrower : BaseState
	{
		public static float baseDuration;

		public static float baseTickFrequency;

		public static float baseEntryDuration;

		public static float pressureDuration;

		private float tickRate;

		private float stopwatch;

		private float flamethrowerStopwatch;

		private float duration;

		private float entryDuration;

		private bool hasBegunFlamethrower;

		public static float maxDistance;

		public static float heatPerTick;

		public static float tickProcCoefficient;

		public static float tickDamageCoefficient;

		public static float igniteChanceHighHeat;

		public static float heatIgniteThreshold;

		public static float recoilForce;

		public static float force;

		public static float radius;

		public static string muzzleString;

		public static GameObject impactEffectPrefab;

		public static GameObject flameEffectPrefab;

		private Transform flamethrowerTransform;

		private PyroController pc;

		private ChildLocator childLocator;

		private ParticleSystem flames;

		public override void OnEnter()
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			((EntityState)this).characterBody.isSprinting = false;
			pc = ((EntityState)this).GetComponent<PyroController>();
			Debug.Log((object)"flamer on enter");
			stopwatch = 0f;
			hasBegunFlamethrower = false;
			duration = baseDuration / base.attackSpeedStat;
			entryDuration = baseEntryDuration / base.attackSpeedStat;
			tickRate = baseTickFrequency / base.attackSpeedStat;
			((EntityState)this).characterBody.SetAimTimer(duration * 2f);
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				childLocator = ((Component)modelTransform).GetComponent<ChildLocator>();
			}
			impactEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/MissileExplosionVFX.prefab").WaitForCompletion();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (((stopwatch >= entryDuration && !hasBegunFlamethrower) || ((BaseState)this).HasBuff(SS2Content.Buffs.bdPyroPressure)) && !hasBegunFlamethrower)
			{
				hasBegunFlamethrower = true;
				flamethrowerTransform = Object.Instantiate<GameObject>(flameEffectPrefab, childLocator.FindChild(muzzleString)).transform;
				Fire(muzzleString);
			}
			if (hasBegunFlamethrower)
			{
				flamethrowerStopwatch += Time.fixedDeltaTime;
				float num = baseTickFrequency / base.attackSpeedStat;
				if (flamethrowerStopwatch > num)
				{
					flamethrowerStopwatch -= num;
					Fire(muzzleString);
				}
			}
			if (stopwatch >= baseDuration && !((EntityState)this).inputBank.skill1.down && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			((EntityState)this).characterBody.AddTimedBuffAuthority(SS2Content.Buffs.bdPyroPressure.buffIndex, pressureDuration);
			if (Object.op_Implicit((Object)(object)flamethrowerTransform))
			{
				EntityState.Destroy((Object)(object)((Component)flamethrowerTransform).gameObject);
			}
		}

		private void Fire(string muzzleString)
		{
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references