Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Starstorm2 v0.6.38
plugins/Starstorm2.dll
Decompiled a month 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.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.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); } } [RequireComponent(typeof(ProjectileController))] public class PyroTornadoController : NetworkBehaviour { private List<CharacterBody> processedVictims = new List<CharacterBody>(); private ProjectileDamage projectileDamage; private ProjectileController projectileController; public Transform rangeIndicator; public GameObject delayBlastPrefab; [Header("Effect Prefabs")] public GameObject impactEffectPrefab; public GameObject indicatorExplosionEffectPrefab; public static float damageCoefficient; public static float force; public static float baseRadius; public static float maxRadiusPerIgnite; public static float minRadiusPerIgnite; public static int maxIgniteHits; public static float diffForMaxGrowthSpeed; public static float maxGrowthSpeed; public static float minGrowthSpeed; public static float decayDuration; public static float decayDurationPerIgnite; public static float searchInterval; public static float delayBlastDamageCoefficient; public static float delayBlastForce; public static float delayBlastRadius; public static float delayBlastVictimRadiusCoefficient; public static float delayBlastProcCoefficient; public static float delayBlastTimer; private float targetRadius; private float currentRadius; private int igniteHits; private AnimateShaderAlpha[] animateShaderAlphas; private SphereSearch sphereSearch; private HurtBox[] hits; private float stopwatch; private float lifetimeStopwatch; private static int kRpcRpcOnIgnitedEnemyHit; public void Start() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) hits = (HurtBox[])(object)new HurtBox[100]; targetRadius = baseRadius; projectileController = ((Component)this).GetComponent<ProjectileController>(); projectileDamage = ((Component)this).GetComponent<ProjectileDamage>(); if (NetworkServer.active) { sphereSearch = new SphereSearch(); } if (!Object.op_Implicit((Object)(object)rangeIndicator)) { return; } animateShaderAlphas = ((Component)rangeIndicator).GetComponentsInChildren<AnimateShaderAlpha>(); if (animateShaderAlphas != null) { for (int i = 0; i < animateShaderAlphas.Length; i++) { animateShaderAlphas[i].timeMax = decayDuration; } } rangeIndicator.localScale = Vector3.zero; } private void FixedUpdate() { CalculateRadius(Time.fixedDeltaTime); if (NetworkServer.active) { stopwatch -= Time.fixedDeltaTime; if (stopwatch <= 0f) { stopwatch += searchInterval; SearchForTargets(); } lifetimeStopwatch += Time.fixedDeltaTime; if (lifetimeStopwatch >= decayDuration) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private void CalculateRadius(float deltaTime) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) float num = targetRadius - currentRadius; float num2 = num / diffForMaxGrowthSpeed; float num3 = Mathf.Lerp(minGrowthSpeed, maxGrowthSpeed, num2) * deltaTime; num3 = Mathf.Min(num3, num); currentRadius += num3; if (Object.op_Implicit((Object)(object)rangeIndicator)) { rangeIndicator.localScale = Vector3.one * currentRadius; } } private void SearchForTargets() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)1; sphereSearch.origin = ((Component)this).transform.position; sphereSearch.radius = currentRadius; TeamMask unprotectedTeams = TeamMask.GetUnprotectedTeams(projectileController.teamFilter.teamIndex); hits = sphereSearch.RefreshCandidates().FilterCandidatesByHurtBoxTeam(unprotectedTeams).OrderCandidatesByDistance() .GetHurtBoxes(); for (int i = 0; i < hits.Length; i++) { TryProcessVictim(hits[i]); } } public void TryProcessVictim(HurtBox victim) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && (Object)(object)victim != (Object)null && (Object)(object)victim.healthComponent != (Object)null && !processedVictims.Contains(victim.healthComponent.body)) { CharacterBody body = victim.healthComponent.body; processedVictims.Add(body); PerformDamageServer(victim); if (Object.op_Implicit((Object)(object)impactEffectPrefab)) { EffectManager.SimpleEffect(impactEffectPrefab, ((Component)victim).transform.position, Quaternion.identity, true); } } } private void PerformDamageServer(HurtBox hurtBox) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00a9: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0164: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hurtBox) || !Object.op_Implicit((Object)(object)hurtBox.healthComponent)) { return; } HealthComponent healthComponent = hurtBox.healthComponent; DamageInfo val = new DamageInfo(); val.attacker = projectileController.owner; val.procChainMask = projectileController.procChainMask; val.procCoefficient = projectileController.procCoefficient; val.inflictor = ((Component)this).gameObject; val.damage = projectileDamage.damage * damageCoefficient; val.crit = projectileDamage.crit; Vector3 val2 = ((Component)hurtBox).transform.position - ((Component)this).transform.position; val.force = ((Vector3)(ref val2)).normalized * force; val.damageType = projectileDamage.damageType; val.damageColorIndex = projectileDamage.damageColorIndex; val.position = ((Component)hurtBox).transform.position; val.canRejectForce = true; val.inflictedHurtbox = hurtBox; healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject); if (!val.rejected) { CharacterBody body = healthComponent.body; if (body.GetBurnCountPyro() > 0) { CallRpcOnIgnitedEnemyHit(((Component)hurtBox).transform.position); Vector3 corePosition = body.corePosition; GameObject obj = Object.Instantiate<GameObject>(delayBlastPrefab, corePosition, Quaternion.identity); DelayBlast component = obj.GetComponent<DelayBlast>(); component.position = corePosition; component.baseDamage = projectileDamage.damage * delayBlastDamageCoefficient; component.procCoefficient = projectileController.procCoefficient * delayBlastProcCoefficient; component.procChainMask = projectileController.procChainMask; component.baseForce = delayBlastForce; component.radius = delayBlastRadius + body.radius * delayBlastVictimRadiusCoefficient; component.attacker = projectileController.owner; component.inflictor = ((Component)this).gameObject; component.crit = projectileDamage.crit; component.maxTimer = delayBlastTimer; component.damageColorIndex = projectileDamage.damageColorIndex; component.falloffModel = (FalloffModel)1; obj.GetComponent<TeamFilter>().teamIndex = projectileController.teamFilter.teamIndex; NetworkServer.Spawn(((Component)this).gameObject); } } } [ClientRpc] public void RpcOnIgnitedEnemyHit(Vector3 hitPosition) { //IL_009c: 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_00a8: 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_00c6: Unknown result type (might be due to invalid IL or missing references) float num = (float)igniteHits / (float)maxIgniteHits; float num2 = Mathf.Lerp(maxRadiusPerIgnite, minRadiusPerIgnite, num); targetRadius += num2; igniteHits++; lifetimeStopwatch -= decayDurationPerIgnite; if (animateShaderAlphas != null) { for (int i = 0; i < animateShaderAlphas.Length; i++) { AnimateShaderAlpha obj = animateShaderAlphas[i]; obj.time -= decayDurationPerIgnite; } } if (Object.op_Implicit((Object)(object)rangeIndicator) && Object.op_Implicit((Object)(object)indicatorExplosionEffectPrefab)) { Vector3 val = hitPosition - ((Component)this).transform.position; Object.Instantiate<GameObject>(indicatorExplosionEffectPrefab, rangeIndicator).transform.forward = ((Vector3)(ref val)).normalized; } } static PyroTornadoController() { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown damageCoefficient = 8f; force = 300f; baseRadius = 10f; maxRadiusPerIgnite = 4f; minRadiusPerIgnite = 1f; maxIgniteHits = 4; diffForMaxGrowthSpeed = 9f; maxGrowthSpeed = 64f; minGrowthSpeed = 1f; decayDuration = 1.2f; decayDurationPerIgnite = 0.25f; searchInterval = 0.125f; delayBlastDamageCoefficient = 4f; delayBlastForce = 1000f; delayBlastRadius = 11f; delayBlastVictimRadiusCoefficient = 1f; delayBlastProcCoefficient = 1f; delayBlastTimer = 1f; kRpcRpcOnIgnitedEnemyHit = 1640872933; NetworkBehaviour.RegisterRpcDelegate(typeof(PyroTornadoController), kRpcRpcOnIgnitedEnemyHit, new CmdDelegate(InvokeRpcRpcOnIgnitedEnemyHit)); NetworkCRC.RegisterBehaviour("PyroTornadoController", 0); } private void UNetVersion() { } protected static void InvokeRpcRpcOnIgnitedEnemyHit(NetworkBehaviour obj, NetworkReader reader) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcOnIgnitedEnemyHit called on server."); } else { ((PyroTornadoController)(object)obj).RpcOnIgnitedEnemyHit(reader.ReadVector3()); } } public void CallRpcOnIgnitedEnemyHit(Vector3 hitPosition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcOnIgnitedEnemyHit called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcOnIgnitedEnemyHit); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.Write(hitPosition); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcOnIgnitedEnemyHit"); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } public override void PreStartClient() { } } 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_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).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 overr