Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of Starstorm2 v0.6.27
plugins/Starstorm2.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
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.Engi.EngiMissilePainter; using EntityStates.Events; using EntityStates.GameplayEvents; using EntityStates.Generic; using EntityStates.GlobalSkills.LunarNeedle; using EntityStates.GolemMonster; using EntityStates.GravekeeperBoss; using EntityStates.Huntress; using EntityStates.ImpBossMonster; using EntityStates.JellyfishMonster; using EntityStates.Knight; using EntityStates.LemurianMonster; using EntityStates.LunarGolem; using EntityStates.LunarTable; using EntityStates.LunarWisp; using EntityStates.Merc; using EntityStates.Mimic; using EntityStates.NemMerc; using EntityStates.NullifierMonster; using EntityStates.Railgunner.Reload; using EntityStates.ScavBackpack; using EntityStates.Scrapper; using EntityStates.TitanMonster; using EntityStates.Toolbot; using EntityStates.Trader.Bag; using EntityStates.VoidCamp; using EntityStates.VoidSurvivor.CorruptMode; using Grumpy; using HG; using HG.BlendableTypes; using HG.Reflection; using IL.EntityStates; using IL.RoR2; using IL.RoR2.Orbs; using IL.RoR2.UI; using JetBrains.Annotations; using KinematicCharacterController; using MSU; using MSU.Config; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.EntityStates; using On.EntityStates.Drone; using On.EntityStates.JellyfishMonster; using On.EntityStates.ScavBackpack; using On.EntityStates.Toolbot; using On.EntityStates.VoidCamp; using On.EntityStates.VoidSurvivor.CorruptMode; using On.RoR2; using On.RoR2.CameraModes; 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.CameraModes; 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.Stats; using RoR2.UI; using RoR2.UI.MainMenu; using SS2; using SS2.Components; using SS2.Equipments; using SS2.Interactables; using SS2.Items; using SS2.Jobs; using SS2.Monsters; using SS2.Orbs; using SS2.ScriptableObjects; using SS2.Stats; using SS2.Survivors; using SS2.UI; using TMPro; using ThreeEyedGames; using Unity; using Unity.Burst; using Unity.Collections; using Unity.Jobs; using Unity.Mathematics; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Jobs; 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] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } } 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 Stumble : MonoBehaviour { private void Start() { } private void Update() { } } 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.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.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)8; } } public class FearedState : BaseState { private static float turnSpeed = 360f; private static string enterSoundString = "Play_voidman_R_pop"; [SerializeField] public GameObject effectPrefab; public float duration; public GameObject target; private GameObject effectInstance; private float cachedTurnSpeed; private Vector3 lastKnownTargetPosition; private Collider bodyCollider; public override void OnEnter() { //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) ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { cachedTurnSpeed = ((EntityState)this).characterDirection.turnSpeed; ((EntityState)this).characterDirection.turnSpeed = turnSpeed; } bodyCollider = ((EntityState)this).GetComponent<Collider>(); if (Object.op_Implicit((Object)(object)effectPrefab)) { effectInstance = Object.Instantiate<GameObject>(effectPrefab, ((EntityState)this).characterBody.coreTransform.position, Quaternion.identity); } Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } private void PlayStunAnimation() { Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.CrossFadeInFixedTime((Random.Range(0, 2) == 0) ? "Hurt1" : "Hurt2", 0.1f); modelAnimator.Update(0f); } } public override void FixedUpdate() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if ((Object)(object)target != (Object)null) { lastKnownTargetPosition = target.transform.position; } Vector3 val = ((EntityState)this).transform.position - lastKnownTargetPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = normalized; } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.moveVector = normalized * base.moveSpeedStat; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void Update() { //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) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)effectInstance)) { Vector3 position = ((EntityState)this).transform.position; if (Object.op_Implicit((Object)(object)bodyCollider)) { Bounds bounds = bodyCollider.bounds; Vector3 center = ((Bounds)(ref bounds)).center; bounds = bodyCollider.bounds; position = center + new Vector3(0f, ((Bounds)(ref bounds)).extents.y, 0f); } effectInstance.transform.position = position; } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.turnSpeed = cachedTurnSpeed; } } } public class FearedStateRed : BaseState { } } 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.Warden { public abstract class BaseWardenMeleeAttack : BaseSkillState, IStepSetter { public int swingIndex; protected string hitboxGroupName = "SwordHitbox"; public DamageType damageType; public float damageCoefficient = 3.5f; protected float procCoefficient = 1f; protected float pushForce = 300f; protected Vector3 bonusForce = Vector3.zero; public float baseDuration = 1f; protected float attackStartPercentTime = 0.2f; protected float attackEndPercentTime = 0.4f; protected float earlyExitPercentTime = 0.4f; protected float hitStopDuration = 0.012f; protected float attackRecoil = 0.75f; protected float hitHopVelocity = 4f; protected string swingSoundString = ""; protected string hitSoundString = ""; protected string muzzleString = "SwingCenter"; protected string playbackRateParam = "Slash.playbackRate"; protected GameObject swingEffectPrefab; protected GameObject hitEffectPrefab; protected NetworkSoundEventIndex impactSound = (NetworkSoundEventIndex)(-1); public bool addModdedDamageType; public ModdedDamageType moddedDamageType; public float duration; private bool hasFired; private float hitPauseTimer; public OverlapAttack attack; protected bool inHitPause; private bool hasHopped; protected float stopwatch; protected Animator animator; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; private WardenChargeMeter chargeMeter; private float chargeMeterGain = 25f; public override void OnEnter() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); chargeMeter = ((Component)((EntityState)this).characterBody).GetComponent<WardenChargeMeter>(); duration = baseDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); PlayAttackAnimation(); attack = new OverlapAttack(); attack.damageType = DamageTypeCombo.op_Implicit(damageType); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = ((BaseState)this).FindHitBoxGroup(hitboxGroupName); attack.isCrit = ((BaseState)this).RollCrit(); attack.impactSound = impactSound; if (addModdedDamageType) { DamageAPI.AddModdedDamageType(attack, moddedDamageType); } } public virtual void PlayAttackAnimation() { } public override void OnExit() { if (inHitPause) { RemoveHitstop(); } ((EntityState)this).OnExit(); } protected virtual void PlaySwingEffect() { EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } protected virtual void OnHitEnemyAuthority() { Util.PlaySound(hitSoundString, ((EntityState)this).gameObject); if (!hasHopped) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity); } hasHopped = true; } ApplyHitstop(); } protected void ApplyHitstop() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!inHitPause && hitStopDuration > 0f) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, playbackRateParam); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } private void FireAttack() { if (!((EntityState)this).isAuthority) { return; } List<HurtBox> list = new List<HurtBox>(); if (!attack.Fire(list)) { return; } Debug.Log((object)("DEBUGGER hitResults.Count: " + list.Count)); if (Object.op_Implicit((Object)(object)chargeMeter)) { Debug.Log((object)"We hit them mfers"); chargeMeter.AddCharge((float)list.Count * chargeMeterGain); } foreach (HurtBox item in list) { if ((Object)(object)((Component)item).gameObject == (Object)(object)SS2.Survivors.Warden.wardenProjectile) { Debug.Log((object)"We hit a WARD!!"); } } OnHitEnemyAuthority(); } private void EnterAttack() { hasFired = true; Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); PlaySwingEffect(); if (((EntityState)this).isAuthority) { ((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil); } } public override void FixedUpdate() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { RemoveHitstop(); } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat(playbackRateParam, 0f); } } bool flag = stopwatch >= duration * attackStartPercentTime; bool flag2 = stopwatch >= duration * attackEndPercentTime; if ((flag && !flag2) || (flag && flag2 && !hasFired)) { if (!hasFired) { EnterAttack(); } FireAttack(); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void RemoveHitstop() { //IL_0002: 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) ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } public override InterruptPriority GetMinimumInterruptPriority() { if (!(stopwatch >= duration * earlyExitPercentTime)) { return (InterruptPriority)1; } return (InterruptPriority)0; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(swingIndex); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); swingIndex = reader.ReadInt32(); } public void SetStep(int i) { swingIndex = i; } } public class BatteringBatons : BaseWardenMeleeAttack { public static float swingTimeCoefficient; public static GameObject beamProjectile; public static float baseDurationBeforeInterruptable; public static float comboFinisherBaseDurationBeforeInterruptable; public static float comboFinisherhitPauseDuration; public static float comboFinisherDamageCoefficient; public new float baseDuration = 1f; public new float duration = 1f; private string animationStateName = "SwingSword0"; private bool isComboFinisher => swingIndex == 2; private void SetupHitbox() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) switch (swingIndex) { case 0: animationStateName = "SwingSword0"; muzzleString = "SwingRight"; hitboxGroupName = "SwordHitbox"; break; case 1: animationStateName = "SwingSword1"; muzzleString = "SwingLeft"; hitboxGroupName = "SwordHitbox"; break; default: animationStateName = "SwingSword0"; muzzleString = "SwingLeft"; hitboxGroupName = "SwordHitbox"; break; } damageType = (DamageType)0; procCoefficient = 0.7f; bonusForce = Vector3.zero; baseDuration = 1f; attackStartPercentTime = 0.25f; attackEndPercentTime = 0.7f; earlyExitPercentTime = 0.8f; swingSoundString = "NemmandoSwing"; hitSoundString = ""; playbackRateParam = "Primary.Hitbox"; hitEffectPrefab = SS2.Survivors.Knight.KnightHitEffect; } public override void OnEnter() { if (((EntityState)this).isAuthority) { SetupHitbox(); base.OnEnter(); } } public override void PlayAttackAnimation() { } public override void FixedUpdate() { base.FixedUpdate(); } public override void OnExit() { base.OnExit(); } } public class MagneticToss : BaseSkillState { private static GameObject projectilePrefab = SS2.Survivors.Warden.wardenProjectile; public string soundString; public GameObject muzzleEffectPrefab; public string muzzleName; public static float bloom = 1f; public static float recoilAmplitude = 1f; public static float fireTime = 0.5f; public static float baseDuration = 0.5f; public static float damageCoefficient = 2f; public static float force = 100f; public static float projectileHSpeed = 140f; private bool hasFired; public float duration; public static float autoAimRadius = 2.5f; public static float autoAimDistance = 50f; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); Util.PlaySound("Play_nemmerc_secondary_lunge", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= duration * fireTime) { hasFired = true; Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } if (!((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 1f); } } private void Fire() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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) //IL_01d0: 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_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_00e8: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014d: 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_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) Util.PlaySound("Play_nemmerc_knife_throw", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleName, true); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).direction; float speedOverride = -1f; RaycastHit val2 = default(RaycastHit); if (Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, autoAimRadius, ref val2, autoAimDistance, ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, (QueryTriggerInteraction)0)) { Vector3 val3 = ((RaycastHit)(ref val2)).point; HurtBox component = ((Component)((RaycastHit)(ref val2)).collider).GetComponent<HurtBox>(); if (Object.op_Implicit((Object)(object)component)) { val3 = ((Component)component).transform.position; } Vector3 val4 = val3 - ((Ray)(ref aimRay)).origin; Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor(val4.x, val4.z); float num = Trajectory.CalculateInitialYSpeed(((Vector2)(ref val5)).magnitude / projectileHSpeed, val4.y); Vector3 val6 = default(Vector3); ((Vector3)(ref val6))..ctor(((Vector2)(ref val5)).normalized.x * projectileHSpeed, num, ((Vector2)(ref val5)).normalized.y * projectileHSpeed); speedOverride = ((Vector3)(ref val6)).magnitude; val = ((Vector3)(ref val6)).normalized; } if (((EntityState)this).isAuthority) { FireProjectileInfo val7 = default(FireProjectileInfo); val7.projectilePrefab = projectilePrefab; val7.position = ((Ray)(ref aimRay)).origin; val7.rotation = Util.QuaternionSafeLookRotation(val); val7.owner = ((EntityState)this).gameObject; val7.damage = ((BaseState)this).damageStat * damageCoefficient; val7.force = force; val7.crit = ((BaseState)this).RollCrit(); ((FireProjectileInfo)(ref val7)).speedOverride = speedOverride; ProjectileManager.instance.FireProjectile(val7); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class PowerVault : BaseState { private float duration = 0.2f; public static float upwardVelocity; public static float forwardVelocity; public static float minimumY; public static float aimVelocity; public static float airControl; public static float hoverVelocity; public static float hoverAcceleration; private float previousAirControl; private bool endNextFrame; private float jetpackStopwatch = 0.1f; private float jetpackHeat = 1f; private float jetpackTimer; private WardenChargeMeter pc; private bool hasJumped; private bool jets; public override void OnEnter() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_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_0104: 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_0126: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); previousAirControl = ((EntityState)this).characterMotor.airControl; pc = ((Component)((EntityState)this).characterBody).GetComponent<WardenChargeMeter>(); Vector3 normalized = ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).normalized; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; float num = upwardVelocity; float num2 = forwardVelocity; if (((EntityState)this).characterMotor.isGrounded) { normalized.y = 30f; num *= 0.75f; num2 *= 1.25f; } else { normalized.y = 70f; num2 *= 0.75f; num *= 1.25f; } normalized.y = Mathf.Max(normalized.y, minimumY); Vector3 val = ((Vector3)(ref normalized)).normalized * aimVelocity * base.moveSpeedStat; Vector3 val2 = Vector3.up * num; Vector3 val3 = new Vector3(normalized.x, 0f, normalized.z); Vector3 val4 = ((Vector3)(ref val3)).normalized * num2; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = val + val2 + val4; } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnMovementHit); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); Jump(); Jets(); } private void OnMovementHit(ref MovementHitInfo movementHitInfo) { endNextFrame = true; } public void Jump() { //IL_0024: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; if (((EntityState)this).fixedAge >= duration && (endNextFrame || (((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround))) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).outer.SetNextStateToMain(); } } } public void Jets() { //IL_0085: 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) if (!((EntityState)this).inputBank.skill3.down || !(pc.charge > jetpackHeat)) { return; } if (((EntityState)this).isAuthority) { float y = ((EntityState)this).characterMotor.velocity.y; y = Mathf.MoveTowards(y, hoverVelocity, hoverAcceleration * Time.fixedDeltaTime); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, y, ((EntityState)this).characterMotor.velocity.z); jetpackTimer += Time.fixedDeltaTime; if (jetpackTimer >= jetpackStopwatch) { jetpackTimer -= jetpackStopwatch; if ((Object)(object)pc != (Object)null) { pc.AddCharge(-1f * jetpackHeat); } } } if (!jets) { jets = true; ((EntityState)this).characterMotor.airControl = previousAirControl; } } public override void OnExit() { //IL_0047: 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_001f: Expected O, but got Unknown if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnMovementHit); } ((EntityState)this).characterMotor.airControl = previousAirControl; ((EntityState)this).characterBody.isSprinting = false; ((EntityState)this).characterBody.SetBuffCount(SS2Content.Buffs.bdPyroJet.buffIndex, 0); ((EntityState)this).OnExit(); } } public class VolticSurge : BaseSkillState { public static float duration = 7f; private GameObject wardInstance; private static float projectileEraserRadius = 20f; private static float minimumFireFrequency = 10f; private static float baseRechargeFrequency = 2f; private float rechargeTimer; private float rechargeFrequency => baseRechargeFrequency * (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) ? ((EntityState)this).characterBody.attackSpeed : 1f); private float fireFrequency => Mathf.Max(minimumFireFrequency, rechargeFrequency); private float timeBetweenFiring => 1f / fireFrequency; private bool isReadyToFire => rechargeTimer <= 0f; public override void OnEnter() { //IL_0013: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_0055: 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; wardInstance = Object.Instantiate<GameObject>(SS2.Survivors.Warden.wardenSurgeWard, val, Quaternion.identity); wardInstance.GetComponent<TeamFilter>().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; wardInstance.GetComponent<NetworkedBodyAttachment>().AttachToGameObjectAndSpawn(((Component)((EntityState)this).characterBody).gameObject, (string)null); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active) { rechargeTimer -= ((EntityState)this).GetDeltaTime(); if (((EntityState)this).fixedAge > timeBetweenFiring) { ((EntityState)this).fixedAge = ((EntityState)this).fixedAge - timeBetweenFiring; if (isReadyToFire && DeleteNearbyProjectile()) { rechargeTimer = 1f / rechargeFrequency; } } } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); Debug.Log((object)"Exiting voltic surge"); } private bool DeleteNearbyProjectile() { //IL_001a: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) ? ((EntityState)this).characterBody.corePosition : Vector3.zero); TeamIndex val2 = (TeamIndex)((!Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) ? (-1) : ((int)((EntityState)this).characterBody.teamComponent.teamIndex)); float num = projectileEraserRadius * projectileEraserRadius; bool result = false; List<ProjectileController> instancesList = InstanceTracker.GetInstancesList<ProjectileController>(); List<ProjectileController> list = new List<ProjectileController>(); int i = 0; for (int count = instancesList.Count; i < count; i++) { ProjectileController val3 = instancesList[i]; if (!val3.cannotBeDeleted && val3.teamFilter.teamIndex != val2) { Vector3 val4 = ((Component)val3).transform.position - val; if (((Vector3)(ref val4)).sqrMagnitude < num) { list.Add(val3); } } } int j = 0; for (int count2 = list.Count; j < count2; j++) { ProjectileController val5 = list[j]; if (Object.op_Implicit((Object)(object)val5)) { result = true; _ = ((Component)val5).transform.position; EntityState.Destroy((Object)(object)((Component)val5).gameObject); } } return result; } } } 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>(); if (NetworkServer.active) { 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; private static float dropDuration = 1f; private static float dropInterval = 0.33f; private float stopwatch; protected override bool enableInteraction => false; public override void OnEnter() { base.OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); _ = NetworkServer.active; } public override void OnExit() { Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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) ((EntityState)this).FixedUpdate(); stopwatch -= Time.fixedDeltaTime; if (stopwatch <= 0f && ((EntityState)this).fixedAge < dropDuration) { stopwatch += dropInterval; if (traderController.pendingRewards.Count > 0) { TraderController.Reward reward = traderController.pendingRewards.Dequeue(); if (reward.drop != PickupIndex.none) { Transform val = ((BaseState)this).FindModelChild(muzzleString); Vector3 forward = val.forward; if (Object.op_Implicit((Object)(object)reward.target)) { Vector3.RotateTowards(forward, reward.target.transform.position, 60f, 0.33f); } forward.y = 0f; PickupDropletController.CreatePickupDroplet(reward.drop, val.position, Vector3.up * dropUpVelocityStrength + forward * dropForwardVelocityStrength); } } } if (((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.Toolbot { public class ArcThrower : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } internal class Blowtorch : BaseSkillState { public float baseDuration = 0.5f; private float duration; public static float baseTickFrequency; public static float baseEntryDuration; public static float pressureDuration; private float stopwatch; private float flamethrowerStopwatch; 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 void Fire(string muzzleString) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_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) ((EntityState)this).characterBody.SetAimTimer(duration * 2f); Ray aimRay = ((BaseState)this).GetAimRay(); 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, damage = tickDamageCoefficient * ((BaseState)this).damageStat, force = force, muzzleName = muzzleString, hitEffectPrefab = impactEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = radius, falloffModel = (FalloffModel)0, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, procCoefficient = tickProcCoefficient, maxDistance = maxDistance, smartCollision = true }.Fire(); } } public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= entryDuration && !hasBegunFlamethrower) { hasBegunFlamethrower = true; Fire(muzzleString); } if (hasBegunFlamethrower) { flamethrowerStopwatch += Time.fixedDeltaTime; float num = baseTickFrequency / ((BaseState)this).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() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class GlueGun : BaseSkillState { public GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/MuzzleflashCroco.prefab").WaitForCompletion(); [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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_0174: 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); ((EntityState)this).PlayAnimation("Gesture, Mouth", "FireSpit", "FireSpit.playbackRate", duration, 0f); Util.PlaySound(attackString, ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); string text = "MouthMuzzle"; if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)0); 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.FireProjectil